From 5245d06c05a248770634aa484e7f6db7d1248e7e Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Fri, 31 Jan 2025 10:02:12 +0100 Subject: [PATCH] Remove serverless client (#8451) --- Elasticsearch.sln | 7 - Packages.Serverless.slnf | 8 - .../ElasticsearchClientProductRegistration.cs | 96 - ...ic.Clients.Elasticsearch.Serverless.csproj | 43 - .../_Generated/Api/ApiUrlLookup.g.cs | 323 - .../AsyncSearch/AsyncSearchStatusRequest.g.cs | 151 - .../AsyncSearchStatusResponse.g.cs | 102 - .../AsyncSearch/DeleteAsyncSearchRequest.g.cs | 134 - .../DeleteAsyncSearchResponse.g.cs | 38 - .../AsyncSearch/GetAsyncSearchRequest.g.cs | 195 - .../AsyncSearch/GetAsyncSearchResponse.g.cs | 77 - .../AsyncSearch/SubmitAsyncSearchRequest.g.cs | 3366 --------- .../SubmitAsyncSearchResponse.g.cs | 77 - .../_Generated/Api/BulkRequest.g.cs | 337 - .../_Generated/Api/BulkResponse.g.cs | 37 - .../_Generated/Api/ClearScrollRequest.g.cs | 114 - .../_Generated/Api/ClearScrollResponse.g.cs | 35 - .../Api/ClosePointInTimeRequest.g.cs | 114 - .../Api/ClosePointInTimeResponse.g.cs | 35 - .../Api/Cluster/AllocationExplainRequest.g.cs | 224 - .../Cluster/AllocationExplainResponse.g.cs | 81 - .../Api/Cluster/ClusterInfoRequest.g.cs | 89 - .../Api/Cluster/ClusterInfoResponse.g.cs | 41 - .../Api/Cluster/ClusterStatsRequest.g.cs | 133 - .../Api/Cluster/ClusterStatsResponse.g.cs | 86 - .../DeleteComponentTemplateRequest.g.cs | 127 - .../DeleteComponentTemplateResponse.g.cs | 38 - .../ExistsComponentTemplateRequest.g.cs | 127 - .../ExistsComponentTemplateResponse.g.cs | 31 - .../Cluster/GetClusterSettingsRequest.g.cs | 147 - .../Cluster/GetClusterSettingsResponse.g.cs | 37 - .../Cluster/GetComponentTemplateRequest.g.cs | 165 - .../Cluster/GetComponentTemplateResponse.g.cs | 33 - .../_Generated/Api/Cluster/HealthRequest.g.cs | 352 - .../Api/Cluster/HealthResponse.g.cs | 163 - .../Api/Cluster/PendingTasksRequest.g.cs | 125 - .../Api/Cluster/PendingTasksResponse.g.cs | 33 - .../Cluster/PutComponentTemplateRequest.g.cs | 473 -- .../Cluster/PutComponentTemplateResponse.g.cs | 38 - .../_Generated/Api/CountRequest.g.cs | 503 -- .../_Generated/Api/CountResponse.g.cs | 35 - .../_Generated/Api/CreateRequest.g.cs | 244 - .../_Generated/Api/CreateResponse.g.cs | 47 - .../_Generated/Api/DeleteByQueryRequest.g.cs | 891 --- .../_Generated/Api/DeleteByQueryResponse.g.cs | 63 - .../Api/DeleteByQueryRethrottleRequest.g.cs | 111 - .../Api/DeleteByQueryRethrottleResponse.g.cs | 52 - .../_Generated/Api/DeleteRequest.g.cs | 293 - .../_Generated/Api/DeleteResponse.g.cs | 47 - .../_Generated/Api/DeleteScriptRequest.g.cs | 161 - .../_Generated/Api/DeleteScriptResponse.g.cs | 38 - .../Api/Enrich/DeletePolicyRequest.g.cs | 89 - .../Api/Enrich/DeletePolicyResponse.g.cs | 38 - .../Api/Enrich/EnrichStatsRequest.g.cs | 79 - .../Api/Enrich/EnrichStatsResponse.g.cs | 54 - .../Api/Enrich/ExecutePolicyRequest.g.cs | 105 - .../Api/Enrich/ExecutePolicyResponse.g.cs | 35 - .../Api/Enrich/GetPolicyRequest.g.cs | 97 - .../Api/Enrich/GetPolicyResponse.g.cs | 33 - .../Api/Enrich/PutPolicyRequest.g.cs | 440 -- .../Api/Enrich/PutPolicyResponse.g.cs | 38 - .../_Generated/Api/Eql/EqlDeleteRequest.g.cs | 125 - .../_Generated/Api/Eql/EqlDeleteResponse.g.cs | 38 - .../_Generated/Api/Eql/EqlGetRequest.g.cs | 161 - .../_Generated/Api/Eql/EqlGetResponse.g.cs | 86 - .../_Generated/Api/Eql/EqlSearchRequest.g.cs | 1141 --- .../_Generated/Api/Eql/EqlSearchResponse.g.cs | 86 - .../Api/Eql/GetEqlStatusRequest.g.cs | 122 - .../Api/Eql/GetEqlStatusResponse.g.cs | 78 - .../_Generated/Api/Esql/EsqlQueryRequest.g.cs | 475 -- .../Api/Esql/EsqlQueryResponse.g.cs | 31 - .../_Generated/Api/ExistsRequest.g.cs | 329 - .../_Generated/Api/ExistsResponse.g.cs | 31 - .../_Generated/Api/ExistsSourceRequest.g.cs | 308 - .../_Generated/Api/ExistsSourceResponse.g.cs | 31 - .../_Generated/Api/ExplainRequest.g.cs | 469 -- .../_Generated/Api/ExplainResponse.g.cs | 41 - .../_Generated/Api/FieldCapsRequest.g.cs | 481 -- .../_Generated/Api/FieldCapsResponse.g.cs | 37 - .../_Generated/Api/GetRequest.g.cs | 325 - .../_Generated/Api/GetResponse.g.cs | 52 - .../_Generated/Api/GetScriptRequest.g.cs | 140 - .../_Generated/Api/GetScriptResponse.g.cs | 37 - .../_Generated/Api/GetSourceRequest.g.cs | 309 - .../_Generated/Api/GetSourceResponse.g.cs | 31 - .../_Generated/Api/Graph/ExploreRequest.g.cs | 655 -- .../_Generated/Api/Graph/ExploreResponse.g.cs | 41 - .../_Generated/Api/HealthReportRequest.g.cs | 187 - .../_Generated/Api/HealthReportResponse.g.cs | 37 - .../IndexManagement/AnalyzeIndexRequest.g.cs | 601 -- .../IndexManagement/AnalyzeIndexResponse.g.cs | 35 - .../IndexManagement/ClearCacheRequest.g.cs | 267 - .../IndexManagement/ClearCacheResponse.g.cs | 33 - .../IndexManagement/CloseIndexRequest.g.cs | 303 - .../IndexManagement/CloseIndexResponse.g.cs | 38 - .../CreateDataStreamRequest.g.cs | 123 - .../CreateDataStreamResponse.g.cs | 38 - .../IndexManagement/CreateIndexRequest.g.cs | 493 -- .../IndexManagement/CreateIndexResponse.g.cs | 37 - .../DataStreamsStatsRequest.g.cs | 115 - .../DataStreamsStatsResponse.g.cs | 79 - .../IndexManagement/DeleteAliasRequest.g.cs | 177 - .../IndexManagement/DeleteAliasResponse.g.cs | 38 - .../DeleteDataLifecycleRequest.g.cs | 137 - .../DeleteDataLifecycleResponse.g.cs | 38 - .../DeleteDataStreamRequest.g.cs | 121 - .../DeleteDataStreamResponse.g.cs | 38 - .../IndexManagement/DeleteIndexRequest.g.cs | 224 - .../IndexManagement/DeleteIndexResponse.g.cs | 40 - .../DeleteIndexTemplateRequest.g.cs | 125 - .../DeleteIndexTemplateResponse.g.cs | 38 - .../IndexManagement/ExistsAliasRequest.g.cs | 225 - .../IndexManagement/ExistsAliasResponse.g.cs | 31 - .../ExistsIndexTemplateRequest.g.cs | 105 - .../ExistsIndexTemplateResponse.g.cs | 31 - .../Api/IndexManagement/ExistsRequest.g.cs | 237 - .../Api/IndexManagement/ExistsResponse.g.cs | 31 - .../ExplainDataLifecycleRequest.g.cs | 161 - .../ExplainDataLifecycleResponse.g.cs | 34 - .../Api/IndexManagement/FlushRequest.g.cs | 263 - .../Api/IndexManagement/FlushResponse.g.cs | 33 - .../IndexManagement/ForcemergeRequest.g.cs | 293 - .../IndexManagement/ForcemergeResponse.g.cs | 42 - .../Api/IndexManagement/GetAliasRequest.g.cs | 233 - .../Api/IndexManagement/GetAliasResponse.g.cs | 37 - .../GetDataLifecycleRequest.g.cs | 141 - .../GetDataLifecycleResponse.g.cs | 33 - .../IndexManagement/GetDataStreamRequest.g.cs | 163 - .../GetDataStreamResponse.g.cs | 33 - .../Api/IndexManagement/GetIndexRequest.g.cs | 274 - .../Api/IndexManagement/GetIndexResponse.g.cs | 37 - .../GetIndexTemplateRequest.g.cs | 161 - .../GetIndexTemplateResponse.g.cs | 33 - .../GetIndicesSettingsRequest.g.cs | 295 - .../GetIndicesSettingsResponse.g.cs | 37 - .../IndexManagement/GetMappingRequest.g.cs | 233 - .../IndexManagement/GetMappingResponse.g.cs | 37 - .../IndexManagement/IndicesStatsRequest.g.cs | 348 - .../IndexManagement/IndicesStatsResponse.g.cs | 37 - .../MigrateToDataStreamRequest.g.cs | 139 - .../MigrateToDataStreamResponse.g.cs | 38 - .../ModifyDataStreamRequest.g.cs | 166 - .../ModifyDataStreamResponse.g.cs | 38 - .../Api/IndexManagement/OpenIndexRequest.g.cs | 243 - .../IndexManagement/OpenIndexResponse.g.cs | 35 - .../Api/IndexManagement/PutAliasRequest.g.cs | 487 -- .../Api/IndexManagement/PutAliasResponse.g.cs | 38 - .../PutDataLifecycleRequest.g.cs | 180 - .../PutDataLifecycleResponse.g.cs | 38 - .../PutIndexTemplateRequest.g.cs | 784 -- .../PutIndexTemplateResponse.g.cs | 38 - .../PutIndicesSettingsRequest.g.cs | 330 - .../PutIndicesSettingsResponse.g.cs | 38 - .../IndexManagement/PutMappingRequest.g.cs | 1009 --- .../IndexManagement/PutMappingResponse.g.cs | 40 - .../Api/IndexManagement/RecoveryRequest.g.cs | 313 - .../Api/IndexManagement/RecoveryResponse.g.cs | 37 - .../Api/IndexManagement/RefreshRequest.g.cs | 197 - .../Api/IndexManagement/RefreshResponse.g.cs | 33 - .../IndexManagement/ResolveIndexRequest.g.cs | 149 - .../IndexManagement/ResolveIndexResponse.g.cs | 37 - .../Api/IndexManagement/RolloverRequest.g.cs | 544 -- .../Api/IndexManagement/RolloverResponse.g.cs | 45 - .../Api/IndexManagement/SegmentsRequest.g.cs | 197 - .../Api/IndexManagement/SegmentsResponse.g.cs | 35 - .../SimulateIndexTemplateRequest.g.cs | 121 - .../SimulateIndexTemplateResponse.g.cs | 35 - .../SimulateTemplateRequest.g.cs | 794 -- .../SimulateTemplateResponse.g.cs | 35 - .../IndexManagement/UpdateAliasesRequest.g.cs | 311 - .../UpdateAliasesResponse.g.cs | 38 - .../IndexManagement/ValidateQueryRequest.g.cs | 461 -- .../ValidateQueryResponse.g.cs | 39 - .../_Generated/Api/IndexRequest.g.cs | 322 - .../_Generated/Api/IndexResponse.g.cs | 47 - .../Api/Inference/DeleteInferenceRequest.g.cs | 133 - .../Inference/DeleteInferenceResponse.g.cs | 40 - .../Api/Inference/GetInferenceRequest.g.cs | 105 - .../Api/Inference/GetInferenceResponse.g.cs | 33 - .../Api/Inference/InferenceRequest.g.cs | 199 - .../Api/Inference/InferenceResponse.g.cs | 31 - .../Api/Inference/PutInferenceRequest.g.cs | 152 - .../Api/Inference/PutInferenceResponse.g.cs | 70 - .../_Generated/Api/InfoRequest.g.cs | 79 - .../_Generated/Api/InfoResponse.g.cs | 41 - .../Ingest/DeleteGeoipDatabaseRequest.g.cs | 159 - .../Ingest/DeleteGeoipDatabaseResponse.g.cs | 38 - .../DeleteIpLocationDatabaseRequest.g.cs | 162 - .../DeleteIpLocationDatabaseResponse.g.cs | 38 - .../Api/Ingest/DeletePipelineRequest.g.cs | 161 - .../Api/Ingest/DeletePipelineResponse.g.cs | 38 - .../Api/Ingest/GeoIpStatsRequest.g.cs | 79 - .../Api/Ingest/GeoIpStatsResponse.g.cs | 46 - .../Api/Ingest/GetGeoipDatabaseRequest.g.cs | 154 - .../Api/Ingest/GetGeoipDatabaseResponse.g.cs | 33 - .../Ingest/GetIpLocationDatabaseRequest.g.cs | 153 - .../Ingest/GetIpLocationDatabaseResponse.g.cs | 33 - .../Api/Ingest/GetPipelineRequest.g.cs | 174 - .../Api/Ingest/GetPipelineResponse.g.cs | 37 - .../Api/Ingest/ProcessorGrokRequest.g.cs | 83 - .../Api/Ingest/ProcessorGrokResponse.g.cs | 33 - .../Api/Ingest/PutGeoipDatabaseRequest.g.cs | 308 - .../Api/Ingest/PutGeoipDatabaseResponse.g.cs | 38 - .../Ingest/PutIpLocationDatabaseRequest.g.cs | 221 - .../Ingest/PutIpLocationDatabaseResponse.g.cs | 38 - .../Api/Ingest/PutPipelineRequest.g.cs | 679 -- .../Api/Ingest/PutPipelineResponse.g.cs | 38 - .../Api/Ingest/SimulateRequest.g.cs | 431 -- .../Api/Ingest/SimulateResponse.g.cs | 33 - .../LicenseManagement/GetLicenseRequest.g.cs | 103 - .../LicenseManagement/GetLicenseResponse.g.cs | 33 - ...earTrainedModelDeploymentCacheRequest.g.cs | 95 - ...arTrainedModelDeploymentCacheResponse.g.cs | 33 - .../Api/MachineLearning/CloseJobRequest.g.cs | 176 - .../Api/MachineLearning/CloseJobResponse.g.cs | 33 - .../DeleteCalendarEventRequest.g.cs | 93 - .../DeleteCalendarEventResponse.g.cs | 38 - .../DeleteCalendarJobRequest.g.cs | 93 - .../DeleteCalendarJobResponse.g.cs | 55 - .../DeleteCalendarRequest.g.cs | 89 - .../DeleteCalendarResponse.g.cs | 38 - .../DeleteDataFrameAnalyticsRequest.g.cs | 154 - .../DeleteDataFrameAnalyticsResponse.g.cs | 38 - .../DeleteDatafeedRequest.g.cs | 105 - .../DeleteDatafeedResponse.g.cs | 38 - .../DeleteExpiredDataRequest.g.cs | 168 - .../DeleteExpiredDataResponse.g.cs | 33 - .../MachineLearning/DeleteFilterRequest.g.cs | 91 - .../MachineLearning/DeleteFilterResponse.g.cs | 38 - .../DeleteForecastRequest.g.cs | 151 - .../DeleteForecastResponse.g.cs | 38 - .../Api/MachineLearning/DeleteJobRequest.g.cs | 155 - .../MachineLearning/DeleteJobResponse.g.cs | 38 - .../DeleteModelSnapshotRequest.g.cs | 99 - .../DeleteModelSnapshotResponse.g.cs | 38 - .../DeleteTrainedModelAliasRequest.g.cs | 99 - .../DeleteTrainedModelAliasResponse.g.cs | 38 - .../DeleteTrainedModelRequest.g.cs | 105 - .../DeleteTrainedModelResponse.g.cs | 38 - .../EstimateModelMemoryRequest.g.cs | 343 - .../EstimateModelMemoryResponse.g.cs | 33 - .../EvaluateDataFrameRequest.g.cs | 365 - .../EvaluateDataFrameResponse.g.cs | 37 - .../ExplainDataFrameAnalyticsRequest.g.cs | 825 --- .../ExplainDataFrameAnalyticsResponse.g.cs | 46 - .../Api/MachineLearning/FlushJobRequest.g.cs | 236 - .../Api/MachineLearning/FlushJobResponse.g.cs | 42 - .../Api/MachineLearning/ForecastRequest.g.cs | 180 - .../Api/MachineLearning/ForecastResponse.g.cs | 35 - .../MachineLearning/GetBucketsRequest.g.cs | 627 -- .../MachineLearning/GetBucketsResponse.g.cs | 35 - .../GetCalendarEventsRequest.g.cs | 167 - .../GetCalendarEventsResponse.g.cs | 35 - .../MachineLearning/GetCalendarsRequest.g.cs | 186 - .../MachineLearning/GetCalendarsResponse.g.cs | 35 - .../MachineLearning/GetCategoriesRequest.g.cs | 210 - .../GetCategoriesResponse.g.cs | 35 - .../GetDataFrameAnalyticsRequest.g.cs | 261 - .../GetDataFrameAnalyticsResponse.g.cs | 41 - .../GetDataFrameAnalyticsStatsRequest.g.cs | 248 - .../GetDataFrameAnalyticsStatsResponse.g.cs | 41 - .../GetDatafeedStatsRequest.g.cs | 169 - .../GetDatafeedStatsResponse.g.cs | 35 - .../MachineLearning/GetDatafeedsRequest.g.cs | 187 - .../MachineLearning/GetDatafeedsResponse.g.cs | 35 - .../MachineLearning/GetFiltersRequest.g.cs | 129 - .../MachineLearning/GetFiltersResponse.g.cs | 35 - .../GetInfluencersRequest.g.cs | 390 - .../GetInfluencersResponse.g.cs | 41 - .../MachineLearning/GetJobStatsRequest.g.cs | 157 - .../MachineLearning/GetJobStatsResponse.g.cs | 35 - .../Api/MachineLearning/GetJobsRequest.g.cs | 185 - .../Api/MachineLearning/GetJobsResponse.g.cs | 35 - .../GetMemoryStatsRequest.g.cs | 135 - .../GetMemoryStatsResponse.g.cs | 37 - .../GetModelSnapshotUpgradeStatsRequest.g.cs | 153 - .../GetModelSnapshotUpgradeStatsResponse.g.cs | 35 - .../GetModelSnapshotsRequest.g.cs | 492 -- .../GetModelSnapshotsResponse.g.cs | 35 - .../GetOverallBucketsRequest.g.cs | 312 - .../GetOverallBucketsResponse.g.cs | 41 - .../MachineLearning/GetRecordsRequest.g.cs | 586 -- .../MachineLearning/GetRecordsResponse.g.cs | 35 - .../GetTrainedModelsRequest.g.cs | 261 - .../GetTrainedModelsResponse.g.cs | 41 - .../GetTrainedModelsStatsRequest.g.cs | 189 - .../GetTrainedModelsStatsResponse.g.cs | 46 - .../InferTrainedModelRequest.g.cs | 289 - .../InferTrainedModelResponse.g.cs | 33 - .../Api/MachineLearning/MlInfoRequest.g.cs | 91 - .../Api/MachineLearning/MlInfoResponse.g.cs | 39 - .../Api/MachineLearning/OpenJobRequest.g.cs | 128 - .../Api/MachineLearning/OpenJobResponse.g.cs | 41 - .../PostCalendarEventsRequest.g.cs | 174 - .../PostCalendarEventsResponse.g.cs | 33 - .../PreviewDataFrameAnalyticsRequest.g.cs | 250 - .../PreviewDataFrameAnalyticsResponse.g.cs | 38 - .../PutCalendarJobRequest.g.cs | 93 - .../PutCalendarJobResponse.g.cs | 55 - .../MachineLearning/PutCalendarRequest.g.cs | 142 - .../MachineLearning/PutCalendarResponse.g.cs | 55 - .../PutDataFrameAnalyticsRequest.g.cs | 936 --- .../PutDataFrameAnalyticsResponse.g.cs | 57 - .../MachineLearning/PutDatafeedRequest.g.cs | 1314 ---- .../MachineLearning/PutDatafeedResponse.g.cs | 61 - .../Api/MachineLearning/PutFilterRequest.g.cs | 148 - .../MachineLearning/PutFilterResponse.g.cs | 37 - .../Api/MachineLearning/PutJobRequest.g.cs | 1222 ---- .../Api/MachineLearning/PutJobResponse.g.cs | 71 - .../PutTrainedModelAliasRequest.g.cs | 145 - .../PutTrainedModelAliasResponse.g.cs | 38 - .../PutTrainedModelDefinitionPartRequest.g.cs | 162 - ...PutTrainedModelDefinitionPartResponse.g.cs | 38 - .../PutTrainedModelRequest.g.cs | 935 --- .../PutTrainedModelResponse.g.cs | 161 - .../PutTrainedModelVocabularyRequest.g.cs | 168 - .../PutTrainedModelVocabularyResponse.g.cs | 38 - .../Api/MachineLearning/ResetJobRequest.g.cs | 133 - .../Api/MachineLearning/ResetJobResponse.g.cs | 38 - .../RevertModelSnapshotRequest.g.cs | 136 - .../RevertModelSnapshotResponse.g.cs | 33 - .../SetUpgradeModeRequest.g.cs | 137 - .../SetUpgradeModeResponse.g.cs | 38 - .../StartDataFrameAnalyticsRequest.g.cs | 172 - .../StartDataFrameAnalyticsResponse.g.cs | 45 - .../MachineLearning/StartDatafeedRequest.g.cs | 200 - .../StartDatafeedResponse.g.cs | 48 - .../StartTrainedModelDeploymentRequest.g.cs | 225 - .../StartTrainedModelDeploymentResponse.g.cs | 33 - .../StopDataFrameAnalyticsRequest.g.cs | 227 - .../StopDataFrameAnalyticsResponse.g.cs | 33 - .../MachineLearning/StopDatafeedRequest.g.cs | 172 - .../MachineLearning/StopDatafeedResponse.g.cs | 33 - .../StopTrainedModelDeploymentRequest.g.cs | 127 - .../StopTrainedModelDeploymentResponse.g.cs | 33 - .../UpdateDataFrameAnalyticsRequest.g.cs | 325 - .../UpdateDataFrameAnalyticsResponse.g.cs | 55 - .../UpdateDatafeedRequest.g.cs | 1306 ---- .../UpdateDatafeedResponse.g.cs | 61 - .../MachineLearning/UpdateFilterRequest.g.cs | 170 - .../MachineLearning/UpdateFilterResponse.g.cs | 37 - .../Api/MachineLearning/UpdateJobRequest.g.cs | 1122 --- .../MachineLearning/UpdateJobResponse.g.cs | 73 - .../UpdateModelSnapshotRequest.g.cs | 154 - .../UpdateModelSnapshotResponse.g.cs | 35 - .../UpgradeJobSnapshotRequest.g.cs | 145 - .../UpgradeJobSnapshotResponse.g.cs | 46 - .../ValidateDetectorRequest.g.cs | 163 - .../ValidateDetectorResponse.g.cs | 38 - .../Api/MachineLearning/ValidateRequest.g.cs | 602 -- .../Api/MachineLearning/ValidateResponse.g.cs | 38 - .../_Generated/Api/MultiGetRequest.g.cs | 499 -- .../_Generated/Api/MultiGetResponse.g.cs | 33 - .../_Generated/Api/MultiSearchRequest.g.cs | 475 -- .../_Generated/Api/MultiSearchResponse.g.cs | 35 - .../Api/MultiSearchTemplateRequest.g.cs | 306 - .../Api/MultiSearchTemplateResponse.g.cs | 35 - .../Api/MultiTermVectorsRequest.g.cs | 551 -- .../Api/MultiTermVectorsResponse.g.cs | 33 - .../Api/Nodes/HotThreadsRequest.g.cs | 235 - .../Api/Nodes/HotThreadsResponse.g.cs | 31 - .../Api/Nodes/NodesInfoRequest.g.cs | 159 - .../Api/Nodes/NodesInfoResponse.g.cs | 43 - .../Api/Nodes/NodesStatsRequest.g.cs | 348 - .../Api/Nodes/NodesStatsResponse.g.cs | 43 - .../Api/Nodes/NodesUsageRequest.g.cs | 127 - .../Api/Nodes/NodesUsageResponse.g.cs | 43 - .../Api/OpenPointInTimeRequest.g.cs | 380 - .../Api/OpenPointInTimeResponse.g.cs | 41 - .../_Generated/Api/PingRequest.g.cs | 79 - .../_Generated/Api/PingResponse.g.cs | 31 - .../_Generated/Api/PutScriptRequest.g.cs | 295 - .../_Generated/Api/PutScriptResponse.g.cs | 38 - .../Api/QueryRules/DeleteRuleRequest.g.cs | 95 - .../Api/QueryRules/DeleteRuleResponse.g.cs | 38 - .../Api/QueryRules/DeleteRulesetRequest.g.cs | 87 - .../Api/QueryRules/DeleteRulesetResponse.g.cs | 38 - .../Api/QueryRules/GetRuleRequest.g.cs | 95 - .../Api/QueryRules/GetRuleResponse.g.cs | 42 - .../Api/QueryRules/GetRulesetRequest.g.cs | 89 - .../Api/QueryRules/GetRulesetResponse.g.cs | 46 - .../Api/QueryRules/ListRulesetsRequest.g.cs | 111 - .../Api/QueryRules/ListRulesetsResponse.g.cs | 35 - .../Api/QueryRules/PutRuleRequest.g.cs | 242 - .../Api/QueryRules/PutRuleResponse.g.cs | 33 - .../Api/QueryRules/PutRulesetRequest.g.cs | 163 - .../Api/QueryRules/PutRulesetResponse.g.cs | 33 - .../Api/QueryRules/TestRequest.g.cs | 104 - .../Api/QueryRules/TestResponse.g.cs | 35 - .../_Generated/Api/RankEvalRequest.g.cs | 479 -- .../_Generated/Api/RankEvalResponse.g.cs | 48 - .../_Generated/Api/ReindexRequest.g.cs | 683 -- .../_Generated/Api/ReindexResponse.g.cs | 63 - .../Api/ReindexRethrottleRequest.g.cs | 109 - .../Api/ReindexRethrottleResponse.g.cs | 33 - .../Api/RenderSearchTemplateRequest.g.cs | 278 - .../Api/RenderSearchTemplateResponse.g.cs | 33 - .../_Generated/Api/ScrollRequest.g.cs | 178 - .../_Generated/Api/ScrollResponse.g.cs | 59 - .../_Generated/Api/SearchMvtRequest.g.cs | 1123 --- .../_Generated/Api/SearchMvtResponse.g.cs | 31 - .../_Generated/Api/SearchRequest.g.cs | 3714 ---------- .../_Generated/Api/SearchResponse.g.cs | 59 - .../_Generated/Api/SearchTemplateRequest.g.cs | 574 -- .../Api/SearchTemplateResponse.g.cs | 59 - .../Security/ActivateUserProfileRequest.g.cs | 143 - .../Security/ActivateUserProfileResponse.g.cs | 45 - .../Api/Security/AuthenticateRequest.g.cs | 89 - .../Api/Security/AuthenticateResponse.g.cs | 53 - .../Api/Security/BulkDeleteRoleRequest.g.cs | 126 - .../Api/Security/BulkDeleteRoleResponse.g.cs | 54 - .../Api/Security/BulkPutRoleRequest.g.cs | 175 - .../Api/Security/BulkPutRoleResponse.g.cs | 62 - .../Api/Security/ClearApiKeyCacheRequest.g.cs | 95 - .../Security/ClearApiKeyCacheResponse.g.cs | 37 - .../ClearCachedPrivilegesRequest.g.cs | 95 - .../ClearCachedPrivilegesResponse.g.cs | 37 - .../Security/ClearCachedRealmsRequest.g.cs | 109 - .../Security/ClearCachedRealmsResponse.g.cs | 37 - .../Api/Security/ClearCachedRolesRequest.g.cs | 93 - .../Security/ClearCachedRolesResponse.g.cs | 37 - .../ClearCachedServiceTokensRequest.g.cs | 105 - .../ClearCachedServiceTokensResponse.g.cs | 37 - .../Api/Security/CreateApiKeyRequest.g.cs | 321 - .../Api/Security/CreateApiKeyResponse.g.cs | 72 - .../Security/CreateServiceTokenRequest.g.cs | 129 - .../Security/CreateServiceTokenResponse.g.cs | 35 - .../Api/Security/DeletePrivilegesRequest.g.cs | 109 - .../Security/DeletePrivilegesResponse.g.cs | 37 - .../Security/DeleteRoleMappingRequest.g.cs | 103 - .../Security/DeleteRoleMappingResponse.g.cs | 33 - .../Api/Security/DeleteRoleRequest.g.cs | 109 - .../Api/Security/DeleteRoleResponse.g.cs | 33 - .../Security/DeleteServiceTokenRequest.g.cs | 121 - .../Security/DeleteServiceTokenResponse.g.cs | 33 - .../Security/DisableUserProfileRequest.g.cs | 113 - .../Security/DisableUserProfileResponse.g.cs | 38 - .../Security/EnableUserProfileRequest.g.cs | 113 - .../Security/EnableUserProfileResponse.g.cs | 38 - .../Api/Security/GetApiKeyRequest.g.cs | 233 - .../Api/Security/GetApiKeyResponse.g.cs | 33 - .../Security/GetBuiltinPrivilegesRequest.g.cs | 83 - .../GetBuiltinPrivilegesResponse.g.cs | 35 - .../Api/Security/GetPrivilegesRequest.g.cs | 105 - .../Api/Security/GetPrivilegesResponse.g.cs | 37 - .../Api/Security/GetRoleMappingRequest.g.cs | 105 - .../Api/Security/GetRoleMappingResponse.g.cs | 37 - .../Api/Security/GetRoleRequest.g.cs | 101 - .../Api/Security/GetRoleResponse.g.cs | 37 - .../Security/GetServiceAccountsRequest.g.cs | 111 - .../Security/GetServiceAccountsResponse.g.cs | 37 - .../GetServiceCredentialsRequest.g.cs | 93 - .../GetServiceCredentialsResponse.g.cs | 45 - .../Api/Security/GetTokenRequest.g.cs | 177 - .../Api/Security/GetTokenResponse.g.cs | 45 - .../Security/GetUserPrivilegesRequest.g.cs | 113 - .../Security/GetUserPrivilegesResponse.g.cs | 41 - .../Api/Security/GetUserProfileRequest.g.cs | 115 - .../Api/Security/GetUserProfileResponse.g.cs | 35 - .../Api/Security/GrantApiKeyRequest.g.cs | 494 -- .../Api/Security/GrantApiKeyResponse.g.cs | 41 - .../Api/Security/HasPrivilegesRequest.g.cs | 277 - .../Api/Security/HasPrivilegesResponse.g.cs | 42 - .../HasPrivilegesUserProfileRequest.g.cs | 154 - .../HasPrivilegesUserProfileResponse.g.cs | 50 - .../Api/Security/InvalidateApiKeyRequest.g.cs | 284 - .../Security/InvalidateApiKeyResponse.g.cs | 39 - .../Api/Security/InvalidateTokenRequest.g.cs | 159 - .../Api/Security/InvalidateTokenResponse.g.cs | 39 - .../Api/Security/PutPrivilegesRequest.g.cs | 110 - .../Api/Security/PutPrivilegesResponse.g.cs | 37 - .../Api/Security/PutRoleMappingRequest.g.cs | 302 - .../Api/Security/PutRoleMappingResponse.g.cs | 35 - .../Api/Security/PutRoleRequest.g.cs | 698 -- .../Api/Security/PutRoleResponse.g.cs | 33 - .../Api/Security/QueryApiKeysRequest.g.cs | 752 -- .../Api/Security/QueryApiKeysResponse.g.cs | 62 - .../Api/Security/QueryRoleRequest.g.cs | 541 -- .../Api/Security/QueryRoleResponse.g.cs | 54 - .../Api/Security/QueryUserRequest.g.cs | 559 -- .../Api/Security/QueryUserResponse.g.cs | 54 - .../Api/Security/SamlAuthenticateRequest.g.cs | 156 - .../Security/SamlAuthenticateResponse.g.cs | 41 - .../Security/SamlCompleteLogoutRequest.g.cs | 182 - .../Security/SamlCompleteLogoutResponse.g.cs | 31 - .../Api/Security/SamlInvalidateRequest.g.cs | 168 - .../Api/Security/SamlInvalidateResponse.g.cs | 37 - .../Api/Security/SamlLogoutRequest.g.cs | 138 - .../Api/Security/SamlLogoutResponse.g.cs | 33 - .../SamlPrepareAuthenticationRequest.g.cs | 170 - .../SamlPrepareAuthenticationResponse.g.cs | 37 - .../SamlServiceProviderMetadataRequest.g.cs | 93 - .../SamlServiceProviderMetadataResponse.g.cs | 33 - .../Security/SuggestUserProfilesRequest.g.cs | 235 - .../Security/SuggestUserProfilesResponse.g.cs | 37 - .../Api/Security/UpdateApiKeyRequest.g.cs | 302 - .../Api/Security/UpdateApiKeyResponse.g.cs | 39 - .../UpdateUserProfileDataRequest.g.cs | 204 - .../UpdateUserProfileDataResponse.g.cs | 38 - .../Snapshot/CleanupRepositoryRequest.g.cs | 121 - .../Snapshot/CleanupRepositoryResponse.g.cs | 38 - .../Api/Snapshot/CloneSnapshotRequest.g.cs | 135 - .../Api/Snapshot/CloneSnapshotResponse.g.cs | 38 - .../Api/Snapshot/CreateRepositoryRequest.g.cs | 154 - .../Snapshot/CreateRepositoryResponse.g.cs | 38 - .../Api/Snapshot/CreateSnapshotRequest.g.cs | 286 - .../Api/Snapshot/CreateSnapshotResponse.g.cs | 46 - .../Api/Snapshot/DeleteRepositoryRequest.g.cs | 123 - .../Snapshot/DeleteRepositoryResponse.g.cs | 38 - .../Api/Snapshot/DeleteSnapshotRequest.g.cs | 109 - .../Api/Snapshot/DeleteSnapshotResponse.g.cs | 38 - .../Api/Snapshot/GetRepositoryRequest.g.cs | 127 - .../Api/Snapshot/GetRepositoryResponse.g.cs | 37 - .../Api/Snapshot/GetSnapshotRequest.g.cs | 301 - .../Api/Snapshot/GetSnapshotResponse.g.cs | 50 - .../Api/Snapshot/RestoreRequest.g.cs | 575 -- .../Api/Snapshot/RestoreResponse.g.cs | 35 - .../Api/Snapshot/SnapshotStatusRequest.g.cs | 161 - .../Api/Snapshot/SnapshotStatusResponse.g.cs | 33 - .../Api/Snapshot/VerifyRepositoryRequest.g.cs | 121 - .../Snapshot/VerifyRepositoryResponse.g.cs | 33 - .../DeleteLifecycleRequest.g.cs | 91 - .../DeleteLifecycleResponse.g.cs | 38 - .../ExecuteLifecycleRequest.g.cs | 91 - .../ExecuteLifecycleResponse.g.cs | 33 - .../ExecuteRetentionRequest.g.cs | 81 - .../ExecuteRetentionResponse.g.cs | 38 - .../GetLifecycleRequest.g.cs | 97 - .../GetLifecycleResponse.g.cs | 37 - .../GetSlmStatusRequest.g.cs | 77 - .../GetSlmStatusResponse.g.cs | 33 - .../GetStatsRequest.g.cs | 79 - .../GetStatsResponse.g.cs | 51 - .../PutLifecycleRequest.g.cs | 318 - .../PutLifecycleResponse.g.cs | 38 - .../StartSlmRequest.g.cs | 81 - .../StartSlmResponse.g.cs | 38 - .../StopSlmRequest.g.cs | 93 - .../StopSlmResponse.g.cs | 38 - .../Api/Sql/ClearCursorRequest.g.cs | 102 - .../Api/Sql/ClearCursorResponse.g.cs | 33 - .../Api/Sql/DeleteAsyncRequest.g.cs | 125 - .../Api/Sql/DeleteAsyncResponse.g.cs | 38 - .../_Generated/Api/Sql/GetAsyncRequest.g.cs | 197 - .../_Generated/Api/Sql/GetAsyncResponse.g.cs | 80 - .../Api/Sql/GetAsyncStatusRequest.g.cs | 122 - .../Api/Sql/GetAsyncStatusResponse.g.cs | 83 - .../_Generated/Api/Sql/QueryRequest.g.cs | 903 --- .../_Generated/Api/Sql/QueryResponse.g.cs | 80 - .../_Generated/Api/Sql/TranslateRequest.g.cs | 340 - .../_Generated/Api/Sql/TranslateResponse.g.cs | 44 - .../Api/Synonyms/DeleteSynonymRequest.g.cs | 119 - .../Api/Synonyms/DeleteSynonymResponse.g.cs | 38 - .../Synonyms/DeleteSynonymRuleRequest.g.cs | 95 - .../Synonyms/DeleteSynonymRuleResponse.g.cs | 47 - .../Api/Synonyms/GetSynonymRequest.g.cs | 154 - .../Api/Synonyms/GetSynonymResponse.g.cs | 35 - .../Api/Synonyms/GetSynonymRuleRequest.g.cs | 95 - .../Api/Synonyms/GetSynonymRuleResponse.g.cs | 46 - .../Api/Synonyms/GetSynonymsSetsRequest.g.cs | 111 - .../Api/Synonyms/GetSynonymsSetsResponse.g.cs | 35 - .../Api/Synonyms/PutSynonymRequest.g.cs | 288 - .../Api/Synonyms/PutSynonymResponse.g.cs | 35 - .../Api/Synonyms/PutSynonymRuleRequest.g.cs | 110 - .../Api/Synonyms/PutSynonymRuleResponse.g.cs | 47 - .../_Generated/Api/TermVectorsRequest.g.cs | 415 -- .../_Generated/Api/TermVectorsResponse.g.cs | 44 - .../_Generated/Api/TermsEnumRequest.g.cs | 550 -- .../_Generated/Api/TermsEnumResponse.g.cs | 37 - .../TextStructure/TestGrokPatternRequest.g.cs | 144 - .../TestGrokPatternResponse.g.cs | 33 - .../DeleteTransformRequest.g.cs | 141 - .../DeleteTransformResponse.g.cs | 38 - .../GetTransformRequest.g.cs | 207 - .../GetTransformResponse.g.cs | 35 - .../GetTransformStatsRequest.g.cs | 195 - .../GetTransformStatsResponse.g.cs | 35 - .../PreviewTransformRequest.g.cs | 1012 --- .../PreviewTransformResponse.g.cs | 35 - .../PutTransformRequest.g.cs | 1115 --- .../PutTransformResponse.g.cs | 38 - .../ResetTransformRequest.g.cs | 111 - .../ResetTransformResponse.g.cs | 38 - .../ScheduleNowTransformRequest.g.cs | 117 - .../ScheduleNowTransformResponse.g.cs | 38 - .../StartTransformRequest.g.cs | 155 - .../StartTransformResponse.g.cs | 38 - .../StopTransformRequest.g.cs | 195 - .../StopTransformResponse.g.cs | 38 - .../UpdateTransformRequest.g.cs | 854 --- .../UpdateTransformResponse.g.cs | 59 - .../UpgradeTransformsRequest.g.cs | 141 - .../UpgradeTransformsResponse.g.cs | 54 - .../_Generated/Api/UpdateByQueryRequest.g.cs | 1059 --- .../_Generated/Api/UpdateByQueryResponse.g.cs | 63 - .../Api/UpdateByQueryRethrottleRequest.g.cs | 111 - .../Api/UpdateByQueryRethrottleResponse.g.cs | 33 - .../_Generated/Api/UpdateRequest.g.cs | 522 -- .../_Generated/Api/UpdateResponse.g.cs | 49 - .../Api/Xpack/XpackInfoRequest.g.cs | 145 - .../Api/Xpack/XpackInfoResponse.g.cs | 39 - .../Api/Xpack/XpackUsageRequest.g.cs | 97 - .../Api/Xpack/XpackUsageResponse.g.cs | 89 - .../ElasticsearchClient.AsyncSearch.g.cs | 489 -- .../Client/ElasticsearchClient.Cluster.g.cs | 1063 --- .../Client/ElasticsearchClient.Enrich.g.cs | 387 - .../Client/ElasticsearchClient.Eql.g.cs | 387 - .../Client/ElasticsearchClient.Esql.g.cs | 138 - .../Client/ElasticsearchClient.Graph.g.cs | 203 - .../Client/ElasticsearchClient.Indices.g.cs | 6081 ---------------- .../Client/ElasticsearchClient.Inference.g.cs | 413 -- .../Client/ElasticsearchClient.Ingest.g.cs | 1358 ---- .../Client/ElasticsearchClient.License.g.cs | 112 - .../Client/ElasticsearchClient.Ml.g.cs | 6454 ----------------- .../Client/ElasticsearchClient.Nodes.g.cs | 459 -- .../ElasticsearchClient.QueryRules.g.cs | 473 -- .../Client/ElasticsearchClient.Security.g.cs | 3920 ---------- .../Client/ElasticsearchClient.Slm.g.cs | 613 -- .../Client/ElasticsearchClient.Snapshot.g.cs | 950 --- .../Client/ElasticsearchClient.Sql.g.cs | 584 -- .../Client/ElasticsearchClient.Synonyms.g.cs | 545 -- .../ElasticsearchClient.TextStructure.g.cs | 100 - .../Client/ElasticsearchClient.Transform.g.cs | 1191 --- .../Client/ElasticsearchClient.Xpack.g.cs | 223 - .../Client/ElasticsearchClient.g.cs | 5602 -------------- .../AdjacencyMatrixAggregate.g.cs | 36 - .../AdjacencyMatrixAggregation.g.cs | 156 - .../Aggregations/AdjacencyMatrixBucket.g.cs | 87 - .../Aggregations/AggregateDictionary.g.cs | 644 -- .../Types/Aggregations/Aggregation.g.cs | 1397 ---- .../Types/Aggregations/AggregationRange.g.cs | 125 - .../Aggregations/ArrayPercentilesItem.g.cs | 38 - .../AutoDateHistogramAggregate.g.cs | 38 - .../AutoDateHistogramAggregation.g.cs | 542 -- .../Types/Aggregations/AverageAggregate.g.cs | 45 - .../Aggregations/AverageAggregation.g.cs | 316 - .../AverageBucketAggregation.g.cs | 129 - .../Types/Aggregations/BoxplotAggregate.g.cs | 62 - .../Aggregations/BoxplotAggregation.g.cs | 332 - .../BucketMetricValueAggregate.g.cs | 47 - .../Aggregations/BucketScriptAggregation.g.cs | 185 - .../BucketSelectorAggregation.g.cs | 185 - .../Aggregations/BucketSortAggregation.g.cs | 357 - .../Types/Aggregations/Buckets.g.cs | 48 - .../Aggregations/CardinalityAggregate.g.cs | 36 - .../Aggregations/CardinalityAggregation.g.cs | 408 -- .../Aggregations/ChiSquareHeuristic.g.cs | 91 - .../Types/Aggregations/ChildrenAggregate.g.cs | 87 - .../Aggregations/ChildrenAggregation.g.cs | 75 - .../Aggregations/CompositeAggregate.g.cs | 38 - .../Aggregations/CompositeAggregation.g.cs | 201 - .../CompositeAggregationSource.g.cs | 479 -- .../Types/Aggregations/CompositeBucket.g.cs | 87 - .../CompositeDateHistogramAggregation.g.cs | 539 -- .../CompositeGeoTileGridAggregation.g.cs | 424 -- .../CompositeHistogramAggregation.g.cs | 387 - .../CompositeTermsAggregation.g.cs | 367 - .../CumulativeCardinalityAggregate.g.cs | 43 - .../CumulativeCardinalityAggregation.g.cs | 129 - .../CumulativeSumAggregation.g.cs | 129 - .../Aggregations/DateHistogramAggregate.g.cs | 36 - .../DateHistogramAggregation.g.cs | 846 --- .../Aggregations/DateHistogramBucket.g.cs | 95 - .../Aggregations/DateRangeAggregate.g.cs | 42 - .../Aggregations/DateRangeAggregation.g.cs | 449 -- .../Aggregations/DateRangeExpression.g.cs | 125 - .../Aggregations/DerivativeAggregate.g.cs | 49 - .../Aggregations/DerivativeAggregation.g.cs | 129 - .../DiversifiedSamplerAggregation.g.cs | 373 - .../Aggregations/DoubleTermsAggregate.g.cs | 45 - .../Types/Aggregations/DoubleTermsBucket.g.cs | 103 - .../Aggregations/ExtendedBoundsDate.g.cs | 99 - .../Aggregations/ExtendedBoundsFloat.g.cs | 99 - .../Aggregations/ExtendedStatsAggregate.g.cs | 80 - .../ExtendedStatsAggregation.g.cs | 360 - .../ExtendedStatsBucketAggregate.g.cs | 80 - .../ExtendedStatsBucketAggregation.g.cs | 155 - .../Types/Aggregations/FieldDateMath.g.cs | 48 - .../Types/Aggregations/FilterAggregate.g.cs | 87 - .../Types/Aggregations/FiltersAggregate.g.cs | 36 - .../Aggregations/FiltersAggregation.g.cs | 197 - .../Types/Aggregations/FiltersBucket.g.cs | 79 - .../FrequentItemSetsAggregate.g.cs | 36 - .../FrequentItemSetsAggregation.g.cs | 461 -- .../Aggregations/FrequentItemSetsBucket.g.cs | 95 - .../Aggregations/FrequentItemSetsField.g.cs | 201 - .../Aggregations/GeoBoundsAggregate.g.cs | 36 - .../Aggregations/GeoBoundsAggregation.g.cs | 332 - .../Aggregations/GeoCentroidAggregate.g.cs | 38 - .../Aggregations/GeoCentroidAggregation.g.cs | 345 - .../Aggregations/GeoDistanceAggregate.g.cs | 41 - .../Aggregations/GeoDistanceAggregation.g.cs | 445 -- .../Types/Aggregations/GeoLineAggregate.g.cs | 40 - .../Aggregations/GeoLineAggregation.g.cs | 409 -- .../Types/Aggregations/GeoLinePoint.g.cs | 143 - .../Types/Aggregations/GeoLineSort.g.cs | 143 - .../Aggregations/GeohashGridAggregate.g.cs | 36 - .../Aggregations/GeohashGridAggregation.g.cs | 339 - .../Types/Aggregations/GeohashGridBucket.g.cs | 87 - .../Aggregations/GeohexGridAggregate.g.cs | 36 - .../Aggregations/GeohexGridAggregation.g.cs | 331 - .../Types/Aggregations/GeohexGridBucket.g.cs | 87 - .../Aggregations/GeotileGridAggregate.g.cs | 36 - .../Aggregations/GeotileGridAggregation.g.cs | 343 - .../Types/Aggregations/GeotileGridBucket.g.cs | 87 - .../Types/Aggregations/GlobalAggregate.g.cs | 87 - .../Types/Aggregations/GlobalAggregation.g.cs | 47 - .../GoogleNormalizedDistanceHeuristic.g.cs | 73 - .../Types/Aggregations/HdrMethod.g.cs | 73 - .../HdrPercentileRanksAggregate.g.cs | 36 - .../Aggregations/HdrPercentilesAggregate.g.cs | 36 - .../Aggregations/HistogramAggregate.g.cs | 36 - .../Aggregations/HistogramAggregation.g.cs | 717 -- .../Types/Aggregations/HistogramBucket.g.cs | 95 - .../Aggregations/InferenceAggregate.g.cs | 106 - .../Aggregations/InferenceAggregation.g.cs | 340 - .../InferenceClassImportance.g.cs | 36 - .../Types/Aggregations/InferenceConfig.g.cs | 242 - .../InferenceFeatureImportance.g.cs | 38 - .../Aggregations/InferenceTopClassEntry.g.cs | 38 - .../Types/Aggregations/IpPrefixAggregate.g.cs | 36 - .../Aggregations/IpPrefixAggregation.g.cs | 316 - .../Types/Aggregations/IpPrefixBucket.g.cs | 111 - .../Types/Aggregations/IpRangeAggregate.g.cs | 36 - .../Aggregations/IpRangeAggregation.g.cs | 313 - .../Aggregations/IpRangeAggregationRange.g.cs | 125 - .../Types/Aggregations/IpRangeBucket.g.cs | 103 - .../Aggregations/LongRareTermsAggregate.g.cs | 41 - .../Aggregations/LongRareTermsBucket.g.cs | 95 - .../Aggregations/LongTermsAggregate.g.cs | 45 - .../Types/Aggregations/LongTermsBucket.g.cs | 103 - .../Aggregations/MatrixStatsAggregate.g.cs | 38 - .../Aggregations/MatrixStatsAggregation.g.cs | 201 - .../Types/Aggregations/MatrixStatsFields.g.cs | 50 - .../Types/Aggregations/MaxAggregate.g.cs | 45 - .../Types/Aggregations/MaxAggregation.g.cs | 316 - .../Aggregations/MaxBucketAggregation.g.cs | 129 - .../MedianAbsoluteDeviationAggregate.g.cs | 45 - .../MedianAbsoluteDeviationAggregation.g.cs | 360 - .../Types/Aggregations/MinAggregate.g.cs | 45 - .../Types/Aggregations/MinAggregation.g.cs | 316 - .../Aggregations/MinBucketAggregation.g.cs | 129 - .../Types/Aggregations/MissingAggregate.g.cs | 87 - .../Aggregations/MissingAggregation.g.cs | 182 - .../MovingFunctionAggregation.g.cs | 209 - .../MovingPercentilesAggregation.g.cs | 183 - .../Types/Aggregations/MultiTermLookup.g.cs | 190 - .../Aggregations/MultiTermsAggregate.g.cs | 40 - .../Aggregations/MultiTermsAggregation.g.cs | 540 -- .../Types/Aggregations/MultiTermsBucket.g.cs | 103 - .../MutualInformationHeuristic.g.cs | 99 - .../Types/Aggregations/NestedAggregate.g.cs | 87 - .../Types/Aggregations/NestedAggregation.g.cs | 153 - .../Aggregations/NormalizeAggregation.g.cs | 155 - .../Types/Aggregations/ParentAggregate.g.cs | 87 - .../Types/Aggregations/ParentAggregation.g.cs | 75 - .../PercentageScoreHeuristic.g.cs | 47 - .../PercentileRanksAggregation.g.cs | 568 -- .../Types/Aggregations/Percentiles.g.cs | 42 - .../Aggregations/PercentilesAggregation.g.cs | 568 -- .../PercentilesBucketAggregate.g.cs | 36 - .../PercentilesBucketAggregation.g.cs | 155 - .../Types/Aggregations/RangeAggregate.g.cs | 36 - .../Types/Aggregations/RangeAggregation.g.cs | 477 -- .../Types/Aggregations/RangeBucket.g.cs | 125 - .../Aggregations/RareTermsAggregation.g.cs | 407 -- .../Types/Aggregations/RateAggregate.g.cs | 38 - .../Types/Aggregations/RateAggregation.g.cs | 407 -- .../Aggregations/ReverseNestedAggregate.g.cs | 87 - .../ReverseNestedAggregation.g.cs | 160 - .../Types/Aggregations/SamplerAggregate.g.cs | 87 - .../Aggregations/SamplerAggregation.g.cs | 75 - .../Types/Aggregations/ScriptedHeuristic.g.cs | 93 - .../Aggregations/ScriptedMetricAggregate.g.cs | 36 - .../ScriptedMetricAggregation.g.cs | 763 -- .../SerialDifferencingAggregation.g.cs | 157 - .../SignificantLongTermsAggregate.g.cs | 40 - .../SignificantLongTermsBucket.g.cs | 111 - .../SignificantStringTermsAggregate.g.cs | 40 - .../SignificantStringTermsBucket.g.cs | 103 - .../SignificantTermsAggregation.g.cs | 1195 --- .../SignificantTextAggregation.g.cs | 1284 ---- .../Aggregations/SimpleValueAggregate.g.cs | 45 - .../Aggregations/StandardDeviationBounds.g.cs | 44 - .../StandardDeviationBoundsAsString.g.cs | 44 - .../Types/Aggregations/StatsAggregate.g.cs | 58 - .../Types/Aggregations/StatsAggregation.g.cs | 316 - .../Aggregations/StatsBucketAggregate.g.cs | 52 - .../Aggregations/StatsBucketAggregation.g.cs | 129 - .../StringRareTermsAggregate.g.cs | 41 - .../Aggregations/StringRareTermsBucket.g.cs | 87 - .../Aggregations/StringStatsAggregate.g.cs | 52 - .../Aggregations/StringStatsAggregation.g.cs | 332 - .../Aggregations/StringTermsAggregate.g.cs | 45 - .../Types/Aggregations/StringTermsBucket.g.cs | 95 - .../Types/Aggregations/SumAggregate.g.cs | 50 - .../Types/Aggregations/SumAggregation.g.cs | 316 - .../Aggregations/SumBucketAggregation.g.cs | 129 - .../Types/Aggregations/TDigest.g.cs | 73 - .../TDigestPercentileRanksAggregate.g.cs | 36 - .../TDigestPercentilesAggregate.g.cs | 36 - .../Types/Aggregations/TTestAggregate.g.cs | 38 - .../Types/Aggregations/TTestAggregation.g.cs | 317 - .../Types/Aggregations/TermsAggregation.g.cs | 874 --- .../Types/Aggregations/TestPopulation.g.cs | 335 - .../Aggregations/TimeSeriesAggregate.g.cs | 36 - .../Types/Aggregations/TimeSeriesBucket.g.cs | 87 - .../Types/Aggregations/TopHitsAggregate.g.cs | 36 - .../Aggregations/TopHitsAggregation.g.cs | 1272 ---- .../Types/Aggregations/TopMetrics.g.cs | 36 - .../Aggregations/TopMetricsAggregate.g.cs | 36 - .../Aggregations/TopMetricsAggregation.g.cs | 646 -- .../Types/Aggregations/TopMetricsValue.g.cs | 143 - .../UnmappedRareTermsAggregate.g.cs | 41 - .../UnmappedSamplerAggregate.g.cs | 87 - .../UnmappedSignificantTermsAggregate.g.cs | 45 - .../Aggregations/UnmappedTermsAggregate.g.cs | 45 - .../Aggregations/ValueCountAggregate.g.cs | 50 - .../Aggregations/ValueCountAggregation.g.cs | 317 - .../VariableWidthHistogramAggregate.g.cs | 36 - .../VariableWidthHistogramAggregation.g.cs | 379 - .../VariableWidthHistogramBucket.g.cs | 127 - .../WeightedAverageAggregate.g.cs | 50 - .../WeightedAverageAggregation.g.cs | 345 - .../Aggregations/WeightedAverageValue.g.cs | 283 - .../_Generated/Types/Analysis/Analyzers.g.cs | 512 -- .../Types/Analysis/ArabicAnalyzer.g.cs | 106 - .../Types/Analysis/ArmenianAnalyzer.g.cs | 106 - .../Analysis/AsciiFoldingTokenFilter.g.cs | 90 - .../Types/Analysis/BasqueAnalyzer.g.cs | 106 - .../Types/Analysis/BengaliAnalyzer.g.cs | 106 - .../Types/Analysis/BrazilianAnalyzer.g.cs | 90 - .../Types/Analysis/BulgarianAnalyzer.g.cs | 106 - .../Types/Analysis/CatalanAnalyzer.g.cs | 106 - .../Types/Analysis/CharFilters.g.cs | 153 - .../Types/Analysis/CharGroupTokenizer.g.cs | 102 - .../Types/Analysis/ChineseAnalyzer.g.cs | 90 - .../Types/Analysis/CjkAnalyzer.g.cs | 90 - .../Types/Analysis/ClassicTokenizer.g.cs | 90 - .../Analysis/CommonGramsTokenFilter.g.cs | 138 - .../Types/Analysis/ConditionTokenFilter.g.cs | 156 - .../Types/Analysis/CustomAnalyzer.g.cs | 135 - .../Types/Analysis/CustomNormalizer.g.cs | 89 - .../Types/Analysis/CzechAnalyzer.g.cs | 106 - .../Types/Analysis/DanishAnalyzer.g.cs | 90 - .../Analysis/DelimitedPayloadTokenFilter.g.cs | 106 - .../DictionaryDecompounderTokenFilter.g.cs | 186 - .../Types/Analysis/DutchAnalyzer.g.cs | 106 - .../Types/Analysis/EdgeNGramTokenFilter.g.cs | 138 - .../Types/Analysis/EdgeNGramTokenizer.g.cs | 138 - .../Types/Analysis/ElisionTokenFilter.g.cs | 122 - .../Types/Analysis/EnglishAnalyzer.g.cs | 106 - .../Types/Analysis/EstonianAnalyzer.g.cs | 90 - .../Types/Analysis/FingerprintAnalyzer.g.cs | 143 - .../Analysis/FingerprintTokenFilter.g.cs | 106 - .../Types/Analysis/FinnishAnalyzer.g.cs | 106 - .../Types/Analysis/FrenchAnalyzer.g.cs | 106 - .../Types/Analysis/GalicianAnalyzer.g.cs | 106 - .../Types/Analysis/GermanAnalyzer.g.cs | 106 - .../Types/Analysis/GreekAnalyzer.g.cs | 90 - .../Types/Analysis/HindiAnalyzer.g.cs | 106 - .../Types/Analysis/HtmlStripCharFilter.g.cs | 90 - .../Types/Analysis/HungarianAnalyzer.g.cs | 106 - .../Types/Analysis/HunspellTokenFilter.g.cs | 134 - .../HyphenationDecompounderTokenFilter.g.cs | 186 - .../Types/Analysis/IcuAnalyzer.g.cs | 81 - .../Analysis/IcuCollationTokenFilter.g.cs | 266 - .../Types/Analysis/IcuFoldingTokenFilter.g.cs | 85 - .../Analysis/IcuNormalizationCharFilter.g.cs | 106 - .../Analysis/IcuNormalizationTokenFilter.g.cs | 86 - .../Types/Analysis/IcuTokenizer.g.cs | 86 - .../Analysis/IcuTransformTokenFilter.g.cs | 102 - .../Types/Analysis/IndonesianAnalyzer.g.cs | 106 - .../Types/Analysis/IrishAnalyzer.g.cs | 106 - .../Types/Analysis/ItalianAnalyzer.g.cs | 106 - .../Types/Analysis/KStemTokenFilter.g.cs | 73 - .../Types/Analysis/KeepTypesTokenFilter.g.cs | 106 - .../Types/Analysis/KeepWordsTokenFilter.g.cs | 122 - .../Types/Analysis/KeywordAnalyzer.g.cs | 73 - .../Analysis/KeywordMarkerTokenFilter.g.cs | 139 - .../Types/Analysis/KeywordTokenizer.g.cs | 90 - .../Types/Analysis/KuromojiAnalyzer.g.cs | 86 - .../KuromojiIterationMarkCharFilter.g.cs | 98 - .../KuromojiPartOfSpeechTokenFilter.g.cs | 86 - .../KuromojiReadingFormTokenFilter.g.cs | 85 - .../Analysis/KuromojiStemmerTokenFilter.g.cs | 86 - .../Types/Analysis/KuromojiTokenizer.g.cs | 182 - .../Types/Analysis/LanguageAnalyzer.g.cs | 131 - .../Types/Analysis/LatvianAnalyzer.g.cs | 106 - .../Types/Analysis/LengthTokenFilter.g.cs | 106 - .../Types/Analysis/LetterTokenizer.g.cs | 73 - .../Analysis/LimitTokenCountTokenFilter.g.cs | 106 - .../Types/Analysis/LithuanianAnalyzer.g.cs | 106 - .../Types/Analysis/LowercaseNormalizer.g.cs | 55 - .../Types/Analysis/LowercaseTokenFilter.g.cs | 90 - .../Types/Analysis/LowercaseTokenizer.g.cs | 73 - .../Types/Analysis/MappingCharFilter.g.cs | 106 - .../Analysis/MultiplexerTokenFilter.g.cs | 102 - .../Types/Analysis/NGramTokenFilter.g.cs | 122 - .../Types/Analysis/NGramTokenizer.g.cs | 138 - .../Types/Analysis/NoriAnalyzer.g.cs | 122 - .../Analysis/NoriPartOfSpeechTokenFilter.g.cs | 90 - .../Types/Analysis/NoriTokenizer.g.cs | 138 - .../Types/Analysis/Normalizers.g.cs | 131 - .../Types/Analysis/NorwegianAnalyzer.g.cs | 106 - .../Analysis/PathHierarchyTokenizer.g.cs | 154 - .../Types/Analysis/PatternAnalyzer.g.cs | 135 - .../Analysis/PatternCaptureTokenFilter.g.cs | 102 - .../Analysis/PatternReplaceCharFilter.g.cs | 118 - .../Analysis/PatternReplaceTokenFilter.g.cs | 134 - .../Types/Analysis/PatternTokenizer.g.cs | 122 - .../Types/Analysis/PersianAnalyzer.g.cs | 90 - .../Types/Analysis/PhoneticTokenFilter.g.cs | 167 - .../Types/Analysis/PorterStemTokenFilter.g.cs | 73 - .../Types/Analysis/PortugueseAnalyzer.g.cs | 106 - .../Types/Analysis/PredicateTokenFilter.g.cs | 144 - .../Analysis/RemoveDuplicatesTokenFilter.g.cs | 73 - .../Types/Analysis/ReverseTokenFilter.g.cs | 73 - .../Types/Analysis/RomanianAnalyzer.g.cs | 106 - .../Types/Analysis/RussianAnalyzer.g.cs | 106 - .../Types/Analysis/SerbianAnalyzer.g.cs | 106 - .../Types/Analysis/ShingleTokenFilter.g.cs | 170 - .../Types/Analysis/SimpleAnalyzer.g.cs | 73 - .../Analysis/SimplePatternSplitTokenizer.g.cs | 90 - .../Analysis/SimplePatternTokenizer.g.cs | 90 - .../Types/Analysis/SnowballAnalyzer.g.cs | 103 - .../Types/Analysis/SnowballTokenFilter.g.cs | 90 - .../Types/Analysis/SoraniAnalyzer.g.cs | 106 - .../Types/Analysis/SpanishAnalyzer.g.cs | 106 - .../Types/Analysis/StandardAnalyzer.g.cs | 90 - .../Types/Analysis/StandardTokenizer.g.cs | 90 - .../Analysis/StemmerOverrideTokenFilter.g.cs | 106 - .../Types/Analysis/StemmerTokenFilter.g.cs | 138 - .../Types/Analysis/StopAnalyzer.g.cs | 107 - .../Types/Analysis/StopTokenFilter.g.cs | 139 - .../Types/Analysis/SwedishAnalyzer.g.cs | 106 - .../Analysis/SynonymGraphTokenFilter.g.cs | 202 - .../Types/Analysis/SynonymTokenFilter.g.cs | 202 - .../Types/Analysis/ThaiAnalyzer.g.cs | 90 - .../Types/Analysis/ThaiTokenizer.g.cs | 73 - .../Types/Analysis/TokenFilters.g.cs | 489 -- .../_Generated/Types/Analysis/Tokenizers.g.cs | 257 - .../Types/Analysis/TrimTokenFilter.g.cs | 73 - .../Types/Analysis/TruncateTokenFilter.g.cs | 90 - .../Types/Analysis/TurkishAnalyzer.g.cs | 106 - .../Types/Analysis/UaxEmailUrlTokenizer.g.cs | 90 - .../Types/Analysis/UniqueTokenFilter.g.cs | 90 - .../Types/Analysis/UppercaseTokenFilter.g.cs | 73 - .../Types/Analysis/WhitespaceAnalyzer.g.cs | 73 - .../Types/Analysis/WhitespaceTokenizer.g.cs | 90 - .../WordDelimiterGraphTokenFilter.g.cs | 314 - .../Analysis/WordDelimiterTokenFilter.g.cs | 282 - .../Types/AsyncSearch/AsyncSearch.g.cs | 79 - .../Types/BulkIndexByScrollFailure.g.cs | 42 - .../_Generated/Types/BulkStats.g.cs | 50 - .../_Generated/Types/ByteSize.g.cs | 45 - .../Types/Cluster/AllocationDecision.g.cs | 38 - .../Types/Cluster/AllocationStore.g.cs | 44 - .../Types/Cluster/CharFilterTypes.g.cs | 95 - .../Types/Cluster/ClusterFileSystem.g.cs | 57 - .../Types/Cluster/ClusterIndices.g.cs | 119 - .../Types/Cluster/ClusterIndicesShards.g.cs | 68 - .../Cluster/ClusterIndicesShardsIndex.g.cs | 55 - .../_Generated/Types/Cluster/ClusterInfo.g.cs | 42 - .../Types/Cluster/ClusterIngest.g.cs | 36 - .../_Generated/Types/Cluster/ClusterJvm.g.cs | 63 - .../Types/Cluster/ClusterJvmMemory.g.cs | 47 - .../Types/Cluster/ClusterJvmVersion.g.cs | 88 - .../Types/Cluster/ClusterNetworkTypes.g.cs | 47 - .../Types/Cluster/ClusterNodeCount.g.cs | 60 - .../Types/Cluster/ClusterNodes.g.cs | 116 - .../Types/Cluster/ClusterOperatingSystem.g.cs | 81 - .../ClusterOperatingSystemArchitecture.g.cs | 47 - .../Cluster/ClusterOperatingSystemName.g.cs | 47 - .../ClusterOperatingSystemPrettyName.g.cs | 47 - .../Types/Cluster/ClusterProcess.g.cs | 47 - .../Types/Cluster/ClusterProcessCpu.g.cs | 40 - .../ClusterProcessOpenFileDescriptors.g.cs | 58 - .../Types/Cluster/ClusterProcessor.g.cs | 42 - .../Types/Cluster/ClusterShardMetrics.g.cs | 55 - .../Types/Cluster/ComponentTemplate.g.cs | 36 - .../Types/Cluster/ComponentTemplateNode.g.cs | 38 - .../Cluster/ComponentTemplateSummary.g.cs | 45 - .../_Generated/Types/Cluster/CurrentNode.g.cs | 44 - .../_Generated/Types/Cluster/DiskUsage.g.cs | 44 - .../_Generated/Types/Cluster/FieldTypes.g.cs | 87 - .../Types/Cluster/FieldTypesMappings.g.cs | 79 - .../Types/Cluster/IndexHealthStats.g.cs | 52 - .../Types/Cluster/IndexingPressure.g.cs | 34 - .../Types/Cluster/IndexingPressureMemory.g.cs | 38 - .../IndexingPressureMemorySummary.g.cs | 48 - .../Types/Cluster/IndicesVersions.g.cs | 40 - .../Cluster/NodeAllocationExplanation.g.cs | 50 - .../Types/Cluster/NodeDiskUsage.g.cs | 38 - .../Types/Cluster/NodePackagingType.g.cs | 55 - .../Cluster/OperatingSystemMemoryInfo.g.cs | 79 - .../_Generated/Types/Cluster/PendingTask.g.cs | 80 - .../Types/Cluster/ReservedSize.g.cs | 40 - .../Types/Cluster/RuntimeFieldTypes.g.cs | 143 - .../Types/Cluster/ShardHealthStats.g.cs | 46 - .../Types/Cluster/UnassignedInformation.g.cs | 46 - .../_Generated/Types/ClusterDetails.g.cs | 44 - .../_Generated/Types/ClusterStatistics.g.cs | 46 - .../_Generated/Types/CompletionStats.g.cs | 51 - .../_Generated/Types/CoordsGeoBounds.g.cs | 92 - .../Types/Core/Bulk/ResponseItem.g.cs | 112 - .../_Generated/Types/Core/Context.g.cs | 48 - .../Types/Core/Explain/Explanation.g.cs | 38 - .../Types/Core/Explain/ExplanationDetail.g.cs | 38 - .../Types/Core/FieldCaps/FieldCapability.g.cs | 92 - .../_Generated/Types/Core/Get/GetResult.g.cs | 53 - .../DataStreamLifecycleDetails.g.cs | 38 - .../DataStreamLifecycleIndicator.g.cs | 47 - .../Types/Core/HealthReport/Diagnosis.g.cs | 42 - .../DiagnosisAffectedResources.g.cs | 43 - .../Core/HealthReport/DiskIndicator.g.cs | 47 - .../HealthReport/DiskIndicatorDetails.g.cs | 42 - .../HealthReport/FileSettingsIndicator.g.cs | 47 - .../FileSettingsIndicatorDetails.g.cs | 36 - .../Types/Core/HealthReport/IlmIndicator.g.cs | 47 - .../HealthReport/IlmIndicatorDetails.g.cs | 38 - .../Types/Core/HealthReport/Impact.g.cs | 40 - .../Core/HealthReport/IndicatorNode.g.cs | 36 - .../Types/Core/HealthReport/Indicators.g.cs | 50 - .../HealthReport/MasterIsStableIndicator.g.cs | 47 - ...IsStableIndicatorClusterFormationNode.g.cs | 38 - .../MasterIsStableIndicatorDetails.g.cs | 40 - ...ableIndicatorExceptionFetchingHistory.g.cs | 36 - .../RepositoryIntegrityIndicator.g.cs | 47 - .../RepositoryIntegrityIndicatorDetails.g.cs | 38 - .../ShardsAvailabilityIndicator.g.cs | 47 - .../ShardsAvailabilityIndicatorDetails.g.cs | 52 - .../HealthReport/ShardsCapacityIndicator.g.cs | 47 - .../ShardsCapacityIndicatorDetails.g.cs | 36 - .../ShardsCapacityIndicatorTierDetail.g.cs | 36 - .../Types/Core/HealthReport/SlmIndicator.g.cs | 47 - .../HealthReport/SlmIndicatorDetails.g.cs | 38 - .../SlmIndicatorUnhealthyPolicies.g.cs | 36 - .../StagnatingBackingIndices.g.cs | 38 - .../Types/Core/MGet/MultiGetError.g.cs | 38 - .../Types/Core/MGet/MultiGetOperation.g.cs | 332 - .../Types/Core/MSearch/MultiSearchItem.g.cs | 62 - .../Types/Core/MSearch/MultisearchBody.g.cs | 2648 ------- .../Types/Core/MSearch/MultisearchHeader.g.cs | 224 - .../Core/MSearchTemplate/TemplateConfig.g.cs | 76 - .../MultiTermVectorsOperation.g.cs | 699 -- .../Mtermvectors/MultiTermVectorsResult.g.cs | 47 - .../Types/Core/MultiGetResponseItem.g.cs | 42 - .../Types/Core/MultiSearchResponseItem.g.cs | 42 - .../Types/Core/RankEval/DocumentRating.g.cs | 113 - .../Types/Core/RankEval/RankEvalHit.g.cs | 38 - .../Types/Core/RankEval/RankEvalHitItem.g.cs | 36 - .../Types/Core/RankEval/RankEvalMetric.g.cs | 273 - .../Core/RankEval/RankEvalMetricDetail.g.cs | 63 - ...ankEvalMetricDiscountedCumulativeGain.g.cs | 111 - .../RankEvalMetricExpectedReciprocalRank.g.cs | 107 - .../RankEvalMetricMeanReciprocalRank.g.cs | 111 - .../RankEval/RankEvalMetricPrecision.g.cs | 137 - .../Core/RankEval/RankEvalMetricRecall.g.cs | 111 - .../Types/Core/RankEval/RankEvalQuery.g.cs | 180 - .../Core/RankEval/RankEvalRequestItem.g.cs | 451 -- .../Types/Core/RankEval/UnratedDocument.g.cs | 36 - .../Types/Core/Reindex/Destination.g.cs | 177 - .../Types/Core/Reindex/RemoteSource.g.cs | 201 - .../_Generated/Types/Core/Reindex/Source.g.cs | 678 -- .../Core/ReindexRethrottle/ReindexNode.g.cs | 46 - .../Core/ReindexRethrottle/ReindexStatus.g.cs | 124 - .../Core/ReindexRethrottle/ReindexTask.g.cs | 52 - .../Core/Search/AggregationBreakdown.g.cs | 56 - .../Types/Core/Search/AggregationProfile.g.cs | 44 - .../Core/Search/AggregationProfileDebug.g.cs | 96 - ...AggregationProfileDelegateDebugFilter.g.cs | 40 - .../Types/Core/Search/Collector.g.cs | 40 - .../Types/Core/Search/CompletionContext.g.cs | 183 - .../Types/Core/Search/CompletionSuggest.g.cs | 41 - .../Core/Search/CompletionSuggestOption.g.cs | 53 - .../Core/Search/CompletionSuggester.g.cs | 539 -- .../Types/Core/Search/DfsKnnProfile.g.cs | 40 - .../Types/Core/Search/DfsProfile.g.cs | 36 - .../Core/Search/DfsStatisticsBreakdown.g.cs | 48 - .../Core/Search/DfsStatisticsProfile.g.cs | 46 - .../Types/Core/Search/DirectGenerator.g.cs | 620 -- .../Types/Core/Search/FetchProfile.g.cs | 44 - .../Core/Search/FetchProfileBreakdown.g.cs | 48 - .../Types/Core/Search/FetchProfileDebug.g.cs | 36 - .../Types/Core/Search/FieldCollapse.g.cs | 433 -- .../Types/Core/Search/FieldSuggester.g.cs | 436 -- .../Types/Core/Search/Highlight.g.cs | 1047 --- .../Types/Core/Search/HighlightField.g.cs | 1056 --- .../_Generated/Types/Core/Search/Hit.g.cs | 73 - .../Types/Core/Search/HitsMetadata.g.cs | 44 - .../Types/Core/Search/InnerHits.g.cs | 933 --- .../Types/Core/Search/InnerHitsResult.g.cs | 34 - .../Types/Core/Search/KnnCollectorResult.g.cs | 42 - .../Core/Search/KnnQueryProfileBreakdown.g.cs | 72 - .../Core/Search/KnnQueryProfileResult.g.cs | 46 - .../Core/Search/LaplaceSmoothingModel.g.cs | 71 - .../Types/Core/Search/LearningToRank.g.cs | 97 - .../LinearInterpolationSmoothingModel.g.cs | 83 - .../Types/Core/Search/NestedIdentity.g.cs | 38 - .../Types/Core/Search/PhraseSuggest.g.cs | 41 - .../Core/Search/PhraseSuggestCollate.g.cs | 155 - .../Search/PhraseSuggestCollateQuery.g.cs | 99 - .../Core/Search/PhraseSuggestHighlight.g.cs | 91 - .../Core/Search/PhraseSuggestOption.g.cs | 40 - .../Types/Core/Search/PhraseSuggester.g.cs | 1100 --- .../Core/Search/PointInTimeReference.g.cs | 74 - .../_Generated/Types/Core/Search/Profile.g.cs | 34 - .../Types/Core/Search/QueryBreakdown.g.cs | 72 - .../Types/Core/Search/QueryProfile.g.cs | 42 - .../Types/Core/Search/RegexOptions.g.cs | 99 - .../_Generated/Types/Core/Search/Rescore.g.cs | 287 - .../Types/Core/Search/RescoreQuery.g.cs | 304 - .../Types/Core/Search/SearchProfile.g.cs | 38 - .../Types/Core/Search/ShardProfile.g.cs | 50 - .../Types/Core/Search/SmoothingModel.g.cs | 257 - .../Types/Core/Search/SourceFilter.g.cs | 169 - .../Search/StupidBackoffSmoothingModel.g.cs | 71 - .../Types/Core/Search/SuggestDictionary.g.cs | 108 - .../Types/Core/Search/SuggestFuzziness.g.cs | 179 - .../Types/Core/Search/Suggester.g.cs | 207 - .../Types/Core/Search/TermSuggest.g.cs | 41 - .../Types/Core/Search/TermSuggestOption.g.cs | 42 - .../Types/Core/Search/TermSuggester.g.cs | 782 -- .../Types/Core/Search/TotalHits.g.cs | 36 - .../_Generated/Types/Core/SourceConfig.g.cs | 47 - .../Types/Core/SourceConfigParam.g.cs | 48 - .../Core/TermVectors/FieldStatistics.g.cs | 38 - .../Types/Core/TermVectors/Filter.g.cs | 235 - .../Types/Core/TermVectors/Term.g.cs | 42 - .../Types/Core/TermVectors/TermVector.g.cs | 36 - .../Types/Core/TermVectors/Token.g.cs | 40 - .../_Generated/Types/Core/TrackHits.g.cs | 50 - .../UpdateByQueryRethrottleNode.g.cs | 46 - .../_Generated/Types/DocStats.g.cs | 50 - .../Types/ElasticsearchVersionInfo.g.cs | 50 - .../_Generated/Types/EmptyObject.g.cs | 57 - .../_Generated/Types/Enrich/CacheStats.g.cs | 48 - .../Types/Enrich/CoordinatorStats.g.cs | 42 - .../_Generated/Types/Enrich/EnrichPolicy.g.cs | 293 - .../Types/Enrich/EnrichSummary.g.cs | 34 - .../Enrich/ExecuteEnrichPolicyStatus.g.cs | 34 - .../Types/Enrich/ExecutingPolicy.g.cs | 36 - .../Types/Enums/Enums.Aggregations.g.cs | 880 --- .../Types/Enums/Enums.Analysis.g.cs | 1457 ---- .../_Generated/Types/Enums/Enums.Cluster.g.cs | 302 - .../Types/Enums/Enums.Core.HealthReport.g.cs | 141 - .../Types/Enums/Enums.Core.Search.g.cs | 577 -- .../Types/Enums/Enums.Core.SearchMvt.g.cs | 120 - .../_Generated/Types/Enums/Enums.Enrich.g.cs | 134 - .../_Generated/Types/Enums/Enums.Eql.g.cs | 81 - .../_Generated/Types/Enums/Enums.Esql.g.cs | 113 - .../Types/Enums/Enums.IndexManagement.g.cs | 672 -- .../Types/Enums/Enums.Inference.g.cs | 85 - .../_Generated/Types/Enums/Enums.Ingest.g.cs | 424 -- .../Types/Enums/Enums.LicenseManagement.g.cs | 176 - .../Types/Enums/Enums.MachineLearning.g.cs | 1223 ---- .../_Generated/Types/Enums/Enums.Mapping.g.cs | 1250 ---- .../Types/Enums/Enums.NoNamespace.g.cs | 1900 ----- .../Types/Enums/Enums.QueryDsl.g.cs | 1114 --- .../Types/Enums/Enums.QueryRules.g.cs | 183 - .../Types/Enums/Enums.Security.g.cs | 373 - .../Types/Enums/Enums.Snapshot.g.cs | 194 - .../_Generated/Types/Enums/Enums.Sql.g.cs | 106 - .../_Generated/Types/Enums/Enums.Watcher.g.cs | 85 - .../_Generated/Types/Enums/Enums.Xpack.g.cs | 78 - .../_Generated/Types/Eql/EqlHits.g.cs | 55 - .../_Generated/Types/Eql/HitsEvent.g.cs | 68 - .../_Generated/Types/Eql/HitsSequence.g.cs | 47 - .../_Generated/Types/ErrorCause.g.cs | 139 - .../_Generated/Types/ErrorResponseBase.g.cs | 41 - .../_Generated/Types/FieldMemoryUsage.g.cs | 36 - .../_Generated/Types/FieldSizeUsage.g.cs | 36 - .../_Generated/Types/FieldSort.g.cs | 320 - .../_Generated/Types/FielddataStats.g.cs | 41 - .../_Generated/Types/FlushStats.g.cs | 40 - .../_Generated/Types/Fuzziness.g.cs | 45 - .../_Generated/Types/GeoBounds.g.cs | 165 - .../_Generated/Types/GeoDistanceSort.g.cs | 469 -- .../_Generated/Types/GeoHashLocation.g.cs | 59 - .../_Generated/Types/GeoLine.g.cs | 52 - .../_Generated/Types/GeoLocation.g.cs | 165 - .../_Generated/Types/GeohashPrecision.g.cs | 47 - .../_Generated/Types/GetStats.g.cs | 52 - .../_Generated/Types/Graph/Connection.g.cs | 40 - .../Types/Graph/ExploreControls.g.cs | 309 - .../_Generated/Types/Graph/Hop.g.cs | 431 -- .../Types/Graph/SampleDiversity.g.cs | 128 - .../_Generated/Types/Graph/Vertex.g.cs | 40 - .../Types/Graph/VertexDefinition.g.cs | 482 -- .../_Generated/Types/Graph/VertexInclude.g.cs | 70 - .../IndexLifecycleManagement/Actions.g.cs | 127 - .../AllocateAction.g.cs | 42 - .../DeleteAction.g.cs | 34 - .../DownsampleAction.g.cs | 36 - .../ForceMergeAction.g.cs | 36 - .../MigrateAction.g.cs | 34 - .../Types/IndexLifecycleManagement/Phase.g.cs | 36 - .../IndexLifecycleManagement/Phases.g.cs | 42 - .../RolloverAction.g.cs | 52 - .../SearchableSnapshotAction.g.cs | 36 - .../SetPriorityAction.g.cs | 34 - .../ShrinkAction.g.cs | 38 - .../WaitForSnapshotAction.g.cs | 34 - .../Types/IndexManagement/AddAction.g.cs | 637 -- .../Types/IndexManagement/Alias.g.cs | 396 - .../IndexManagement/AliasDefinition.g.cs | 82 - .../Types/IndexManagement/AnalyzeDetail.g.cs | 42 - .../Types/IndexManagement/AnalyzeToken.g.cs | 44 - .../Types/IndexManagement/AnalyzerDetail.g.cs | 36 - .../Types/IndexManagement/CacheQueries.g.cs | 59 - .../IndexManagement/CharFilterDetail.g.cs | 36 - .../IndexManagement/CloseIndexResult.g.cs | 36 - .../IndexManagement/CloseShardResult.g.cs | 34 - .../Types/IndexManagement/DataStream.g.cs | 174 - .../IndexManagement/DataStreamIndex.g.cs | 71 - .../IndexManagement/DataStreamLifecycle.g.cs | 171 - .../DataStreamLifecycleDownsampling.g.cs | 131 - .../DataStreamLifecycleExplain.g.cs | 50 - ...DataStreamLifecycleRolloverConditions.g.cs | 52 - .../DataStreamLifecycleWithRollover.g.cs | 74 - .../DataStreamTimestampField.g.cs | 39 - .../IndexManagement/DataStreamVisibility.g.cs | 78 - .../DataStreamWithLifecycle.g.cs | 36 - .../IndexManagement/DataStreamsStatsItem.g.cs | 76 - .../IndexManagement/DownsampleConfig.g.cs | 69 - .../IndexManagement/DownsamplingRound.g.cs | 125 - .../IndexManagement/ExplainAnalyzeToken.g.cs | 138 - .../Types/IndexManagement/FailureStore.g.cs | 38 - .../FielddataFrequencyFilter.g.cs | 81 - .../Types/IndexManagement/FileDetails.g.cs | 38 - .../Types/IndexManagement/IndexAliases.g.cs | 34 - .../IndexAndDataStreamAction.g.cs | 91 - .../IndexManagement/IndexMappingRecord.g.cs | 36 - .../IndexModifyDataStreamAction.g.cs | 242 - .../Types/IndexManagement/IndexRouting.g.cs | 138 - .../IndexRoutingAllocation.g.cs | 198 - .../IndexRoutingAllocationDisk.g.cs | 63 - .../IndexRoutingAllocationInclude.g.cs | 78 - ...IndexRoutingAllocationInitialRecovery.g.cs | 63 - .../IndexRoutingRebalance.g.cs | 59 - .../Types/IndexManagement/IndexSegment.g.cs | 34 - .../IndexManagement/IndexSegmentSort.g.cs | 180 - .../IndexManagement/IndexSettingBlocks.g.cs | 123 - .../Types/IndexManagement/IndexSettings.g.cs | 3714 ---------- .../IndexSettingsAnalysis.g.cs | 193 - .../IndexSettingsLifecycle.g.cs | 238 - .../IndexSettingsLifecycleStep.g.cs | 75 - .../IndexSettingsTimeSeries.g.cs | 78 - .../Types/IndexManagement/IndexState.g.cs | 504 -- .../Types/IndexManagement/IndexStats.g.cs | 172 - .../Types/IndexManagement/IndexTemplate.g.cs | 119 - .../IndexTemplateDataStreamConfiguration.g.cs | 47 - .../IndexManagement/IndexTemplateItem.g.cs | 36 - .../IndexManagement/IndexTemplateMapping.g.cs | 415 -- .../IndexManagement/IndexTemplateSummary.g.cs | 62 - .../IndexUpdateAliasesAction.g.cs | 257 - .../IndexManagement/IndexVersioning.g.cs | 78 - .../IndexManagement/IndexingPressure.g.cs | 93 - .../IndexingPressureMemory.g.cs | 77 - .../IndexingSlowlogSettings.g.cs | 138 - .../IndexingSlowlogTresholds.g.cs | 105 - .../Types/IndexManagement/IndicesStats.g.cs | 44 - .../IndicesValidationExplanation.g.cs | 40 - .../IndexManagement/MappingLimitSettings.g.cs | 360 - .../MappingLimitSettingsDepth.g.cs | 75 - .../MappingLimitSettingsDimensionFields.g.cs | 75 - .../MappingLimitSettingsFieldNameLength.g.cs | 77 - .../MappingLimitSettingsNestedFields.g.cs | 77 - .../MappingLimitSettingsNestedObjects.g.cs | 75 - .../MappingLimitSettingsTotalFields.g.cs | 111 - .../Types/IndexManagement/MappingStats.g.cs | 38 - .../Types/IndexManagement/Merge.g.cs | 93 - .../Types/IndexManagement/MergeScheduler.g.cs | 78 - .../IndexManagement/NumericFielddata.g.cs | 59 - .../Types/IndexManagement/Overlapping.g.cs | 36 - .../Types/IndexManagement/Queries.g.cs | 93 - .../Types/IndexManagement/RecoveryBytes.g.cs | 50 - .../Types/IndexManagement/RecoveryFiles.g.cs | 42 - .../IndexManagement/RecoveryIndexStatus.g.cs | 50 - .../Types/IndexManagement/RecoveryOrigin.g.cs | 56 - .../IndexManagement/RecoveryStartStatus.g.cs | 40 - .../Types/IndexManagement/RecoveryStatus.g.cs | 34 - .../Types/IndexManagement/ReloadDetails.g.cs | 38 - .../Types/IndexManagement/ReloadResult.g.cs | 36 - .../Types/IndexManagement/RemoveAction.g.cs | 188 - .../IndexManagement/RemoveIndexAction.g.cs | 131 - .../ResolveIndexAliasItem.g.cs | 37 - .../ResolveIndexDataStreamsItem.g.cs | 39 - .../IndexManagement/ResolveIndexItem.g.cs | 40 - .../Types/IndexManagement/RetentionLease.g.cs | 59 - .../IndexManagement/RolloverConditions.g.cs | 273 - .../Types/IndexManagement/SearchIdle.g.cs | 63 - .../Types/IndexManagement/Segment.g.cs | 50 - .../IndexManagement/SettingsAnalyze.g.cs | 63 - .../IndexManagement/SettingsHighlight.g.cs | 63 - .../IndexManagement/SettingsQueryString.g.cs | 59 - .../Types/IndexManagement/SettingsSearch.g.cs | 138 - .../IndexManagement/SettingsSimilarities.g.cs | 177 - .../SettingsSimilarityBm25.g.cs | 105 - .../SettingsSimilarityBoolean.g.cs | 55 - .../SettingsSimilarityDfi.g.cs | 69 - .../SettingsSimilarityDfr.g.cs | 93 - .../IndexManagement/SettingsSimilarityIb.g.cs | 93 - .../SettingsSimilarityLmd.g.cs | 73 - .../SettingsSimilarityLmj.g.cs | 73 - .../SettingsSimilarityScripted.g.cs | 198 - .../Types/IndexManagement/ShardCommit.g.cs | 40 - .../IndexManagement/ShardFileSizeInfo.g.cs | 44 - .../Types/IndexManagement/ShardLease.g.cs | 40 - .../Types/IndexManagement/ShardPath.g.cs | 38 - .../IndexManagement/ShardQueryCache.g.cs | 46 - .../Types/IndexManagement/ShardRecovery.g.cs | 64 - .../IndexManagement/ShardRetentionLeases.g.cs | 38 - .../Types/IndexManagement/ShardRouting.g.cs | 40 - .../IndexManagement/ShardSegmentRouting.g.cs | 38 - .../IndexManagement/ShardSequenceNumber.g.cs | 38 - .../Types/IndexManagement/ShardStats.g.cs | 85 - .../Types/IndexManagement/ShardsSegment.g.cs | 40 - .../IndexManagement/ShardsTotalStats.g.cs | 34 - .../IndexManagement/SlowlogSettings.g.cs | 138 - .../SlowlogTresholdLevels.g.cs | 108 - .../IndexManagement/SlowlogTresholds.g.cs | 138 - .../Types/IndexManagement/SoftDeletes.g.cs | 135 - .../Types/IndexManagement/Storage.g.cs | 90 - .../Types/IndexManagement/Template.g.cs | 39 - .../Types/IndexManagement/TokenDetail.g.cs | 36 - .../Types/IndexManagement/Translog.g.cs | 180 - .../IndexManagement/TranslogRetention.g.cs | 115 - .../Types/IndexManagement/TranslogStatus.g.cs | 44 - .../Types/IndexManagement/VerifyIndex.g.cs | 40 - .../_Generated/Types/IndexingStats.g.cs | 62 - .../_Generated/Types/IndicesOptions.g.cs | 172 - .../Types/Inference/InferenceEndpoint.g.cs | 127 - .../Inference/InferenceEndpointInfo.g.cs | 76 - .../Types/Ingest/AppendProcessor.g.cs | 575 -- .../Types/Ingest/AttachmentProcessor.g.cs | 892 --- .../Types/Ingest/BytesProcessor.g.cs | 626 -- .../Types/Ingest/CircleProcessor.g.cs | 698 -- .../Types/Ingest/CommunityIDProcessor.g.cs | 1310 ---- .../Types/Ingest/ConvertProcessor.g.cs | 662 -- .../_Generated/Types/Ingest/CsvProcessor.g.cs | 750 -- .../Types/Ingest/DatabaseConfiguration.g.cs | 309 - .../Ingest/DatabaseConfigurationFull.g.cs | 332 - .../Ingest/DatabaseConfigurationMetadata.g.cs | 40 - .../Types/Ingest/DateIndexNameProcessor.g.cs | 753 -- .../Types/Ingest/DateProcessor.g.cs | 755 -- .../Types/Ingest/DissectProcessor.g.cs | 611 -- .../_Generated/Types/Ingest/Document.g.cs | 123 - .../Types/Ingest/DocumentSimulation.g.cs | 151 - .../Types/Ingest/DotExpanderProcessor.g.cs | 591 -- .../Types/Ingest/DropProcessor.g.cs | 407 -- .../Types/Ingest/EnrichProcessor.g.cs | 805 -- .../Types/Ingest/FailProcessor.g.cs | 446 -- .../Types/Ingest/FingerprintProcessor.g.cs | 676 -- .../Types/Ingest/ForeachProcessor.g.cs | 635 -- .../Types/Ingest/GeoGridProcessor.g.cs | 1010 --- .../Types/Ingest/GeoIpDownloadStatistics.g.cs | 79 - .../Types/Ingest/GeoIpNodeDatabaseName.g.cs | 39 - .../Types/Ingest/GeoIpNodeDatabases.g.cs | 52 - .../Types/Ingest/GeoIpProcessor.g.cs | 798 -- .../Types/Ingest/GrokProcessor.g.cs | 708 -- .../Types/Ingest/GsubProcessor.g.cs | 698 -- .../Types/Ingest/HtmlStripProcessor.g.cs | 626 -- .../Types/Ingest/InferenceConfig.g.cs | 242 - .../Ingest/InferenceConfigClassification.g.cs | 376 - .../Ingest/InferenceConfigRegression.g.cs | 197 - .../Types/Ingest/InferenceProcessor.g.cs | 682 -- .../_Generated/Types/Ingest/IngestInfo.g.cs | 38 - .../IpDatabaseConfigurationMetadata.g.cs | 42 - .../Types/Ingest/IpLocationProcessor.g.cs | 798 -- .../_Generated/Types/Ingest/Ipinfo.g.cs | 47 - .../Types/Ingest/JoinProcessor.g.cs | 618 -- .../Types/Ingest/JsonProcessor.g.cs | 726 -- .../Types/Ingest/KeyValueProcessor.g.cs | 979 --- .../_Generated/Types/Ingest/Local.g.cs | 61 - .../Types/Ingest/LowercaseProcessor.g.cs | 626 -- .../_Generated/Types/Ingest/Maxmind.g.cs | 62 - .../Ingest/NetworkDirectionProcessor.g.cs | 866 --- .../_Generated/Types/Ingest/Pipeline.g.cs | 565 -- .../Types/Ingest/PipelineProcessor.g.cs | 490 -- .../Types/Ingest/PipelineSimulation.g.cs | 46 - .../_Generated/Types/Ingest/Processor.g.cs | 887 --- .../_Generated/Types/Ingest/Redact.g.cs | 39 - .../Types/Ingest/RedactProcessor.g.cs | 771 -- .../Ingest/RegisteredDomainProcessor.g.cs | 629 -- .../Types/Ingest/RemoveProcessor.g.cs | 533 -- .../Types/Ingest/RenameProcessor.g.cs | 625 -- .../Types/Ingest/RerouteProcessor.g.cs | 598 -- .../Types/Ingest/ScriptProcessor.g.cs | 589 -- .../_Generated/Types/Ingest/SetProcessor.g.cs | 780 -- .../Ingest/SetSecurityUserProcessor.g.cs | 531 -- .../Types/Ingest/SimulateDocumentResult.g.cs | 38 - .../Types/Ingest/SortProcessor.g.cs | 629 -- .../Types/Ingest/SplitProcessor.g.cs | 706 -- .../Types/Ingest/TerminateProcessor.g.cs | 407 -- .../Types/Ingest/TrimProcessor.g.cs | 626 -- .../Types/Ingest/UppercaseProcessor.g.cs | 626 -- .../Types/Ingest/UriPartsProcessor.g.cs | 710 -- .../Types/Ingest/UrlDecodeProcessor.g.cs | 626 -- .../Types/Ingest/UserAgentProcessor.g.cs | 751 -- .../_Generated/Types/Ingest/Web.g.cs | 47 - .../_Generated/Types/InlineGet.g.cs | 115 - .../_Generated/Types/KnnQuery.g.cs | 663 -- .../_Generated/Types/KnnRetriever.g.cs | 566 -- .../_Generated/Types/KnnSearch.g.cs | 728 -- .../_Generated/Types/LatLonGeoLocation.g.cs | 91 - .../LicenseManagement/LicenseInformation.g.cs | 56 - .../AdaptiveAllocationsSettings.g.cs | 38 - .../MachineLearning/AggregateOutput.g.cs | 228 - .../Types/MachineLearning/AnalysisConfig.g.cs | 815 --- .../MachineLearning/AnalysisConfigRead.g.cs | 142 - .../Types/MachineLearning/AnalysisLimits.g.cs | 99 - .../MachineLearning/AnalysisMemoryLimit.g.cs | 69 - .../Types/MachineLearning/Anomaly.g.cs | 223 - .../Types/MachineLearning/AnomalyCause.g.cs | 60 - .../MachineLearning/AnomalyDetectors.g.cs | 42 - .../MachineLearning/AnomalyExplanation.g.cs | 111 - .../MachineLearning/ApiKeyAuthorization.g.cs | 47 - .../MachineLearning/BucketInfluencer.g.cs | 123 - .../Types/MachineLearning/BucketSummary.g.cs | 118 - .../Types/MachineLearning/Calendar.g.cs | 55 - .../Types/MachineLearning/CalendarEvent.g.cs | 232 - .../CategorizationAnalyzer.g.cs | 42 - .../CategorizationAnalyzerDefinition.g.cs | 125 - .../Types/MachineLearning/Category.g.cs | 125 - .../Types/MachineLearning/ChunkingConfig.g.cs | 101 - .../ClassificationInferenceOptions.g.cs | 181 - .../MachineLearning/ConfusionMatrixItem.g.cs | 40 - .../ConfusionMatrixPrediction.g.cs | 36 - .../ConfusionMatrixThreshold.g.cs | 63 - .../Types/MachineLearning/DataCounts.g.cs | 70 - .../MachineLearning/DataDescription.g.cs | 268 - .../Types/MachineLearning/Datafeed.g.cs | 189 - .../DatafeedAuthorization.g.cs | 55 - .../Types/MachineLearning/DatafeedConfig.g.cs | 1082 --- .../MachineLearning/DatafeedRunningState.g.cs | 56 - .../Types/MachineLearning/DatafeedStats.g.cs | 74 - .../MachineLearning/DatafeedTimingStats.g.cs | 81 - .../Types/MachineLearning/Datafeeds.g.cs | 34 - .../MachineLearning/DataframeAnalysis.g.cs | 257 - .../DataframeAnalysisAnalyzedFields.g.cs | 91 - .../DataframeAnalysisClassification.g.cs | 1328 ---- .../DataframeAnalysisFeatureProcessor.g.cs | 287 - ...ysisFeatureProcessorFrequencyEncoding.g.cs | 181 - ...AnalysisFeatureProcessorMultiEncoding.g.cs | 71 - ...AnalysisFeatureProcessorNGramEncoding.g.cs | 342 - ...nalysisFeatureProcessorOneHotEncoding.g.cs | 181 - ...sisFeatureProcessorTargetMeanEncoding.g.cs | 253 - .../DataframeAnalysisOutlierDetection.g.cs | 205 - .../DataframeAnalysisRegression.g.cs | 1344 ---- .../MachineLearning/DataframeAnalytics.g.cs | 79 - .../DataframeAnalyticsAuthorization.g.cs | 55 - .../DataframeAnalyticsDestination.g.cs | 187 - .../DataframeAnalyticsFieldSelection.g.cs | 79 - .../DataframeAnalyticsMemoryEstimation.g.cs | 47 - .../DataframeAnalyticsSource.g.cs | 351 - .../DataframeAnalyticsStatsDataCounts.g.cs | 55 - .../DataframeAnalyticsStatsMemoryUsage.g.cs | 63 - .../DataframeAnalyticsStatsProgress.g.cs | 47 - .../DataframeAnalyticsSummary.g.cs | 64 - .../DataframeClassificationSummary.g.cs | 72 - ...ataframeClassificationSummaryAccuracy.g.cs | 36 - ...ationSummaryMulticlassConfusionMatrix.g.cs | 36 - ...taframeClassificationSummaryPrecision.g.cs | 36 - .../DataframeClassificationSummaryRecall.g.cs | 36 - .../MachineLearning/DataframeEvaluation.g.cs | 257 - .../DataframeEvaluationClass.g.cs | 36 - .../DataframeEvaluationClassification.g.cs | 425 -- ...aframeEvaluationClassificationMetrics.g.cs | 207 - ...EvaluationClassificationMetricsAucRoc.g.cs | 99 - .../DataframeEvaluationOutlierDetection.g.cs | 329 - ...rameEvaluationOutlierDetectionMetrics.g.cs | 181 - .../DataframeEvaluationRegression.g.cs | 329 - .../DataframeEvaluationRegressionMetrics.g.cs | 211 - ...frameEvaluationRegressionMetricsHuber.g.cs | 73 - ...aframeEvaluationRegressionMetricsMsle.g.cs | 73 - .../DataframeEvaluationSummaryAucRoc.g.cs | 36 - ...frameEvaluationSummaryAucRocCurveItem.g.cs | 38 - .../DataframeEvaluationValue.g.cs | 34 - .../DataframeOutlierDetectionSummary.g.cs | 63 - .../DataframePreviewConfig.g.cs | 384 - .../DataframeRegressionSummary.g.cs | 63 - .../Types/MachineLearning/Defaults.g.cs | 36 - .../Types/MachineLearning/Definition.g.cs | 187 - .../DelayedDataCheckConfig.g.cs | 99 - .../Types/MachineLearning/DetectionRule.g.cs | 311 - .../Types/MachineLearning/Detector.g.cs | 795 -- .../Types/MachineLearning/DetectorRead.g.cs | 124 - .../Types/MachineLearning/DetectorUpdate.g.cs | 312 - .../Types/MachineLearning/Ensemble.g.cs | 211 - .../ExponentialAverageCalculationContext.g.cs | 38 - .../FillMaskInferenceOptions.g.cs | 246 - .../FillMaskInferenceUpdateOptions.g.cs | 157 - .../Types/MachineLearning/Filter.g.cs | 55 - .../Types/MachineLearning/FilterRef.g.cs | 95 - .../FrequencyEncodingPreprocessor.g.cs | 83 - .../Types/MachineLearning/GeoResults.g.cs | 47 - .../Types/MachineLearning/Hyperparameter.g.cs | 71 - .../InferenceConfigCreate.g.cs | 367 - .../InferenceConfigUpdate.g.cs | 362 - .../InferenceResponseResult.g.cs | 114 - .../Types/MachineLearning/Influence.g.cs | 36 - .../Types/MachineLearning/Influencer.g.cs | 126 - .../Types/MachineLearning/Input.g.cs | 59 - .../_Generated/Types/MachineLearning/Job.g.cs | 231 - .../Types/MachineLearning/JobBlocked.g.cs | 36 - .../JobForecastStatistics.g.cs | 44 - .../Types/MachineLearning/JobStatistics.g.cs | 40 - .../Types/MachineLearning/JobStats.g.cs | 106 - .../Types/MachineLearning/JobTimingStats.g.cs | 48 - .../Types/MachineLearning/JvmStats.g.cs | 79 - .../Types/MachineLearning/Limits.g.cs | 42 - .../Types/MachineLearning/MemMlStats.g.cs | 111 - .../Types/MachineLearning/MemStats.g.cs | 73 - .../Types/MachineLearning/Memory.g.cs | 76 - .../MachineLearning/ModelPackageConfig.g.cs | 60 - .../MachineLearning/ModelPlotConfig.g.cs | 239 - .../Types/MachineLearning/ModelSizeStats.g.cs | 76 - .../Types/MachineLearning/ModelSnapshot.g.cs | 111 - .../MachineLearning/ModelSnapshotUpgrade.g.cs | 40 - .../Types/MachineLearning/NativeCode.g.cs | 36 - .../MachineLearning/NerInferenceOptions.g.cs | 212 - .../NerInferenceUpdateOptions.g.cs | 131 - .../NlpBertTokenizationConfig.g.cs | 187 - .../NlpRobertaTokenizationConfig.g.cs | 215 - .../NlpTokenizationUpdateOptions.g.cs | 99 - .../OneHotEncodingPreprocessor.g.cs | 72 - .../Types/MachineLearning/OverallBucket.g.cs | 87 - .../MachineLearning/OverallBucketJob.g.cs | 36 - .../Types/MachineLearning/Page.g.cs | 99 - .../PassThroughInferenceOptions.g.cs | 186 - .../PassThroughInferenceUpdateOptions.g.cs | 131 - .../PerPartitionCategorization.g.cs | 99 - .../Types/MachineLearning/Preprocessor.g.cs | 257 - .../QuestionAnsweringInferenceOptions.g.cs | 193 - ...estionAnsweringInferenceUpdateOptions.g.cs | 205 - .../RegressionInferenceOptions.g.cs | 199 - .../Types/MachineLearning/RuleCondition.g.cs | 113 - .../RunningStateSearchInterval.g.cs | 63 - .../TargetMeanEncodingPreprocessor.g.cs | 94 - .../TextClassificationInferenceOptions.g.cs | 193 - ...tClassificationInferenceUpdateOptions.g.cs | 183 - .../TextEmbeddingInferenceOptions.g.cs | 212 - .../TextEmbeddingInferenceUpdateOptions.g.cs | 120 - .../TextExpansionInferenceOptions.g.cs | 186 - .../TextExpansionInferenceUpdateOptions.g.cs | 120 - .../MachineLearning/TokenizationConfig.g.cs | 277 - .../Types/MachineLearning/TopClassEntry.g.cs | 38 - .../TotalFeatureImportance.g.cs | 55 - .../TotalFeatureImportanceClass.g.cs | 47 - .../TotalFeatureImportanceStatistics.g.cs | 55 - .../Types/MachineLearning/TrainedModel.g.cs | 241 - .../TrainedModelAssignment.g.cs | 64 - .../TrainedModelAssignmentRoutingTable.g.cs | 64 - .../TrainedModelAssignmentTaskParameters.g.cs | 93 - .../MachineLearning/TrainedModelConfig.g.cs | 162 - .../TrainedModelConfigInput.g.cs | 39 - .../TrainedModelConfigMetadata.g.cs | 57 - ...rainedModelDeploymentAllocationStatus.g.cs | 55 - .../TrainedModelDeploymentNodesStats.g.cs | 137 - .../TrainedModelDeploymentStats.g.cs | 157 - .../MachineLearning/TrainedModelEntities.g.cs | 42 - .../TrainedModelInferenceClassImportance.g.cs | 36 - ...rainedModelInferenceFeatureImportance.g.cs | 38 - .../TrainedModelInferenceStats.g.cs | 75 - .../MachineLearning/TrainedModelLocation.g.cs | 34 - .../TrainedModelLocationIndex.g.cs | 34 - .../TrainedModelPrefixStrings.g.cs | 99 - .../TrainedModelSizeStats.g.cs | 47 - .../MachineLearning/TrainedModelStats.g.cs | 81 - .../MachineLearning/TrainedModelTree.g.cs | 162 - .../MachineLearning/TrainedModelTreeNode.g.cs | 179 - .../TransformAuthorization.g.cs | 55 - .../Types/MachineLearning/Vocabulary.g.cs | 59 - .../Types/MachineLearning/Weights.g.cs | 59 - ...eroShotClassificationInferenceOptions.g.cs | 243 - ...tClassificationInferenceUpdateOptions.g.cs | 179 - .../AggregateMetricDoubleProperty.g.cs | 375 - .../_Generated/Types/Mapping/AllField.g.cs | 158 - .../Types/Mapping/BinaryProperty.g.cs | 392 - .../Types/Mapping/BooleanProperty.g.cs | 620 -- .../Types/Mapping/ByteNumberProperty.g.cs | 710 -- .../Types/Mapping/CompletionProperty.g.cs | 736 -- .../Types/Mapping/CompositeSubField.g.cs | 59 - .../Mapping/ConstantKeywordProperty.g.cs | 332 - .../Types/Mapping/DataStreamTimestamp.g.cs | 59 - .../Types/Mapping/DateNanosProperty.g.cs | 572 -- .../Types/Mapping/DateProperty.g.cs | 740 -- .../Types/Mapping/DateRangeProperty.g.cs | 512 -- .../Mapping/DenseVectorIndexOptions.g.cs | 185 - .../Types/Mapping/DenseVectorProperty.g.cs | 698 -- .../Types/Mapping/DoubleNumberProperty.g.cs | 710 -- .../Types/Mapping/DoubleRangeProperty.g.cs | 482 -- .../Types/Mapping/DynamicProperty.g.cs | 1268 ---- .../Types/Mapping/DynamicTemplate.g.cs | 535 -- .../Types/Mapping/FieldAliasProperty.g.cs | 355 - .../Types/Mapping/FieldNamesField.g.cs | 59 - .../Types/Mapping/FlattenedProperty.g.cs | 571 -- .../Types/Mapping/FloatNumberProperty.g.cs | 710 -- .../Types/Mapping/FloatRangeProperty.g.cs | 482 -- .../Types/Mapping/GeoPointProperty.g.cs | 680 -- .../Types/Mapping/GeoShapeProperty.g.cs | 563 -- .../Mapping/HalfFloatNumberProperty.g.cs | 710 -- .../Types/Mapping/HistogramProperty.g.cs | 331 - .../Types/Mapping/IcuCollationProperty.g.cs | 905 --- .../_Generated/Types/Mapping/IndexField.g.cs | 59 - .../Types/Mapping/IntegerNumberProperty.g.cs | 710 -- .../Types/Mapping/IntegerRangeProperty.g.cs | 482 -- .../_Generated/Types/Mapping/IpProperty.g.cs | 680 -- .../Types/Mapping/IpRangeProperty.g.cs | 482 -- .../Types/Mapping/JoinProperty.g.cs | 361 - .../Types/Mapping/KeywordProperty.g.cs | 830 --- .../Types/Mapping/LongNumberProperty.g.cs | 710 -- .../Types/Mapping/LongRangeProperty.g.cs | 482 -- .../Types/Mapping/MatchOnlyTextProperty.g.cs | 278 - .../Types/Mapping/Murmur3HashProperty.g.cs | 392 - .../Types/Mapping/NestedProperty.g.cs | 452 -- .../Types/Mapping/ObjectProperty.g.cs | 422 -- .../Mapping/PassthroughObjectProperty.g.cs | 452 -- .../Types/Mapping/PercolatorProperty.g.cs | 301 - .../Types/Mapping/PointProperty.g.cs | 482 -- .../_Generated/Types/Mapping/Properties.g.cs | 612 -- .../Types/Mapping/RankFeatureProperty.g.cs | 331 - .../Types/Mapping/RankFeaturesProperty.g.cs | 331 - .../Types/Mapping/RoutingField.g.cs | 59 - .../Types/Mapping/RuntimeField.g.cs | 671 -- .../Mapping/RuntimeFieldFetchFields.g.cs | 136 - .../Mapping/ScaledFloatNumberProperty.g.cs | 740 -- .../Mapping/SearchAsYouTypeProperty.g.cs | 632 -- .../Types/Mapping/SemanticTextProperty.g.cs | 85 - .../Types/Mapping/ShapeProperty.g.cs | 533 -- .../Types/Mapping/ShortNumberProperty.g.cs | 710 -- .../_Generated/Types/Mapping/SizeField.g.cs | 59 - .../_Generated/Types/Mapping/SourceField.g.cs | 138 - .../Types/Mapping/SparseVectorProperty.g.cs | 301 - .../Types/Mapping/SuggestContext.g.cs | 184 - .../Types/Mapping/TextIndexPrefixes.g.cs | 70 - .../Types/Mapping/TextProperty.g.cs | 1028 --- .../Types/Mapping/TokenCountProperty.g.cs | 542 -- .../_Generated/Types/Mapping/TypeMapping.g.cs | 988 --- .../Mapping/UnsignedLongNumberProperty.g.cs | 710 -- .../Types/Mapping/VersionProperty.g.cs | 392 - .../Types/Mapping/WildcardProperty.g.cs | 422 -- .../_Generated/Types/MergesStats.g.cs | 64 - .../_Generated/Types/NestedSortValue.g.cs | 312 - .../_Generated/Types/NodeStatistics.g.cs | 62 - .../Types/Nodes/AdaptiveSelection.g.cs | 87 - .../_Generated/Types/Nodes/Breaker.g.cs | 79 - .../_Generated/Types/Nodes/Cgroup.g.cs | 55 - .../_Generated/Types/Nodes/CgroupCpu.g.cs | 63 - .../_Generated/Types/Nodes/CgroupCpuStat.g.cs | 55 - .../_Generated/Types/Nodes/CgroupMemory.g.cs | 58 - .../_Generated/Types/Nodes/Client.g.cs | 121 - .../Types/Nodes/ClusterAppliedStats.g.cs | 34 - .../Types/Nodes/ClusterStateQueue.g.cs | 55 - .../Types/Nodes/ClusterStateUpdate.g.cs | 155 - .../_Generated/Types/Nodes/Context.g.cs | 40 - .../_Generated/Types/Nodes/Cpu.g.cs | 48 - .../_Generated/Types/Nodes/CpuAcct.g.cs | 47 - .../_Generated/Types/Nodes/DataPathStats.g.cs | 117 - .../Types/Nodes/DeprecationIndexing.g.cs | 34 - .../_Generated/Types/Nodes/Discovery.g.cs | 63 - .../Types/Nodes/ExtendedMemoryStats.g.cs | 92 - .../_Generated/Types/Nodes/FileSystem.g.cs | 64 - .../Types/Nodes/FileSystemTotal.g.cs | 83 - .../Types/Nodes/GarbageCollector.g.cs | 39 - .../Types/Nodes/GarbageCollectorTotal.g.cs | 55 - .../_Generated/Types/Nodes/Http.g.cs | 56 - .../Types/Nodes/IndexingPressure.g.cs | 39 - .../Types/Nodes/IndexingPressureMemory.g.cs | 65 - .../_Generated/Types/Nodes/Ingest.g.cs | 47 - .../_Generated/Types/Nodes/IngestStats.g.cs | 92 - .../_Generated/Types/Nodes/IngestTotal.g.cs | 63 - .../_Generated/Types/Nodes/IoStatDevice.g.cs | 79 - .../_Generated/Types/Nodes/IoStats.g.cs | 48 - .../_Generated/Types/Nodes/Jvm.g.cs | 96 - .../_Generated/Types/Nodes/JvmClasses.g.cs | 55 - .../Types/Nodes/JvmMemoryStats.g.cs | 87 - .../_Generated/Types/Nodes/JvmThreads.g.cs | 47 - .../Types/Nodes/KeyedProcessor.g.cs | 36 - .../_Generated/Types/Nodes/MemoryStats.g.cs | 76 - .../Types/Nodes/NodeBufferPool.g.cs | 71 - .../_Generated/Types/Nodes/NodeInfo.g.cs | 128 - .../Types/Nodes/NodeInfoAction.g.cs | 34 - .../Types/Nodes/NodeInfoAggregation.g.cs | 34 - .../Types/Nodes/NodeInfoBootstrap.g.cs | 34 - .../Types/Nodes/NodeInfoClient.g.cs | 34 - .../Types/Nodes/NodeInfoDiscover.g.cs | 91 - .../_Generated/Types/Nodes/NodeInfoHttp.g.cs | 40 - .../Types/Nodes/NodeInfoIngest.g.cs | 34 - .../Types/Nodes/NodeInfoIngestDownloader.g.cs | 34 - .../Types/Nodes/NodeInfoIngestInfo.g.cs | 34 - .../Types/Nodes/NodeInfoIngestProcessor.g.cs | 34 - .../Types/Nodes/NodeInfoJvmMemory.g.cs | 52 - .../Types/Nodes/NodeInfoMemory.g.cs | 36 - .../Types/Nodes/NodeInfoNetwork.g.cs | 36 - .../Types/Nodes/NodeInfoNetworkInterface.g.cs | 38 - .../_Generated/Types/Nodes/NodeInfoOSCPU.g.cs | 48 - .../_Generated/Types/Nodes/NodeInfoPath.g.cs | 41 - .../Types/Nodes/NodeInfoRepositories.g.cs | 34 - .../Types/Nodes/NodeInfoRepositoriesUrl.g.cs | 34 - .../Types/Nodes/NodeInfoScript.g.cs | 36 - .../Types/Nodes/NodeInfoSearch.g.cs | 34 - .../Types/Nodes/NodeInfoSearchRemote.g.cs | 34 - .../Types/Nodes/NodeInfoSettings.g.cs | 62 - .../Types/Nodes/NodeInfoSettingsCluster.g.cs | 42 - .../NodeInfoSettingsClusterElection.g.cs | 34 - .../Types/Nodes/NodeInfoSettingsHttp.g.cs | 40 - .../Types/Nodes/NodeInfoSettingsHttpType.g.cs | 34 - .../Types/Nodes/NodeInfoSettingsIngest.g.cs | 100 - .../Types/Nodes/NodeInfoSettingsNetwork.g.cs | 35 - .../Types/Nodes/NodeInfoSettingsNode.g.cs | 38 - .../Nodes/NodeInfoSettingsTransport.g.cs | 38 - .../NodeInfoSettingsTransportFeatures.g.cs | 34 - .../Nodes/NodeInfoSettingsTransportType.g.cs | 34 - .../Types/Nodes/NodeInfoTransport.g.cs | 38 - .../_Generated/Types/Nodes/NodeInfoXpack.g.cs | 40 - .../Types/Nodes/NodeInfoXpackLicense.g.cs | 34 - .../Types/Nodes/NodeInfoXpackLicenseType.g.cs | 34 - .../Types/Nodes/NodeInfoXpackMl.g.cs | 34 - .../Types/Nodes/NodeInfoXpackSecurity.g.cs | 40 - .../Nodes/NodeInfoXpackSecurityAuthc.g.cs | 36 - .../NodeInfoXpackSecurityAuthcRealms.g.cs | 38 - ...odeInfoXpackSecurityAuthcRealmsStatus.g.cs | 36 - .../NodeInfoXpackSecurityAuthcToken.g.cs | 34 - .../Types/Nodes/NodeInfoXpackSecuritySsl.g.cs | 34 - .../_Generated/Types/Nodes/NodeJvmInfo.g.cs | 151 - .../Types/Nodes/NodeOperatingSystemInfo.g.cs | 87 - .../Types/Nodes/NodeProcessInfo.g.cs | 55 - .../Types/Nodes/NodeThreadPoolInfo.g.cs | 44 - .../_Generated/Types/Nodes/NodeUsage.g.cs | 40 - .../Types/Nodes/OperatingSystem.g.cs | 42 - .../_Generated/Types/Nodes/Pool.g.cs | 63 - .../Types/Nodes/PressureMemory.g.cs | 137 - .../_Generated/Types/Nodes/Process.g.cs | 72 - .../_Generated/Types/Nodes/Processor.g.cs | 63 - .../Types/Nodes/PublishedClusterStates.g.cs | 55 - .../_Generated/Types/Nodes/Recording.g.cs | 40 - .../_Generated/Types/Nodes/ScriptCache.g.cs | 57 - .../_Generated/Types/Nodes/Scripting.g.cs | 65 - .../Types/Nodes/SerializedClusterState.g.cs | 42 - .../Nodes/SerializedClusterStateDetail.g.cs | 42 - .../_Generated/Types/Nodes/Stats.g.cs | 198 - .../_Generated/Types/Nodes/ThreadCount.g.cs | 79 - .../_Generated/Types/Nodes/Transport.g.cs | 113 - .../Types/Nodes/TransportHistogram.g.cs | 56 - .../_Generated/Types/PluginStats.g.cs | 50 - .../_Generated/Types/QueryCacheStats.g.cs | 96 - .../_Generated/Types/QueryDsl/BoolQuery.g.cs | 827 --- .../Types/QueryDsl/BoostingQuery.g.cs | 390 - .../Types/QueryDsl/CombinedFieldsQuery.g.cs | 398 - .../Types/QueryDsl/ConstantScoreQuery.g.cs | 256 - .../Types/QueryDsl/DateDecayFunction.g.cs | 228 - .../QueryDsl/DateDistanceFeatureQuery.g.cs | 329 - .../Types/QueryDsl/DateRangeQuery.g.cs | 643 -- .../Types/QueryDsl/DecayPlacement.g.cs | 66 - .../Types/QueryDsl/DisMaxQuery.g.cs | 356 - .../Types/QueryDsl/ExistsQuery.g.cs | 229 - .../Types/QueryDsl/FieldAndFormat.g.cs | 230 - .../Types/QueryDsl/FieldLookup.g.cs | 275 - .../FieldValueFactorScoreFunction.g.cs | 280 - .../Types/QueryDsl/FunctionScore.g.cs | 410 -- .../Types/QueryDsl/FunctionScoreQuery.g.cs | 586 -- .../_Generated/Types/QueryDsl/FuzzyQuery.g.cs | 578 -- .../Types/QueryDsl/GeoBoundingBoxQuery.g.cs | 393 - .../Types/QueryDsl/GeoDecayFunction.g.cs | 228 - .../QueryDsl/GeoDistanceFeatureQuery.g.cs | 329 - .../Types/QueryDsl/GeoDistanceQuery.g.cs | 497 -- .../Types/QueryDsl/GeoShapeFieldQuery.g.cs | 239 - .../Types/QueryDsl/GeoShapeQuery.g.cs | 375 - .../Types/QueryDsl/HasChildQuery.g.cs | 575 -- .../Types/QueryDsl/HasParentQuery.g.cs | 484 -- .../_Generated/Types/QueryDsl/IdsQuery.g.cs | 125 - .../_Generated/Types/QueryDsl/Intervals.g.cs | 302 - .../Types/QueryDsl/IntervalsAllOf.g.cs | 421 -- .../Types/QueryDsl/IntervalsAnyOf.g.cs | 330 - .../Types/QueryDsl/IntervalsFilter.g.cs | 347 - .../Types/QueryDsl/IntervalsFuzzy.g.cs | 373 - .../Types/QueryDsl/IntervalsMatch.g.cs | 436 -- .../Types/QueryDsl/IntervalsPrefix.g.cs | 241 - .../Types/QueryDsl/IntervalsQuery.g.cs | 475 -- .../Types/QueryDsl/IntervalsWildcard.g.cs | 244 - .../_Generated/Types/QueryDsl/Like.g.cs | 48 - .../Types/QueryDsl/LikeDocument.g.cs | 352 - .../Types/QueryDsl/MatchAllQuery.g.cs | 99 - .../Types/QueryDsl/MatchBoolPrefixQuery.g.cs | 767 -- .../Types/QueryDsl/MatchNoneQuery.g.cs | 96 - .../QueryDsl/MatchPhrasePrefixQuery.g.cs | 523 -- .../Types/QueryDsl/MatchPhraseQuery.g.cs | 468 -- .../_Generated/Types/QueryDsl/MatchQuery.g.cs | 911 --- .../Types/QueryDsl/MoreLikeThisQuery.g.cs | 904 --- .../Types/QueryDsl/MultiMatchQuery.g.cs | 849 --- .../Types/QueryDsl/NestedQuery.g.cs | 522 -- .../Types/QueryDsl/NumberRangeQuery.g.cs | 533 -- .../Types/QueryDsl/NumericDecayFunction.g.cs | 228 - .../Types/QueryDsl/ParentIdQuery.g.cs | 174 - .../Types/QueryDsl/PercolateQuery.g.cs | 578 -- .../_Generated/Types/QueryDsl/PinnedDoc.g.cs | 91 - .../Types/QueryDsl/PinnedQuery.g.cs | 409 -- .../Types/QueryDsl/PrefixQuery.g.cs | 419 -- .../_Generated/Types/QueryDsl/Query.g.cs | 1061 --- .../Types/QueryDsl/QueryStringQuery.g.cs | 1287 ---- .../Types/QueryDsl/RandomScoreFunction.g.cs | 146 - .../QueryDsl/RankFeatureFunctionLinear.g.cs | 47 - .../RankFeatureFunctionLogarithm.g.cs | 69 - .../RankFeatureFunctionSaturation.g.cs | 73 - .../QueryDsl/RankFeatureFunctionSigmoid.g.cs | 91 - .../Types/QueryDsl/RankFeatureQuery.g.cs | 642 -- .../Types/QueryDsl/RegexpQuery.g.cs | 526 -- .../_Generated/Types/QueryDsl/RuleQuery.g.cs | 274 - .../Types/QueryDsl/ScriptQuery.g.cs | 154 - .../Types/QueryDsl/ScriptScoreFunction.g.cs | 105 - .../Types/QueryDsl/ScriptScoreQuery.g.cs | 401 - .../Types/QueryDsl/SemanticQuery.g.cs | 140 - .../Types/QueryDsl/ShapeFieldQuery.g.cs | 255 - .../_Generated/Types/QueryDsl/ShapeQuery.g.cs | 372 - .../QueryDsl/SimpleQueryStringQuery.g.cs | 723 -- .../Types/QueryDsl/SpanContainingQuery.g.cs | 361 - .../Types/QueryDsl/SpanFieldMaskingQuery.g.cs | 279 - .../Types/QueryDsl/SpanFirstQuery.g.cs | 287 - .../Types/QueryDsl/SpanMultiTermQuery.g.cs | 251 - .../Types/QueryDsl/SpanNearQuery.g.cs | 395 - .../Types/QueryDsl/SpanNotQuery.g.cs | 490 -- .../Types/QueryDsl/SpanOrQuery.g.cs | 307 - .../_Generated/Types/QueryDsl/SpanQuery.g.cs | 360 - .../Types/QueryDsl/SpanTermQuery.g.cs | 288 - .../Types/QueryDsl/SpanWithinQuery.g.cs | 361 - .../Types/QueryDsl/SparseVectorQuery.g.cs | 506 -- .../_Generated/Types/QueryDsl/TermQuery.g.cs | 364 - .../Types/QueryDsl/TermRangeQuery.g.cs | 533 -- .../Types/QueryDsl/TermsLookup.g.cs | 176 - .../_Generated/Types/QueryDsl/TermsQuery.g.cs | 280 - .../Types/QueryDsl/TermsQueryField.g.cs | 42 - .../Types/QueryDsl/TermsSetQuery.g.cs | 572 -- .../Types/QueryDsl/UntypedDecayFunction.g.cs | 228 - .../QueryDsl/UntypedDistanceFeatureQuery.g.cs | 329 - .../Types/QueryDsl/UntypedRangeQuery.g.cs | 643 -- .../Types/QueryDsl/WildcardQuery.g.cs | 483 -- .../Types/QueryDsl/WrapperQuery.g.cs | 120 - .../Types/QueryRules/QueryRule.g.cs | 202 - .../Types/QueryRules/QueryRuleActions.g.cs | 136 - .../Types/QueryRules/QueryRuleCriteria.g.cs | 89 - .../QueryRules/QueryRulesetListItem.g.cs | 63 - .../QueryRules/QueryRulesetMatchedRule.g.cs | 47 - .../_Generated/Types/QueryVectorBuilder.g.cs | 227 - .../_Generated/Types/RRFRetriever.g.cs | 514 -- .../_Generated/Types/RecoveryStats.g.cs | 40 - .../_Generated/Types/RefreshStats.g.cs | 44 - .../_Generated/Types/RequestCacheStats.g.cs | 42 - .../_Generated/Types/Retries.g.cs | 36 - .../_Generated/Types/Retriever.g.cs | 287 - .../_Generated/Types/RuleRetriever.g.cs | 486 -- .../_Generated/Types/ScoreSort.g.cs | 63 - .../_Generated/Types/Script.g.cs | 170 - .../_Generated/Types/ScriptField.g.cs | 108 - .../_Generated/Types/ScriptSort.g.cs | 326 - .../_Generated/Types/SearchStats.g.cs | 68 - .../_Generated/Types/Security/Access.g.cs | 47 - .../_Generated/Types/Security/ApiKey.g.cs | 166 - .../Types/Security/ApiKeyAggregation.g.cs | 452 -- .../Security/ApiKeyFiltersAggregation.g.cs | 244 - .../Types/Security/ApiKeyQuery.g.cs | 384 - .../ApplicationGlobalUserPrivileges.g.cs | 34 - .../Types/Security/ApplicationPrivileges.g.cs | 113 - .../Security/ApplicationPrivilegesCheck.g.cs | 113 - .../Types/Security/AuthenticateApiKey.g.cs | 36 - .../Types/Security/AuthenticateToken.g.cs | 36 - .../Types/Security/AuthenticatedUser.g.cs | 54 - .../Security/AuthenticationProvider.g.cs | 36 - .../_Generated/Types/Security/BulkError.g.cs | 47 - .../Types/Security/ClusterNode.g.cs | 34 - .../Types/Security/CreatedStatus.g.cs | 34 - .../_Generated/Types/Security/FieldRule.g.cs | 251 - .../Types/Security/FieldSecurity.g.cs | 122 - .../Types/Security/FoundStatus.g.cs | 34 - .../Types/Security/GetUserProfileErrors.g.cs | 36 - .../Types/Security/GlobalPrivilege.g.cs | 34 - .../Types/Security/GrantApiKey.g.cs | 231 - .../HasPrivilegesUserProfileErrors.g.cs | 36 - .../_Generated/Types/Security/Hint.g.cs | 103 - .../Types/Security/IndexPrivilegesCheck.g.cs | 121 - .../Types/Security/IndicesPrivileges.g.cs | 284 - .../Types/Security/ManageUserPrivileges.g.cs | 34 - .../Types/Security/NodesCredentials.g.cs | 47 - .../Security/NodesCredentialsFileToken.g.cs | 34 - .../Types/Security/PrivilegeActions.g.cs | 104 - .../Types/Security/PrivilegesCheck.g.cs | 220 - .../_Generated/Types/Security/QueryRole.g.cs | 182 - .../_Generated/Types/Security/QueryUser.g.cs | 48 - .../_Generated/Types/Security/RealmInfo.g.cs | 36 - .../Types/Security/ReplicationAccess.g.cs | 48 - .../Types/Security/Restriction.g.cs | 59 - .../_Generated/Types/Security/Role.g.cs | 48 - .../Types/Security/RoleDescriptor.g.cs | 804 -- .../Types/Security/RoleDescriptorRead.g.cs | 160 - .../Types/Security/RoleDescriptorWrapper.g.cs | 34 - .../Types/Security/RoleMapping.g.cs | 42 - .../Types/Security/RoleMappingRule.g.cs | 272 - .../_Generated/Types/Security/RoleQuery.g.cs | 384 - .../Types/Security/RoleTemplate.g.cs | 108 - .../Types/Security/SearchAccess.g.cs | 56 - .../Types/Security/ServiceToken.g.cs | 36 - .../Types/Security/TotalUserProfiles.g.cs | 36 - .../Types/Security/UserIndicesPrivileges.g.cs | 72 - .../Types/Security/UserProfile.g.cs | 42 - .../Security/UserProfileHitMetadata.g.cs | 36 - .../Types/Security/UserProfileUser.g.cs | 44 - .../Security/UserProfileWithMetadata.g.cs | 46 - .../_Generated/Types/Security/UserQuery.g.cs | 384 - .../_Generated/Types/Security/UserRealm.g.cs | 36 - .../_Generated/Types/SegmentsStats.g.cs | 213 - .../_Generated/Types/ShardFailure.g.cs | 42 - .../_Generated/Types/ShardStatistics.g.cs | 54 - .../_Generated/Types/SlicedScroll.g.cs | 156 - .../_Generated/Types/Slices.g.cs | 47 - .../Types/Snapshot/AzureRepository.g.cs | 144 - .../Snapshot/AzureRepositorySettings.g.cs | 183 - .../Snapshot/CleanupRepositoryResults.g.cs | 47 - .../Types/Snapshot/CompactNodeInfo.g.cs | 34 - .../Snapshot/FileCountSnapshotStats.g.cs | 36 - .../Types/Snapshot/GcsRepository.g.cs | 144 - .../Types/Snapshot/GcsRepositorySettings.g.cs | 179 - .../Types/Snapshot/IndexDetails.g.cs | 40 - .../Types/Snapshot/InfoFeatureState.g.cs | 37 - .../Types/Snapshot/ReadOnlyUrlRepository.g.cs | 144 - .../ReadOnlyUrlRepositorySettings.g.cs | 164 - .../Types/Snapshot/Repositories.g.cs | 161 - .../Types/Snapshot/S3Repository.g.cs | 144 - .../Types/Snapshot/S3RepositorySettings.g.cs | 224 - .../Types/Snapshot/ShardsStats.g.cs | 44 - .../Types/Snapshot/ShardsStatsSummary.g.cs | 42 - .../Snapshot/ShardsStatsSummaryItem.g.cs | 36 - .../Snapshot/SharedFileSystemRepository.g.cs | 144 - .../SharedFileSystemRepositorySettings.g.cs | 149 - .../Types/Snapshot/SnapshotIndexStats.g.cs | 38 - .../Types/Snapshot/SnapshotInfo.g.cs | 75 - .../Types/Snapshot/SnapshotResponseItem.g.cs | 38 - .../Types/Snapshot/SnapshotRestore.g.cs | 38 - .../Types/Snapshot/SnapshotShardFailure.g.cs | 44 - .../Types/Snapshot/SnapshotShardsStatus.g.cs | 36 - .../Types/Snapshot/SnapshotStats.g.cs | 42 - .../Types/Snapshot/SourceOnlyRepository.g.cs | 144 - .../SourceOnlyRepositorySettings.g.cs | 255 - .../_Generated/Types/Snapshot/Status.g.cs | 48 - .../InProgress.g.cs | 40 - .../Invocation.g.cs | 36 - .../Retention.g.cs | 113 - .../SlmConfiguration.g.cs | 207 - .../SlmPolicy.g.cs | 42 - .../SnapshotLifecycle.g.cs | 52 - .../Statistics.g.cs | 135 - .../_Generated/Types/SortOptions.g.cs | 296 - .../Types/SpecUtils/OverloadOf.g.cs | 39 - .../_Generated/Types/Sql/Column.g.cs | 36 - .../_Generated/Types/StandardRetriever.g.cs | 719 -- .../_Generated/Types/StoreStats.g.cs | 81 - .../_Generated/Types/StoredScript.g.cs | 106 - .../Types/Synonyms/SynonymRule.g.cs | 95 - .../Types/Synonyms/SynonymRuleRead.g.cs | 47 - .../Types/Synonyms/SynonymsSetItem.g.cs | 47 - .../_Generated/Types/TaskFailure.g.cs | 40 - .../_Generated/Types/Tasks/NodeTasks.g.cs | 46 - .../Types/Tasks/ParentTaskInfo.g.cs | 78 - .../_Generated/Types/Tasks/TaskInfo.g.cs | 76 - .../_Generated/Types/Tasks/TaskInfos.g.cs | 42 - .../_Generated/Types/TextEmbedding.g.cs | 72 - .../Types/TextSimilarityReranker.g.cs | 546 -- .../Types/TextStructure/MatchedField.g.cs | 38 - .../Types/TextStructure/MatchedText.g.cs | 36 - .../Types/TopLeftBottomRightGeoBounds.g.cs | 70 - .../Types/TopRightBottomLeftGeoBounds.g.cs | 70 - .../TransformManagement/CheckpointStats.g.cs | 44 - .../TransformManagement/Checkpointing.g.cs | 44 - .../TransformManagement/Destination.g.cs | 103 - .../Types/TransformManagement/Latest.g.cs | 180 - .../Types/TransformManagement/Pivot.g.cs | 210 - .../TransformManagement/PivotGroupBy.g.cs | 272 - .../TransformManagement/RetentionPolicy.g.cs | 227 - .../Types/TransformManagement/Settings.g.cs | 231 - .../Types/TransformManagement/Source.g.cs | 259 - .../Types/TransformManagement/Sync.g.cs | 227 - .../TimeRetentionPolicy.g.cs | 184 - .../Types/TransformManagement/TimeSync.g.cs | 203 - .../TransformIndexerStats.g.cs | 66 - .../TransformProgress.g.cs | 42 - .../TransformManagement/TransformStats.g.cs | 44 - .../TransformStatsHealth.g.cs | 34 - .../TransformManagement/TransformSummary.g.cs | 113 - .../_Generated/Types/TranslogStats.g.cs | 46 - .../_Generated/Types/WarmerStats.g.cs | 40 - .../_Generated/Types/WktGeoBounds.g.cs | 59 - .../_Generated/Types/Xpack/Analytics.g.cs | 38 - .../Types/Xpack/AnalyticsStatistics.g.cs | 50 - .../_Generated/Types/Xpack/Archive.g.cs | 38 - .../_Generated/Types/Xpack/Audit.g.cs | 36 - .../_Generated/Types/Xpack/Base.g.cs | 36 - .../Types/Xpack/BuildInformation.g.cs | 36 - .../_Generated/Types/Xpack/Ccr.g.cs | 40 - .../_Generated/Types/Xpack/Counter.g.cs | 36 - .../_Generated/Types/Xpack/DataStreams.g.cs | 40 - .../Types/Xpack/DataTierPhaseStatistics.g.cs | 52 - .../_Generated/Types/Xpack/DataTiers.g.cs | 46 - .../_Generated/Types/Xpack/Datafeed.g.cs | 34 - .../_Generated/Types/Xpack/Eql.g.cs | 40 - .../_Generated/Types/Xpack/EqlFeatures.g.cs | 46 - .../Types/Xpack/EqlFeaturesJoin.g.cs | 42 - .../Types/Xpack/EqlFeaturesKeys.g.cs | 42 - .../Types/Xpack/EqlFeaturesPipes.g.cs | 36 - .../Types/Xpack/EqlFeaturesSequences.g.cs | 44 - .../_Generated/Types/Xpack/Feature.g.cs | 40 - .../_Generated/Types/Xpack/FeatureToggle.g.cs | 34 - .../_Generated/Types/Xpack/Features.g.cs | 80 - .../_Generated/Types/Xpack/Flattened.g.cs | 38 - .../_Generated/Types/Xpack/FrozenIndices.g.cs | 38 - .../Types/Xpack/HealthStatistics.g.cs | 38 - .../_Generated/Types/Xpack/Ilm.g.cs | 36 - .../Types/Xpack/IlmPolicyStatistics.g.cs | 36 - .../_Generated/Types/Xpack/Invocations.g.cs | 34 - .../_Generated/Types/Xpack/IpFilter.g.cs | 36 - .../_Generated/Types/Xpack/JobUsage.g.cs | 42 - .../Types/Xpack/MachineLearning.g.cs | 52 - .../Xpack/MinimalLicenseInformation.g.cs | 42 - .../_Generated/Types/Xpack/MlCounter.g.cs | 34 - .../Types/Xpack/MlDataFrameAnalyticsJobs.g.cs | 40 - .../MlDataFrameAnalyticsJobsAnalysis.g.cs | 38 - .../Xpack/MlDataFrameAnalyticsJobsCount.g.cs | 34 - .../Xpack/MlDataFrameAnalyticsJobsMemory.g.cs | 34 - .../_Generated/Types/Xpack/MlInference.g.cs | 38 - .../Types/Xpack/MlInferenceDeployments.g.cs | 40 - .../Xpack/MlInferenceDeploymentsTimeMs.g.cs | 34 - .../Xpack/MlInferenceIngestProcessor.g.cs | 40 - .../MlInferenceIngestProcessorCount.g.cs | 38 - .../Types/Xpack/MlInferenceTrainedModels.g.cs | 42 - .../Xpack/MlInferenceTrainedModelsCount.g.cs | 48 - .../Types/Xpack/MlJobForecasts.g.cs | 36 - .../_Generated/Types/Xpack/Monitoring.g.cs | 40 - .../Types/Xpack/NativeCodeInformation.g.cs | 36 - .../_Generated/Types/Xpack/Realm.g.cs | 52 - .../_Generated/Types/Xpack/RealmCache.g.cs | 34 - .../_Generated/Types/Xpack/RoleMapping.g.cs | 36 - .../Types/Xpack/RuntimeFieldTypes.g.cs | 38 - .../Types/Xpack/RuntimeFieldsType.g.cs | 60 - .../Types/Xpack/SearchableSnapshots.g.cs | 42 - .../_Generated/Types/Xpack/Security.g.cs | 60 - .../_Generated/Types/Xpack/SecurityRoles.g.cs | 38 - .../Types/Xpack/SecurityRolesDls.g.cs | 34 - .../Xpack/SecurityRolesDlsBitSetCache.g.cs | 38 - .../Types/Xpack/SecurityRolesFile.g.cs | 38 - .../Types/Xpack/SecurityRolesNative.g.cs | 38 - .../_Generated/Types/Xpack/Slm.g.cs | 40 - .../_Generated/Types/Xpack/Sql.g.cs | 40 - .../_Generated/Types/Xpack/Ssl.g.cs | 36 - .../_Generated/Types/Xpack/Vector.g.cs | 42 - .../_Generated/Types/Xpack/Watcher.g.cs | 42 - .../Types/Xpack/WatcherActionTotals.g.cs | 36 - .../Types/Xpack/WatcherActions.g.cs | 34 - .../_Generated/Types/Xpack/WatcherWatch.g.cs | 40 - .../Types/Xpack/WatcherWatchTrigger.g.cs | 36 - .../Xpack/WatcherWatchTriggerSchedule.g.cs | 40 - .../Types/Xpack/XpackUsageQuery.g.cs | 40 - .../Elastic.Clients.Elasticsearch.csproj | 3 - .../Api/AsyncSearch/GetAsyncSearchRequest.cs | 4 - .../AsyncSearch/SubmitAsyncSearchRequest.cs | 8 - .../_Shared/Api/BulkRequest.cs | 16 - .../_Shared/Api/BulkResponse.cs | 8 - .../_Shared/Api/CountRequest.cs | 8 - .../_Shared/Api/CreateRequest.cs | 4 - .../_Shared/Api/DeleteRequest.cs | 4 - .../_Shared/Api/Esql/EsqlQueryRequest.cs | 4 - .../_Shared/Api/ExistsRequest.cs | 4 - .../_Shared/Api/ExistsResponse.cs | 4 - .../_Shared/Api/ExistsSourceResponse.cs | 4 - .../_Shared/Api/GetSourceRequestDescriptor.cs | 4 - .../_Shared/Api/GetSourceResponse.cs | 8 - .../IndexManagement/ExistsAliasResponse.cs | 4 - .../ExistsIndexTemplateResponse.cs | 4 - .../Api/IndexManagement/ExistsResponse.cs | 4 - .../IndexManagement/ExistsTemplateResponse.cs | 4 - .../Api/IndexManagement/GetAliasResponse.cs | 4 - .../Api/IndexManagement/GetIndexResponse.cs | 4 - .../Api/IndexManagement/GetMappingResponse.cs | 8 - .../_Shared/Api/IndexRequest.cs | 8 - .../_Shared/Api/Ingest/GetPipelineResponse.cs | 4 - .../_Shared/Api/MultiSearchRequest.cs | 4 - .../_Shared/Api/ResponseItem.cs | 4 - .../_Shared/Api/ScrollResponse.cs | 4 - .../_Shared/Api/SearchRequest.cs | 8 - .../_Shared/Api/SearchResponse.cs | 4 - .../_Shared/Api/Sql/GetAsyncResponse.cs | 4 - .../_Shared/Api/Sql/QueryResponse.cs | 4 - .../Client/ElasticsearchClient-Manual.cs | 4 - .../_Shared/Client/ElasticsearchClient.cs | 8 - .../ElasticsearchResponseBaseExtensions.cs | 4 - .../_Shared/Client/IndexManyExtensions.cs | 8 - .../_Shared/Client/NamespacedClientProxy.cs | 8 - .../Core/Configuration/ClrTypeDefaults.cs | 8 - .../ElasticsearchClientSettings.cs | 8 - .../IElasticsearchClientSettings.cs | 8 - .../Core/Configuration/MemberInfoResolver.cs | 4 - .../Core/DateTime/DateMath/DateMath.cs | 4 - .../DateTime/DateMath/DateMathExpression.cs | 4 - .../DateTime/DateMath/DateMathOperation.cs | 8 - .../Core/DateTime/DateMath/DateMathTime.cs | 4 - .../DateTime/DateMath/DateMathTimeUnit.cs | 8 - .../_Shared/Core/DateTime/Duration.cs | 4 - .../_Shared/Core/DateTime/TimeUnit.cs | 4 - .../_Shared/Core/EmptyReadOnly.cs | 4 - .../_Shared/Core/EmptyReadOnlyExtensions.cs | 4 - .../_Shared/Core/Exceptions/ThrowHelper.cs | 4 - .../Core/Extensions/ExceptionExtensions.cs | 4 - .../Core/Extensions/ExpressionExtensions.cs | 4 - .../_Shared/Core/Extensions/Extensions.cs | 4 - .../Core/Extensions/StringExtensions.cs | 4 - .../Core/Extensions/SuffixExtensions.cs | 4 - .../_Shared/Core/Extensions/TaskExtensions.cs | 4 - .../_Shared/Core/Extensions/TypeExtensions.cs | 4 - .../_Shared/Core/Fields/FieldValue.cs | 8 - .../_Shared/Core/Fields/FieldValues.cs | 8 - .../_Shared/Core/Fluent/Descriptor.cs | 8 - .../_Shared/Core/Fluent/Fluent.cs | 4 - .../_Shared/Core/Fluent/FluentDictionary.cs | 4 - .../Core/Fluent/IBuildableDescriptor.cs | 4 - .../_Shared/Core/Fluent/Promise/IPromise.cs | 4 - .../Fluent/Promise/IsADictionaryDescriptor.cs | 4 - .../Core/Fluent/Promise/PromiseDescriptor.cs | 4 - .../_Shared/Core/IComplexUnion.cs | 4 - .../_Shared/Core/IEnumStruct.cs | 4 - .../Infer/DefaultPropertyMappingProvider.cs | 4 - .../Core/Infer/DocumentPath/DocumentPath.cs | 8 - .../Core/Infer/Field/FieldConverter.cs | 8 - .../Infer/Field/FieldExpressionVisitor.cs | 4 - .../Core/Infer/Field/FieldExtensions.cs | 4 - .../_Shared/Core/Infer/Field/FieldResolver.cs | 4 - .../Infer/Field/ToStringExpressionVisitor.cs | 4 - .../_Shared/Core/Infer/Fields/Fields.cs | 4 - .../Core/Infer/Fields/FieldsConverter.cs | 4 - .../Core/Infer/Fields/FieldsDescriptor.cs | 4 - .../Core/Infer/IPropertyMappingProvider.cs | 4 - .../_Shared/Core/Infer/Id/Id.cs | 4 - .../_Shared/Core/Infer/Id/IdConverter.cs | 8 - .../_Shared/Core/Infer/Id/IdExtensions.cs | 4 - .../_Shared/Core/Infer/Id/IdResolver.cs | 4 - .../_Shared/Core/Infer/Id/Ids.cs | 4 - .../_Shared/Core/Infer/Id/IdsConverter.cs | 4 - .../_Shared/Core/Infer/IndexName/IndexName.cs | 4 - .../Infer/IndexName/IndexNameConverter.cs | 8 - .../Infer/IndexName/IndexNameExtensions.cs | 4 - .../Core/Infer/IndexName/IndexNameResolver.cs | 4 - .../_Shared/Core/Infer/Indices/Indices.cs | 8 - .../_Shared/Core/Infer/Inferrer.cs | 4 - .../_Shared/Core/Infer/JoinField.cs | 4 - .../_Shared/Core/Infer/JoinFieldConverter.cs | 8 - .../Core/Infer/JoinFieldRouting/Routing.cs | 4 - .../JoinFieldRouting/RoutingConverter.cs | 8 - .../_Shared/Core/Infer/Metric/Metrics.cs | 4 - .../_Shared/Core/Infer/PropertyMapping.cs | 8 - .../Core/Infer/PropertyName/PropertyName.cs | 8 - .../PropertyName/PropertyNameExtensions.cs | 4 - .../Core/Infer/RelationName/RelationName.cs | 8 - .../RelationName/RelationNameResolver.cs | 4 - .../_Shared/Core/Infer/RoutingResolver.cs | 4 - .../_Shared/Core/Infer/Timestamp/Timestamp.cs | 4 - .../_Shared/Core/IsADictionary.cs | 4 - .../_Shared/Core/IsAReadOnlyDictionary.cs | 4 - .../_Shared/Core/LazyJson.cs | 8 - .../_Shared/Core/MinimumShouldMatch.cs | 4 - .../Core/OpenTelemetry/SemanticConventions.cs | 4 - .../_Shared/Core/RawJsonString.cs | 4 - .../_Shared/Core/ReadOnlyFieldDictionary.cs | 4 - .../Core/ReadOnlyIndexNameDictionary.cs | 4 - .../_Shared/Core/Request/ApiUrls.cs | 4 - .../_Shared/Core/Request/PlainRequest.cs | 4 - .../_Shared/Core/Request/Request.cs | 4 - .../_Shared/Core/Request/RequestDescriptor.cs | 8 - .../_Shared/Core/Request/RouteValues.cs | 4 - .../_Shared/Core/Request/UrlLookup.cs | 4 - .../Core/Response/DictionaryResponse.cs | 4 - .../Response/ResolvableDictionaryProxy.cs | 4 - .../_Shared/Core/Static/Infer.cs | 8 - .../_Shared/Core/Union/Union.cs | 4 - .../DataStreamNames/DataStreamName.cs | 4 - .../DataStreamNames/DataStreamNames.cs | 4 - .../UrlParameters/IndexAlias/IndexAlias.cs | 4 - .../Core/UrlParameters/IndexUuid/IndexUuid.cs | 4 - .../_Shared/Core/UrlParameters/Name/Name.cs | 8 - .../_Shared/Core/UrlParameters/Name/Names.cs | 4 - .../Core/UrlParameters/NodeIds/NodeIds.cs | 4 - .../Core/UrlParameters/ScrollIds/ScrollId.cs | 4 - .../Core/UrlParameters/ScrollIds/ScrollIds.cs | 4 - .../Core/UrlParameters/TaskId/TaskId.cs | 8 - .../Core/UrlParameters/Username/Username.cs | 8 - .../_Shared/CrossPlatform/NativeMethods.cs | 4 - .../CrossPlatform/RuntimeInformation.cs | 4 - .../_Shared/CrossPlatform/TypeExtensions.cs | 4 - .../Exceptions/UnsupportedProductException.cs | 4 - .../_Shared/Helpers/BulkAllObserver.cs | 4 - .../_Shared/Helpers/BulkAllRequest.cs | 12 - .../_Shared/Helpers/BulkAllResponse.cs | 8 - .../Helpers/CoordinatedRequestDefaults.cs | 4 - .../Helpers/CoordinatedRequestObserverBase.cs | 4 - .../_Shared/Helpers/HelperIdentifiers.cs | 4 - .../_Shared/Helpers/IBulkAllRequest.cs | 8 - .../_Shared/Helpers/IHelperCallable.cs | 4 - .../_Shared/Helpers/PartitionHelper.cs | 4 - .../Helpers/ProducerConsumerBackPressure.cs | 4 - .../Helpers/RequestMetaDataExtensions.cs | 4 - .../_Shared/Helpers/RequestMetaDataFactory.cs | 4 - .../Serialization/CustomizedNamingPolicy.cs | 4 - .../DefaultRequestResponseSerializer.cs | 4 - .../Serialization/DefaultSourceSerializer.cs | 4 - .../DictionaryResponseConverter.cs | 4 - .../DoubleWithFractionalPortionConverter.cs | 4 - .../Serialization/EnumStructConverter.cs | 8 - .../GenericConverterAttribute.cs | 4 - .../_Shared/Serialization/ISourceMarker.cs | 4 - .../Serialization/IStreamSerializable.cs | 4 - .../_Shared/Serialization/IUnionVerifiable.cs | 4 - .../Serialization/InterfaceConverter.cs | 4 - .../InterfaceConverterAttribute.cs | 4 - .../IntermediateSourceConverter.cs | 4 - .../IsADictionaryConverterFactory.cs | 8 - .../_Shared/Serialization/JsonConstants.cs | 4 - .../_Shared/Serialization/JsonHelper.cs | 4 - .../JsonSerializerOptionsExtensions.cs | 4 - .../Serialization/KeyValuePairConverter.cs | 4 - .../Serialization/MultiItemUnionConverter.cs | 8 - .../Serialization/NumericAliasConverter.cs | 4 - .../ObjectToInferredTypesConverter.cs | 4 - .../Serialization/PropertyNameConverter.cs | 4 - .../_Shared/Serialization/QueryConverter.cs | 4 - .../ReadOnlyFieldDictionaryConverter.cs | 4 - .../ReadOnlyIndexNameDictionaryConverter.cs | 4 - ...vableReadonlyDictionaryConverterFactory.cs | 4 - .../ResponseItemConverterFactory.cs | 12 - .../_Shared/Serialization/SelfSerializable.cs | 4 - .../SelfSerializableConverterFactory.cs | 4 - .../Serialization/SerializationConstants.cs | 4 - .../Serialization/SettingsJsonConverter.cs | 4 - .../Serialization/SimpleInterfaceConverter.cs | 4 - .../SingleOrManyCollectionAttribute.cs | 4 - .../SingleOrManyCollectionConverter.cs | 4 - .../SingleOrManySerializationHelper.cs | 4 - .../SingleWithFractionalPortionConverter.cs | 4 - .../_Shared/Serialization/SourceConverter.cs | 4 - .../Serialization/SourceConverterAttribute.cs | 4 - .../Serialization/SourceConverterFactory.cs | 4 - .../_Shared/Serialization/SourceMarker.cs | 4 - .../Serialization/StringAliasConverter.cs | 4 - .../Serialization/StringEnumAttribute.cs | 4 - .../_Shared/Serialization/Stringified.cs | 4 - .../TermsAggregateSerializationHelper.cs | 8 - .../_Shared/Serialization/UnionConverter.cs | 8 - .../Types/Aggregations/AggregateOrder.cs | 4 - .../_Shared/Types/Aggregations/BucketsPath.cs | 8 - .../Types/Aggregations/TermsExclude.cs | 4 - .../Types/Aggregations/TermsInclude.cs | 4 - .../_Shared/Types/AsyncSearch/AsyncSearch.cs | 4 - .../Types/Core/Bulk/BulkCreateOperation.cs | 8 - .../Bulk/BulkCreateOperationDescriptor.cs | 12 - .../Types/Core/Bulk/BulkDeleteOperation.cs | 8 - .../Bulk/BulkDeleteOperationDescriptor.cs | 8 - .../Types/Core/Bulk/BulkIndexOperation.cs | 8 - .../Core/Bulk/BulkIndexOperationDescriptor.cs | 12 - .../_Shared/Types/Core/Bulk/BulkOperation.cs | 8 - .../Core/Bulk/BulkOperationDescriptor.cs | 12 - .../Core/Bulk/BulkOperationsCollection.cs | 8 - .../Core/Bulk/BulkResponseItemConverter.cs | 4 - .../_Shared/Types/Core/Bulk/BulkUpdateBody.cs | 12 - .../Types/Core/Bulk/BulkUpdateOperation.cs | 8 - .../Bulk/BulkUpdateOperationDescriptor.cs | 12 - .../Types/Core/Bulk/BulkUpdateOperationT.cs | 8 - .../Bulk/BulkUpdateOperationWithPartial.cs | 4 - .../Bulk/BulkUpdateOperationWithScript.cs | 4 - .../_Shared/Types/Core/Bulk/IBulkOperation.cs | 4 - .../Types/Core/Bulk/PartialBulkUpdateBody.cs | 8 - .../Bulk/Response/BulkCreateResponseItem.cs | 4 - .../Bulk/Response/BulkDeleteResponseItem.cs | 4 - .../Bulk/Response/BulkIndexResponseItem.cs | 4 - .../Bulk/Response/BulkUpdateResponseItem.cs | 4 - .../Types/Core/Bulk/ScriptedBulkUpdateBody.cs | 8 - .../Types/Core/MSearch/SearchRequestItem.cs | 8 - .../SearchTemplateRequestItem.cs | 12 - .../Types/Core/Search/SourceConfigParam.cs | 4 - .../_Shared/Types/FieldSort.cs | 8 - .../_Shared/Types/GeoLocation.cs | 4 - .../_Shared/Types/Mapping/Properties.cs | 8 - .../Types/Mapping/PropertiesDescriptor.cs | 8 - .../Types/Mapping/PropertyNameExtensions.cs | 4 - .../_Shared/Types/MultiSearchItem.cs | 4 - .../_Shared/Types/OpType.cs | 4 - .../Types/PointInTimeReferenceDescriptor.cs | 4 - .../_Shared/Types/QueryDsl/BoolQuery.cs | 4 - .../Types/QueryDsl/BoolQueryAndExtensions.cs | 4 - .../Types/QueryDsl/BoolQueryExtensions.cs | 4 - .../Types/QueryDsl/BoolQueryOrExtensions.cs | 4 - .../_Shared/Types/QueryDsl/FunctionScore.cs | 4 - .../_Shared/Types/QueryDsl/Query.cs | 4 - .../_Shared/Types/QueryDsl/RangeQuery.cs | 8 - .../_Shared/Types/QueryDsl/RawJsonQuery.cs | 4 - .../_Shared/Types/Ranges.cs | 4 - .../_Shared/Types/Refresh.cs | 4 - .../_Shared/Types/Slices.cs | 4 - .../_Shared/Types/SortOptions.cs | 8 - .../_Shared/Types/SourceConfig.cs | 4 - .../_Shared/Types/Sql/SqlRow.cs | 4 - .../_Shared/Types/Sql/SqlValue.cs | 4 - .../_Shared/Types/WaitForActiveShards.cs | 4 - src/Playground/Playground.csproj | 1 - 2309 files changed, 397498 deletions(-) delete mode 100644 Packages.Serverless.slnf delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/Core/ElasticsearchClientProductRegistration.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageRequest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageResponse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Esql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.License.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ml.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Nodes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.QueryRules.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Security.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Slm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Snapshot.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Sql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Synonyms.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.TextStructure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Transform.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Xpack.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregationRange.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Buckets.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeExpression.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsDate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsFloat.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FieldDateMath.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FilterAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLinePoint.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineSort.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrMethod.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentileRanksAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentilesAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceClassImportance.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceTopClassEntry.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregationRange.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsFields.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermLookup.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NormalizeAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentageScoreHeuristic.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Percentiles.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedHeuristic.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBoundsAsString.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentilesAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetrics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsValue.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedRareTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSamplerAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageValue.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Analyzers.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArabicAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArmenianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BasqueAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BengaliAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BrazilianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BulgarianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CatalanAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharFilters.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharGroupTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ChineseAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CjkAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ConditionTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomNormalizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CzechAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DanishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DutchAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ElisionTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EnglishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EstonianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FinnishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FrenchAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GalicianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GermanAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GreekAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HindiAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HungarianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HunspellTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IndonesianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IrishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ItalianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KStemTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LanguageAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LatvianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LengthTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LetterTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LithuanianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseNormalizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MappingCharFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Normalizers.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NorwegianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PersianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PortugueseAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PredicateTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ReverseTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RomanianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RussianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SerbianAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ShingleTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimpleAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SoraniAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SpanishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SwedishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TokenFilters.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TrimTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TruncateTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TurkishAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UniqueTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/AsyncSearch/AsyncSearch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkIndexByScrollFailure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ByteSize.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationDecision.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationStore.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CharFilterTypes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterFileSystem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndices.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShards.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShardsIndex.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIngest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmVersion.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNetworkTypes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodeCount.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemArchitecture.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemName.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemPrettyName.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcess.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessCpu.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessOpenFileDescriptors.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterShardMetrics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/DiskUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypesMappings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndicesVersions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeDiskUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodePackagingType.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/PendingTask.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ReservedSize.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/RuntimeFieldTypes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/UnassignedInformation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CompletionStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CoordsGeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Bulk/ResponseItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Context.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/Explanation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/ExplanationDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Get/GetResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Diagnosis.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiagnosisAffectedResources.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Impact.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IndicatorNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Indicators.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorClusterFormationNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorExceptionFetchingHistory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorUnhealthyPolicies.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/StagnatingBackingIndices.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetError.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiGetResponseItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiSearchResponseItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/DocumentRating.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHit.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetric.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/UnratedDocument.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Destination.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/RemoteSource.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationBreakdown.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Collector.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionContext.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggester.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DirectGenerator.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileDebug.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldSuggester.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HitsMetadata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHitsResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LaplaceSmoothingModel.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LinearInterpolationSmoothingModel.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/NestedIdentity.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollateQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestHighlight.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PointInTimeReference.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Profile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RegexOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SearchProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SmoothingModel.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SourceFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/StupidBackoffSmoothingModel.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestDictionary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestFuzziness.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Suggester.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggestOption.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggester.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TotalHits.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfigParam.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/FieldStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Filter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Term.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/TermVector.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Token.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TrackHits.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/DocStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ElasticsearchVersionInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/EmptyObject.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CoordinatorStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichPolicy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecuteEnrichPolicyStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecutingPolicy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Aggregations.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Analysis.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Cluster.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.Search.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.SearchMvt.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Enrich.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Eql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.IndexManagement.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.LicenseManagement.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.NoNamespace.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryDsl.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryRules.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Security.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Snapshot.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Watcher.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/EqlHits.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsEvent.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsSequence.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorCause.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorResponseBase.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldMemoryUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSizeUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FielddataStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FlushStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Fuzziness.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoDistanceSort.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoHashLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLine.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeohashPrecision.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GetStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Connection.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/ExploreControls.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Hop.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/SampleDiversity.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Vertex.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexDefinition.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexInclude.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Actions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DownsampleAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ForceMergeAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phase.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phases.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/WaitForSnapshotAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Alias.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AliasDefinition.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeToken.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzerDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CacheQueries.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CharFilterDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseIndexResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseShardResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleDownsampling.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamTimestampField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamsStatsItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsampleConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsamplingRound.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FailureStore.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FileDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAliases.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAndDataStreamAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexMappingRecord.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexModifyDataStreamAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRouting.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationDisk.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInclude.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInitialRecovery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingRebalance.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegment.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycleStep.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexUpdateAliasesAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexVersioning.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogTresholds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesValidationExplanation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsTotalFields.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Merge.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MergeScheduler.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/NumericFielddata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Overlapping.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Queries.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryBytes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryFiles.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryIndexStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStartStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexAliasItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexDataStreamsItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RetentionLease.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RolloverConditions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SearchIdle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Segment.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsHighlight.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsQueryString.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSearch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarities.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBoolean.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfi.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfr.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityIb.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityScripted.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardCommit.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardLease.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardPath.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardQueryCache.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRecovery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRetentionLeases.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRouting.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSegmentRouting.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSequenceNumber.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsSegment.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsTotalStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogSettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholdLevels.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SoftDeletes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Storage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Template.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TokenDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Translog.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogRetention.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/VerifyIndex.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexingStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndicesOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/BytesProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CircleProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ConvertProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfiguration.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationFull.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationMetadata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Document.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DocumentSimulation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FailProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpDownloadStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabaseName.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabases.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GrokProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/HtmlStripProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigClassification.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigRegression.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IngestInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpLocationProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Ipinfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JoinProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JsonProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/KeyValueProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Local.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Maxmind.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineSimulation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Redact.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RerouteProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ScriptProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SimulateDocumentResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SplitProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TerminateProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TrimProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UppercaseProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UriPartsProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Web.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/InlineGet.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnRetriever.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LatLonGeoLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LicenseManagement/LicenseInformation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AggregateOutput.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisLimits.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisMemoryLimit.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Anomaly.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyCause.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyDetectors.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ApiKeyAuthorization.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketInfluencer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Calendar.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzerDefinition.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Category.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ChunkingConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixPrediction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixThreshold.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataCounts.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataDescription.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeed.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedAuthorization.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedRunningState.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeeds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysis.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorFrequencyEncoding.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorMultiEncoding.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorOneHotEncoding.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorTargetMeanEncoding.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalytics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsAuthorization.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsDestination.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsFieldSelection.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsMemoryEstimation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsDataCounts.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsProgress.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryAccuracy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryMulticlassConfusionMatrix.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryPrecision.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryRecall.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClass.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassification.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetrics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetection.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetectionMetrics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegression.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetrics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRoc.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRocCurveItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationValue.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeOutlierDetectionSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeRegressionSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Defaults.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Definition.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DelayedDataCheckConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectionRule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Detector.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorRead.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorUpdate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Ensemble.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Filter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FilterRef.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FrequencyEncodingPreprocessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/GeoResults.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Hyperparameter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigCreate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigUpdate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influence.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influencer.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Input.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Job.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobBlocked.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobForecastStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobTimingStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JvmStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Limits.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemMlStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Memory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSizeStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshot.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshotUpgrade.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NativeCode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OneHotEncodingPreprocessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucket.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucketJob.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Page.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Preprocessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RuleCondition.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RunningStateSearchInterval.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TargetMeanEncodingPreprocessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TokenizationConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TopClassEntry.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportance.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceClass.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModel.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentRoutingTable.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentTaskParameters.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigInput.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigMetadata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentAllocationStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelEntities.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceClassImportance.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocationIndex.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelPrefixStrings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelSizeStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTree.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TransformAuthorization.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Vocabulary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Weights.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AllField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BooleanProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ByteNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DataStreamTimestamp.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateRangeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleRangeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicTemplate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldAliasProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldNamesField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FlattenedProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatRangeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoPointProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoShapeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HistogramProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IndexField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerRangeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpRangeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/JoinProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/KeywordProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongRangeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Murmur3HashProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/NestedProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ObjectProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PercolatorProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PointProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeatureProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeaturesProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RoutingField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeFieldFetchFields.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SemanticTextProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShapeProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShortNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SizeField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SourceField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SuggestContext.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextIndexPrefixes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TokenCountProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/VersionProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/WildcardProperty.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MergesStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NodeStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/AdaptiveSelection.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Breaker.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cgroup.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpu.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpuStat.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Client.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterAppliedStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateQueue.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateUpdate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Context.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cpu.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CpuAcct.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DataPathStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DeprecationIndexing.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Discovery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystemTotal.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollector.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Http.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressureMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Ingest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStatDevice.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Jvm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmClasses.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmMemoryStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmThreads.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/KeyedProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/MemoryStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeBufferPool.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoBootstrap.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoClient.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoDiscover.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoHttp.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestDownloader.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoJvmMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetwork.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetworkInterface.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoOSCPU.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoPath.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositories.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositoriesUrl.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearchRemote.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsCluster.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsClusterElection.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttp.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttpType.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsIngest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransport.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportFeatures.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportType.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoTransport.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpack.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicense.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicenseType.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurity.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthc.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealms.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealmsStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcToken.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecuritySsl.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeJvmInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeProcessInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/OperatingSystem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Pool.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PressureMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Process.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Processor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PublishedClusterStates.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Recording.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ScriptCache.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Scripting.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterState.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Stats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ThreadCount.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Transport.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/TransportHistogram.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/PluginStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDecayFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DecayPlacement.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldAndFormat.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldLookup.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScore.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Intervals.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsMatch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsPrefix.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsWildcard.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Like.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedDoc.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Query.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RandomScoreFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLinear.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLogarithm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSigmoid.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RegexpQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SemanticQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermRangeQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsLookup.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQueryField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleActions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetMatchedRule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryVectorBuilder.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RRFRetriever.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RecoveryStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RefreshStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RequestCacheStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retries.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retriever.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScoreSort.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Script.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SearchStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Access.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKey.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationGlobalUserPrivileges.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivileges.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateApiKey.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateToken.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticatedUser.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticationProvider.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/BulkError.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ClusterNode.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/CreatedStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldRule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldSecurity.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FoundStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GetUserProfileErrors.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GlobalPrivilege.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GrantApiKey.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/HasPrivilegesUserProfileErrors.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Hint.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndexPrivilegesCheck.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndicesPrivileges.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ManageUserPrivileges.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentials.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentialsFileToken.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegeActions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegesCheck.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryRole.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryUser.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RealmInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ReplicationAccess.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Role.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorRead.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorWrapper.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMapping.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMappingRule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleTemplate.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/SearchAccess.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ServiceToken.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/TotalUserProfiles.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserIndicesPrivileges.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileHitMetadata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileUser.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileWithMetadata.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserRealm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SegmentsStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardFailure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SlicedScroll.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Slices.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepository.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CompactNodeInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/FileCountSnapshotStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepository.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/IndexDetails.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/InfoFeatureState.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Repositories.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3Repository.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3RepositorySettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummaryItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotIndexStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotResponseItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotRestore.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardsStatus.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Status.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/InProgress.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Invocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Retention.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmPolicy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SortOptions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SpecUtils/OverloadOf.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Sql/Column.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StandardRetriever.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoreStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoredScript.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRuleRead.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymsSetItem.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TaskFailure.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/NodeTasks.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/ParentTaskInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfo.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfos.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextEmbedding.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedField.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedText.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/CheckpointStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Checkpointing.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Destination.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Latest.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Pivot.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/PivotGroupBy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/RetentionPolicy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Settings.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Source.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Sync.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeRetentionPolicy.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeSync.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformProgress.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStatsHealth.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformSummary.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TranslogStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WarmerStats.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WktGeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Analytics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/AnalyticsStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Archive.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Audit.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Base.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/BuildInformation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ccr.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Counter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataStreams.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTierPhaseStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTiers.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Datafeed.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Eql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeatures.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesJoin.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesKeys.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesPipes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesSequences.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Feature.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FeatureToggle.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Features.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Flattened.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FrozenIndices.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/HealthStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ilm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Invocations.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IpFilter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/JobUsage.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MachineLearning.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MinimalLicenseInformation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlCounter.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobs.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsCount.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsMemory.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInference.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeployments.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeploymentsTimeMs.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessor.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessorCount.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModels.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlJobForecasts.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Monitoring.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/NativeCodeInformation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Realm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RealmCache.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RoleMapping.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldTypes.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldsType.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SearchableSnapshots.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Security.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRoles.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDls.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDlsBitSetCache.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesFile.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesNative.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Slm.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Sql.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ssl.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Vector.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Watcher.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActionTotals.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActions.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatch.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTrigger.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTriggerSchedule.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/XpackUsageQuery.g.cs diff --git a/Elasticsearch.sln b/Elasticsearch.sln index d362e850907..4bf57fbcf3a 100644 --- a/Elasticsearch.sln +++ b/Elasticsearch.sln @@ -57,8 +57,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.ClusterLauncher", "te EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch.JsonNetSerializer", "src\Elastic.Clients.Elasticsearch.JsonNetSerializer\Elastic.Clients.Elasticsearch.JsonNetSerializer.csproj", "{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch.Serverless", "src\Elastic.Clients.Elasticsearch.Serverless\Elastic.Clients.Elasticsearch.Serverless.csproj", "{49D7F5A7-AA32-492B-B957-0E3325861F55}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests\Tests.csproj", "{6FD804B2-CE80-41CB-A411-2023F34C18FE}" EndProject Global @@ -107,10 +105,6 @@ Global {8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Debug|Any CPU.Build.0 = Debug|Any CPU {8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Release|Any CPU.ActiveCfg = Release|Any CPU {8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Release|Any CPU.Build.0 = Release|Any CPU - {49D7F5A7-AA32-492B-B957-0E3325861F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49D7F5A7-AA32-492B-B957-0E3325861F55}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49D7F5A7-AA32-492B-B957-0E3325861F55}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49D7F5A7-AA32-492B-B957-0E3325861F55}.Release|Any CPU.Build.0 = Release|Any CPU {6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {6FD804B2-CE80-41CB-A411-2023F34C18FE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -130,7 +124,6 @@ Global {68D1BFDC-F447-4D2C-AF81-537807636610} = {1FE49D14-216A-41EE-A177-E42BFF53E0DC} {F6162603-D134-4121-8106-2BA4DAD7350B} = {362B2776-4B29-46AB-B237-56776B5372B6} {8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7} - {49D7F5A7-AA32-492B-B957-0E3325861F55} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7} {6FD804B2-CE80-41CB-A411-2023F34C18FE} = {362B2776-4B29-46AB-B237-56776B5372B6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/Packages.Serverless.slnf b/Packages.Serverless.slnf deleted file mode 100644 index 218a457e47d..00000000000 --- a/Packages.Serverless.slnf +++ /dev/null @@ -1,8 +0,0 @@ -{ - "solution": { - "path": "Elasticsearch.sln", - "projects": [ - "src\\Elastic.Clients.Elasticsearch.Serverless\\Elastic.Clients.Elasticsearch.Serverless.csproj" - ] - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/Core/ElasticsearchClientProductRegistration.cs b/src/Elastic.Clients.Elasticsearch.Serverless/Core/ElasticsearchClientProductRegistration.cs deleted file mode 100644 index cfe03c51617..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/Core/ElasticsearchClientProductRegistration.cs +++ /dev/null @@ -1,96 +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.Diagnostics.CodeAnalysis; - -using Elastic.Transport; -using Elastic.Transport.Products.Elasticsearch; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -internal sealed class ElasticsearchClientProductRegistration : ElasticsearchProductRegistration -{ - private readonly MetaHeaderProvider _metaHeaderProvider; - - public ElasticsearchClientProductRegistration(Type markerType) : base(markerType) - { - var identifier = ServiceIdentifier; - if (!string.IsNullOrEmpty(identifier)) - _metaHeaderProvider = new ServerlessMetaHeaderProvider(markerType, identifier); - } - - public static ElasticsearchClientProductRegistration DefaultForElasticsearchClientsElasticsearch { get; } = new(typeof(ElasticsearchClient)); - - public override string ServiceIdentifier => "esv"; - - public override string? DefaultContentType => null; // Prevent base 'ElasticsearchProductRegistration' from sending the compatibility header - - public override MetaHeaderProvider MetaHeaderProvider => _metaHeaderProvider; - - /// - /// Elastic.Clients.Elasticsearch handles 404 in its , we do not want the low level client throwing - /// exceptions - /// when is enabled for 404's. The client is in charge of - /// composing paths - /// so a 404 never signals a wrong URL but a missing entity. - /// - public override bool HttpStatusCodeClassifier(HttpMethod method, int statusCode) => - statusCode is >= 200 and < 300 or 404; - - /// - /// Makes the low level transport aware of Elastic.Clients.Elasticsearch's - /// so that it can peek in to its exposed error when reporting failures. - /// - public override bool TryGetServerErrorReason(TResponse response, [NotNullWhen(returnValue: true)] out string? reason) - { - if (response is not ElasticsearchResponse r) - return base.TryGetServerErrorReason(response, out reason); - reason = r.ElasticsearchServerError?.Error?.ToString(); - return !string.IsNullOrEmpty(reason); - } -} - -public sealed class ServerlessMetaHeaderProvider : MetaHeaderProvider -{ - private readonly MetaHeaderProducer[] _producers; - - /// - public override MetaHeaderProducer[] Producers => _producers; - - public ServerlessMetaHeaderProvider(Type clientType, string serviceIdentifier) - { - var version = ReflectionVersionInfo.Create(clientType); - - _producers = new MetaHeaderProducer[] - { - new DefaultMetaHeaderProducer(version, serviceIdentifier), - new ApiVersionMetaHeaderProducer(version) - }; - } -} - -public class ApiVersionMetaHeaderProducer : MetaHeaderProducer -{ - private readonly string _apiVersion; - - public override string HeaderName => "Elastic-Api-Version"; - - public override string ProduceHeaderValue(BoundConfiguration boundConfiguration, bool isAsync) => _apiVersion; - - public ApiVersionMetaHeaderProducer(VersionInfo version) - { - var meta = version.Metadata; - - if (meta is null || meta.Length != 8) - { - _apiVersion = "2023-10-31"; // Fall back to the earliest version - return; - } - - // Metadata format: 20231031 - - _apiVersion = $"{meta.Substring(0, 4)}-{meta.Substring(4, 2)}-{meta.Substring(6, 2)}"; - } -} diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj b/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj deleted file mode 100644 index 8ba54c7ca36..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/Elastic.Clients.Elasticsearch.Serverless.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - Elastic.Clients.Elasticsearch.Serverless - Elastic.Clients.Elasticsearch.Serverless - Official Elasticsearch Serverless .NET Client - elasticsearch;elastic;client;search - - This strongly-typed, client library enables working with Elasticsearch Serverless. It is the official client maintained and supported by Elastic. - - true - README.md - - - $(DefineConstants);ELASTICSEARCH_SERVERLESS - - - true - true - netstandard2.0;net462;netstandard2.1;net8.0 - true - true - annotations - - - - - - - - - - - - <_Parameter1>true - - - - - - - - - - \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs deleted file mode 100644 index 3513b8150f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs +++ /dev/null @@ -1,323 +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. -// -// ------------------------------------------------ - -#nullable restore - -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; - -internal static class ApiUrlLookup -{ - internal static ApiUrls AsyncSearchDelete = new ApiUrls(new[] { "_async_search/{id}" }); - internal static ApiUrls AsyncSearchGet = new ApiUrls(new[] { "_async_search/{id}" }); - internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" }); - internal static ApiUrls AsyncSearchSubmit = new ApiUrls(new[] { "_async_search", "{index}/_async_search" }); - internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[] { "_cluster/allocation/explain" }); - internal static ApiUrls ClusterDeleteComponentTemplate = new ApiUrls(new[] { "_component_template/{name}" }); - internal static ApiUrls ClusterExistsComponentTemplate = new ApiUrls(new[] { "_component_template/{name}" }); - internal static ApiUrls ClusterGetComponentTemplate = new ApiUrls(new[] { "_component_template", "_component_template/{name}" }); - internal static ApiUrls ClusterGetSettings = new ApiUrls(new[] { "_cluster/settings" }); - internal static ApiUrls ClusterHealth = new ApiUrls(new[] { "_cluster/health", "_cluster/health/{index}" }); - internal static ApiUrls ClusterInfo = new ApiUrls(new[] { "_info/{target}" }); - internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[] { "_cluster/pending_tasks" }); - internal static ApiUrls ClusterPutComponentTemplate = new ApiUrls(new[] { "_component_template/{name}" }); - internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" }); - internal static ApiUrls EnrichDeletePolicy = new ApiUrls(new[] { "_enrich/policy/{name}" }); - internal static ApiUrls EnrichExecutePolicy = new ApiUrls(new[] { "_enrich/policy/{name}/_execute" }); - internal static ApiUrls EnrichGetPolicy = new ApiUrls(new[] { "_enrich/policy/{name}", "_enrich/policy" }); - internal static ApiUrls EnrichPutPolicy = new ApiUrls(new[] { "_enrich/policy/{name}" }); - internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" }); - internal static ApiUrls EqlDelete = new ApiUrls(new[] { "_eql/search/{id}" }); - internal static ApiUrls EqlGet = new ApiUrls(new[] { "_eql/search/{id}" }); - internal static ApiUrls EqlGetStatus = new ApiUrls(new[] { "_eql/search/status/{id}" }); - internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" }); - internal static ApiUrls EsqlQuery = new ApiUrls(new[] { "_query" }); - internal static ApiUrls GraphExplore = new ApiUrls(new[] { "{index}/_graph/explore" }); - internal static ApiUrls IndexManagementAnalyze = new ApiUrls(new[] { "_analyze", "{index}/_analyze" }); - internal static ApiUrls IndexManagementClearCache = new ApiUrls(new[] { "_cache/clear", "{index}/_cache/clear" }); - internal static ApiUrls IndexManagementClose = new ApiUrls(new[] { "{index}/_close" }); - internal static ApiUrls IndexManagementCreate = new ApiUrls(new[] { "{index}" }); - internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); - internal static ApiUrls IndexManagementDataStreamsStats = new ApiUrls(new[] { "_data_stream/_stats", "_data_stream/{name}/_stats" }); - internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" }); - internal static ApiUrls IndexManagementDeleteAlias = new ApiUrls(new[] { "{index}/_alias/{name}", "{index}/_aliases/{name}" }); - internal static ApiUrls IndexManagementDeleteDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); - internal static ApiUrls IndexManagementDeleteDataStream = new ApiUrls(new[] { "_data_stream/{name}" }); - internal static ApiUrls IndexManagementDeleteIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); - internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" }); - internal static ApiUrls IndexManagementExistsAlias = new ApiUrls(new[] { "_alias/{name}", "{index}/_alias/{name}" }); - internal static ApiUrls IndexManagementExistsIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); - internal static ApiUrls IndexManagementExplainDataLifecycle = new ApiUrls(new[] { "{index}/_lifecycle/explain" }); - internal static ApiUrls IndexManagementFlush = new ApiUrls(new[] { "_flush", "{index}/_flush" }); - internal static ApiUrls IndexManagementForcemerge = new ApiUrls(new[] { "_forcemerge", "{index}/_forcemerge" }); - internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" }); - internal static ApiUrls IndexManagementGetAlias = new ApiUrls(new[] { "_alias", "_alias/{name}", "{index}/_alias/{name}", "{index}/_alias" }); - internal static ApiUrls IndexManagementGetDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); - internal static ApiUrls IndexManagementGetDataStream = new ApiUrls(new[] { "_data_stream", "_data_stream/{name}" }); - internal static ApiUrls IndexManagementGetIndexTemplate = new ApiUrls(new[] { "_index_template", "_index_template/{name}" }); - internal static ApiUrls IndexManagementGetMapping = new ApiUrls(new[] { "_mapping", "{index}/_mapping" }); - internal static ApiUrls IndexManagementGetSettings = new ApiUrls(new[] { "_settings", "{index}/_settings", "{index}/_settings/{name}", "_settings/{name}" }); - internal static ApiUrls IndexManagementMigrateToDataStream = new ApiUrls(new[] { "_data_stream/_migrate/{name}" }); - internal static ApiUrls IndexManagementModifyDataStream = new ApiUrls(new[] { "_data_stream/_modify" }); - internal static ApiUrls IndexManagementOpen = new ApiUrls(new[] { "{index}/_open" }); - internal static ApiUrls IndexManagementPutAlias = new ApiUrls(new[] { "{index}/_alias/{name}", "{index}/_aliases/{name}" }); - internal static ApiUrls IndexManagementPutDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" }); - internal static ApiUrls IndexManagementPutIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" }); - internal static ApiUrls IndexManagementPutMapping = new ApiUrls(new[] { "{index}/_mapping" }); - internal static ApiUrls IndexManagementPutSettings = new ApiUrls(new[] { "_settings", "{index}/_settings" }); - internal static ApiUrls IndexManagementRecovery = new ApiUrls(new[] { "_recovery", "{index}/_recovery" }); - internal static ApiUrls IndexManagementRefresh = new ApiUrls(new[] { "_refresh", "{index}/_refresh" }); - internal static ApiUrls IndexManagementResolveIndex = new ApiUrls(new[] { "_resolve/index/{name}" }); - internal static ApiUrls IndexManagementRollover = new ApiUrls(new[] { "{alias}/_rollover", "{alias}/_rollover/{new_index}" }); - internal static ApiUrls IndexManagementSegments = new ApiUrls(new[] { "_segments", "{index}/_segments" }); - internal static ApiUrls IndexManagementSimulateIndexTemplate = new ApiUrls(new[] { "_index_template/_simulate_index/{name}" }); - internal static ApiUrls IndexManagementSimulateTemplate = new ApiUrls(new[] { "_index_template/_simulate", "_index_template/_simulate/{name}" }); - internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" }); - internal static ApiUrls IndexManagementUpdateAliases = new ApiUrls(new[] { "_aliases" }); - internal static ApiUrls IndexManagementValidateQuery = new ApiUrls(new[] { "_validate/query", "{index}/_validate/query" }); - internal static ApiUrls InferenceDelete = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); - internal static ApiUrls InferenceGet = new ApiUrls(new[] { "_inference", "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); - internal static ApiUrls InferenceInference = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); - internal static ApiUrls InferencePut = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" }); - internal static ApiUrls IngestDeleteGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database/{id}" }); - internal static ApiUrls IngestDeleteIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database/{id}" }); - internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" }); - internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "_ingest/geoip/stats" }); - internal static ApiUrls IngestGetGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database", "_ingest/geoip/database/{id}" }); - internal static ApiUrls IngestGetIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database", "_ingest/ip_location/database/{id}" }); - internal static ApiUrls IngestGetPipeline = new ApiUrls(new[] { "_ingest/pipeline", "_ingest/pipeline/{id}" }); - internal static ApiUrls IngestProcessorGrok = new ApiUrls(new[] { "_ingest/processor/grok" }); - internal static ApiUrls IngestPutGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database/{id}" }); - internal static ApiUrls IngestPutIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database/{id}" }); - internal static ApiUrls IngestPutPipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" }); - internal static ApiUrls IngestSimulate = new ApiUrls(new[] { "_ingest/pipeline/_simulate", "_ingest/pipeline/{id}/_simulate" }); - internal static ApiUrls LicenseManagementGet = new ApiUrls(new[] { "_license" }); - internal static ApiUrls MachineLearningClearTrainedModelDeploymentCache = new ApiUrls(new[] { "_ml/trained_models/{model_id}/deployment/cache/_clear" }); - internal static ApiUrls MachineLearningCloseJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_close" }); - internal static ApiUrls MachineLearningDeleteCalendar = new ApiUrls(new[] { "_ml/calendars/{calendar_id}" }); - internal static ApiUrls MachineLearningDeleteCalendarEvent = new ApiUrls(new[] { "_ml/calendars/{calendar_id}/events/{event_id}" }); - internal static ApiUrls MachineLearningDeleteCalendarJob = new ApiUrls(new[] { "_ml/calendars/{calendar_id}/jobs/{job_id}" }); - internal static ApiUrls MachineLearningDeleteDatafeed = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}" }); - internal static ApiUrls MachineLearningDeleteDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/{id}" }); - internal static ApiUrls MachineLearningDeleteExpiredData = new ApiUrls(new[] { "_ml/_delete_expired_data/{job_id}", "_ml/_delete_expired_data" }); - internal static ApiUrls MachineLearningDeleteFilter = new ApiUrls(new[] { "_ml/filters/{filter_id}" }); - internal static ApiUrls MachineLearningDeleteForecast = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_forecast", "_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}" }); - internal static ApiUrls MachineLearningDeleteJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}" }); - internal static ApiUrls MachineLearningDeleteModelSnapshot = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}" }); - internal static ApiUrls MachineLearningDeleteTrainedModel = new ApiUrls(new[] { "_ml/trained_models/{model_id}" }); - internal static ApiUrls MachineLearningDeleteTrainedModelAlias = new ApiUrls(new[] { "_ml/trained_models/{model_id}/model_aliases/{model_alias}" }); - internal static ApiUrls MachineLearningEstimateModelMemory = new ApiUrls(new[] { "_ml/anomaly_detectors/_estimate_model_memory" }); - internal static ApiUrls MachineLearningEvaluateDataFrame = new ApiUrls(new[] { "_ml/data_frame/_evaluate" }); - internal static ApiUrls MachineLearningExplainDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/_explain", "_ml/data_frame/analytics/{id}/_explain" }); - internal static ApiUrls MachineLearningFlushJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_flush" }); - internal static ApiUrls MachineLearningForecast = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_forecast" }); - internal static ApiUrls MachineLearningGetBuckets = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", "_ml/anomaly_detectors/{job_id}/results/buckets" }); - internal static ApiUrls MachineLearningGetCalendarEvents = new ApiUrls(new[] { "_ml/calendars/{calendar_id}/events" }); - internal static ApiUrls MachineLearningGetCalendars = new ApiUrls(new[] { "_ml/calendars", "_ml/calendars/{calendar_id}" }); - internal static ApiUrls MachineLearningGetCategories = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", "_ml/anomaly_detectors/{job_id}/results/categories" }); - internal static ApiUrls MachineLearningGetDatafeeds = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}", "_ml/datafeeds" }); - internal static ApiUrls MachineLearningGetDatafeedStats = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}/_stats", "_ml/datafeeds/_stats" }); - internal static ApiUrls MachineLearningGetDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/{id}", "_ml/data_frame/analytics" }); - internal static ApiUrls MachineLearningGetDataFrameAnalyticsStats = new ApiUrls(new[] { "_ml/data_frame/analytics/_stats", "_ml/data_frame/analytics/{id}/_stats" }); - internal static ApiUrls MachineLearningGetFilters = new ApiUrls(new[] { "_ml/filters", "_ml/filters/{filter_id}" }); - internal static ApiUrls MachineLearningGetInfluencers = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/results/influencers" }); - internal static ApiUrls MachineLearningGetJobs = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}", "_ml/anomaly_detectors" }); - internal static ApiUrls MachineLearningGetJobStats = new ApiUrls(new[] { "_ml/anomaly_detectors/_stats", "_ml/anomaly_detectors/{job_id}/_stats" }); - internal static ApiUrls MachineLearningGetMemoryStats = new ApiUrls(new[] { "_ml/memory/_stats", "_ml/memory/{node_id}/_stats" }); - internal static ApiUrls MachineLearningGetModelSnapshots = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", "_ml/anomaly_detectors/{job_id}/model_snapshots" }); - internal static ApiUrls MachineLearningGetModelSnapshotUpgradeStats = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats" }); - internal static ApiUrls MachineLearningGetOverallBuckets = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/results/overall_buckets" }); - internal static ApiUrls MachineLearningGetRecords = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/results/records" }); - internal static ApiUrls MachineLearningGetTrainedModels = new ApiUrls(new[] { "_ml/trained_models/{model_id}", "_ml/trained_models" }); - internal static ApiUrls MachineLearningGetTrainedModelsStats = new ApiUrls(new[] { "_ml/trained_models/{model_id}/_stats", "_ml/trained_models/_stats" }); - internal static ApiUrls MachineLearningInferTrainedModel = new ApiUrls(new[] { "_ml/trained_models/{model_id}/_infer" }); - internal static ApiUrls MachineLearningInfo = new ApiUrls(new[] { "_ml/info" }); - internal static ApiUrls MachineLearningOpenJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_open" }); - internal static ApiUrls MachineLearningPostCalendarEvents = new ApiUrls(new[] { "_ml/calendars/{calendar_id}/events" }); - internal static ApiUrls MachineLearningPreviewDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/_preview", "_ml/data_frame/analytics/{id}/_preview" }); - internal static ApiUrls MachineLearningPutCalendar = new ApiUrls(new[] { "_ml/calendars/{calendar_id}" }); - internal static ApiUrls MachineLearningPutCalendarJob = new ApiUrls(new[] { "_ml/calendars/{calendar_id}/jobs/{job_id}" }); - internal static ApiUrls MachineLearningPutDatafeed = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}" }); - internal static ApiUrls MachineLearningPutDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/{id}" }); - internal static ApiUrls MachineLearningPutFilter = new ApiUrls(new[] { "_ml/filters/{filter_id}" }); - internal static ApiUrls MachineLearningPutJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}" }); - internal static ApiUrls MachineLearningPutTrainedModel = new ApiUrls(new[] { "_ml/trained_models/{model_id}" }); - internal static ApiUrls MachineLearningPutTrainedModelAlias = new ApiUrls(new[] { "_ml/trained_models/{model_id}/model_aliases/{model_alias}" }); - internal static ApiUrls MachineLearningPutTrainedModelDefinitionPart = new ApiUrls(new[] { "_ml/trained_models/{model_id}/definition/{part}" }); - internal static ApiUrls MachineLearningPutTrainedModelVocabulary = new ApiUrls(new[] { "_ml/trained_models/{model_id}/vocabulary" }); - internal static ApiUrls MachineLearningResetJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_reset" }); - internal static ApiUrls MachineLearningRevertModelSnapshot = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert" }); - internal static ApiUrls MachineLearningSetUpgradeMode = new ApiUrls(new[] { "_ml/set_upgrade_mode" }); - internal static ApiUrls MachineLearningStartDatafeed = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}/_start" }); - internal static ApiUrls MachineLearningStartDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/{id}/_start" }); - internal static ApiUrls MachineLearningStartTrainedModelDeployment = new ApiUrls(new[] { "_ml/trained_models/{model_id}/deployment/_start" }); - internal static ApiUrls MachineLearningStopDatafeed = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}/_stop" }); - internal static ApiUrls MachineLearningStopDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/{id}/_stop" }); - internal static ApiUrls MachineLearningStopTrainedModelDeployment = new ApiUrls(new[] { "_ml/trained_models/{model_id}/deployment/_stop" }); - internal static ApiUrls MachineLearningUpdateDatafeed = new ApiUrls(new[] { "_ml/datafeeds/{datafeed_id}/_update" }); - internal static ApiUrls MachineLearningUpdateDataFrameAnalytics = new ApiUrls(new[] { "_ml/data_frame/analytics/{id}/_update" }); - internal static ApiUrls MachineLearningUpdateFilter = new ApiUrls(new[] { "_ml/filters/{filter_id}/_update" }); - internal static ApiUrls MachineLearningUpdateJob = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/_update" }); - internal static ApiUrls MachineLearningUpdateModelSnapshot = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update" }); - internal static ApiUrls MachineLearningUpgradeJobSnapshot = new ApiUrls(new[] { "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade" }); - internal static ApiUrls MachineLearningValidate = new ApiUrls(new[] { "_ml/anomaly_detectors/_validate" }); - internal static ApiUrls MachineLearningValidateDetector = new ApiUrls(new[] { "_ml/anomaly_detectors/_validate/detector" }); - internal static ApiUrls NodesHotThreads = new ApiUrls(new[] { "_nodes/hot_threads", "_nodes/{node_id}/hot_threads" }); - internal static ApiUrls NodesInfo = new ApiUrls(new[] { "_nodes", "_nodes/{node_id}", "_nodes/{metric}", "_nodes/{node_id}/{metric}" }); - internal static ApiUrls NodesStats = new ApiUrls(new[] { "_nodes/stats", "_nodes/{node_id}/stats", "_nodes/stats/{metric}", "_nodes/{node_id}/stats/{metric}", "_nodes/stats/{metric}/{index_metric}", "_nodes/{node_id}/stats/{metric}/{index_metric}" }); - internal static ApiUrls NodesUsage = new ApiUrls(new[] { "_nodes/usage", "_nodes/{node_id}/usage", "_nodes/usage/{metric}", "_nodes/{node_id}/usage/{metric}" }); - internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); - internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); - internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); - internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); - internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" }); - internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" }); - internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" }); - internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" }); - internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" }); - internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" }); - internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" }); - internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" }); - internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" }); - internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" }); - internal static ApiUrls NoNamespaceHealthReport = new ApiUrls(new[] { "_health_report", "_health_report/{feature}" }); - internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" }); - internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" }); - internal static ApiUrls NoNamespaceMtermvectors = new ApiUrls(new[] { "_mtermvectors", "{index}/_mtermvectors" }); - internal static ApiUrls NoNamespaceMultiGet = new ApiUrls(new[] { "_mget", "{index}/_mget" }); - internal static ApiUrls NoNamespaceMultiSearch = new ApiUrls(new[] { "_msearch", "{index}/_msearch" }); - internal static ApiUrls NoNamespaceMultiSearchTemplate = new ApiUrls(new[] { "_msearch/template", "{index}/_msearch/template" }); - internal static ApiUrls NoNamespaceOpenPointInTime = new ApiUrls(new[] { "{index}/_pit" }); - internal static ApiUrls NoNamespacePing = new ApiUrls(new[] { "" }); - internal static ApiUrls NoNamespacePutScript = new ApiUrls(new[] { "_scripts/{id}", "_scripts/{id}/{context}" }); - internal static ApiUrls NoNamespaceRankEval = new ApiUrls(new[] { "_rank_eval", "{index}/_rank_eval" }); - internal static ApiUrls NoNamespaceReindex = new ApiUrls(new[] { "_reindex" }); - internal static ApiUrls NoNamespaceReindexRethrottle = new ApiUrls(new[] { "_reindex/{task_id}/_rethrottle" }); - internal static ApiUrls NoNamespaceRenderSearchTemplate = new ApiUrls(new[] { "_render/template", "_render/template/{id}" }); - internal static ApiUrls NoNamespaceScroll = new ApiUrls(new[] { "_search/scroll" }); - internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "_search", "{index}/_search" }); - internal static ApiUrls NoNamespaceSearchMvt = new ApiUrls(new[] { "{index}/_mvt/{field}/{zoom}/{x}/{y}" }); - internal static ApiUrls NoNamespaceSearchTemplate = new ApiUrls(new[] { "_search/template", "{index}/_search/template" }); - internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" }); - internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" }); - internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); - internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); - internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); - internal static ApiUrls QueryRulesDeleteRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); - internal static ApiUrls QueryRulesDeleteRuleset = new ApiUrls(new[] { "_query_rules/{ruleset_id}" }); - internal static ApiUrls QueryRulesGetRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); - internal static ApiUrls QueryRulesGetRuleset = new ApiUrls(new[] { "_query_rules/{ruleset_id}" }); - internal static ApiUrls QueryRulesListRulesets = new ApiUrls(new[] { "_query_rules" }); - internal static ApiUrls QueryRulesPutRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); - internal static ApiUrls QueryRulesPutRuleset = new ApiUrls(new[] { "_query_rules/{ruleset_id}" }); - internal static ApiUrls QueryRulesTest = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_test" }); - internal static ApiUrls SecurityActivateUserProfile = new ApiUrls(new[] { "_security/profile/_activate" }); - internal static ApiUrls SecurityAuthenticate = new ApiUrls(new[] { "_security/_authenticate" }); - internal static ApiUrls SecurityBulkDeleteRole = new ApiUrls(new[] { "_security/role" }); - internal static ApiUrls SecurityBulkPutRole = new ApiUrls(new[] { "_security/role" }); - internal static ApiUrls SecurityClearApiKeyCache = new ApiUrls(new[] { "_security/api_key/{ids}/_clear_cache" }); - internal static ApiUrls SecurityClearCachedPrivileges = new ApiUrls(new[] { "_security/privilege/{application}/_clear_cache" }); - internal static ApiUrls SecurityClearCachedRealms = new ApiUrls(new[] { "_security/realm/{realms}/_clear_cache" }); - internal static ApiUrls SecurityClearCachedRoles = new ApiUrls(new[] { "_security/role/{name}/_clear_cache" }); - internal static ApiUrls SecurityClearCachedServiceTokens = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache" }); - internal static ApiUrls SecurityCreateApiKey = new ApiUrls(new[] { "_security/api_key" }); - internal static ApiUrls SecurityCreateServiceToken = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}", "_security/service/{namespace}/{service}/credential/token" }); - internal static ApiUrls SecurityDeletePrivileges = new ApiUrls(new[] { "_security/privilege/{application}/{name}" }); - internal static ApiUrls SecurityDeleteRole = new ApiUrls(new[] { "_security/role/{name}" }); - internal static ApiUrls SecurityDeleteRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}" }); - internal static ApiUrls SecurityDeleteServiceToken = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}" }); - internal static ApiUrls SecurityDisableUserProfile = new ApiUrls(new[] { "_security/profile/{uid}/_disable" }); - internal static ApiUrls SecurityEnableUserProfile = new ApiUrls(new[] { "_security/profile/{uid}/_enable" }); - internal static ApiUrls SecurityGetApiKey = new ApiUrls(new[] { "_security/api_key" }); - internal static ApiUrls SecurityGetBuiltinPrivileges = new ApiUrls(new[] { "_security/privilege/_builtin" }); - internal static ApiUrls SecurityGetPrivileges = new ApiUrls(new[] { "_security/privilege", "_security/privilege/{application}", "_security/privilege/{application}/{name}" }); - internal static ApiUrls SecurityGetRole = new ApiUrls(new[] { "_security/role/{name}", "_security/role" }); - internal static ApiUrls SecurityGetRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}", "_security/role_mapping" }); - internal static ApiUrls SecurityGetServiceAccounts = new ApiUrls(new[] { "_security/service/{namespace}/{service}", "_security/service/{namespace}", "_security/service" }); - internal static ApiUrls SecurityGetServiceCredentials = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential" }); - internal static ApiUrls SecurityGetToken = new ApiUrls(new[] { "_security/oauth2/token" }); - internal static ApiUrls SecurityGetUserPrivileges = new ApiUrls(new[] { "_security/user/_privileges" }); - internal static ApiUrls SecurityGetUserProfile = new ApiUrls(new[] { "_security/profile/{uid}" }); - internal static ApiUrls SecurityGrantApiKey = new ApiUrls(new[] { "_security/api_key/grant" }); - internal static ApiUrls SecurityHasPrivileges = new ApiUrls(new[] { "_security/user/_has_privileges", "_security/user/{user}/_has_privileges" }); - internal static ApiUrls SecurityHasPrivilegesUserProfile = new ApiUrls(new[] { "_security/profile/_has_privileges" }); - internal static ApiUrls SecurityInvalidateApiKey = new ApiUrls(new[] { "_security/api_key" }); - internal static ApiUrls SecurityInvalidateToken = new ApiUrls(new[] { "_security/oauth2/token" }); - internal static ApiUrls SecurityPutPrivileges = new ApiUrls(new[] { "_security/privilege" }); - internal static ApiUrls SecurityPutRole = new ApiUrls(new[] { "_security/role/{name}" }); - internal static ApiUrls SecurityPutRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}" }); - internal static ApiUrls SecurityQueryApiKeys = new ApiUrls(new[] { "_security/_query/api_key" }); - internal static ApiUrls SecurityQueryRole = new ApiUrls(new[] { "_security/_query/role" }); - internal static ApiUrls SecurityQueryUser = new ApiUrls(new[] { "_security/_query/user" }); - internal static ApiUrls SecuritySamlAuthenticate = new ApiUrls(new[] { "_security/saml/authenticate" }); - internal static ApiUrls SecuritySamlCompleteLogout = new ApiUrls(new[] { "_security/saml/complete_logout" }); - internal static ApiUrls SecuritySamlInvalidate = new ApiUrls(new[] { "_security/saml/invalidate" }); - internal static ApiUrls SecuritySamlLogout = new ApiUrls(new[] { "_security/saml/logout" }); - internal static ApiUrls SecuritySamlPrepareAuthentication = new ApiUrls(new[] { "_security/saml/prepare" }); - internal static ApiUrls SecuritySamlServiceProviderMetadata = new ApiUrls(new[] { "_security/saml/metadata/{realm_name}" }); - internal static ApiUrls SecuritySuggestUserProfiles = new ApiUrls(new[] { "_security/profile/_suggest" }); - internal static ApiUrls SecurityUpdateApiKey = new ApiUrls(new[] { "_security/api_key/{id}" }); - internal static ApiUrls SecurityUpdateUserProfileData = new ApiUrls(new[] { "_security/profile/{uid}/_data" }); - internal static ApiUrls SnapshotCleanupRepository = new ApiUrls(new[] { "_snapshot/{repository}/_cleanup" }); - internal static ApiUrls SnapshotClone = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}" }); - internal static ApiUrls SnapshotCreate = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}" }); - internal static ApiUrls SnapshotCreateRepository = new ApiUrls(new[] { "_snapshot/{repository}" }); - internal static ApiUrls SnapshotDelete = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}" }); - internal static ApiUrls SnapshotDeleteRepository = new ApiUrls(new[] { "_snapshot/{repository}" }); - internal static ApiUrls SnapshotGet = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}" }); - internal static ApiUrls SnapshotGetRepository = new ApiUrls(new[] { "_snapshot", "_snapshot/{repository}" }); - internal static ApiUrls SnapshotLifecycleManagementDeleteLifecycle = new ApiUrls(new[] { "_slm/policy/{policy_id}" }); - internal static ApiUrls SnapshotLifecycleManagementExecuteLifecycle = new ApiUrls(new[] { "_slm/policy/{policy_id}/_execute" }); - internal static ApiUrls SnapshotLifecycleManagementExecuteRetention = new ApiUrls(new[] { "_slm/_execute_retention" }); - internal static ApiUrls SnapshotLifecycleManagementGetLifecycle = new ApiUrls(new[] { "_slm/policy/{policy_id}", "_slm/policy" }); - internal static ApiUrls SnapshotLifecycleManagementGetStats = new ApiUrls(new[] { "_slm/stats" }); - internal static ApiUrls SnapshotLifecycleManagementGetStatus = new ApiUrls(new[] { "_slm/status" }); - internal static ApiUrls SnapshotLifecycleManagementPutLifecycle = new ApiUrls(new[] { "_slm/policy/{policy_id}" }); - internal static ApiUrls SnapshotLifecycleManagementStart = new ApiUrls(new[] { "_slm/start" }); - internal static ApiUrls SnapshotLifecycleManagementStop = new ApiUrls(new[] { "_slm/stop" }); - internal static ApiUrls SnapshotRestore = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}/_restore" }); - internal static ApiUrls SnapshotStatus = new ApiUrls(new[] { "_snapshot/_status", "_snapshot/{repository}/_status", "_snapshot/{repository}/{snapshot}/_status" }); - internal static ApiUrls SnapshotVerifyRepository = new ApiUrls(new[] { "_snapshot/{repository}/_verify" }); - internal static ApiUrls SqlClearCursor = new ApiUrls(new[] { "_sql/close" }); - internal static ApiUrls SqlDeleteAsync = new ApiUrls(new[] { "_sql/async/delete/{id}" }); - internal static ApiUrls SqlGetAsync = new ApiUrls(new[] { "_sql/async/{id}" }); - internal static ApiUrls SqlGetAsyncStatus = new ApiUrls(new[] { "_sql/async/status/{id}" }); - internal static ApiUrls SqlQuery = new ApiUrls(new[] { "_sql" }); - internal static ApiUrls SqlTranslate = new ApiUrls(new[] { "_sql/translate" }); - internal static ApiUrls SynonymsDeleteSynonym = new ApiUrls(new[] { "_synonyms/{id}" }); - internal static ApiUrls SynonymsDeleteSynonymRule = new ApiUrls(new[] { "_synonyms/{set_id}/{rule_id}" }); - internal static ApiUrls SynonymsGetSynonym = new ApiUrls(new[] { "_synonyms/{id}" }); - internal static ApiUrls SynonymsGetSynonymRule = new ApiUrls(new[] { "_synonyms/{set_id}/{rule_id}" }); - internal static ApiUrls SynonymsGetSynonymsSets = new ApiUrls(new[] { "_synonyms" }); - internal static ApiUrls SynonymsPutSynonym = new ApiUrls(new[] { "_synonyms/{id}" }); - internal static ApiUrls SynonymsPutSynonymRule = new ApiUrls(new[] { "_synonyms/{set_id}/{rule_id}" }); - internal static ApiUrls TextStructureTestGrokPattern = new ApiUrls(new[] { "_text_structure/test_grok_pattern" }); - internal static ApiUrls TransformManagementDeleteTransform = new ApiUrls(new[] { "_transform/{transform_id}" }); - internal static ApiUrls TransformManagementGetTransform = new ApiUrls(new[] { "_transform/{transform_id}", "_transform" }); - internal static ApiUrls TransformManagementGetTransformStats = new ApiUrls(new[] { "_transform/{transform_id}/_stats" }); - internal static ApiUrls TransformManagementPreviewTransform = new ApiUrls(new[] { "_transform/{transform_id}/_preview", "_transform/_preview" }); - internal static ApiUrls TransformManagementPutTransform = new ApiUrls(new[] { "_transform/{transform_id}" }); - internal static ApiUrls TransformManagementResetTransform = new ApiUrls(new[] { "_transform/{transform_id}/_reset" }); - internal static ApiUrls TransformManagementScheduleNowTransform = new ApiUrls(new[] { "_transform/{transform_id}/_schedule_now" }); - internal static ApiUrls TransformManagementStartTransform = new ApiUrls(new[] { "_transform/{transform_id}/_start" }); - internal static ApiUrls TransformManagementStopTransform = new ApiUrls(new[] { "_transform/{transform_id}/_stop" }); - internal static ApiUrls TransformManagementUpdateTransform = new ApiUrls(new[] { "_transform/{transform_id}/_update" }); - internal static ApiUrls TransformManagementUpgradeTransforms = new ApiUrls(new[] { "_transform/_upgrade" }); - internal static ApiUrls XpackInfo = new ApiUrls(new[] { "_xpack" }); - internal static ApiUrls XpackUsage = new ApiUrls(new[] { "_xpack/usage" }); -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs deleted file mode 100644 index 23a2a730ace..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusRequest.g.cs +++ /dev/null @@ -1,151 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class AsyncSearchStatusRequestParameters : RequestParameters -{ - /// - /// - /// Specifies how long the async search needs to be available. - /// Ongoing async searches and any saved search results are deleted after this period. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } -} - -/// -/// -/// Get the async search status. -/// -/// -/// Get the status of a previously submitted async search request given its identifier, without retrieving search results. -/// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. -/// -/// -public sealed partial class AsyncSearchStatusRequest : PlainRequest -{ - public AsyncSearchStatusRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.status"; - - /// - /// - /// Specifies how long the async search needs to be available. - /// Ongoing async searches and any saved search results are deleted after this period. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } -} - -/// -/// -/// Get the async search status. -/// -/// -/// Get the status of a previously submitted async search request given its identifier, without retrieving search results. -/// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. -/// -/// -public sealed partial class AsyncSearchStatusRequestDescriptor : RequestDescriptor, AsyncSearchStatusRequestParameters> -{ - internal AsyncSearchStatusRequestDescriptor(Action> configure) => configure.Invoke(this); - - public AsyncSearchStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.status"; - - public AsyncSearchStatusRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - - public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get the async search status. -/// -/// -/// Get the status of a previously submitted async search request given its identifier, without retrieving search results. -/// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. -/// -/// -public sealed partial class AsyncSearchStatusRequestDescriptor : RequestDescriptor -{ - internal AsyncSearchStatusRequestDescriptor(Action configure) => configure.Invoke(this); - - public AsyncSearchStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.status"; - - public AsyncSearchStatusRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - - public AsyncSearchStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs deleted file mode 100644 index ac935fb70ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs +++ /dev/null @@ -1,102 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse -{ - /// - /// - /// Metadata about clusters involved in the cross-cluster search. - /// Not shown for local-only searches. - /// - /// - [JsonInclude, JsonPropertyName("_clusters")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterStatistics? Clusters { get; init; } - - /// - /// - /// If the async search completed, this field shows the status code of the search. - /// For example, 200 indicates that the async search was successfully completed. - /// 503 indicates that the async search was completed with an error. - /// - /// - [JsonInclude, JsonPropertyName("completion_status")] - public int? CompletionStatus { get; init; } - - /// - /// - /// Indicates when the async search completed. Only present - /// when the search has completed. - /// - /// - [JsonInclude, JsonPropertyName("completion_time")] - public DateTimeOffset? CompletionTime { get; init; } - [JsonInclude, JsonPropertyName("completion_time_in_millis")] - public long? CompletionTimeInMillis { get; init; } - - /// - /// - /// Indicates when the async search will expire. - /// - /// - [JsonInclude, JsonPropertyName("expiration_time")] - public DateTimeOffset? ExpirationTime { get; init; } - [JsonInclude, JsonPropertyName("expiration_time_in_millis")] - public long ExpirationTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - - /// - /// - /// When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards. - /// While the query is running, is_partial is always set to true. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool IsPartial { get; init; } - - /// - /// - /// Indicates whether the search is still running or has completed. - /// NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool IsRunning { get; init; } - - /// - /// - /// Indicates how many shards have run the query so far. - /// - /// - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset? StartTime { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs deleted file mode 100644 index 3d0db2d1b6f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchRequest.g.cs +++ /dev/null @@ -1,134 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class DeleteAsyncSearchRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete an async search. -/// -/// -/// If the asynchronous search is still running, it is cancelled. -/// Otherwise, the saved search results are deleted. -/// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. -/// -/// -public sealed partial class DeleteAsyncSearchRequest : PlainRequest -{ - public DeleteAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.delete"; -} - -/// -/// -/// Delete an async search. -/// -/// -/// If the asynchronous search is still running, it is cancelled. -/// Otherwise, the saved search results are deleted. -/// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. -/// -/// -public sealed partial class DeleteAsyncSearchRequestDescriptor : RequestDescriptor, DeleteAsyncSearchRequestParameters> -{ - internal DeleteAsyncSearchRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.delete"; - - public DeleteAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete an async search. -/// -/// -/// If the asynchronous search is still running, it is cancelled. -/// Otherwise, the saved search results are deleted. -/// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. -/// -/// -public sealed partial class DeleteAsyncSearchRequestDescriptor : RequestDescriptor -{ - internal DeleteAsyncSearchRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.delete"; - - public DeleteAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs deleted file mode 100644 index 66a78fb63cb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class DeleteAsyncSearchResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs deleted file mode 100644 index 773597370a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchRequest.g.cs +++ /dev/null @@ -1,195 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class GetAsyncSearchRequestParameters : RequestParameters -{ - /// - /// - /// Specifies how long the async search should be available in the cluster. - /// When not specified, the keep_alive set with the corresponding submit async request will be used. - /// Otherwise, it is possible to override the value and extend the validity of the request. - /// When this period expires, the search, if still running, is cancelled. - /// If the search is completed, its saved results are deleted. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Specifies to wait for the search to be completed up until the provided timeout. - /// Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. - /// By default no timeout is set meaning that the currently available results will be returned without any additional wait. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -/// -/// -/// Get async search results. -/// -/// -/// Retrieve the results of a previously submitted asynchronous search request. -/// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. -/// -/// -public sealed partial class GetAsyncSearchRequest : PlainRequest -{ - public GetAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.get"; - - /// - /// - /// Specifies how long the async search should be available in the cluster. - /// When not specified, the keep_alive set with the corresponding submit async request will be used. - /// Otherwise, it is possible to override the value and extend the validity of the request. - /// When this period expires, the search, if still running, is cancelled. - /// If the search is completed, its saved results are deleted. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Specifies to wait for the search to be completed up until the provided timeout. - /// Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. - /// By default no timeout is set meaning that the currently available results will be returned without any additional wait. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -/// -/// -/// Get async search results. -/// -/// -/// Retrieve the results of a previously submitted asynchronous search request. -/// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. -/// -/// -public sealed partial class GetAsyncSearchRequestDescriptor : RequestDescriptor, GetAsyncSearchRequestParameters> -{ - internal GetAsyncSearchRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.get"; - - public GetAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - public GetAsyncSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - public GetAsyncSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public GetAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get async search results. -/// -/// -/// Retrieve the results of a previously submitted asynchronous search request. -/// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. -/// -/// -public sealed partial class GetAsyncSearchRequestDescriptor : RequestDescriptor -{ - internal GetAsyncSearchRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "async_search.get"; - - public GetAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - public GetAsyncSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - public GetAsyncSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public GetAsyncSearchRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs deleted file mode 100644 index a7fd20fd67d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs +++ /dev/null @@ -1,77 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class GetAsyncSearchResponse : ElasticsearchResponse -{ - /// - /// - /// Indicates when the async search completed. Only present - /// when the search has completed. - /// - /// - [JsonInclude, JsonPropertyName("completion_time")] - public DateTimeOffset? CompletionTime { get; init; } - [JsonInclude, JsonPropertyName("completion_time_in_millis")] - public long? CompletionTimeInMillis { get; init; } - - /// - /// - /// Indicates when the async search will expire. - /// - /// - [JsonInclude, JsonPropertyName("expiration_time")] - public DateTimeOffset? ExpirationTime { get; init; } - [JsonInclude, JsonPropertyName("expiration_time_in_millis")] - public long ExpirationTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - - /// - /// - /// When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards. - /// While the query is running, is_partial is always set to true. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool IsPartial { get; init; } - - /// - /// - /// Indicates whether the search is still running or has completed. - /// NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool IsRunning { get; init; } - [JsonInclude, JsonPropertyName("response")] - public Elastic.Clients.Elasticsearch.Serverless.AsyncSearch.AsyncSearch Response { get; init; } - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset? StartTime { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs deleted file mode 100644 index da346fb535f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ /dev/null @@ -1,3366 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class SubmitAsyncSearchRequestParameters : RequestParameters -{ - /// - /// - /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Indicate if an error should be returned if there is a partial search failure or timeout - /// - /// - public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); } - - /// - /// - /// The analyzer to use for the query string - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// Specify whether wildcard and prefix queries should be analyzed (default: false) - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// Affects how often partial results become available, which happens whenever shard results are reduced. - /// A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default). - /// - /// - public long? BatchedReduceSize { get => Q("batched_reduce_size"); set => Q("batched_reduce_size", value); } - - /// - /// - /// The default value is the only supported value. - /// - /// - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// The default operator for query string query (AND or OR) - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// The field to use as default where no field prefix is given in the query string - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Whether specified concrete, expanded or aliased indices should be ignored when throttled - /// - /// - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// Whether specified concrete indices should be ignored when unavailable (missing or closed) - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, results are stored for later retrieval when the search completes within the wait_for_completion_timeout. - /// - /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } - - /// - /// - /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - /// - /// - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - - /// - /// - /// Specify the node or shard the operation should be performed on (default: random) - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// Specify if request cache should be used for this request or not, defaults to true - /// - /// - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// Indicates whether hits.total should be rendered as an integer or an object in the rest search response - /// - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// A comma-separated list of specific routing values - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Search operation type - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// A list of fields to exclude from the returned _source field - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A list of fields to extract and return from the _source field - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Specifies which field to use for suggestions. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } - - /// - /// - /// Specify suggest mode - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } - - /// - /// - /// How many suggestions to return in response - /// - /// - public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } - - /// - /// - /// The source text for which the suggestions should be returned. - /// - /// - public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } - - /// - /// - /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Blocks and waits until the search is completed up to a certain timeout. - /// When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -internal sealed partial class SubmitAsyncSearchRequestConverter : JsonConverter -{ - public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new SubmitAsyncSearchRequest(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "collapse") - { - variant.Collapse = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "explain") - { - variant.Explain = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ext") - { - variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "fields") - { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "from") - { - variant.From = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "highlight") - { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices_boost") - { - variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); - continue; - } - - if (property == "knn") - { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "min_score") - { - variant.MinScore = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "post_filter") - { - variant.PostFilter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "profile") - { - variant.Profile = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rescore") - { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "search_after") - { - variant.SearchAfter = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "size") - { - variant.Size = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "slice") - { - variant.Slice = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "sort") - { - variant.Sort = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "_source") - { - variant.Source = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stats") - { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "suggest") - { - variant.Suggest = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "terminate_after") - { - variant.TerminateAfter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "timeout") - { - variant.Timeout = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "track_scores") - { - variant.TrackScores = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "track_total_hits") - { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.Collapse is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, value.Collapse, options); - } - - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - - if (value.Explain.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(value.Explain.Value); - } - - if (value.Ext is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, value.Ext, options); - } - - if (value.Fields is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); - } - - if (value.From.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(value.From.Value); - } - - if (value.Highlight is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, value.Highlight, options); - } - - if (value.IndicesBoost is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, value.IndicesBoost, options); - } - - if (value.Knn is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, value.Knn, options); - } - - if (value.MinScore.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(value.MinScore.Value); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.PostFilter is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, value.PostFilter, options); - } - - if (value.Profile.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(value.Profile.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.Rescore is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, value.Rescore, options); - } - - if (value.RuntimeMappings is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); - } - - if (value.ScriptFields is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, value.ScriptFields, options); - } - - if (value.SearchAfter is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, value.SearchAfter, options); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.Size.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(value.Size.Value); - } - - if (value.Slice is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, value.Slice, options); - } - - if (value.Sort is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, value.Sort, options); - } - - if (value.Source is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, value.Source, options); - } - - if (value.Stats is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - new FieldsConverter().Write(writer, value.StoredFields, options); - } - - if (value.Suggest is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, value.Suggest, options); - } - - if (value.TerminateAfter.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(value.TerminateAfter.Value); - } - - if (!string.IsNullOrEmpty(value.Timeout)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(value.Timeout); - } - - if (value.TrackScores.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(value.TrackScores.Value); - } - - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Run an async search. -/// -/// -/// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. -/// -/// -/// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. -/// -/// -/// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. -/// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. -/// -/// -[JsonConverter(typeof(SubmitAsyncSearchRequestConverter))] -public sealed partial class SubmitAsyncSearchRequest : PlainRequest -{ - public SubmitAsyncSearchRequest() - { - } - - public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchSubmit; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "async_search.submit"; - - /// - /// - /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Indicate if an error should be returned if there is a partial search failure or timeout - /// - /// - [JsonIgnore] - public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); } - - /// - /// - /// The analyzer to use for the query string - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// Specify whether wildcard and prefix queries should be analyzed (default: false) - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// Affects how often partial results become available, which happens whenever shard results are reduced. - /// A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default). - /// - /// - [JsonIgnore] - public long? BatchedReduceSize { get => Q("batched_reduce_size"); set => Q("batched_reduce_size", value); } - - /// - /// - /// The default value is the only supported value. - /// - /// - [JsonIgnore] - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// The default operator for query string query (AND or OR) - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// The field to use as default where no field prefix is given in the query string - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Whether specified concrete, expanded or aliased indices should be ignored when throttled - /// - /// - [JsonIgnore] - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// Whether specified concrete indices should be ignored when unavailable (missing or closed) - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, results are stored for later retrieval when the search completes within the wait_for_completion_timeout. - /// - /// - [JsonIgnore] - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } - - /// - /// - /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - /// - /// - [JsonIgnore] - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - - /// - /// - /// Specify the node or shard the operation should be performed on (default: random) - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// Specify if request cache should be used for this request or not, defaults to true - /// - /// - [JsonIgnore] - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// Indicates whether hits.total should be rendered as an integer or an object in the rest search response - /// - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// A comma-separated list of specific routing values - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Search operation type - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// A list of fields to exclude from the returned _source field - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A list of fields to extract and return from the _source field - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Specifies which field to use for suggestions. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } - - /// - /// - /// Specify suggest mode - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } - - /// - /// - /// How many suggestions to return in response - /// - /// - [JsonIgnore] - public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } - - /// - /// - /// The source text for which the suggestions should be returned. - /// - /// - [JsonIgnore] - public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } - - /// - /// - /// Specify whether aggregation and suggester names should be prefixed by their respective types in the response - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Blocks and waits until the search is completed up to a certain timeout. - /// When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - [JsonInclude, JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. The request returns doc values for field - /// names matching these patterns in the hits.fields property of the response. - /// - /// - [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; set; } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - [JsonInclude, JsonPropertyName("ext")] - public IDictionary? Ext { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } - - /// - /// - /// Starting document offset. By default, you cannot page through more than 10,000 - /// hits using the from and size parameters. To page through more hits, use the - /// search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - [JsonInclude, JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - [JsonInclude, JsonPropertyName("indices_boost")] - public ICollection>? IndicesBoost { get; set; } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - [JsonInclude, JsonPropertyName("knn")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnSearch))] - public ICollection? Knn { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are - /// not included in the search results. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public double? MinScore { get; set; } - - /// - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you - /// cannot specify an <index> in the request path. - /// - /// - [JsonInclude, JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } - [JsonInclude, JsonPropertyName("post_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilter { get; set; } - [JsonInclude, JsonPropertyName("profile")] - public bool? Profile { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - [JsonInclude, JsonPropertyName("rescore")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))] - public ICollection? Rescore { get; set; } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - [JsonInclude, JsonPropertyName("script_fields")] - public IDictionary? ScriptFields { get; set; } - [JsonInclude, JsonPropertyName("search_after")] - public ICollection? SearchAfter { get; set; } - - /// - /// - /// If true, returns sequence number and primary term of the last modification - /// of each hit. See Optimistic concurrency control. - /// - /// - [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// - /// The number of hits to return. By default, you cannot page through more - /// than 10,000 hits using the from and size parameters. To page through more - /// hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - [JsonInclude, JsonPropertyName("slice")] - public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - /// - /// - /// Indicates which source fields are returned for matching documents. These - /// fields are returned in the hits._source property of the search response. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - - /// - /// - /// Stats groups to associate with the search. Each group maintains a statistics - /// aggregation for its associated searches. You can retrieve these stats using - /// the indices stats API. - /// - /// - [JsonInclude, JsonPropertyName("stats")] - public ICollection? Stats { get; set; } - - /// - /// - /// List of stored fields to return as part of a hit. If no fields are specified, - /// no stored fields are included in the response. If this field is specified, the _source - /// parameter defaults to false. You can pass _source: true to return both source fields - /// and stored fields in the search response. - /// - /// - [JsonInclude, JsonPropertyName("stored_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? Suggest { get; set; } - - /// - /// - /// Maximum number of documents to collect for each shard. If a query reaches this - /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents - /// before sorting. Defaults to 0, which does not terminate query execution early. - /// - /// - [JsonInclude, JsonPropertyName("terminate_after")] - public long? TerminateAfter { get; set; } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. If no response - /// is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public string? Timeout { get; set; } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - [JsonInclude, JsonPropertyName("track_scores")] - public bool? TrackScores { get; set; } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact - /// number of hits is returned at the cost of some performance. If false, the - /// response does not include the total number of hits matching the query. - /// Defaults to 10,000 hits. - /// - /// - [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } -} - -/// -/// -/// Run an async search. -/// -/// -/// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. -/// -/// -/// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. -/// -/// -/// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. -/// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. -/// -/// -public sealed partial class SubmitAsyncSearchRequestDescriptor : RequestDescriptor, SubmitAsyncSearchRequestParameters> -{ - internal SubmitAsyncSearchRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SubmitAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SubmitAsyncSearchRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchSubmit; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "async_search.submit"; - - public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); - public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public SubmitAsyncSearchRequestDescriptor Df(string? df) => Qs("df", df); - public SubmitAsyncSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SubmitAsyncSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public SubmitAsyncSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SubmitAsyncSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion); - public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); - public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); - public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); - public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); - public SubmitAsyncSearchRequestDescriptor SuggestText(string? suggestText) => Qs("suggest_text", suggestText); - public SubmitAsyncSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - public SubmitAsyncSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private IDictionary> AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action> DocvalueFieldsDescriptorAction { get; set; } - private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action> FieldsDescriptorAction { get; set; } - private Action>[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } - private Action> PostFilterDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? RescoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action> RescoreDescriptorAction { get; set; } - private Action>[] RescoreDescriptorActions { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action> SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private ICollection? StatsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action> SuggestDescriptorAction { get; set; } - private long? TerminateAfterValue { get; set; } - private string? TimeoutValue { get; set; } - private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? VersionValue { get; set; } - - public SubmitAsyncSearchRequestDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Collapse(Action> configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns doc values for field - /// names matching these patterns in the hits.fields property of the response. - /// - /// - public SubmitAsyncSearchRequestDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor DocvalueFields(Action> configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Action>[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public SubmitAsyncSearchRequestDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Fields(Action> configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Fields(params Action>[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. By default, you cannot page through more than 10,000 - /// hits using the from and size parameters. To page through more hits, use the - /// search_after parameter. - /// - /// - public SubmitAsyncSearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Highlight(Action> configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) - { - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnValue = knn; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) - { - KnnValue = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Knn(Action> configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorActions = null; - KnnDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Knn(params Action>[] configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are - /// not included in the search results. - /// - /// - public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you - /// cannot specify an <index> in the request path. - /// - /// - public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor PostFilter(Action> configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public SubmitAsyncSearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(Action> configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(params Action>[] configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification - /// of each hit. See Optimistic concurrency control. - /// - /// - public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The number of hits to return. By default, you cannot page through more - /// than 10,000 hits using the from and size parameters. To page through more - /// hits, use the search_after parameter. - /// - /// - public SubmitAsyncSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Slice(Action> configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Indicates which source fields are returned for matching documents. These - /// fields are returned in the hits._source property of the search response. - /// - /// - public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Stats groups to associate with the search. Each group maintains a statistics - /// aggregation for its associated searches. You can retrieve these stats using - /// the indices stats API. - /// - /// - public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// - /// List of stored fields to return as part of a hit. If no fields are specified, - /// no stored fields are included in the response. If this field is specified, the _source - /// parameter defaults to false. You can pass _source: true to return both source fields - /// and stored fields in the search response. - /// - /// - public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Action> configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. If a query reaches this - /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents - /// before sorting. Defaults to 0, which does not terminate query execution early. - /// - /// - public SubmitAsyncSearchRequestDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. If no response - /// is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public SubmitAsyncSearchRequestDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public SubmitAsyncSearchRequestDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact - /// number of hits is returned at the cost of some performance. If false, the - /// response does not include the total number of hits matching the query. - /// Defaults to 10,000 hits. - /// - /// - public SubmitAsyncSearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public SubmitAsyncSearchRequestDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (KnnDescriptor is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, KnnDescriptor, options); - } - else if (KnnDescriptorAction is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); - } - else if (KnnDescriptorActions is not null) - { - writer.WritePropertyName("knn"); - if (KnnDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in KnnDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); - } - - if (KnnDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (KnnValue is not null) - { - writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (PostFilterDescriptor is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); - } - else if (PostFilterDescriptorAction is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PostFilterDescriptorAction), options); - } - else if (PostFilterValue is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RescoreDescriptor is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, RescoreDescriptor, options); - } - else if (RescoreDescriptorAction is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); - } - else if (RescoreDescriptorActions is not null) - { - writer.WritePropertyName("rescore"); - if (RescoreDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RescoreDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(action), options); - } - - if (RescoreDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (RescoreValue is not null) - { - writer.WritePropertyName("rescore"); - SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (SuggestDescriptor is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestDescriptor, options); - } - else if (SuggestDescriptorAction is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); - } - else if (SuggestValue is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestValue, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - if (!string.IsNullOrEmpty(TimeoutValue)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(TimeoutValue); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Run an async search. -/// -/// -/// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. -/// -/// -/// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. -/// -/// -/// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. -/// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. -/// -/// -public sealed partial class SubmitAsyncSearchRequestDescriptor : RequestDescriptor -{ - internal SubmitAsyncSearchRequestDescriptor(Action configure) => configure.Invoke(this); - - public SubmitAsyncSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SubmitAsyncSearchRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.AsyncSearchSubmit; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "async_search.submit"; - - public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); - public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public SubmitAsyncSearchRequestDescriptor Df(string? df) => Qs("df", df); - public SubmitAsyncSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SubmitAsyncSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public SubmitAsyncSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SubmitAsyncSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion); - public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); - public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); - public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); - public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); - public SubmitAsyncSearchRequestDescriptor SuggestText(string? suggestText) => Qs("suggest_text", suggestText); - public SubmitAsyncSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - public SubmitAsyncSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private IDictionary AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action DocvalueFieldsDescriptorAction { get; set; } - private Action[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action FieldsDescriptorAction { get; set; } - private Action[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } - private Action PostFilterDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? RescoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action RescoreDescriptorAction { get; set; } - private Action[] RescoreDescriptorActions { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private ICollection? StatsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } - private long? TerminateAfterValue { get; set; } - private string? TimeoutValue { get; set; } - private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? VersionValue { get; set; } - - public SubmitAsyncSearchRequestDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Collapse(Action configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns doc values for field - /// names matching these patterns in the hits.fields property of the response. - /// - /// - public SubmitAsyncSearchRequestDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor DocvalueFields(Action configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Action[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public SubmitAsyncSearchRequestDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Fields(Action configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Fields(params Action[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. By default, you cannot page through more than 10,000 - /// hits using the from and size parameters. To page through more hits, use the - /// search_after parameter. - /// - /// - public SubmitAsyncSearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) - { - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnValue = knn; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) - { - KnnValue = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Knn(Action configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorActions = null; - KnnDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Knn(params Action[] configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are - /// not included in the search results. - /// - /// - public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you - /// cannot specify an <index> in the request path. - /// - /// - public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor PostFilter(Action configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public SubmitAsyncSearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(Action configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Rescore(params Action[] configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification - /// of each hit. See Optimistic concurrency control. - /// - /// - public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The number of hits to return. By default, you cannot page through more - /// than 10,000 hits using the from and size parameters. To page through more - /// hits, use the search_after parameter. - /// - /// - public SubmitAsyncSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Indicates which source fields are returned for matching documents. These - /// fields are returned in the hits._source property of the search response. - /// - /// - public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Stats groups to associate with the search. Each group maintains a statistics - /// aggregation for its associated searches. You can retrieve these stats using - /// the indices stats API. - /// - /// - public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// - /// List of stored fields to return as part of a hit. If no fields are specified, - /// no stored fields are included in the response. If this field is specified, the _source - /// parameter defaults to false. You can pass _source: true to return both source fields - /// and stored fields in the search response. - /// - /// - public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public SubmitAsyncSearchRequestDescriptor Suggest(Action configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. If a query reaches this - /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents - /// before sorting. Defaults to 0, which does not terminate query execution early. - /// - /// - public SubmitAsyncSearchRequestDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. If no response - /// is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public SubmitAsyncSearchRequestDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public SubmitAsyncSearchRequestDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact - /// number of hits is returned at the cost of some performance. If false, the - /// response does not include the total number of hits matching the query. - /// Defaults to 10,000 hits. - /// - /// - public SubmitAsyncSearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public SubmitAsyncSearchRequestDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (KnnDescriptor is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, KnnDescriptor, options); - } - else if (KnnDescriptorAction is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); - } - else if (KnnDescriptorActions is not null) - { - writer.WritePropertyName("knn"); - if (KnnDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in KnnDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); - } - - if (KnnDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (KnnValue is not null) - { - writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (PostFilterDescriptor is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); - } - else if (PostFilterDescriptorAction is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PostFilterDescriptorAction), options); - } - else if (PostFilterValue is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RescoreDescriptor is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, RescoreDescriptor, options); - } - else if (RescoreDescriptorAction is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); - } - else if (RescoreDescriptorActions is not null) - { - writer.WritePropertyName("rescore"); - if (RescoreDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RescoreDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(action), options); - } - - if (RescoreDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (RescoreValue is not null) - { - writer.WritePropertyName("rescore"); - SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (SuggestDescriptor is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestDescriptor, options); - } - else if (SuggestDescriptorAction is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); - } - else if (SuggestValue is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestValue, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - if (!string.IsNullOrEmpty(TimeoutValue)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(TimeoutValue); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs deleted file mode 100644 index 2aa8d3f0afe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs +++ /dev/null @@ -1,77 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class SubmitAsyncSearchResponse : ElasticsearchResponse -{ - /// - /// - /// Indicates when the async search completed. Only present - /// when the search has completed. - /// - /// - [JsonInclude, JsonPropertyName("completion_time")] - public DateTimeOffset? CompletionTime { get; init; } - [JsonInclude, JsonPropertyName("completion_time_in_millis")] - public long? CompletionTimeInMillis { get; init; } - - /// - /// - /// Indicates when the async search will expire. - /// - /// - [JsonInclude, JsonPropertyName("expiration_time")] - public DateTimeOffset? ExpirationTime { get; init; } - [JsonInclude, JsonPropertyName("expiration_time_in_millis")] - public long ExpirationTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - - /// - /// - /// When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards. - /// While the query is running, is_partial is always set to true. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool IsPartial { get; init; } - - /// - /// - /// Indicates whether the search is still running or has completed. - /// NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool IsRunning { get; init; } - [JsonInclude, JsonPropertyName("response")] - public Elastic.Clients.Elasticsearch.Serverless.AsyncSearch.AsyncSearch Response { get; init; } - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset? StartTime { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs deleted file mode 100644 index 911de7c5c91..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs +++ /dev/null @@ -1,337 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class BulkRequestParameters : RequestParameters -{ - /// - /// - /// If true, the response will include the ingest pipelines that were executed for each index or create. - /// - /// - public bool? ListExecutedPipelines { get => Q("list_executed_pipelines"); set => Q("list_executed_pipelines", value); } - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the request’s actions must target an index alias. - /// - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// If true, the request's actions must target a data stream (existing or to-be-created). - /// - /// - public bool? RequireDataStream { get => Q("require_data_stream"); set => Q("require_data_stream", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// true or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Bulk index or delete documents. -/// Performs multiple indexing or delete operations in a single API call. -/// This reduces overhead and can greatly increase indexing speed. -/// -/// -public sealed partial class BulkRequest : PlainRequest -{ - public BulkRequest() - { - } - - public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceBulk; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "bulk"; - - /// - /// - /// If true, the response will include the ingest pipelines that were executed for each index or create. - /// - /// - [JsonIgnore] - public bool? ListExecutedPipelines { get => Q("list_executed_pipelines"); set => Q("list_executed_pipelines", value); } - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - [JsonIgnore] - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the request’s actions must target an index alias. - /// - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// If true, the request's actions must target a data stream (existing or to-be-created). - /// - /// - [JsonIgnore] - public bool? RequireDataStream { get => Q("require_data_stream"); set => Q("require_data_stream", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// true or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Bulk index or delete documents. -/// Performs multiple indexing or delete operations in a single API call. -/// This reduces overhead and can greatly increase indexing speed. -/// -/// -public sealed partial class BulkRequestDescriptor : RequestDescriptor, BulkRequestParameters> -{ - internal BulkRequestDescriptor(Action> configure) => configure.Invoke(this); - - public BulkRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public BulkRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceBulk; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "bulk"; - - public BulkRequestDescriptor ListExecutedPipelines(bool? listExecutedPipelines = true) => Qs("list_executed_pipelines", listExecutedPipelines); - public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); - public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); - public BulkRequestDescriptor RequireDataStream(bool? requireDataStream = true) => Qs("require_data_stream", requireDataStream); - public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public BulkRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} - -/// -/// -/// Bulk index or delete documents. -/// Performs multiple indexing or delete operations in a single API call. -/// This reduces overhead and can greatly increase indexing speed. -/// -/// -public sealed partial class BulkRequestDescriptor : RequestDescriptor -{ - internal BulkRequestDescriptor(Action configure) => configure.Invoke(this); - - public BulkRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public BulkRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceBulk; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "bulk"; - - public BulkRequestDescriptor ListExecutedPipelines(bool? listExecutedPipelines = true) => Qs("list_executed_pipelines", listExecutedPipelines); - public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); - public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); - public BulkRequestDescriptor RequireDataStream(bool? requireDataStream = true) => Qs("require_data_stream", requireDataStream); - public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public BulkRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkResponse.g.cs deleted file mode 100644 index 6540f2c9a6c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class BulkResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("errors")] - public bool Errors { get; init; } - [JsonInclude, JsonPropertyName("ingest_took")] - public long? IngestTook { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollRequest.g.cs deleted file mode 100644 index d0dec945da3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ClearScrollRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear a scrolling search. -/// -/// -/// Clear the search context and results for a scrolling search. -/// -/// -public sealed partial class ClearScrollRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceClearScroll; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "clear_scroll"; - - /// - /// - /// Scroll IDs to clear. - /// To clear all scroll IDs, use _all. - /// - /// - [JsonInclude, JsonPropertyName("scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollIds? ScrollId { get; set; } -} - -/// -/// -/// Clear a scrolling search. -/// -/// -/// Clear the search context and results for a scrolling search. -/// -/// -public sealed partial class ClearScrollRequestDescriptor : RequestDescriptor -{ - internal ClearScrollRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearScrollRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceClearScroll; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "clear_scroll"; - - private Elastic.Clients.Elasticsearch.Serverless.ScrollIds? ScrollIdValue { get; set; } - - /// - /// - /// Scroll IDs to clear. - /// To clear all scroll IDs, use _all. - /// - /// - public ClearScrollRequestDescriptor ScrollId(Elastic.Clients.Elasticsearch.Serverless.ScrollIds? scrollId) - { - ScrollIdValue = scrollId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScrollIdValue is not null) - { - writer.WritePropertyName("scroll_id"); - JsonSerializer.Serialize(writer, ScrollIdValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollResponse.g.cs deleted file mode 100644 index 121e9946eb2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClearScrollResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ClearScrollResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("num_freed")] - public int NumFreed { get; init; } - [JsonInclude, JsonPropertyName("succeeded")] - public bool Succeeded { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeRequest.g.cs deleted file mode 100644 index 843be08f62d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ClosePointInTimeRequestParameters : RequestParameters -{ -} - -/// -/// -/// Close a point in time. -/// -/// -/// A point in time must be opened explicitly before being used in search requests. -/// The keep_alive parameter tells Elasticsearch how long it should persist. -/// A point in time is automatically closed when the keep_alive period has elapsed. -/// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. -/// -/// -public sealed partial class ClosePointInTimeRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceClosePointInTime; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "close_point_in_time"; - - /// - /// - /// The ID of the point-in-time. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } -} - -/// -/// -/// Close a point in time. -/// -/// -/// A point in time must be opened explicitly before being used in search requests. -/// The keep_alive parameter tells Elasticsearch how long it should persist. -/// A point in time is automatically closed when the keep_alive period has elapsed. -/// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. -/// -/// -public sealed partial class ClosePointInTimeRequestDescriptor : RequestDescriptor -{ - internal ClosePointInTimeRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClosePointInTimeRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceClosePointInTime; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "close_point_in_time"; - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - - /// - /// - /// The ID of the point-in-time. - /// - /// - public ClosePointInTimeRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeResponse.g.cs deleted file mode 100644 index e12e0397740..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ClosePointInTimeResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ClosePointInTimeResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("num_freed")] - public int NumFreed { get; init; } - [JsonInclude, JsonPropertyName("succeeded")] - public bool Succeeded { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainRequest.g.cs deleted file mode 100644 index 986ef49cab9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainRequest.g.cs +++ /dev/null @@ -1,224 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class AllocationExplainRequestParameters : RequestParameters -{ - /// - /// - /// If true, returns information about disk usage and shard sizes. - /// - /// - public bool? IncludeDiskInfo { get => Q("include_disk_info"); set => Q("include_disk_info", value); } - - /// - /// - /// If true, returns YES decisions in explanation. - /// - /// - public bool? IncludeYesDecisions { get => Q("include_yes_decisions"); set => Q("include_yes_decisions", value); } -} - -/// -/// -/// Explain the shard allocations. -/// Get explanations for shard allocations in the cluster. -/// For unassigned shards, it provides an explanation for why the shard is unassigned. -/// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. -/// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. -/// -/// -public sealed partial class AllocationExplainRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterAllocationExplain; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "cluster.allocation_explain"; - - /// - /// - /// If true, returns information about disk usage and shard sizes. - /// - /// - [JsonIgnore] - public bool? IncludeDiskInfo { get => Q("include_disk_info"); set => Q("include_disk_info", value); } - - /// - /// - /// If true, returns YES decisions in explanation. - /// - /// - [JsonIgnore] - public bool? IncludeYesDecisions { get => Q("include_yes_decisions"); set => Q("include_yes_decisions", value); } - - /// - /// - /// Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node. - /// - /// - [JsonInclude, JsonPropertyName("current_node")] - public string? CurrentNode { get; set; } - - /// - /// - /// Specifies the name of the index that you would like an explanation for. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// If true, returns explanation for the primary shard for the given shard ID. - /// - /// - [JsonInclude, JsonPropertyName("primary")] - public bool? Primary { get; set; } - - /// - /// - /// Specifies the ID of the shard that you would like an explanation for. - /// - /// - [JsonInclude, JsonPropertyName("shard")] - public int? Shard { get; set; } -} - -/// -/// -/// Explain the shard allocations. -/// Get explanations for shard allocations in the cluster. -/// For unassigned shards, it provides an explanation for why the shard is unassigned. -/// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. -/// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. -/// -/// -public sealed partial class AllocationExplainRequestDescriptor : RequestDescriptor -{ - internal AllocationExplainRequestDescriptor(Action configure) => configure.Invoke(this); - - public AllocationExplainRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterAllocationExplain; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "cluster.allocation_explain"; - - public AllocationExplainRequestDescriptor IncludeDiskInfo(bool? includeDiskInfo = true) => Qs("include_disk_info", includeDiskInfo); - public AllocationExplainRequestDescriptor IncludeYesDecisions(bool? includeYesDecisions = true) => Qs("include_yes_decisions", includeYesDecisions); - - private string? CurrentNodeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private bool? PrimaryValue { get; set; } - private int? ShardValue { get; set; } - - /// - /// - /// Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node. - /// - /// - public AllocationExplainRequestDescriptor CurrentNode(string? currentNode) - { - CurrentNodeValue = currentNode; - return Self; - } - - /// - /// - /// Specifies the name of the index that you would like an explanation for. - /// - /// - public AllocationExplainRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// If true, returns explanation for the primary shard for the given shard ID. - /// - /// - public AllocationExplainRequestDescriptor Primary(bool? primary = true) - { - PrimaryValue = primary; - return Self; - } - - /// - /// - /// Specifies the ID of the shard that you would like an explanation for. - /// - /// - public AllocationExplainRequestDescriptor Shard(int? shard) - { - ShardValue = shard; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CurrentNodeValue)) - { - writer.WritePropertyName("current_node"); - writer.WriteStringValue(CurrentNodeValue); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (PrimaryValue.HasValue) - { - writer.WritePropertyName("primary"); - writer.WriteBooleanValue(PrimaryValue.Value); - } - - if (ShardValue.HasValue) - { - writer.WritePropertyName("shard"); - writer.WriteNumberValue(ShardValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainResponse.g.cs deleted file mode 100644 index ce1cf06e5b0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/AllocationExplainResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class AllocationExplainResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("allocate_explanation")] - public string? AllocateExplanation { get; init; } - [JsonInclude, JsonPropertyName("allocation_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? AllocationDelay { get; init; } - [JsonInclude, JsonPropertyName("allocation_delay_in_millis")] - public long? AllocationDelayInMillis { get; init; } - [JsonInclude, JsonPropertyName("can_allocate")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.Decision? CanAllocate { get; init; } - [JsonInclude, JsonPropertyName("can_move_to_other_node")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.Decision? CanMoveToOtherNode { get; init; } - [JsonInclude, JsonPropertyName("can_rebalance_cluster")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.Decision? CanRebalanceCluster { get; init; } - [JsonInclude, JsonPropertyName("can_rebalance_cluster_decisions")] - public IReadOnlyCollection? CanRebalanceClusterDecisions { get; init; } - [JsonInclude, JsonPropertyName("can_rebalance_to_other_node")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.Decision? CanRebalanceToOtherNode { get; init; } - [JsonInclude, JsonPropertyName("can_remain_decisions")] - public IReadOnlyCollection? CanRemainDecisions { get; init; } - [JsonInclude, JsonPropertyName("can_remain_on_current_node")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.Decision? CanRemainOnCurrentNode { get; init; } - [JsonInclude, JsonPropertyName("cluster_info")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterInfo? ClusterInfo { get; init; } - [JsonInclude, JsonPropertyName("configured_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ConfiguredDelay { get; init; } - [JsonInclude, JsonPropertyName("configured_delay_in_millis")] - public long? ConfiguredDelayInMillis { get; init; } - [JsonInclude, JsonPropertyName("current_node")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.CurrentNode? CurrentNode { get; init; } - [JsonInclude, JsonPropertyName("current_state")] - public string CurrentState { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("move_explanation")] - public string? MoveExplanation { get; init; } - [JsonInclude, JsonPropertyName("node_allocation_decisions")] - public IReadOnlyCollection? NodeAllocationDecisions { get; init; } - [JsonInclude, JsonPropertyName("note")] - public string? Note { get; init; } - [JsonInclude, JsonPropertyName("primary")] - public bool Primary { get; init; } - [JsonInclude, JsonPropertyName("rebalance_explanation")] - public string? RebalanceExplanation { get; init; } - [JsonInclude, JsonPropertyName("remaining_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? RemainingDelay { get; init; } - [JsonInclude, JsonPropertyName("remaining_delay_in_millis")] - public long? RemainingDelayInMillis { get; init; } - [JsonInclude, JsonPropertyName("shard")] - public int Shard { get; init; } - [JsonInclude, JsonPropertyName("unassigned_info")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.UnassignedInformation? UnassignedInfo { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoRequest.g.cs deleted file mode 100644 index 31f8239a78c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoRequest.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterInfoRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get cluster info. -/// Returns basic information about the cluster. -/// -/// -public sealed partial class ClusterInfoRequest : PlainRequest -{ - public ClusterInfoRequest(IReadOnlyCollection target) : base(r => r.Required("target", target)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.info"; -} - -/// -/// -/// Get cluster info. -/// Returns basic information about the cluster. -/// -/// -public sealed partial class ClusterInfoRequestDescriptor : RequestDescriptor -{ - internal ClusterInfoRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClusterInfoRequestDescriptor(IReadOnlyCollection target) : base(r => r.Required("target", target)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.info"; - - public ClusterInfoRequestDescriptor Target(IReadOnlyCollection target) - { - RouteValues.Required("target", target); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoResponse.g.cs deleted file mode 100644 index 6c4a5a88c82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterInfoResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterInfoResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("http")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Http? Http { get; init; } - [JsonInclude, JsonPropertyName("ingest")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Ingest? Ingest { get; init; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Scripting? Script { get; init; } - [JsonInclude, JsonPropertyName("thread_pool")] - public IReadOnlyDictionary? ThreadPool { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs deleted file mode 100644 index adcc13f8058..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs +++ /dev/null @@ -1,133 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterStatsRequestParameters : RequestParameters -{ - /// - /// - /// Include remote cluster data into the response - /// - /// - public bool? IncludeRemotes { get => Q("include_remotes"); set => Q("include_remotes", value); } - - /// - /// - /// Period to wait for each node to respond. - /// If a node does not respond before its timeout expires, the response does not include its stats. - /// However, timed out nodes are included in the response’s _nodes.failed property. Defaults to no timeout. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get cluster statistics. -/// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). -/// -/// -public sealed partial class ClusterStatsRequest : PlainRequest -{ - public ClusterStatsRequest() - { - } - - public ClusterStatsRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.stats"; - - /// - /// - /// Include remote cluster data into the response - /// - /// - [JsonIgnore] - public bool? IncludeRemotes { get => Q("include_remotes"); set => Q("include_remotes", value); } - - /// - /// - /// Period to wait for each node to respond. - /// If a node does not respond before its timeout expires, the response does not include its stats. - /// However, timed out nodes are included in the response’s _nodes.failed property. Defaults to no timeout. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get cluster statistics. -/// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). -/// -/// -public sealed partial class ClusterStatsRequestDescriptor : RequestDescriptor -{ - internal ClusterStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClusterStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - public ClusterStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.stats"; - - public ClusterStatsRequestDescriptor IncludeRemotes(bool? includeRemotes = true) => Qs("include_remotes", includeRemotes); - public ClusterStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public ClusterStatsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsResponse.g.cs deleted file mode 100644 index 12d77b02a34..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsResponse.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterStatsResponse : ElasticsearchResponse -{ - /// - /// - /// Name of the cluster, based on the cluster name setting. - /// - /// - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - - /// - /// - /// Unique identifier for the cluster. - /// - /// - [JsonInclude, JsonPropertyName("cluster_uuid")] - public string ClusterUuid { get; init; } - - /// - /// - /// Contains statistics about indices with shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterIndices Indices { get; init; } - - /// - /// - /// Contains statistics about nodes selected by the request’s node filters. - /// - /// - [JsonInclude, JsonPropertyName("nodes")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterNodes Nodes { get; init; } - - /// - /// - /// Contains statistics about the number of nodes selected by the request’s node filters. - /// - /// - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics? NodeStats { get; init; } - - /// - /// - /// Health status of the cluster, based on the state of its primary and replica shards. - /// - /// - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } - - /// - /// - /// Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs deleted file mode 100644 index b1deddeacbe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class DeleteComponentTemplateRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete component templates. -/// Deletes component templates. -/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. -/// -/// -public sealed partial class DeleteComponentTemplateRequest : PlainRequest -{ - public DeleteComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterDeleteComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.delete_component_template"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete component templates. -/// Deletes component templates. -/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. -/// -/// -public sealed partial class DeleteComponentTemplateRequestDescriptor : RequestDescriptor -{ - internal DeleteComponentTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterDeleteComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.delete_component_template"; - - public DeleteComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteComponentTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.cs deleted file mode 100644 index e0f3c244fef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/DeleteComponentTemplateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class DeleteComponentTemplateResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs deleted file mode 100644 index 93382cdfb0d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ExistsComponentTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, the request retrieves information from the local node only. - /// Defaults to false, which means information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Check component templates. -/// Returns information about whether a particular component template exists. -/// -/// -public sealed partial class ExistsComponentTemplateRequest : PlainRequest -{ - public ExistsComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterExistsComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.exists_component_template"; - - /// - /// - /// If true, the request retrieves information from the local node only. - /// Defaults to false, which means information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Check component templates. -/// Returns information about whether a particular component template exists. -/// -/// -public sealed partial class ExistsComponentTemplateRequestDescriptor : RequestDescriptor -{ - internal ExistsComponentTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExistsComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterExistsComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.exists_component_template"; - - public ExistsComponentTemplateRequestDescriptor Local(bool? local = true) => Qs("local", local); - public ExistsComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public ExistsComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateResponse.g.cs deleted file mode 100644 index b17b21afbd8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ExistsComponentTemplateResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ExistsComponentTemplateResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs deleted file mode 100644 index 18138758000..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsRequest.g.cs +++ /dev/null @@ -1,147 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class GetClusterSettingsRequestParameters : RequestParameters -{ - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If true, returns default cluster settings from the local node. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get cluster-wide settings. -/// By default, it returns only settings that have been explicitly defined. -/// -/// -public sealed partial class GetClusterSettingsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterGetSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.get_settings"; - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If true, returns default cluster settings from the local node. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get cluster-wide settings. -/// By default, it returns only settings that have been explicitly defined. -/// -/// -public sealed partial class GetClusterSettingsRequestDescriptor : RequestDescriptor -{ - internal GetClusterSettingsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetClusterSettingsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterGetSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.get_settings"; - - public GetClusterSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetClusterSettingsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetClusterSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public GetClusterSettingsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs deleted file mode 100644 index 01f99ea2bce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class GetClusterSettingsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("defaults")] - public IReadOnlyDictionary? Defaults { get; init; } - [JsonInclude, JsonPropertyName("persistent")] - public IReadOnlyDictionary Persistent { get; init; } - [JsonInclude, JsonPropertyName("transient")] - public IReadOnlyDictionary Transient { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs deleted file mode 100644 index fc9c79d5584..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs +++ /dev/null @@ -1,165 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class GetComponentTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// Return all default configurations for the component template (default: false) - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. - /// If false, information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get component templates. -/// Retrieves information about component templates. -/// -/// -public sealed partial class GetComponentTemplateRequest : PlainRequest -{ - public GetComponentTemplateRequest() - { - } - - public GetComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterGetComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.get_component_template"; - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// Return all default configurations for the component template (default: false) - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. - /// If false, information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get component templates. -/// Retrieves information about component templates. -/// -/// -public sealed partial class GetComponentTemplateRequestDescriptor : RequestDescriptor -{ - internal GetComponentTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - public GetComponentTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterGetComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.get_component_template"; - - public GetComponentTemplateRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetComponentTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetComponentTemplateRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs deleted file mode 100644 index 949e435bcb1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/GetComponentTemplateResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class GetComponentTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("component_templates")] - public IReadOnlyCollection ComponentTemplates { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs deleted file mode 100644 index 935701c3aa5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs +++ /dev/null @@ -1,352 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class HealthRequestParameters : RequestParameters -{ - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Can be one of cluster, indices or shards. Controls the details level of the health information returned. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Level? Level { get => Q("level"); set => Q("level", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? WaitForEvents { get => Q("wait_for_events"); set => Q("wait_for_events", value); } - - /// - /// - /// The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation. - /// - /// - public object? WaitForNodes { get => Q("wait_for_nodes"); set => Q("wait_for_nodes", value); } - - /// - /// - /// A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. - /// - /// - public bool? WaitForNoInitializingShards { get => Q("wait_for_no_initializing_shards"); set => Q("wait_for_no_initializing_shards", value); } - - /// - /// - /// A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. - /// - /// - public bool? WaitForNoRelocatingShards { get => Q("wait_for_no_relocating_shards"); set => Q("wait_for_no_relocating_shards", value); } - - /// - /// - /// One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus? WaitForStatus { get => Q("wait_for_status"); set => Q("wait_for_status", value); } -} - -/// -/// -/// Get the cluster health status. -/// You can also use the API to get the health status of only specified data streams and indices. -/// For data streams, the API retrieves the health status of the stream’s backing indices. -/// -/// -/// The cluster health status is: green, yellow or red. -/// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. -/// The index level status is controlled by the worst shard status. -/// -/// -/// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. -/// The cluster status is controlled by the worst index status. -/// -/// -public sealed partial class HealthRequest : PlainRequest -{ - public HealthRequest() - { - } - - public HealthRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterHealth; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.health"; - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Can be one of cluster, indices or shards. Controls the details level of the health information returned. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Level? Level { get => Q("level"); set => Q("level", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? WaitForEvents { get => Q("wait_for_events"); set => Q("wait_for_events", value); } - - /// - /// - /// The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation. - /// - /// - [JsonIgnore] - public object? WaitForNodes { get => Q("wait_for_nodes"); set => Q("wait_for_nodes", value); } - - /// - /// - /// A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. - /// - /// - [JsonIgnore] - public bool? WaitForNoInitializingShards { get => Q("wait_for_no_initializing_shards"); set => Q("wait_for_no_initializing_shards", value); } - - /// - /// - /// A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. - /// - /// - [JsonIgnore] - public bool? WaitForNoRelocatingShards { get => Q("wait_for_no_relocating_shards"); set => Q("wait_for_no_relocating_shards", value); } - - /// - /// - /// One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus? WaitForStatus { get => Q("wait_for_status"); set => Q("wait_for_status", value); } -} - -/// -/// -/// Get the cluster health status. -/// You can also use the API to get the health status of only specified data streams and indices. -/// For data streams, the API retrieves the health status of the stream’s backing indices. -/// -/// -/// The cluster health status is: green, yellow or red. -/// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. -/// The index level status is controlled by the worst shard status. -/// -/// -/// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. -/// The cluster status is controlled by the worst index status. -/// -/// -public sealed partial class HealthRequestDescriptor : RequestDescriptor, HealthRequestParameters> -{ - internal HealthRequestDescriptor(Action> configure) => configure.Invoke(this); - - public HealthRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public HealthRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterHealth; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.health"; - - public HealthRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public HealthRequestDescriptor Level(Elastic.Clients.Elasticsearch.Serverless.Level? level) => Qs("level", level); - public HealthRequestDescriptor Local(bool? local = true) => Qs("local", local); - public HealthRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents); - public HealthRequestDescriptor WaitForNodes(object? waitForNodes) => Qs("wait_for_nodes", waitForNodes); - public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards); - public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards); - public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.Serverless.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus); - - public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get the cluster health status. -/// You can also use the API to get the health status of only specified data streams and indices. -/// For data streams, the API retrieves the health status of the stream’s backing indices. -/// -/// -/// The cluster health status is: green, yellow or red. -/// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. -/// The index level status is controlled by the worst shard status. -/// -/// -/// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. -/// The cluster status is controlled by the worst index status. -/// -/// -public sealed partial class HealthRequestDescriptor : RequestDescriptor -{ - internal HealthRequestDescriptor(Action configure) => configure.Invoke(this); - - public HealthRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public HealthRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterHealth; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.health"; - - public HealthRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public HealthRequestDescriptor Level(Elastic.Clients.Elasticsearch.Serverless.Level? level) => Qs("level", level); - public HealthRequestDescriptor Local(bool? local = true) => Qs("local", local); - public HealthRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents); - public HealthRequestDescriptor WaitForNodes(object? waitForNodes) => Qs("wait_for_nodes", waitForNodes); - public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards); - public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards); - public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.Serverless.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus); - - public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs deleted file mode 100644 index 609d064dd95..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthResponse.g.cs +++ /dev/null @@ -1,163 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class HealthResponse : ElasticsearchResponse -{ - /// - /// - /// The number of active primary shards. - /// - /// - [JsonInclude, JsonPropertyName("active_primary_shards")] - public int ActivePrimaryShards { get; init; } - - /// - /// - /// The total number of active primary and replica shards. - /// - /// - [JsonInclude, JsonPropertyName("active_shards")] - public int ActiveShards { get; init; } - - /// - /// - /// The ratio of active shards in the cluster expressed as a percentage. - /// - /// - [JsonInclude, JsonPropertyName("active_shards_percent_as_number")] - public double ActiveShardsPercentAsNumber { get; init; } - - /// - /// - /// The name of the cluster. - /// - /// - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - - /// - /// - /// The number of shards whose allocation has been delayed by the timeout settings. - /// - /// - [JsonInclude, JsonPropertyName("delayed_unassigned_shards")] - public int DelayedUnassignedShards { get; init; } - [JsonInclude, JsonPropertyName("indices")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Cluster.IndexHealthStats))] - public IReadOnlyDictionary? Indices { get; init; } - - /// - /// - /// The number of shards that are under initialization. - /// - /// - [JsonInclude, JsonPropertyName("initializing_shards")] - public int InitializingShards { get; init; } - - /// - /// - /// The number of nodes that are dedicated data nodes. - /// - /// - [JsonInclude, JsonPropertyName("number_of_data_nodes")] - public int NumberOfDataNodes { get; init; } - - /// - /// - /// The number of unfinished fetches. - /// - /// - [JsonInclude, JsonPropertyName("number_of_in_flight_fetch")] - public int NumberOfInFlightFetch { get; init; } - - /// - /// - /// The number of nodes within the cluster. - /// - /// - [JsonInclude, JsonPropertyName("number_of_nodes")] - public int NumberOfNodes { get; init; } - - /// - /// - /// The number of cluster-level changes that have not yet been executed. - /// - /// - [JsonInclude, JsonPropertyName("number_of_pending_tasks")] - public int NumberOfPendingTasks { get; init; } - - /// - /// - /// The number of shards that are under relocation. - /// - /// - [JsonInclude, JsonPropertyName("relocating_shards")] - public int RelocatingShards { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } - - /// - /// - /// The time since the earliest initiated task is waiting for being performed. - /// - /// - [JsonInclude, JsonPropertyName("task_max_waiting_in_queue")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TaskMaxWaitingInQueue { get; init; } - - /// - /// - /// The time expressed in milliseconds since the earliest initiated task is waiting for being performed. - /// - /// - [JsonInclude, JsonPropertyName("task_max_waiting_in_queue_millis")] - public long TaskMaxWaitingInQueueMillis { get; init; } - - /// - /// - /// If false the response returned within the period of time that is specified by the timeout parameter (30s by default) - /// - /// - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - - /// - /// - /// The number of primary shards that are not allocated. - /// - /// - [JsonInclude, JsonPropertyName("unassigned_primary_shards")] - public int UnassignedPrimaryShards { get; init; } - - /// - /// - /// The number of shards that are not allocated. - /// - /// - [JsonInclude, JsonPropertyName("unassigned_shards")] - public int UnassignedShards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksRequest.g.cs deleted file mode 100644 index 0d272d928cc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksRequest.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class PendingTasksRequestParameters : RequestParameters -{ - /// - /// - /// If true, the request retrieves information from the local node only. - /// If false, information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get the pending cluster tasks. -/// Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. -/// -/// -/// NOTE: This API returns a list of any pending updates to the cluster state. -/// These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. -/// However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. -/// -/// -public sealed partial class PendingTasksRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPendingTasks; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.pending_tasks"; - - /// - /// - /// If true, the request retrieves information from the local node only. - /// If false, information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get the pending cluster tasks. -/// Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. -/// -/// -/// NOTE: This API returns a list of any pending updates to the cluster state. -/// These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. -/// However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. -/// -/// -public sealed partial class PendingTasksRequestDescriptor : RequestDescriptor -{ - internal PendingTasksRequestDescriptor(Action configure) => configure.Invoke(this); - - public PendingTasksRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPendingTasks; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "cluster.pending_tasks"; - - public PendingTasksRequestDescriptor Local(bool? local = true) => Qs("local", local); - public PendingTasksRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksResponse.g.cs deleted file mode 100644 index d4cd024db8e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PendingTasksResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class PendingTasksResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("tasks")] - public IReadOnlyCollection Tasks { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs deleted file mode 100644 index 010a9dead81..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs +++ /dev/null @@ -1,473 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class PutComponentTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, this request cannot replace or update existing component templates. - /// - /// - public bool? Create { get => Q("create"); set => Q("create", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Create or update a component template. -/// Creates or updates a component template. -/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. -/// -/// -/// An index template can be composed of multiple component templates. -/// To use a component template, specify it in an index template’s composed_of list. -/// Component templates are only applied to new data streams and indices as part of a matching index template. -/// -/// -/// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. -/// -/// -/// Component templates are only used during index creation. -/// For data streams, this includes data stream creation and the creation of a stream’s backing indices. -/// Changes to component templates do not affect existing indices, including a stream’s backing indices. -/// -/// -/// You can use C-style /* *\/ block comments in component templates. -/// You can include comments anywhere in the request body except before the opening curly bracket. -/// -/// -public sealed partial class PutComponentTemplateRequest : PlainRequest -{ - public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPutComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "cluster.put_component_template"; - - /// - /// - /// If true, this request cannot replace or update existing component templates. - /// - /// - [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; set; } - - /// - /// - /// Optional user metadata about the component template. - /// May have any contents. This map is not automatically generated by Elasticsearch. - /// This information is stored in the cluster state, so keeping it short is preferable. - /// To unset _meta, replace the template without specifying this information. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// The template to be applied which includes mappings, settings, or aliases configuration. - /// - /// - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState Template { get; set; } - - /// - /// - /// Version number used to manage component templates externally. - /// This number isn't automatically generated or incremented by Elasticsearch. - /// To unset a version, replace the template without specifying a version. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -/// -/// -/// Create or update a component template. -/// Creates or updates a component template. -/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. -/// -/// -/// An index template can be composed of multiple component templates. -/// To use a component template, specify it in an index template’s composed_of list. -/// Component templates are only applied to new data streams and indices as part of a matching index template. -/// -/// -/// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. -/// -/// -/// Component templates are only used during index creation. -/// For data streams, this includes data stream creation and the creation of a stream’s backing indices. -/// Changes to component templates do not affect existing indices, including a stream’s backing indices. -/// -/// -/// You can use C-style /* *\/ block comments in component templates. -/// You can include comments anywhere in the request body except before the opening curly bracket. -/// -/// -public sealed partial class PutComponentTemplateRequestDescriptor : RequestDescriptor, PutComponentTemplateRequestParameters> -{ - internal PutComponentTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPutComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "cluster.put_component_template"; - - public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? DeprecatedValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// Optional user metadata about the component template. - /// May have any contents. This map is not automatically generated by Elasticsearch. - /// This information is stored in the cluster state, so keeping it short is preferable. - /// To unset _meta, replace the template without specifying this information. - /// - /// - public PutComponentTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The template to be applied which includes mappings, settings, or aliases configuration. - /// - /// - public PutComponentTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutComponentTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutComponentTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Version number used to manage component templates externally. - /// This number isn't automatically generated or incremented by Elasticsearch. - /// To unset a version, replace the template without specifying a version. - /// - /// - public PutComponentTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor(TemplateDescriptorAction), options); - } - else - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update a component template. -/// Creates or updates a component template. -/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. -/// -/// -/// An index template can be composed of multiple component templates. -/// To use a component template, specify it in an index template’s composed_of list. -/// Component templates are only applied to new data streams and indices as part of a matching index template. -/// -/// -/// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. -/// -/// -/// Component templates are only used during index creation. -/// For data streams, this includes data stream creation and the creation of a stream’s backing indices. -/// Changes to component templates do not affect existing indices, including a stream’s backing indices. -/// -/// -/// You can use C-style /* *\/ block comments in component templates. -/// You can include comments anywhere in the request body except before the opening curly bracket. -/// -/// -public sealed partial class PutComponentTemplateRequestDescriptor : RequestDescriptor -{ - internal PutComponentTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.ClusterPutComponentTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "cluster.put_component_template"; - - public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? DeprecatedValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// Optional user metadata about the component template. - /// May have any contents. This map is not automatically generated by Elasticsearch. - /// This information is stored in the cluster state, so keeping it short is preferable. - /// To unset _meta, replace the template without specifying this information. - /// - /// - public PutComponentTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The template to be applied which includes mappings, settings, or aliases configuration. - /// - /// - public PutComponentTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutComponentTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutComponentTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Version number used to manage component templates externally. - /// This number isn't automatically generated or incremented by Elasticsearch. - /// To unset a version, replace the template without specifying a version. - /// - /// - public PutComponentTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor(TemplateDescriptorAction), options); - } - else - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateResponse.g.cs deleted file mode 100644 index 6b23a00a031..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class PutComponentTemplateResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs deleted file mode 100644 index 5e91835c79f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs +++ /dev/null @@ -1,503 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class CountRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, concrete, expanded or aliased indices are ignored when frozen. - /// - /// - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Sets the minimum _score value that documents must have to be included in the result. - /// - /// - public double? MinScore { get => Q("min_score"); set => Q("min_score", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// - /// - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } -} - -/// -/// -/// Count search results. -/// Get the number of documents matching a query. -/// -/// -public partial class CountRequest : PlainRequest -{ - public CountRequest() - { - } - - public CountRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceCount; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "count"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, concrete, expanded or aliased indices are ignored when frozen. - /// - /// - [JsonIgnore] - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Sets the minimum _score value that documents must have to be included in the result. - /// - /// - [JsonIgnore] - public double? MinScore { get => Q("min_score"); set => Q("min_score", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// - /// - [JsonIgnore] - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } -} - -/// -/// -/// Count search results. -/// Get the number of documents matching a query. -/// -/// -public sealed partial class CountRequestDescriptor : RequestDescriptor, CountRequestParameters> -{ - internal CountRequestDescriptor(Action> configure) => configure.Invoke(this); - - public CountRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public CountRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceCount; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "count"; - - public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public CountRequestDescriptor Df(string? df) => Qs("df", df); - public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public CountRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public CountRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore); - public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); - - public CountRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public CountRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Count search results. -/// Get the number of documents matching a query. -/// -/// -public sealed partial class CountRequestDescriptor : RequestDescriptor -{ - internal CountRequestDescriptor(Action configure) => configure.Invoke(this); - - public CountRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public CountRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceCount; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "count"; - - public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public CountRequestDescriptor Df(string? df) => Qs("df", df); - public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public CountRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public CountRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore); - public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); - - public CountRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public CountRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountResponse.g.cs deleted file mode 100644 index f5f128d25bc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class CountResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateRequest.g.cs deleted file mode 100644 index effdf74767f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateRequest.g.cs +++ /dev/null @@ -1,244 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class CreateRequestParameters : RequestParameters -{ - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Index a document. -/// Adds a JSON document to the specified data stream or index and makes it searchable. -/// If the target is an index and the document already exists, the request updates the document and increments its version. -/// -/// -public sealed partial class CreateRequest : PlainRequest, ISelfSerializable -{ - public CreateRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "create"; - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - [JsonIgnore] - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - [JsonIgnore] - public TDocument Document { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - settings.SourceSerializer.Serialize(Document, writer); - } -} - -/// -/// -/// Index a document. -/// Adds a JSON document to the specified data stream or index and makes it searchable. -/// If the target is an index and the document already exists, the request updates the document and increments its version. -/// -/// -public sealed partial class CreateRequestDescriptor : RequestDescriptor, CreateRequestParameters> -{ - internal CreateRequestDescriptor(Action> configure) => configure.Invoke(this); - public CreateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) => DocumentValue = document; - - public CreateRequestDescriptor(TDocument document) : this(document, typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public CreateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(document, index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public CreateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(document, typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "create"; - - public CreateRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); - public CreateRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public CreateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public CreateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public CreateRequestDescriptor Version(long? version) => Qs("version", version); - public CreateRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - public CreateRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public CreateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public CreateRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private TDocument DocumentValue { get; set; } - - public CreateRequestDescriptor Document(TDocument document) - { - DocumentValue = document; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - settings.SourceSerializer.Serialize(DocumentValue, writer); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs deleted file mode 100644 index 17ad3a8848c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class CreateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("forced_refresh")] - public bool? ForcedRefresh { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs deleted file mode 100644 index 3d339e7542c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs +++ /dev/null @@ -1,891 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteByQueryRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Analyzer to use for the query string. - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// What to do if delete by query hits version conflicts: abort or proceed. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Conflicts? Conflicts { get => Q("conflicts"); set => Q("conflicts", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Starting offset (default: 0) - /// - /// - public long? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the request cache is used for this request. - /// Defaults to the index-level setting. - /// - /// - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to retain the search context for scrolling. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// Size of the scroll request that powers the operation. - /// - /// - public long? ScrollSize { get => Q("scroll_size"); set => Q("scroll_size", value); } - - /// - /// - /// Explicit timeout for each search request. - /// Defaults to no timeout. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? SearchTimeout { get => Q("search_timeout"); set => Q("search_timeout", value); } - - /// - /// - /// The type of the search operation. - /// Available options: query_then_fetch, dfs_query_then_fetch. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// The number of slices this task should be divided into. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); } - - /// - /// - /// Specific tag of the request for logging and statistical purposes. - /// - /// - public ICollection? Stats { get => Q?>("stats"); set => Q("stats", value); } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// - /// - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// - /// Period each deletion request waits for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - public bool? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// If true, the request blocks until the operation is complete. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Delete documents. -/// Deletes documents that match the specified query. -/// -/// -public sealed partial class DeleteByQueryRequest : PlainRequest -{ - public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "delete_by_query"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Analyzer to use for the query string. - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// What to do if delete by query hits version conflicts: abort or proceed. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Conflicts? Conflicts { get => Q("conflicts"); set => Q("conflicts", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Starting offset (default: 0) - /// - /// - [JsonIgnore] - public long? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the request cache is used for this request. - /// Defaults to the index-level setting. - /// - /// - [JsonIgnore] - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - [JsonIgnore] - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to retain the search context for scrolling. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// Size of the scroll request that powers the operation. - /// - /// - [JsonIgnore] - public long? ScrollSize { get => Q("scroll_size"); set => Q("scroll_size", value); } - - /// - /// - /// Explicit timeout for each search request. - /// Defaults to no timeout. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? SearchTimeout { get => Q("search_timeout"); set => Q("search_timeout", value); } - - /// - /// - /// The type of the search operation. - /// Available options: query_then_fetch, dfs_query_then_fetch. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// The number of slices this task should be divided into. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - [JsonIgnore] - public ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); } - - /// - /// - /// Specific tag of the request for logging and statistical purposes. - /// - /// - [JsonIgnore] - public ICollection? Stats { get => Q?>("stats"); set => Q("stats", value); } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// - /// - [JsonIgnore] - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// - /// Period each deletion request waits for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - [JsonIgnore] - public bool? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// If true, the request blocks until the operation is complete. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// - /// The maximum number of documents to delete. - /// - /// - [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; set; } - - /// - /// - /// Specifies the documents to delete using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Slice the request manually using the provided slice ID and total number of slices. - /// - /// - [JsonInclude, JsonPropertyName("slice")] - public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } -} - -/// -/// -/// Delete documents. -/// Deletes documents that match the specified query. -/// -/// -public sealed partial class DeleteByQueryRequestDescriptor : RequestDescriptor, DeleteByQueryRequestParameters> -{ - internal DeleteByQueryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteByQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public DeleteByQueryRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "delete_by_query"; - - public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) => Qs("conflicts", conflicts); - public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df); - public DeleteByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public DeleteByQueryRequestDescriptor From(long? from) => Qs("from", from); - public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - public DeleteByQueryRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public DeleteByQueryRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public DeleteByQueryRequestDescriptor ScrollSize(long? scrollSize) => Qs("scroll_size", scrollSize); - public DeleteByQueryRequestDescriptor SearchTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? searchTimeout) => Qs("search_timeout", searchTimeout); - public DeleteByQueryRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public DeleteByQueryRequestDescriptor Slices(Elastic.Clients.Elasticsearch.Serverless.Slices? slices) => Qs("slices", slices); - public DeleteByQueryRequestDescriptor Sort(ICollection? sort) => Qs("sort", sort); - public DeleteByQueryRequestDescriptor Stats(ICollection? stats) => Qs("stats", stats); - public DeleteByQueryRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); - public DeleteByQueryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public DeleteByQueryRequestDescriptor Version(bool? version = true) => Qs("version", version); - public DeleteByQueryRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public DeleteByQueryRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action> SliceDescriptorAction { get; set; } - - /// - /// - /// The maximum number of documents to delete. - /// - /// - public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// - /// Specifies the documents to delete using the Query DSL. - /// - /// - public DeleteByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public DeleteByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public DeleteByQueryRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Slice the request manually using the provided slice ID and total number of slices. - /// - /// - public DeleteByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public DeleteByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public DeleteByQueryRequestDescriptor Slice(Action> configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Delete documents. -/// Deletes documents that match the specified query. -/// -/// -public sealed partial class DeleteByQueryRequestDescriptor : RequestDescriptor -{ - internal DeleteByQueryRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteByQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "delete_by_query"; - - public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) => Qs("conflicts", conflicts); - public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df); - public DeleteByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public DeleteByQueryRequestDescriptor From(long? from) => Qs("from", from); - public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - public DeleteByQueryRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public DeleteByQueryRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public DeleteByQueryRequestDescriptor ScrollSize(long? scrollSize) => Qs("scroll_size", scrollSize); - public DeleteByQueryRequestDescriptor SearchTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? searchTimeout) => Qs("search_timeout", searchTimeout); - public DeleteByQueryRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public DeleteByQueryRequestDescriptor Slices(Elastic.Clients.Elasticsearch.Serverless.Slices? slices) => Qs("slices", slices); - public DeleteByQueryRequestDescriptor Sort(ICollection? sort) => Qs("sort", sort); - public DeleteByQueryRequestDescriptor Stats(ICollection? stats) => Qs("stats", stats); - public DeleteByQueryRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); - public DeleteByQueryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public DeleteByQueryRequestDescriptor Version(bool? version = true) => Qs("version", version); - public DeleteByQueryRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public DeleteByQueryRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action SliceDescriptorAction { get; set; } - - /// - /// - /// The maximum number of documents to delete. - /// - /// - public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// - /// Specifies the documents to delete using the Query DSL. - /// - /// - public DeleteByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public DeleteByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public DeleteByQueryRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Slice the request manually using the provided slice ID and total number of slices. - /// - /// - public DeleteByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public DeleteByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public DeleteByQueryRequestDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryResponse.g.cs deleted file mode 100644 index a8cb2a4cddf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteByQueryResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("batches")] - public long? Batches { get; init; } - [JsonInclude, JsonPropertyName("deleted")] - public long? Deleted { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - [JsonInclude, JsonPropertyName("noops")] - public long? Noops { get; init; } - [JsonInclude, JsonPropertyName("requests_per_second")] - public float? RequestsPerSecond { get; init; } - [JsonInclude, JsonPropertyName("retries")] - public Elastic.Clients.Elasticsearch.Serverless.Retries? Retries { get; init; } - [JsonInclude, JsonPropertyName("slice_id")] - public int? SliceId { get; init; } - [JsonInclude, JsonPropertyName("task")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? Task { get; init; } - [JsonInclude, JsonPropertyName("throttled")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Throttled { get; init; } - [JsonInclude, JsonPropertyName("throttled_millis")] - public long? ThrottledMillis { get; init; } - [JsonInclude, JsonPropertyName("throttled_until")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ThrottledUntil { get; init; } - [JsonInclude, JsonPropertyName("throttled_until_millis")] - public long? ThrottledUntilMillis { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool? TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long? Total { get; init; } - [JsonInclude, JsonPropertyName("version_conflicts")] - public long? VersionConflicts { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs deleted file mode 100644 index 4b332640fe0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteByQueryRethrottleRequestParameters : RequestParameters -{ - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } -} - -/// -/// -/// Throttle a delete by query operation. -/// -/// -/// Change the number of requests per second for a particular delete by query operation. -/// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. -/// -/// -public sealed partial class DeleteByQueryRethrottleRequest : PlainRequest -{ - public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.Serverless.TaskId taskId) : base(r => r.Required("task_id", taskId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQueryRethrottle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete_by_query_rethrottle"; - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - [JsonIgnore] - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } -} - -/// -/// -/// Throttle a delete by query operation. -/// -/// -/// Change the number of requests per second for a particular delete by query operation. -/// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. -/// -/// -public sealed partial class DeleteByQueryRethrottleRequestDescriptor : RequestDescriptor -{ - internal DeleteByQueryRethrottleRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteByQueryRethrottleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.TaskId taskId) : base(r => r.Required("task_id", taskId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteByQueryRethrottle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete_by_query_rethrottle"; - - public DeleteByQueryRethrottleRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - - public DeleteByQueryRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.Serverless.TaskId taskId) - { - RouteValues.Required("task_id", taskId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs deleted file mode 100644 index 8873be7f541..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRethrottleResponse.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteByQueryRethrottleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("node_failures")] - public IReadOnlyCollection? NodeFailures { get; init; } - - /// - /// - /// Task information grouped by node, if group_by was set to node (the default). - /// - /// - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary? Nodes { get; init; } - [JsonInclude, JsonPropertyName("task_failures")] - public IReadOnlyCollection? TaskFailures { get; init; } - - /// - /// - /// Either a flat list of tasks if group_by was set to none, or grouped by parents if - /// group_by was set to parents. - /// - /// - [JsonInclude, JsonPropertyName("tasks")] - public Elastic.Clients.Elasticsearch.Serverless.Tasks.TaskInfos? Tasks { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteRequest.g.cs deleted file mode 100644 index 2aad452164c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteRequest.g.cs +++ /dev/null @@ -1,293 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteRequestParameters : RequestParameters -{ - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to wait for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Delete a document. -/// Removes a JSON document from the specified index. -/// -/// -public partial class DeleteRequest : PlainRequest -{ - public DeleteRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete"; - - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - [JsonIgnore] - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - [JsonIgnore] - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to wait for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Delete a document. -/// Removes a JSON document from the specified index. -/// -/// -public sealed partial class DeleteRequestDescriptor : RequestDescriptor, DeleteRequestParameters> -{ - internal DeleteRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public DeleteRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public DeleteRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public DeleteRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public DeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete"; - - public DeleteRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); - public DeleteRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); - public DeleteRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public DeleteRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public DeleteRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public DeleteRequestDescriptor Version(long? version) => Qs("version", version); - public DeleteRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - public DeleteRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public DeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public DeleteRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete a document. -/// Removes a JSON document from the specified index. -/// -/// -public sealed partial class DeleteRequestDescriptor : RequestDescriptor -{ - internal DeleteRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete"; - - public DeleteRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); - public DeleteRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); - public DeleteRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public DeleteRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public DeleteRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public DeleteRequestDescriptor Version(long? version) => Qs("version", version); - public DeleteRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - public DeleteRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public DeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public DeleteRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs deleted file mode 100644 index 14f7602e577..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("forced_refresh")] - public bool? ForcedRefresh { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptRequest.g.cs deleted file mode 100644 index 3f00760dcc2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptRequest.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteScriptRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete a script or search template. -/// Deletes a stored script or search template. -/// -/// -public sealed partial class DeleteScriptRequest : PlainRequest -{ - public DeleteScriptRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete_script"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete a script or search template. -/// Deletes a stored script or search template. -/// -/// -public sealed partial class DeleteScriptRequestDescriptor : RequestDescriptor, DeleteScriptRequestParameters> -{ - internal DeleteScriptRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete_script"; - - public DeleteScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete a script or search template. -/// Deletes a stored script or search template. -/// -/// -public sealed partial class DeleteScriptRequestDescriptor : RequestDescriptor -{ - internal DeleteScriptRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceDeleteScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "delete_script"; - - public DeleteScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptResponse.g.cs deleted file mode 100644 index a12cef4ef93..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteScriptResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DeleteScriptResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyRequest.g.cs deleted file mode 100644 index 6ea6f518ad4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyRequest.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class DeletePolicyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete an enrich policy. -/// Deletes an existing enrich policy and its enrich index. -/// -/// -public sealed partial class DeletePolicyRequest : PlainRequest -{ - public DeletePolicyRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichDeletePolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.delete_policy"; -} - -/// -/// -/// Delete an enrich policy. -/// Deletes an existing enrich policy and its enrich index. -/// -/// -public sealed partial class DeletePolicyRequestDescriptor : RequestDescriptor -{ - internal DeletePolicyRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeletePolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichDeletePolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.delete_policy"; - - public DeletePolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyResponse.g.cs deleted file mode 100644 index ddcc0a34a0c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/DeletePolicyResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class DeletePolicyResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsRequest.g.cs deleted file mode 100644 index 1941f7b01c8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsRequest.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class EnrichStatsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get enrich stats. -/// Returns enrich coordinator statistics and information about enrich policies that are currently executing. -/// -/// -public sealed partial class EnrichStatsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.stats"; -} - -/// -/// -/// Get enrich stats. -/// Returns enrich coordinator statistics and information about enrich policies that are currently executing. -/// -/// -public sealed partial class EnrichStatsRequestDescriptor : RequestDescriptor -{ - internal EnrichStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public EnrichStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.stats"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsResponse.g.cs deleted file mode 100644 index 8bfd8cf71e0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/EnrichStatsResponse.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class EnrichStatsResponse : ElasticsearchResponse -{ - /// - /// - /// Objects containing information about the enrich cache stats on each ingest node. - /// - /// - [JsonInclude, JsonPropertyName("cache_stats")] - public IReadOnlyCollection? CacheStats { get; init; } - - /// - /// - /// Objects containing information about each coordinating ingest node for configured enrich processors. - /// - /// - [JsonInclude, JsonPropertyName("coordinator_stats")] - public IReadOnlyCollection CoordinatorStats { get; init; } - - /// - /// - /// Objects containing information about each enrich policy that is currently executing. - /// - /// - [JsonInclude, JsonPropertyName("executing_policies")] - public IReadOnlyCollection ExecutingPolicies { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs deleted file mode 100644 index e99a7fa485a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class ExecutePolicyRequestParameters : RequestParameters -{ - /// - /// - /// If true, the request blocks other enrich policy execution requests until complete. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Run an enrich policy. -/// Create the enrich index for an existing enrich policy. -/// -/// -public sealed partial class ExecutePolicyRequest : PlainRequest -{ - public ExecutePolicyRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichExecutePolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.execute_policy"; - - /// - /// - /// If true, the request blocks other enrich policy execution requests until complete. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Run an enrich policy. -/// Create the enrich index for an existing enrich policy. -/// -/// -public sealed partial class ExecutePolicyRequestDescriptor : RequestDescriptor -{ - internal ExecutePolicyRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExecutePolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichExecutePolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.execute_policy"; - - public ExecutePolicyRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public ExecutePolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs deleted file mode 100644 index 456ddb5ba4f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/ExecutePolicyResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class ExecutePolicyResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Enrich.ExecuteEnrichPolicyStatus? Status { get; init; } - [JsonInclude, JsonPropertyName("task_id")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? TaskId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyRequest.g.cs deleted file mode 100644 index 18a6f0883de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyRequest.g.cs +++ /dev/null @@ -1,97 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class GetPolicyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get an enrich policy. -/// Returns information about an enrich policy. -/// -/// -public sealed partial class GetPolicyRequest : PlainRequest -{ - public GetPolicyRequest() - { - } - - public GetPolicyRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichGetPolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.get_policy"; -} - -/// -/// -/// Get an enrich policy. -/// Returns information about an enrich policy. -/// -/// -public sealed partial class GetPolicyRequestDescriptor : RequestDescriptor -{ - internal GetPolicyRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetPolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - public GetPolicyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichGetPolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "enrich.get_policy"; - - public GetPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyResponse.g.cs deleted file mode 100644 index a6859836745..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/GetPolicyResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class GetPolicyResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("policies")] - public IReadOnlyCollection Policies { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyRequest.g.cs deleted file mode 100644 index 2b519e863af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyRequest.g.cs +++ /dev/null @@ -1,440 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class PutPolicyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create an enrich policy. -/// Creates an enrich policy. -/// -/// -public sealed partial class PutPolicyRequest : PlainRequest -{ - public PutPolicyRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichPutPolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "enrich.put_policy"; - - /// - /// - /// Matches enrich data to incoming documents based on a geo_shape query. - /// - /// - [JsonInclude, JsonPropertyName("geo_match")] - public Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? GeoMatch { get; set; } - - /// - /// - /// Matches enrich data to incoming documents based on a term query. - /// - /// - [JsonInclude, JsonPropertyName("match")] - public Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? Match { get; set; } - - /// - /// - /// Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a term query. - /// - /// - [JsonInclude, JsonPropertyName("range")] - public Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? Range { get; set; } -} - -/// -/// -/// Create an enrich policy. -/// Creates an enrich policy. -/// -/// -public sealed partial class PutPolicyRequestDescriptor : RequestDescriptor, PutPolicyRequestParameters> -{ - internal PutPolicyRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutPolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichPutPolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "enrich.put_policy"; - - public PutPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? GeoMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor GeoMatchDescriptor { get; set; } - private Action> GeoMatchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? MatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor MatchDescriptor { get; set; } - private Action> MatchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? RangeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor RangeDescriptor { get; set; } - private Action> RangeDescriptorAction { get; set; } - - /// - /// - /// Matches enrich data to incoming documents based on a geo_shape query. - /// - /// - public PutPolicyRequestDescriptor GeoMatch(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? geoMatch) - { - GeoMatchDescriptor = null; - GeoMatchDescriptorAction = null; - GeoMatchValue = geoMatch; - return Self; - } - - public PutPolicyRequestDescriptor GeoMatch(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor descriptor) - { - GeoMatchValue = null; - GeoMatchDescriptorAction = null; - GeoMatchDescriptor = descriptor; - return Self; - } - - public PutPolicyRequestDescriptor GeoMatch(Action> configure) - { - GeoMatchValue = null; - GeoMatchDescriptor = null; - GeoMatchDescriptorAction = configure; - return Self; - } - - /// - /// - /// Matches enrich data to incoming documents based on a term query. - /// - /// - public PutPolicyRequestDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? match) - { - MatchDescriptor = null; - MatchDescriptorAction = null; - MatchValue = match; - return Self; - } - - public PutPolicyRequestDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor descriptor) - { - MatchValue = null; - MatchDescriptorAction = null; - MatchDescriptor = descriptor; - return Self; - } - - public PutPolicyRequestDescriptor Match(Action> configure) - { - MatchValue = null; - MatchDescriptor = null; - MatchDescriptorAction = configure; - return Self; - } - - /// - /// - /// Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a term query. - /// - /// - public PutPolicyRequestDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? range) - { - RangeDescriptor = null; - RangeDescriptorAction = null; - RangeValue = range; - return Self; - } - - public PutPolicyRequestDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor descriptor) - { - RangeValue = null; - RangeDescriptorAction = null; - RangeDescriptor = descriptor; - return Self; - } - - public PutPolicyRequestDescriptor Range(Action> configure) - { - RangeValue = null; - RangeDescriptor = null; - RangeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (GeoMatchDescriptor is not null) - { - writer.WritePropertyName("geo_match"); - JsonSerializer.Serialize(writer, GeoMatchDescriptor, options); - } - else if (GeoMatchDescriptorAction is not null) - { - writer.WritePropertyName("geo_match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor(GeoMatchDescriptorAction), options); - } - else if (GeoMatchValue is not null) - { - writer.WritePropertyName("geo_match"); - JsonSerializer.Serialize(writer, GeoMatchValue, options); - } - - if (MatchDescriptor is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchDescriptor, options); - } - else if (MatchDescriptorAction is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor(MatchDescriptorAction), options); - } - else if (MatchValue is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchValue, options); - } - - if (RangeDescriptor is not null) - { - writer.WritePropertyName("range"); - JsonSerializer.Serialize(writer, RangeDescriptor, options); - } - else if (RangeDescriptorAction is not null) - { - writer.WritePropertyName("range"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor(RangeDescriptorAction), options); - } - else if (RangeValue is not null) - { - writer.WritePropertyName("range"); - JsonSerializer.Serialize(writer, RangeValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create an enrich policy. -/// Creates an enrich policy. -/// -/// -public sealed partial class PutPolicyRequestDescriptor : RequestDescriptor -{ - internal PutPolicyRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutPolicyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EnrichPutPolicy; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "enrich.put_policy"; - - public PutPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? GeoMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor GeoMatchDescriptor { get; set; } - private Action GeoMatchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? MatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor MatchDescriptor { get; set; } - private Action MatchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? RangeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor RangeDescriptor { get; set; } - private Action RangeDescriptorAction { get; set; } - - /// - /// - /// Matches enrich data to incoming documents based on a geo_shape query. - /// - /// - public PutPolicyRequestDescriptor GeoMatch(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? geoMatch) - { - GeoMatchDescriptor = null; - GeoMatchDescriptorAction = null; - GeoMatchValue = geoMatch; - return Self; - } - - public PutPolicyRequestDescriptor GeoMatch(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor descriptor) - { - GeoMatchValue = null; - GeoMatchDescriptorAction = null; - GeoMatchDescriptor = descriptor; - return Self; - } - - public PutPolicyRequestDescriptor GeoMatch(Action configure) - { - GeoMatchValue = null; - GeoMatchDescriptor = null; - GeoMatchDescriptorAction = configure; - return Self; - } - - /// - /// - /// Matches enrich data to incoming documents based on a term query. - /// - /// - public PutPolicyRequestDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? match) - { - MatchDescriptor = null; - MatchDescriptorAction = null; - MatchValue = match; - return Self; - } - - public PutPolicyRequestDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor descriptor) - { - MatchValue = null; - MatchDescriptorAction = null; - MatchDescriptor = descriptor; - return Self; - } - - public PutPolicyRequestDescriptor Match(Action configure) - { - MatchValue = null; - MatchDescriptor = null; - MatchDescriptorAction = configure; - return Self; - } - - /// - /// - /// Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a term query. - /// - /// - public PutPolicyRequestDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicy? range) - { - RangeDescriptor = null; - RangeDescriptorAction = null; - RangeValue = range; - return Self; - } - - public PutPolicyRequestDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor descriptor) - { - RangeValue = null; - RangeDescriptorAction = null; - RangeDescriptor = descriptor; - return Self; - } - - public PutPolicyRequestDescriptor Range(Action configure) - { - RangeValue = null; - RangeDescriptor = null; - RangeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (GeoMatchDescriptor is not null) - { - writer.WritePropertyName("geo_match"); - JsonSerializer.Serialize(writer, GeoMatchDescriptor, options); - } - else if (GeoMatchDescriptorAction is not null) - { - writer.WritePropertyName("geo_match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor(GeoMatchDescriptorAction), options); - } - else if (GeoMatchValue is not null) - { - writer.WritePropertyName("geo_match"); - JsonSerializer.Serialize(writer, GeoMatchValue, options); - } - - if (MatchDescriptor is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchDescriptor, options); - } - else if (MatchDescriptorAction is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor(MatchDescriptorAction), options); - } - else if (MatchValue is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchValue, options); - } - - if (RangeDescriptor is not null) - { - writer.WritePropertyName("range"); - JsonSerializer.Serialize(writer, RangeDescriptor, options); - } - else if (RangeDescriptorAction is not null) - { - writer.WritePropertyName("range"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyDescriptor(RangeDescriptorAction), options); - } - else if (RangeValue is not null) - { - writer.WritePropertyName("range"); - JsonSerializer.Serialize(writer, RangeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyResponse.g.cs deleted file mode 100644 index b139f4781c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Enrich/PutPolicyResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class PutPolicyResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteRequest.g.cs deleted file mode 100644 index 1559fb99b38..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteRequest.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlDeleteRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete an async EQL search. -/// Delete an async EQL search or a stored synchronous EQL search. -/// The API also deletes results for the search. -/// -/// -public sealed partial class EqlDeleteRequest : PlainRequest -{ - public EqlDeleteRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.delete"; -} - -/// -/// -/// Delete an async EQL search. -/// Delete an async EQL search or a stored synchronous EQL search. -/// The API also deletes results for the search. -/// -/// -public sealed partial class EqlDeleteRequestDescriptor : RequestDescriptor, EqlDeleteRequestParameters> -{ - internal EqlDeleteRequestDescriptor(Action> configure) => configure.Invoke(this); - - public EqlDeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.delete"; - - public EqlDeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete an async EQL search. -/// Delete an async EQL search or a stored synchronous EQL search. -/// The API also deletes results for the search. -/// -/// -public sealed partial class EqlDeleteRequestDescriptor : RequestDescriptor -{ - internal EqlDeleteRequestDescriptor(Action configure) => configure.Invoke(this); - - public EqlDeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.delete"; - - public EqlDeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteResponse.g.cs deleted file mode 100644 index 38f55f2b5cc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlDeleteResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlDeleteResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetRequest.g.cs deleted file mode 100644 index 20655ebd2ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetRequest.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlGetRequestParameters : RequestParameters -{ - /// - /// - /// Period for which the search and its results are stored on the cluster. - /// Defaults to the keep_alive value set by the search’s EQL search API request. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Timeout duration to wait for the request to finish. - /// Defaults to no timeout, meaning the request waits for complete search results. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -/// -/// -/// Get async EQL search results. -/// Get the current status and available results for an async EQL search or a stored synchronous EQL search. -/// -/// -public sealed partial class EqlGetRequest : PlainRequest -{ - public EqlGetRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.get"; - - /// - /// - /// Period for which the search and its results are stored on the cluster. - /// Defaults to the keep_alive value set by the search’s EQL search API request. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Timeout duration to wait for the request to finish. - /// Defaults to no timeout, meaning the request waits for complete search results. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -/// -/// -/// Get async EQL search results. -/// Get the current status and available results for an async EQL search or a stored synchronous EQL search. -/// -/// -public sealed partial class EqlGetRequestDescriptor : RequestDescriptor, EqlGetRequestParameters> -{ - internal EqlGetRequestDescriptor(Action> configure) => configure.Invoke(this); - - public EqlGetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.get"; - - public EqlGetRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - public EqlGetRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public EqlGetRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get async EQL search results. -/// Get the current status and available results for an async EQL search or a stored synchronous EQL search. -/// -/// -public sealed partial class EqlGetRequestDescriptor : RequestDescriptor -{ - internal EqlGetRequestDescriptor(Action configure) => configure.Invoke(this); - - public EqlGetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.get"; - - public EqlGetRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - public EqlGetRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public EqlGetRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetResponse.g.cs deleted file mode 100644 index 19dc034e90b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlGetResponse.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlGetResponse : ElasticsearchResponse -{ - /// - /// - /// Contains matching events and sequences. Also contains related metadata. - /// - /// - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Eql.EqlHits Hits { get; init; } - - /// - /// - /// Identifier for the search. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - - /// - /// - /// If true, the response does not contain complete search results. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool? IsPartial { get; init; } - - /// - /// - /// If true, the search request is still executing. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool? IsRunning { get; init; } - - /// - /// - /// Contains information about shard failures (if any), in case allow_partial_search_results=true - /// - /// - [JsonInclude, JsonPropertyName("shard_failures")] - public IReadOnlyCollection? ShardFailures { get; init; } - - /// - /// - /// If true, the request timed out before completion. - /// - /// - [JsonInclude, JsonPropertyName("timed_out")] - public bool? TimedOut { get; init; } - - /// - /// - /// Milliseconds it took Elasticsearch to execute the request. - /// - /// - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs deleted file mode 100644 index 41ebfb7e630..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ /dev/null @@ -1,1141 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlSearchRequestParameters : RequestParameters -{ - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Get EQL search results. -/// Returns search results for an Event Query Language (EQL) query. -/// EQL assumes each document in a data stream or index corresponds to an event. -/// -/// -public sealed partial class EqlSearchRequest : PlainRequest -{ - public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "eql.search"; - - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - [JsonInclude, JsonPropertyName("allow_partial_search_results")] - public bool? AllowPartialSearchResults { get; set; } - [JsonInclude, JsonPropertyName("allow_partial_sequence_results")] - public bool? AllowPartialSequenceResults { get; set; } - [JsonInclude, JsonPropertyName("case_sensitive")] - public bool? CaseSensitive { get; set; } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - [JsonInclude, JsonPropertyName("event_category_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryField { get; set; } - - /// - /// - /// Maximum number of events to search at a time for sequence queries. - /// - /// - [JsonInclude, JsonPropertyName("fetch_size")] - public int? FetchSize { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormat))] - public ICollection? Fields { get; set; } - - /// - /// - /// Query, written in Query DSL, used to filter the events on which the EQL query runs. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - [JsonInclude, JsonPropertyName("keep_alive")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; } - [JsonInclude, JsonPropertyName("keep_on_completion")] - public bool? KeepOnCompletion { get; set; } - - /// - /// - /// By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size - /// parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the - /// max_samples_per_key parameter. Pipes are not supported for sample queries. - /// - /// - [JsonInclude, JsonPropertyName("max_samples_per_key")] - public int? MaxSamplesPerKey { get; set; } - - /// - /// - /// EQL query you wish to run. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("result_position")] - public Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPosition { get; set; } - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// For basic queries, the maximum number of matching events to return. Defaults to 10 - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - [JsonInclude, JsonPropertyName("tiebreaker_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerField { get; set; } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - [JsonInclude, JsonPropertyName("timestamp_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TimestampField { get; set; } - [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; } -} - -/// -/// -/// Get EQL search results. -/// Returns search results for an Event Query Language (EQL) query. -/// EQL assumes each document in a data stream or index corresponds to an event. -/// -/// -public sealed partial class EqlSearchRequestDescriptor : RequestDescriptor, EqlSearchRequestParameters> -{ - internal EqlSearchRequestDescriptor(Action> configure) => configure.Invoke(this); - - public EqlSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public EqlSearchRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "eql.search"; - - public EqlSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public EqlSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public EqlSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private bool? AllowPartialSearchResultsValue { get; set; } - private bool? AllowPartialSequenceResultsValue { get; set; } - private bool? CaseSensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; } - private int? FetchSizeValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action> FieldsDescriptorAction { get; set; } - private Action>[] FieldsDescriptorActions { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } - private bool? KeepOnCompletionValue { get; set; } - private int? MaxSamplesPerKeyValue { get; set; } - private string QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPositionValue { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TimestampFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } - - public EqlSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) - { - AllowPartialSearchResultsValue = allowPartialSearchResults; - return Self; - } - - public EqlSearchRequestDescriptor AllowPartialSequenceResults(bool? allowPartialSequenceResults = true) - { - AllowPartialSequenceResultsValue = allowPartialSequenceResults; - return Self; - } - - public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) - { - CaseSensitiveValue = caseSensitive; - return Self; - } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// - /// Maximum number of events to search at a time for sequence queries. - /// - /// - public EqlSearchRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. - /// - /// - public EqlSearchRequestDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public EqlSearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public EqlSearchRequestDescriptor Fields(Action> configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public EqlSearchRequestDescriptor Fields(params Action>[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Query, written in Query DSL, used to filter the events on which the EQL query runs. - /// - /// - public EqlSearchRequestDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public EqlSearchRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public EqlSearchRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public EqlSearchRequestDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) - { - KeepAliveValue = keepAlive; - return Self; - } - - public EqlSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) - { - KeepOnCompletionValue = keepOnCompletion; - return Self; - } - - /// - /// - /// By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size - /// parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the - /// max_samples_per_key parameter. Pipes are not supported for sample queries. - /// - /// - public EqlSearchRequestDescriptor MaxSamplesPerKey(int? maxSamplesPerKey) - { - MaxSamplesPerKeyValue = maxSamplesPerKey; - return Self; - } - - /// - /// - /// EQL query you wish to run. - /// - /// - public EqlSearchRequestDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public EqlSearchRequestDescriptor ResultPosition(Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? resultPosition) - { - ResultPositionValue = resultPosition; - return Self; - } - - public EqlSearchRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// For basic queries, the maximum number of matching events to return. Defaults to 10 - /// - /// - public EqlSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - public EqlSearchRequestDescriptor TiebreakerField(Elastic.Clients.Elasticsearch.Serverless.Field? tiebreakerField) - { - TiebreakerFieldValue = tiebreakerField; - return Self; - } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - public EqlSearchRequestDescriptor TiebreakerField(Expression> tiebreakerField) - { - TiebreakerFieldValue = tiebreakerField; - return Self; - } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - public EqlSearchRequestDescriptor TiebreakerField(Expression> tiebreakerField) - { - TiebreakerFieldValue = tiebreakerField; - return Self; - } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - public EqlSearchRequestDescriptor TimestampField(Elastic.Clients.Elasticsearch.Serverless.Field? timestampField) - { - TimestampFieldValue = timestampField; - return Self; - } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - public EqlSearchRequestDescriptor TimestampField(Expression> timestampField) - { - TimestampFieldValue = timestampField; - return Self; - } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - public EqlSearchRequestDescriptor TimestampField(Expression> timestampField) - { - TimestampFieldValue = timestampField; - return Self; - } - - public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) - { - WaitForCompletionTimeoutValue = waitForCompletionTimeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowPartialSearchResultsValue.HasValue) - { - writer.WritePropertyName("allow_partial_search_results"); - writer.WriteBooleanValue(AllowPartialSearchResultsValue.Value); - } - - if (AllowPartialSequenceResultsValue.HasValue) - { - writer.WritePropertyName("allow_partial_sequence_results"); - writer.WriteBooleanValue(AllowPartialSequenceResultsValue.Value); - } - - if (CaseSensitiveValue.HasValue) - { - writer.WritePropertyName("case_sensitive"); - writer.WriteBooleanValue(CaseSensitiveValue.Value); - } - - if (EventCategoryFieldValue is not null) - { - writer.WritePropertyName("event_category_field"); - JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - if (FieldsDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - if (FieldsDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - SingleOrManySerializationHelper.Serialize(FieldsValue, writer, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (KeepAliveValue is not null) - { - writer.WritePropertyName("keep_alive"); - JsonSerializer.Serialize(writer, KeepAliveValue, options); - } - - if (KeepOnCompletionValue.HasValue) - { - writer.WritePropertyName("keep_on_completion"); - writer.WriteBooleanValue(KeepOnCompletionValue.Value); - } - - if (MaxSamplesPerKeyValue.HasValue) - { - writer.WritePropertyName("max_samples_per_key"); - writer.WriteNumberValue(MaxSamplesPerKeyValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (ResultPositionValue is not null) - { - writer.WritePropertyName("result_position"); - JsonSerializer.Serialize(writer, ResultPositionValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (TiebreakerFieldValue is not null) - { - writer.WritePropertyName("tiebreaker_field"); - JsonSerializer.Serialize(writer, TiebreakerFieldValue, options); - } - - if (TimestampFieldValue is not null) - { - writer.WritePropertyName("timestamp_field"); - JsonSerializer.Serialize(writer, TimestampFieldValue, options); - } - - if (WaitForCompletionTimeoutValue is not null) - { - writer.WritePropertyName("wait_for_completion_timeout"); - JsonSerializer.Serialize(writer, WaitForCompletionTimeoutValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get EQL search results. -/// Returns search results for an Event Query Language (EQL) query. -/// EQL assumes each document in a data stream or index corresponds to an event. -/// -/// -public sealed partial class EqlSearchRequestDescriptor : RequestDescriptor -{ - internal EqlSearchRequestDescriptor(Action configure) => configure.Invoke(this); - - public EqlSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "eql.search"; - - public EqlSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public EqlSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public EqlSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private bool? AllowPartialSearchResultsValue { get; set; } - private bool? AllowPartialSequenceResultsValue { get; set; } - private bool? CaseSensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; } - private int? FetchSizeValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action FieldsDescriptorAction { get; set; } - private Action[] FieldsDescriptorActions { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } - private bool? KeepOnCompletionValue { get; set; } - private int? MaxSamplesPerKeyValue { get; set; } - private string QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPositionValue { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TimestampFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } - - public EqlSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) - { - AllowPartialSearchResultsValue = allowPartialSearchResults; - return Self; - } - - public EqlSearchRequestDescriptor AllowPartialSequenceResults(bool? allowPartialSequenceResults = true) - { - AllowPartialSequenceResultsValue = allowPartialSequenceResults; - return Self; - } - - public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true) - { - CaseSensitiveValue = caseSensitive; - return Self; - } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// - /// Field containing the event classification, such as process, file, or network. - /// - /// - public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField) - { - EventCategoryFieldValue = eventCategoryField; - return Self; - } - - /// - /// - /// Maximum number of events to search at a time for sequence queries. - /// - /// - public EqlSearchRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. - /// - /// - public EqlSearchRequestDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public EqlSearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public EqlSearchRequestDescriptor Fields(Action configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public EqlSearchRequestDescriptor Fields(params Action[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Query, written in Query DSL, used to filter the events on which the EQL query runs. - /// - /// - public EqlSearchRequestDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public EqlSearchRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public EqlSearchRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public EqlSearchRequestDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) - { - KeepAliveValue = keepAlive; - return Self; - } - - public EqlSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) - { - KeepOnCompletionValue = keepOnCompletion; - return Self; - } - - /// - /// - /// By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size - /// parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the - /// max_samples_per_key parameter. Pipes are not supported for sample queries. - /// - /// - public EqlSearchRequestDescriptor MaxSamplesPerKey(int? maxSamplesPerKey) - { - MaxSamplesPerKeyValue = maxSamplesPerKey; - return Self; - } - - /// - /// - /// EQL query you wish to run. - /// - /// - public EqlSearchRequestDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public EqlSearchRequestDescriptor ResultPosition(Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? resultPosition) - { - ResultPositionValue = resultPosition; - return Self; - } - - public EqlSearchRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// For basic queries, the maximum number of matching events to return. Defaults to 10 - /// - /// - public EqlSearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - public EqlSearchRequestDescriptor TiebreakerField(Elastic.Clients.Elasticsearch.Serverless.Field? tiebreakerField) - { - TiebreakerFieldValue = tiebreakerField; - return Self; - } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - public EqlSearchRequestDescriptor TiebreakerField(Expression> tiebreakerField) - { - TiebreakerFieldValue = tiebreakerField; - return Self; - } - - /// - /// - /// Field used to sort hits with the same timestamp in ascending order - /// - /// - public EqlSearchRequestDescriptor TiebreakerField(Expression> tiebreakerField) - { - TiebreakerFieldValue = tiebreakerField; - return Self; - } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - public EqlSearchRequestDescriptor TimestampField(Elastic.Clients.Elasticsearch.Serverless.Field? timestampField) - { - TimestampFieldValue = timestampField; - return Self; - } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - public EqlSearchRequestDescriptor TimestampField(Expression> timestampField) - { - TimestampFieldValue = timestampField; - return Self; - } - - /// - /// - /// Field containing event timestamp. Default "@timestamp" - /// - /// - public EqlSearchRequestDescriptor TimestampField(Expression> timestampField) - { - TimestampFieldValue = timestampField; - return Self; - } - - public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) - { - WaitForCompletionTimeoutValue = waitForCompletionTimeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowPartialSearchResultsValue.HasValue) - { - writer.WritePropertyName("allow_partial_search_results"); - writer.WriteBooleanValue(AllowPartialSearchResultsValue.Value); - } - - if (AllowPartialSequenceResultsValue.HasValue) - { - writer.WritePropertyName("allow_partial_sequence_results"); - writer.WriteBooleanValue(AllowPartialSequenceResultsValue.Value); - } - - if (CaseSensitiveValue.HasValue) - { - writer.WritePropertyName("case_sensitive"); - writer.WriteBooleanValue(CaseSensitiveValue.Value); - } - - if (EventCategoryFieldValue is not null) - { - writer.WritePropertyName("event_category_field"); - JsonSerializer.Serialize(writer, EventCategoryFieldValue, options); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - if (FieldsDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - if (FieldsDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - SingleOrManySerializationHelper.Serialize(FieldsValue, writer, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (KeepAliveValue is not null) - { - writer.WritePropertyName("keep_alive"); - JsonSerializer.Serialize(writer, KeepAliveValue, options); - } - - if (KeepOnCompletionValue.HasValue) - { - writer.WritePropertyName("keep_on_completion"); - writer.WriteBooleanValue(KeepOnCompletionValue.Value); - } - - if (MaxSamplesPerKeyValue.HasValue) - { - writer.WritePropertyName("max_samples_per_key"); - writer.WriteNumberValue(MaxSamplesPerKeyValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (ResultPositionValue is not null) - { - writer.WritePropertyName("result_position"); - JsonSerializer.Serialize(writer, ResultPositionValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (TiebreakerFieldValue is not null) - { - writer.WritePropertyName("tiebreaker_field"); - JsonSerializer.Serialize(writer, TiebreakerFieldValue, options); - } - - if (TimestampFieldValue is not null) - { - writer.WritePropertyName("timestamp_field"); - JsonSerializer.Serialize(writer, TimestampFieldValue, options); - } - - if (WaitForCompletionTimeoutValue is not null) - { - writer.WritePropertyName("wait_for_completion_timeout"); - JsonSerializer.Serialize(writer, WaitForCompletionTimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchResponse.g.cs deleted file mode 100644 index c33426f84df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchResponse.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlSearchResponse : ElasticsearchResponse -{ - /// - /// - /// Contains matching events and sequences. Also contains related metadata. - /// - /// - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Eql.EqlHits Hits { get; init; } - - /// - /// - /// Identifier for the search. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - - /// - /// - /// If true, the response does not contain complete search results. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool? IsPartial { get; init; } - - /// - /// - /// If true, the search request is still executing. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool? IsRunning { get; init; } - - /// - /// - /// Contains information about shard failures (if any), in case allow_partial_search_results=true - /// - /// - [JsonInclude, JsonPropertyName("shard_failures")] - public IReadOnlyCollection? ShardFailures { get; init; } - - /// - /// - /// If true, the request timed out before completion. - /// - /// - [JsonInclude, JsonPropertyName("timed_out")] - public bool? TimedOut { get; init; } - - /// - /// - /// Milliseconds it took Elasticsearch to execute the request. - /// - /// - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusRequest.g.cs deleted file mode 100644 index 495702bebde..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusRequest.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class GetEqlStatusRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get the async EQL status. -/// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. -/// -/// -public sealed partial class GetEqlStatusRequest : PlainRequest -{ - public GetEqlStatusRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGetStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.get_status"; -} - -/// -/// -/// Get the async EQL status. -/// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. -/// -/// -public sealed partial class GetEqlStatusRequestDescriptor : RequestDescriptor, GetEqlStatusRequestParameters> -{ - internal GetEqlStatusRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetEqlStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGetStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.get_status"; - - public GetEqlStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get the async EQL status. -/// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. -/// -/// -public sealed partial class GetEqlStatusRequestDescriptor : RequestDescriptor -{ - internal GetEqlStatusRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetEqlStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EqlGetStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "eql.get_status"; - - public GetEqlStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusResponse.g.cs deleted file mode 100644 index 5112f40661b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/GetEqlStatusResponse.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class GetEqlStatusResponse : ElasticsearchResponse -{ - /// - /// - /// For a completed search shows the http status code of the completed search. - /// - /// - [JsonInclude, JsonPropertyName("completion_status")] - public int? CompletionStatus { get; init; } - - /// - /// - /// Shows a timestamp when the eql search will be expired, in milliseconds since the Unix epoch. When this time is reached, the search and its results are deleted, even if the search is still ongoing. - /// - /// - [JsonInclude, JsonPropertyName("expiration_time_in_millis")] - public long? ExpirationTimeInMillis { get; init; } - - /// - /// - /// Identifier for the search. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// If true, the search request is still executing. If false, the search is completed. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool IsPartial { get; init; } - - /// - /// - /// If true, the response does not contain complete search results. This could be because either the search is still running (is_running status is false), or because it is already completed (is_running status is true) and results are partial due to failures or timeouts. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool IsRunning { get; init; } - - /// - /// - /// For a running search shows a timestamp when the eql search started, in milliseconds since the Unix epoch. - /// - /// - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long? StartTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs deleted file mode 100644 index e5a692c6955..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ /dev/null @@ -1,475 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Esql; - -public sealed partial class EsqlQueryRequestParameters : RequestParameters -{ - /// - /// - /// The character to use between values within a CSV row. Only valid for the CSV format. - /// - /// - public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } - - /// - /// - /// Should columns that are entirely null be removed from the columns and values portion of the results? - /// Defaults to false. If true then the response will include an extra section under the name all_columns which has the name of all columns. - /// - /// - public bool? DropNullColumns { get => Q("drop_null_columns"); set => Q("drop_null_columns", value); } - - /// - /// - /// A short version of the Accept header, e.g. json, yaml. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } -} - -/// -/// -/// Run an ES|QL query. -/// Get search results for an ES|QL (Elasticsearch query language) query. -/// -/// -public sealed partial class EsqlQueryRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "esql.query"; - - /// - /// - /// The character to use between values within a CSV row. Only valid for the CSV format. - /// - /// - [JsonIgnore] - public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } - - /// - /// - /// Should columns that are entirely null be removed from the columns and values portion of the results? - /// Defaults to false. If true then the response will include an extra section under the name all_columns which has the name of all columns. - /// - /// - [JsonIgnore] - public bool? DropNullColumns { get => Q("drop_null_columns"); set => Q("drop_null_columns", value); } - - /// - /// - /// A short version of the Accept header, e.g. json, yaml. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } - - /// - /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. - /// - /// - [JsonInclude, JsonPropertyName("columnar")] - public bool? Columnar { get; set; } - - /// - /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - [JsonInclude, JsonPropertyName("locale")] - public string? Locale { get; set; } - - /// - /// - /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public ICollection? Params { get; set; } - - /// - /// - /// If provided and true the response will include an extra profile object - /// with information on how the query was executed. This information is for human debugging - /// and its format can change at any time but it can give some insight into the performance - /// of each part of the query. - /// - /// - [JsonInclude, JsonPropertyName("profile")] - public bool? Profile { get; set; } - - /// - /// - /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } -} - -/// -/// -/// Run an ES|QL query. -/// Get search results for an ES|QL (Elasticsearch query language) query. -/// -/// -public sealed partial class EsqlQueryRequestDescriptor : RequestDescriptor, EsqlQueryRequestParameters> -{ - internal EsqlQueryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public EsqlQueryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "esql.query"; - - public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); - public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns); - public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? format) => Qs("format", format); - - private bool? ColumnarValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private string? LocaleValue { get; set; } - private ICollection? ParamsValue { get; set; } - private bool? ProfileValue { get; set; } - private string QueryValue { get; set; } - - /// - /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. - /// - /// - public EsqlQueryRequestDescriptor Columnar(bool? columnar = true) - { - ColumnarValue = columnar; - return Self; - } - - /// - /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. - /// - /// - public EsqlQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public EsqlQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public EsqlQueryRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public EsqlQueryRequestDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. - /// - /// - public EsqlQueryRequestDescriptor Params(ICollection? value) - { - ParamsValue = value; - return Self; - } - - /// - /// - /// If provided and true the response will include an extra profile object - /// with information on how the query was executed. This information is for human debugging - /// and its format can change at any time but it can give some insight into the performance - /// of each part of the query. - /// - /// - public EsqlQueryRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. - /// - /// - public EsqlQueryRequestDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ColumnarValue.HasValue) - { - writer.WritePropertyName("columnar"); - writer.WriteBooleanValue(ColumnarValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - writer.WriteEndObject(); - } -} - -/// -/// -/// Run an ES|QL query. -/// Get search results for an ES|QL (Elasticsearch query language) query. -/// -/// -public sealed partial class EsqlQueryRequestDescriptor : RequestDescriptor -{ - internal EsqlQueryRequestDescriptor(Action configure) => configure.Invoke(this); - - public EsqlQueryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "esql.query"; - - public EsqlQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); - public EsqlQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns); - public EsqlQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Esql.EsqlFormat? format) => Qs("format", format); - - private bool? ColumnarValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private string? LocaleValue { get; set; } - private ICollection? ParamsValue { get; set; } - private bool? ProfileValue { get; set; } - private string QueryValue { get; set; } - - /// - /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. - /// - /// - public EsqlQueryRequestDescriptor Columnar(bool? columnar = true) - { - ColumnarValue = columnar; - return Self; - } - - /// - /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. - /// - /// - public EsqlQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public EsqlQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public EsqlQueryRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public EsqlQueryRequestDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. - /// - /// - public EsqlQueryRequestDescriptor Params(ICollection? value) - { - ParamsValue = value; - return Self; - } - - /// - /// - /// If provided and true the response will include an extra profile object - /// with information on how the query was executed. This information is for human debugging - /// and its format can change at any time but it can give some insight into the performance - /// of each part of the query. - /// - /// - public EsqlQueryRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. - /// - /// - public EsqlQueryRequestDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ColumnarValue.HasValue) - { - writer.WritePropertyName("columnar"); - writer.WriteBooleanValue(ColumnarValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryResponse.g.cs deleted file mode 100644 index c872ff199a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Esql/EsqlQueryResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Esql; - -public sealed partial class EsqlQueryResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs deleted file mode 100644 index 49b0e900db4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsRequest.g.cs +++ /dev/null @@ -1,329 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ExistsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// true or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Check a document. -/// Checks if a specified document exists. -/// -/// -public sealed partial class ExistsRequest : PlainRequest -{ - public ExistsRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExists; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "exists"; - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// true or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Check a document. -/// Checks if a specified document exists. -/// -/// -public sealed partial class ExistsRequestDescriptor : RequestDescriptor, ExistsRequestParameters> -{ - internal ExistsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public ExistsRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public ExistsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public ExistsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExists; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "exists"; - - public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExistsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public ExistsRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public ExistsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExistsRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - public ExistsRequestDescriptor Version(long? version) => Qs("version", version); - public ExistsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public ExistsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public ExistsRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Check a document. -/// Checks if a specified document exists. -/// -/// -public sealed partial class ExistsRequestDescriptor : RequestDescriptor -{ - internal ExistsRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExists; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "exists"; - - public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExistsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public ExistsRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public ExistsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExistsRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - public ExistsRequestDescriptor Version(long? version) => Qs("version", version); - public ExistsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public ExistsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public ExistsRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsResponse.g.cs deleted file mode 100644 index 242b97d85f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ExistsResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs deleted file mode 100644 index 2f40a52f211..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceRequest.g.cs +++ /dev/null @@ -1,308 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ExistsSourceRequestParameters : RequestParameters -{ - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// true or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Check for a document source. -/// Checks if a document's _source is stored. -/// -/// -public sealed partial class ExistsSourceRequest : PlainRequest -{ - public ExistsSourceRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExistsSource; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "exists_source"; - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// true or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Check for a document source. -/// Checks if a document's _source is stored. -/// -/// -public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptor, ExistsSourceRequestParameters> -{ - internal ExistsSourceRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public ExistsSourceRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public ExistsSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public ExistsSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExistsSource; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "exists_source"; - - public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version); - public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public ExistsSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public ExistsSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Check for a document source. -/// Checks if a document's _source is stored. -/// -/// -public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptor -{ - internal ExistsSourceRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExistsSource; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "exists_source"; - - public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version); - public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public ExistsSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public ExistsSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceResponse.g.cs deleted file mode 100644 index db25e7ee395..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExistsSourceResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ExistsSourceResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs deleted file mode 100644 index b372cd2365c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainRequest.g.cs +++ /dev/null @@ -1,469 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ExplainRequestParameters : RequestParameters -{ - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// A comma-separated list of stored fields to return in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } -} - -/// -/// -/// Explain a document match result. -/// Returns information about why a specific document matches, or doesn’t match, a query. -/// -/// -public sealed partial class ExplainRequest : PlainRequest -{ - public ExplainRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExplain; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "explain"; - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// A comma-separated list of stored fields to return in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } -} - -/// -/// -/// Explain a document match result. -/// Returns information about why a specific document matches, or doesn’t match, a query. -/// -/// -public sealed partial class ExplainRequestDescriptor : RequestDescriptor, ExplainRequestParameters> -{ - internal ExplainRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExplainRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public ExplainRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public ExplainRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public ExplainRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public ExplainRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExplain; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "explain"; - - public ExplainRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public ExplainRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public ExplainRequestDescriptor Df(string? df) => Qs("df", df); - public ExplainRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public ExplainRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExplainRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public ExplainRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExplainRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - - public ExplainRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public ExplainRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public ExplainRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ExplainRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ExplainRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Explain a document match result. -/// Returns information about why a specific document matches, or doesn’t match, a query. -/// -/// -public sealed partial class ExplainRequestDescriptor : RequestDescriptor -{ - internal ExplainRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExplainRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceExplain; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "explain"; - - public ExplainRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public ExplainRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public ExplainRequestDescriptor Df(string? df) => Qs("df", df); - public ExplainRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public ExplainRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public ExplainRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public ExplainRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public ExplainRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - - public ExplainRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public ExplainRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public ExplainRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ExplainRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ExplainRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainResponse.g.cs deleted file mode 100644 index 6925c56fc6f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ExplainResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ExplainResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("explanation")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Explain.ExplanationDetail? Explanation { get; init; } - [JsonInclude, JsonPropertyName("get")] - public Elastic.Clients.Elasticsearch.Serverless.InlineGet? Get { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("matched")] - public bool Matched { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs deleted file mode 100644 index c947c938007..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs +++ /dev/null @@ -1,481 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FieldCapsRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, - /// or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request - /// targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent - /// - /// - public string? Filters { get => Q("filters"); set => Q("filters", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If false, empty fields are not included in the response. - /// - /// - public bool? IncludeEmptyFields { get => Q("include_empty_fields"); set => Q("include_empty_fields", value); } - - /// - /// - /// If true, unmapped fields are included in the response. - /// - /// - public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } - - /// - /// - /// Only return results for fields that have one of the types in the list - /// - /// - public ICollection? Types { get => Q?>("types"); set => Q("types", value); } -} - -/// -/// -/// Get the field capabilities. -/// -/// -/// Get information about the capabilities of fields among multiple indices. -/// -/// -/// For data streams, the API returns field capabilities among the stream’s backing indices. -/// It returns runtime fields like any other field. -/// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. -/// -/// -public sealed partial class FieldCapsRequest : PlainRequest -{ - public FieldCapsRequest() - { - } - - public FieldCapsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceFieldCaps; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "field_caps"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, - /// or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request - /// targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent - /// - /// - [JsonIgnore] - public string? Filters { get => Q("filters"); set => Q("filters", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If false, empty fields are not included in the response. - /// - /// - [JsonIgnore] - public bool? IncludeEmptyFields { get => Q("include_empty_fields"); set => Q("include_empty_fields", value); } - - /// - /// - /// If true, unmapped fields are included in the response. - /// - /// - [JsonIgnore] - public bool? IncludeUnmapped { get => Q("include_unmapped"); set => Q("include_unmapped", value); } - - /// - /// - /// Only return results for fields that have one of the types in the list - /// - /// - [JsonIgnore] - public ICollection? Types { get => Q?>("types"); set => Q("types", value); } - - /// - /// - /// List of fields to retrieve capabilities for. Wildcard (*) expressions are supported. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// Allows to filter indices if the provided query rewrites to match_none on every shard. - /// - /// - [JsonInclude, JsonPropertyName("index_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilter { get; set; } - - /// - /// - /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests. - /// These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } -} - -/// -/// -/// Get the field capabilities. -/// -/// -/// Get information about the capabilities of fields among multiple indices. -/// -/// -/// For data streams, the API returns field capabilities among the stream’s backing indices. -/// It returns runtime fields like any other field. -/// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. -/// -/// -public sealed partial class FieldCapsRequestDescriptor : RequestDescriptor, FieldCapsRequestParameters> -{ - internal FieldCapsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public FieldCapsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public FieldCapsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceFieldCaps; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "field_caps"; - - public FieldCapsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public FieldCapsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public FieldCapsRequestDescriptor Filters(string? filters) => Qs("filters", filters); - public FieldCapsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public FieldCapsRequestDescriptor IncludeEmptyFields(bool? includeEmptyFields = true) => Qs("include_empty_fields", includeEmptyFields); - public FieldCapsRequestDescriptor IncludeUnmapped(bool? includeUnmapped = true) => Qs("include_unmapped", includeUnmapped); - public FieldCapsRequestDescriptor Types(ICollection? types) => Qs("types", types); - - public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } - private Action> IndexFilterDescriptorAction { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - - /// - /// - /// List of fields to retrieve capabilities for. Wildcard (*) expressions are supported. - /// - /// - public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Allows to filter indices if the provided query rewrites to match_none on every shard. - /// - /// - public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public FieldCapsRequestDescriptor IndexFilter(Action> configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests. - /// These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings. - /// - /// - public FieldCapsRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IndexFilterDescriptor is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); - } - else if (IndexFilterDescriptorAction is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); - } - else if (IndexFilterValue is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get the field capabilities. -/// -/// -/// Get information about the capabilities of fields among multiple indices. -/// -/// -/// For data streams, the API returns field capabilities among the stream’s backing indices. -/// It returns runtime fields like any other field. -/// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. -/// -/// -public sealed partial class FieldCapsRequestDescriptor : RequestDescriptor -{ - internal FieldCapsRequestDescriptor(Action configure) => configure.Invoke(this); - - public FieldCapsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public FieldCapsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceFieldCaps; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "field_caps"; - - public FieldCapsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public FieldCapsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public FieldCapsRequestDescriptor Filters(string? filters) => Qs("filters", filters); - public FieldCapsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public FieldCapsRequestDescriptor IncludeEmptyFields(bool? includeEmptyFields = true) => Qs("include_empty_fields", includeEmptyFields); - public FieldCapsRequestDescriptor IncludeUnmapped(bool? includeUnmapped = true) => Qs("include_unmapped", includeUnmapped); - public FieldCapsRequestDescriptor Types(ICollection? types) => Qs("types", types); - - public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } - private Action IndexFilterDescriptorAction { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - - /// - /// - /// List of fields to retrieve capabilities for. Wildcard (*) expressions are supported. - /// - /// - public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Allows to filter indices if the provided query rewrites to match_none on every shard. - /// - /// - public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public FieldCapsRequestDescriptor IndexFilter(Action configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests. - /// These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings. - /// - /// - public FieldCapsRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IndexFilterDescriptor is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); - } - else if (IndexFilterDescriptorAction is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); - } - else if (IndexFilterValue is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsResponse.g.cs deleted file mode 100644 index b812902de68..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FieldCapsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("fields")] - [ReadOnlyFieldDictionaryConverter(typeof(IReadOnlyDictionary))] - public IReadOnlyDictionary> Fields { get; init; } - [JsonInclude, JsonPropertyName("indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Indices { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetRequest.g.cs deleted file mode 100644 index ab515ef772d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetRequest.g.cs +++ /dev/null @@ -1,325 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetRequestParameters : RequestParameters -{ - /// - /// - /// Specifies the node or shard the operation should be performed on. Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: internal, external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Get a document by its ID. -/// Retrieves the document with the specified ID from an index. -/// -/// -public sealed partial class GetRequest : PlainRequest -{ - public GetRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get"; - - /// - /// - /// Specifies the node or shard the operation should be performed on. Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: internal, external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Get a document by its ID. -/// Retrieves the document with the specified ID from an index. -/// -/// -public sealed partial class GetRequestDescriptor : RequestDescriptor, GetRequestParameters> -{ - internal GetRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public GetRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public GetRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public GetRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public GetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get"; - - public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public GetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public GetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - public GetRequestDescriptor Version(long? version) => Qs("version", version); - public GetRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public GetRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public GetRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get a document by its ID. -/// Retrieves the document with the specified ID from an index. -/// -/// -public sealed partial class GetRequestDescriptor : RequestDescriptor -{ - internal GetRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get"; - - public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public GetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public GetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - public GetRequestDescriptor Version(long? version) => Qs("version", version); - public GetRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public GetRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public GetRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetResponse.g.cs deleted file mode 100644 index 6991ba6a6f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetResponse.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValues? Fields { get; init; } - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_ignored")] - public IReadOnlyCollection? Ignored { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("_routing")] - public string? Routing { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_source")] - [SourceConverter] - public TDocument? Source { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptRequest.g.cs deleted file mode 100644 index 9550ee70937..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptRequest.g.cs +++ /dev/null @@ -1,140 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetScriptRequestParameters : RequestParameters -{ - /// - /// - /// Specify timeout for connection to master - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get a script or search template. -/// Retrieves a stored script or search template. -/// -/// -public sealed partial class GetScriptRequest : PlainRequest -{ - public GetScriptRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get_script"; - - /// - /// - /// Specify timeout for connection to master - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get a script or search template. -/// Retrieves a stored script or search template. -/// -/// -public sealed partial class GetScriptRequestDescriptor : RequestDescriptor, GetScriptRequestParameters> -{ - internal GetScriptRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get_script"; - - public GetScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get a script or search template. -/// Retrieves a stored script or search template. -/// -/// -public sealed partial class GetScriptRequestDescriptor : RequestDescriptor -{ - internal GetScriptRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get_script"; - - public GetScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptResponse.g.cs deleted file mode 100644 index e283ddb5ab6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetScriptResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetScriptResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.StoredScript? Script { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs deleted file mode 100644 index a7cf0ccf4a0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceRequest.g.cs +++ /dev/null @@ -1,309 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetSourceRequestParameters : RequestParameters -{ - /// - /// - /// Specifies the node or shard the operation should be performed on. Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Boolean) If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: internal, external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Get a document's source. -/// Returns the source of a document. -/// -/// -public sealed partial class GetSourceRequest : PlainRequest -{ - public GetSourceRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetSource; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get_source"; - - /// - /// - /// Specifies the node or shard the operation should be performed on. Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Boolean) If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Target the specified primary shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: internal, external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Get a document's source. -/// Returns the source of a document. -/// -/// -public sealed partial class GetSourceRequestDescriptor : RequestDescriptor, GetSourceRequestParameters> -{ - internal GetSourceRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public GetSourceRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public GetSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public GetSourceRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public GetSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetSource; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get_source"; - - public GetSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public GetSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public GetSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public GetSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - public GetSourceRequestDescriptor Version(long? version) => Qs("version", version); - public GetSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public GetSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public GetSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get a document's source. -/// Returns the source of a document. -/// -/// -public sealed partial class GetSourceRequestDescriptor : RequestDescriptor -{ - internal GetSourceRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetSourceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceGetSource; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "get_source"; - - public GetSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public GetSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public GetSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public GetSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public GetSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public GetSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public GetSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public GetSourceRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - public GetSourceRequestDescriptor Version(long? version) => Qs("version", version); - public GetSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public GetSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public GetSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceResponse.g.cs deleted file mode 100644 index fe4055b01b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/GetSourceResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetSourceResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreRequest.g.cs deleted file mode 100644 index 56469ab3fe3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreRequest.g.cs +++ /dev/null @@ -1,655 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class ExploreRequestParameters : RequestParameters -{ - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Explore graph analytics. -/// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. -/// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. -/// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. -/// Subsequent requests enable you to spider out from one more vertices of interest. -/// You can exclude vertices that have already been returned. -/// -/// -public sealed partial class ExploreRequest : PlainRequest -{ - public ExploreRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.GraphExplore; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "graph.explore"; - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Specifies or more fields from which you want to extract terms that are associated with the specified vertices. - /// - /// - [JsonInclude, JsonPropertyName("connections")] - public Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? Connections { get; set; } - - /// - /// - /// Direct the Graph API how to build the graph. - /// - /// - [JsonInclude, JsonPropertyName("controls")] - public Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControls? Controls { get; set; } - - /// - /// - /// A seed query that identifies the documents of interest. Can be any valid Elasticsearch query. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Specifies one or more fields that contain the terms you want to include in the graph as vertices. - /// - /// - [JsonInclude, JsonPropertyName("vertices")] - public ICollection? Vertices { get; set; } -} - -/// -/// -/// Explore graph analytics. -/// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. -/// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. -/// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. -/// Subsequent requests enable you to spider out from one more vertices of interest. -/// You can exclude vertices that have already been returned. -/// -/// -public sealed partial class ExploreRequestDescriptor : RequestDescriptor, ExploreRequestParameters> -{ - internal ExploreRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExploreRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public ExploreRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.GraphExplore; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "graph.explore"; - - public ExploreRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExploreRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public ExploreRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? ConnectionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor ConnectionsDescriptor { get; set; } - private Action> ConnectionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControls? ControlsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControlsDescriptor ControlsDescriptor { get; set; } - private Action> ControlsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? VerticesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor VerticesDescriptor { get; set; } - private Action> VerticesDescriptorAction { get; set; } - private Action>[] VerticesDescriptorActions { get; set; } - - /// - /// - /// Specifies or more fields from which you want to extract terms that are associated with the specified vertices. - /// - /// - public ExploreRequestDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? connections) - { - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = null; - ConnectionsValue = connections; - return Self; - } - - public ExploreRequestDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor descriptor) - { - ConnectionsValue = null; - ConnectionsDescriptorAction = null; - ConnectionsDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Connections(Action> configure) - { - ConnectionsValue = null; - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Direct the Graph API how to build the graph. - /// - /// - public ExploreRequestDescriptor Controls(Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControls? controls) - { - ControlsDescriptor = null; - ControlsDescriptorAction = null; - ControlsValue = controls; - return Self; - } - - public ExploreRequestDescriptor Controls(Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControlsDescriptor descriptor) - { - ControlsValue = null; - ControlsDescriptorAction = null; - ControlsDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Controls(Action> configure) - { - ControlsValue = null; - ControlsDescriptor = null; - ControlsDescriptorAction = configure; - return Self; - } - - /// - /// - /// A seed query that identifies the documents of interest. Can be any valid Elasticsearch query. - /// - /// - public ExploreRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ExploreRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies one or more fields that contain the terms you want to include in the graph as vertices. - /// - /// - public ExploreRequestDescriptor Vertices(ICollection? vertices) - { - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesValue = vertices; - return Self; - } - - public ExploreRequestDescriptor Vertices(Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor descriptor) - { - VerticesValue = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Vertices(Action> configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorActions = null; - VerticesDescriptorAction = configure; - return Self; - } - - public ExploreRequestDescriptor Vertices(params Action>[] configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConnectionsDescriptor is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsDescriptor, options); - } - else if (ConnectionsDescriptorAction is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor(ConnectionsDescriptorAction), options); - } - else if (ConnectionsValue is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsValue, options); - } - - if (ControlsDescriptor is not null) - { - writer.WritePropertyName("controls"); - JsonSerializer.Serialize(writer, ControlsDescriptor, options); - } - else if (ControlsDescriptorAction is not null) - { - writer.WritePropertyName("controls"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControlsDescriptor(ControlsDescriptorAction), options); - } - else if (ControlsValue is not null) - { - writer.WritePropertyName("controls"); - JsonSerializer.Serialize(writer, ControlsValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (VerticesDescriptor is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, VerticesDescriptor, options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorAction is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(VerticesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorActions is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - foreach (var action in VerticesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (VerticesValue is not null) - { - writer.WritePropertyName("vertices"); - JsonSerializer.Serialize(writer, VerticesValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Explore graph analytics. -/// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. -/// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. -/// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. -/// Subsequent requests enable you to spider out from one more vertices of interest. -/// You can exclude vertices that have already been returned. -/// -/// -public sealed partial class ExploreRequestDescriptor : RequestDescriptor -{ - internal ExploreRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExploreRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.GraphExplore; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "graph.explore"; - - public ExploreRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public ExploreRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public ExploreRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? ConnectionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor ConnectionsDescriptor { get; set; } - private Action ConnectionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControls? ControlsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControlsDescriptor ControlsDescriptor { get; set; } - private Action ControlsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? VerticesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor VerticesDescriptor { get; set; } - private Action VerticesDescriptorAction { get; set; } - private Action[] VerticesDescriptorActions { get; set; } - - /// - /// - /// Specifies or more fields from which you want to extract terms that are associated with the specified vertices. - /// - /// - public ExploreRequestDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? connections) - { - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = null; - ConnectionsValue = connections; - return Self; - } - - public ExploreRequestDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor descriptor) - { - ConnectionsValue = null; - ConnectionsDescriptorAction = null; - ConnectionsDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Connections(Action configure) - { - ConnectionsValue = null; - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Direct the Graph API how to build the graph. - /// - /// - public ExploreRequestDescriptor Controls(Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControls? controls) - { - ControlsDescriptor = null; - ControlsDescriptorAction = null; - ControlsValue = controls; - return Self; - } - - public ExploreRequestDescriptor Controls(Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControlsDescriptor descriptor) - { - ControlsValue = null; - ControlsDescriptorAction = null; - ControlsDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Controls(Action configure) - { - ControlsValue = null; - ControlsDescriptor = null; - ControlsDescriptorAction = configure; - return Self; - } - - /// - /// - /// A seed query that identifies the documents of interest. Can be any valid Elasticsearch query. - /// - /// - public ExploreRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ExploreRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies one or more fields that contain the terms you want to include in the graph as vertices. - /// - /// - public ExploreRequestDescriptor Vertices(ICollection? vertices) - { - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesValue = vertices; - return Self; - } - - public ExploreRequestDescriptor Vertices(Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor descriptor) - { - VerticesValue = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesDescriptor = descriptor; - return Self; - } - - public ExploreRequestDescriptor Vertices(Action configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorActions = null; - VerticesDescriptorAction = configure; - return Self; - } - - public ExploreRequestDescriptor Vertices(params Action[] configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConnectionsDescriptor is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsDescriptor, options); - } - else if (ConnectionsDescriptorAction is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor(ConnectionsDescriptorAction), options); - } - else if (ConnectionsValue is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsValue, options); - } - - if (ControlsDescriptor is not null) - { - writer.WritePropertyName("controls"); - JsonSerializer.Serialize(writer, ControlsDescriptor, options); - } - else if (ControlsDescriptorAction is not null) - { - writer.WritePropertyName("controls"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.ExploreControlsDescriptor(ControlsDescriptorAction), options); - } - else if (ControlsValue is not null) - { - writer.WritePropertyName("controls"); - JsonSerializer.Serialize(writer, ControlsValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (VerticesDescriptor is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, VerticesDescriptor, options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorAction is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(VerticesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorActions is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - foreach (var action in VerticesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (VerticesValue is not null) - { - writer.WritePropertyName("vertices"); - JsonSerializer.Serialize(writer, VerticesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreResponse.g.cs deleted file mode 100644 index b4c16e5ce14..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Graph/ExploreResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class ExploreResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("connections")] - public IReadOnlyCollection Connections { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection Failures { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } - [JsonInclude, JsonPropertyName("vertices")] - public IReadOnlyCollection Vertices { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportRequest.g.cs deleted file mode 100644 index 6f6a38f567a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportRequest.g.cs +++ /dev/null @@ -1,187 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class HealthReportRequestParameters : RequestParameters -{ - /// - /// - /// Limit the number of affected resources the health report API returns. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Explicit operation timeout. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Opt-in for more information about the health of the system. - /// - /// - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get the cluster health. -/// Get a report with the health status of an Elasticsearch cluster. -/// The report contains a list of indicators that compose Elasticsearch functionality. -/// -/// -/// Each indicator has a health status of: green, unknown, yellow or red. -/// The indicator will provide an explanation and metadata describing the reason for its current health status. -/// -/// -/// The cluster’s status is controlled by the worst indicator status. -/// -/// -/// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. -/// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. -/// -/// -/// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. -/// The root cause and remediation steps are encapsulated in a diagnosis. -/// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. -/// -/// -/// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. -/// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. -/// -/// -public sealed partial class HealthReportRequest : PlainRequest -{ - public HealthReportRequest() - { - } - - public HealthReportRequest(IReadOnlyCollection? feature) : base(r => r.Optional("feature", feature)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceHealthReport; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "health_report"; - - /// - /// - /// Limit the number of affected resources the health report API returns. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Explicit operation timeout. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Opt-in for more information about the health of the system. - /// - /// - [JsonIgnore] - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get the cluster health. -/// Get a report with the health status of an Elasticsearch cluster. -/// The report contains a list of indicators that compose Elasticsearch functionality. -/// -/// -/// Each indicator has a health status of: green, unknown, yellow or red. -/// The indicator will provide an explanation and metadata describing the reason for its current health status. -/// -/// -/// The cluster’s status is controlled by the worst indicator status. -/// -/// -/// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. -/// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. -/// -/// -/// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. -/// The root cause and remediation steps are encapsulated in a diagnosis. -/// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. -/// -/// -/// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. -/// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. -/// -/// -public sealed partial class HealthReportRequestDescriptor : RequestDescriptor -{ - internal HealthReportRequestDescriptor(Action configure) => configure.Invoke(this); - - public HealthReportRequestDescriptor(IReadOnlyCollection? feature) : base(r => r.Optional("feature", feature)) - { - } - - public HealthReportRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceHealthReport; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "health_report"; - - public HealthReportRequestDescriptor Size(int? size) => Qs("size", size); - public HealthReportRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public HealthReportRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public HealthReportRequestDescriptor Feature(IReadOnlyCollection? feature) - { - RouteValues.Optional("feature", feature); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportResponse.g.cs deleted file mode 100644 index dc6e11408ba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/HealthReportResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class HealthReportResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("indicators")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.Indicators Indicators { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus? Status { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs deleted file mode 100644 index 81d71987457..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs +++ /dev/null @@ -1,601 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AnalyzeIndexRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get tokens from text analysis. -/// The analyze API performs analysis on a text string and returns the resulting tokens. -/// -/// -public sealed partial class AnalyzeIndexRequest : PlainRequest -{ - public AnalyzeIndexRequest() - { - } - - public AnalyzeIndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementAnalyze; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.analyze"; - - /// - /// - /// The name of the analyzer that should be applied to the provided text. - /// This could be a built-in analyzer, or an analyzer that’s been configured in the index. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// Array of token attributes used to filter the output of the explain parameter. - /// - /// - [JsonInclude, JsonPropertyName("attributes")] - public ICollection? Attributes { get; set; } - - /// - /// - /// Array of character filters used to preprocess characters before the tokenizer. - /// - /// - [JsonInclude, JsonPropertyName("char_filter")] - public ICollection? CharFilter { get; set; } - - /// - /// - /// If true, the response includes token attributes and additional details. - /// - /// - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; set; } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Array of token filters used to apply after the tokenizer. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public ICollection? Filter { get; set; } - - /// - /// - /// Normalizer to use to convert text into a single token. - /// - /// - [JsonInclude, JsonPropertyName("normalizer")] - public string? Normalizer { get; set; } - - /// - /// - /// Text to analyze. - /// If an array of strings is provided, it is analyzed as a multi-value field. - /// - /// - [JsonInclude, JsonPropertyName("text")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Text { get; set; } - - /// - /// - /// Tokenizer to use to convert text into tokens. - /// - /// - [JsonInclude, JsonPropertyName("tokenizer")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? Tokenizer { get; set; } -} - -/// -/// -/// Get tokens from text analysis. -/// The analyze API performs analysis on a text string and returns the resulting tokens. -/// -/// -public sealed partial class AnalyzeIndexRequestDescriptor : RequestDescriptor, AnalyzeIndexRequestParameters> -{ - internal AnalyzeIndexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public AnalyzeIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public AnalyzeIndexRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementAnalyze; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.analyze"; - - public AnalyzeIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - private string? AnalyzerValue { get; set; } - private ICollection? AttributesValue { get; set; } - private ICollection? CharFilterValue { get; set; } - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private string? NormalizerValue { get; set; } - private ICollection? TextValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? TokenizerValue { get; set; } - - /// - /// - /// The name of the analyzer that should be applied to the provided text. - /// This could be a built-in analyzer, or an analyzer that’s been configured in the index. - /// - /// - public AnalyzeIndexRequestDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Array of token attributes used to filter the output of the explain parameter. - /// - /// - public AnalyzeIndexRequestDescriptor Attributes(ICollection? attributes) - { - AttributesValue = attributes; - return Self; - } - - /// - /// - /// Array of character filters used to preprocess characters before the tokenizer. - /// - /// - public AnalyzeIndexRequestDescriptor CharFilter(ICollection? charFilter) - { - CharFilterValue = charFilter; - return Self; - } - - /// - /// - /// If true, the response includes token attributes and additional details. - /// - /// - public AnalyzeIndexRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - public AnalyzeIndexRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - public AnalyzeIndexRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - public AnalyzeIndexRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Array of token filters used to apply after the tokenizer. - /// - /// - public AnalyzeIndexRequestDescriptor Filter(ICollection? filter) - { - FilterValue = filter; - return Self; - } - - /// - /// - /// Normalizer to use to convert text into a single token. - /// - /// - public AnalyzeIndexRequestDescriptor Normalizer(string? normalizer) - { - NormalizerValue = normalizer; - return Self; - } - - /// - /// - /// Text to analyze. - /// If an array of strings is provided, it is analyzed as a multi-value field. - /// - /// - public AnalyzeIndexRequestDescriptor Text(ICollection? text) - { - TextValue = text; - return Self; - } - - /// - /// - /// Tokenizer to use to convert text into tokens. - /// - /// - public AnalyzeIndexRequestDescriptor Tokenizer(Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? tokenizer) - { - TokenizerValue = tokenizer; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AttributesValue is not null) - { - writer.WritePropertyName("attributes"); - JsonSerializer.Serialize(writer, AttributesValue, options); - } - - if (CharFilterValue is not null) - { - writer.WritePropertyName("char_filter"); - JsonSerializer.Serialize(writer, CharFilterValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (!string.IsNullOrEmpty(NormalizerValue)) - { - writer.WritePropertyName("normalizer"); - writer.WriteStringValue(NormalizerValue); - } - - if (TextValue is not null) - { - writer.WritePropertyName("text"); - SingleOrManySerializationHelper.Serialize(TextValue, writer, options); - } - - if (TokenizerValue is not null) - { - writer.WritePropertyName("tokenizer"); - JsonSerializer.Serialize(writer, TokenizerValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get tokens from text analysis. -/// The analyze API performs analysis on a text string and returns the resulting tokens. -/// -/// -public sealed partial class AnalyzeIndexRequestDescriptor : RequestDescriptor -{ - internal AnalyzeIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public AnalyzeIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public AnalyzeIndexRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementAnalyze; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.analyze"; - - public AnalyzeIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - private string? AnalyzerValue { get; set; } - private ICollection? AttributesValue { get; set; } - private ICollection? CharFilterValue { get; set; } - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private string? NormalizerValue { get; set; } - private ICollection? TextValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? TokenizerValue { get; set; } - - /// - /// - /// The name of the analyzer that should be applied to the provided text. - /// This could be a built-in analyzer, or an analyzer that’s been configured in the index. - /// - /// - public AnalyzeIndexRequestDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Array of token attributes used to filter the output of the explain parameter. - /// - /// - public AnalyzeIndexRequestDescriptor Attributes(ICollection? attributes) - { - AttributesValue = attributes; - return Self; - } - - /// - /// - /// Array of character filters used to preprocess characters before the tokenizer. - /// - /// - public AnalyzeIndexRequestDescriptor CharFilter(ICollection? charFilter) - { - CharFilterValue = charFilter; - return Self; - } - - /// - /// - /// If true, the response includes token attributes and additional details. - /// - /// - public AnalyzeIndexRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - public AnalyzeIndexRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - public AnalyzeIndexRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field used to derive the analyzer. - /// To use this parameter, you must specify an index. - /// If specified, the analyzer parameter overrides this value. - /// - /// - public AnalyzeIndexRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Array of token filters used to apply after the tokenizer. - /// - /// - public AnalyzeIndexRequestDescriptor Filter(ICollection? filter) - { - FilterValue = filter; - return Self; - } - - /// - /// - /// Normalizer to use to convert text into a single token. - /// - /// - public AnalyzeIndexRequestDescriptor Normalizer(string? normalizer) - { - NormalizerValue = normalizer; - return Self; - } - - /// - /// - /// Text to analyze. - /// If an array of strings is provided, it is analyzed as a multi-value field. - /// - /// - public AnalyzeIndexRequestDescriptor Text(ICollection? text) - { - TextValue = text; - return Self; - } - - /// - /// - /// Tokenizer to use to convert text into tokens. - /// - /// - public AnalyzeIndexRequestDescriptor Tokenizer(Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? tokenizer) - { - TokenizerValue = tokenizer; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AttributesValue is not null) - { - writer.WritePropertyName("attributes"); - JsonSerializer.Serialize(writer, AttributesValue, options); - } - - if (CharFilterValue is not null) - { - writer.WritePropertyName("char_filter"); - JsonSerializer.Serialize(writer, CharFilterValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (!string.IsNullOrEmpty(NormalizerValue)) - { - writer.WritePropertyName("normalizer"); - writer.WriteStringValue(NormalizerValue); - } - - if (TextValue is not null) - { - writer.WritePropertyName("text"); - SingleOrManySerializationHelper.Serialize(TextValue, writer, options); - } - - if (TokenizerValue is not null) - { - writer.WritePropertyName("tokenizer"); - JsonSerializer.Serialize(writer, TokenizerValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexResponse.g.cs deleted file mode 100644 index e2a51c4d93c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/AnalyzeIndexResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AnalyzeIndexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("detail")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.AnalyzeDetail? Detail { get; init; } - [JsonInclude, JsonPropertyName("tokens")] - public IReadOnlyCollection? Tokens { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs deleted file mode 100644 index 80013f19d4e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs +++ /dev/null @@ -1,267 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ClearCacheRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, clears the fields cache. - /// Use the fields parameter to clear the cache of specific fields only. - /// - /// - public bool? Fielddata { get => Q("fielddata"); set => Q("fielddata", value); } - - /// - /// - /// Comma-separated list of field names used to limit the fielddata parameter. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, clears the query cache. - /// - /// - public bool? Query { get => Q("query"); set => Q("query", value); } - - /// - /// - /// If true, clears the request cache. - /// - /// - public bool? Request { get => Q("request"); set => Q("request", value); } -} - -/// -/// -/// Clear the cache. -/// Clear the cache of one or more indices. -/// For data streams, the API clears the caches of the stream's backing indices. -/// -/// -public sealed partial class ClearCacheRequest : PlainRequest -{ - public ClearCacheRequest() - { - } - - public ClearCacheRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClearCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.clear_cache"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, clears the fields cache. - /// Use the fields parameter to clear the cache of specific fields only. - /// - /// - [JsonIgnore] - public bool? Fielddata { get => Q("fielddata"); set => Q("fielddata", value); } - - /// - /// - /// Comma-separated list of field names used to limit the fielddata parameter. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, clears the query cache. - /// - /// - [JsonIgnore] - public bool? Query { get => Q("query"); set => Q("query", value); } - - /// - /// - /// If true, clears the request cache. - /// - /// - [JsonIgnore] - public bool? Request { get => Q("request"); set => Q("request", value); } -} - -/// -/// -/// Clear the cache. -/// Clear the cache of one or more indices. -/// For data streams, the API clears the caches of the stream's backing indices. -/// -/// -public sealed partial class ClearCacheRequestDescriptor : RequestDescriptor, ClearCacheRequestParameters> -{ - internal ClearCacheRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ClearCacheRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public ClearCacheRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClearCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.clear_cache"; - - public ClearCacheRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ClearCacheRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ClearCacheRequestDescriptor Fielddata(bool? fielddata = true) => Qs("fielddata", fielddata); - public ClearCacheRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public ClearCacheRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ClearCacheRequestDescriptor Query(bool? query = true) => Qs("query", query); - public ClearCacheRequestDescriptor Request(bool? request = true) => Qs("request", request); - - public ClearCacheRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Clear the cache. -/// Clear the cache of one or more indices. -/// For data streams, the API clears the caches of the stream's backing indices. -/// -/// -public sealed partial class ClearCacheRequestDescriptor : RequestDescriptor -{ - internal ClearCacheRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearCacheRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public ClearCacheRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClearCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.clear_cache"; - - public ClearCacheRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ClearCacheRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ClearCacheRequestDescriptor Fielddata(bool? fielddata = true) => Qs("fielddata", fielddata); - public ClearCacheRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public ClearCacheRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ClearCacheRequestDescriptor Query(bool? query = true) => Qs("query", query); - public ClearCacheRequestDescriptor Request(bool? request = true) => Qs("request", request); - - public ClearCacheRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs deleted file mode 100644 index 17ef061beb2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ClearCacheResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs deleted file mode 100644 index 4f8c0fcc4d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexRequest.g.cs +++ /dev/null @@ -1,303 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CloseIndexRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Close an index. -/// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. -/// It is not possible to index documents or to search for documents in a closed index. -/// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. -/// -/// -/// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. -/// The shards will then go through the normal recovery process. -/// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. -/// -/// -/// You can open and close multiple indices. -/// An error is thrown if the request explicitly refers to a missing index. -/// This behaviour can be turned off using the ignore_unavailable=true parameter. -/// -/// -/// By default, you must explicitly name the indices you are opening or closing. -/// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. -/// -/// -/// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. -/// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. -/// -/// -public sealed partial class CloseIndexRequest : PlainRequest -{ - public CloseIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClose; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.close"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Close an index. -/// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. -/// It is not possible to index documents or to search for documents in a closed index. -/// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. -/// -/// -/// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. -/// The shards will then go through the normal recovery process. -/// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. -/// -/// -/// You can open and close multiple indices. -/// An error is thrown if the request explicitly refers to a missing index. -/// This behaviour can be turned off using the ignore_unavailable=true parameter. -/// -/// -/// By default, you must explicitly name the indices you are opening or closing. -/// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. -/// -/// -/// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. -/// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. -/// -/// -public sealed partial class CloseIndexRequestDescriptor : RequestDescriptor, CloseIndexRequestParameters> -{ - internal CloseIndexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public CloseIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public CloseIndexRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClose; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.close"; - - public CloseIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CloseIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public CloseIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public CloseIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CloseIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public CloseIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public CloseIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Close an index. -/// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. -/// It is not possible to index documents or to search for documents in a closed index. -/// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. -/// -/// -/// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. -/// The shards will then go through the normal recovery process. -/// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. -/// -/// -/// You can open and close multiple indices. -/// An error is thrown if the request explicitly refers to a missing index. -/// This behaviour can be turned off using the ignore_unavailable=true parameter. -/// -/// -/// By default, you must explicitly name the indices you are opening or closing. -/// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. -/// -/// -/// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. -/// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. -/// -/// -public sealed partial class CloseIndexRequestDescriptor : RequestDescriptor -{ - internal CloseIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public CloseIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementClose; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.close"; - - public CloseIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public CloseIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public CloseIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public CloseIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CloseIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public CloseIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public CloseIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexResponse.g.cs deleted file mode 100644 index 26696939f0e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CloseIndexResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CloseIndexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("indices")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CloseIndexResult))] - public IReadOnlyDictionary Indices { get; init; } - [JsonInclude, JsonPropertyName("shards_acknowledged")] - public bool ShardsAcknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs deleted file mode 100644 index b9173b90ce0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs +++ /dev/null @@ -1,123 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CreateDataStreamRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create a data stream. -/// Creates a data stream. -/// You must have a matching index template with data stream enabled. -/// -/// -public sealed partial class CreateDataStreamRequest : PlainRequest -{ - public CreateDataStreamRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamName name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementCreateDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.create_data_stream"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create a data stream. -/// Creates a data stream. -/// You must have a matching index template with data stream enabled. -/// -/// -public sealed partial class CreateDataStreamRequestDescriptor : RequestDescriptor -{ - internal CreateDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); - - public CreateDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.DataStreamName name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementCreateDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.create_data_stream"; - - public CreateDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CreateDataStreamRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public CreateDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamName name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamResponse.g.cs deleted file mode 100644 index a52e895259d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateDataStreamResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CreateDataStreamResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs deleted file mode 100644 index 746e53173e0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs +++ /dev/null @@ -1,493 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CreateIndexRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Create an index. -/// Creates a new index. -/// -/// -public sealed partial class CreateIndexRequest : PlainRequest -{ - public CreateIndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.create"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// Aliases for the index. - /// - /// - [JsonInclude, JsonPropertyName("aliases")] - public IDictionary? Aliases { get; set; } - - /// - /// - /// Mapping for fields in the index. If specified, this mapping can include: - /// - /// - /// - /// - /// Field names - /// - /// - /// - /// - /// Field data types - /// - /// - /// - /// - /// Mapping parameters - /// - /// - /// - /// - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; set; } - - /// - /// - /// Configuration options for the index. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; } -} - -/// -/// -/// Create an index. -/// Creates a new index. -/// -/// -public sealed partial class CreateIndexRequestDescriptor : RequestDescriptor, CreateIndexRequestParameters> -{ - internal CreateIndexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public CreateIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - public CreateIndexRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.create"; - - public CreateIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CreateIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public CreateIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private IDictionary> AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action> MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - - /// - /// - /// Aliases for the index. - /// - /// - public CreateIndexRequestDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Mapping for fields in the index. If specified, this mapping can include: - /// - /// - /// - /// - /// Field names - /// - /// - /// - /// - /// Field data types - /// - /// - /// - /// - /// Mapping parameters - /// - /// - /// - /// - public CreateIndexRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public CreateIndexRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public CreateIndexRequestDescriptor Mappings(Action> configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configuration options for the index. - /// - /// - public CreateIndexRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public CreateIndexRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public CreateIndexRequestDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create an index. -/// Creates a new index. -/// -/// -public sealed partial class CreateIndexRequestDescriptor : RequestDescriptor -{ - internal CreateIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public CreateIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.create"; - - public CreateIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CreateIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public CreateIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private IDictionary AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - - /// - /// - /// Aliases for the index. - /// - /// - public CreateIndexRequestDescriptor Aliases(Func, FluentDescriptorDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Mapping for fields in the index. If specified, this mapping can include: - /// - /// - /// - /// - /// Field names - /// - /// - /// - /// - /// Field data types - /// - /// - /// - /// - /// Mapping parameters - /// - /// - /// - /// - public CreateIndexRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public CreateIndexRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public CreateIndexRequestDescriptor Mappings(Action configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configuration options for the index. - /// - /// - public CreateIndexRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public CreateIndexRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public CreateIndexRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexResponse.g.cs deleted file mode 100644 index 16a1cc6de10..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CreateIndexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("shards_acknowledged")] - public bool ShardsAcknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsRequest.g.cs deleted file mode 100644 index 71d611237d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsRequest.g.cs +++ /dev/null @@ -1,115 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamsStatsRequestParameters : RequestParameters -{ - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } -} - -/// -/// -/// Get data stream stats. -/// Retrieves statistics for one or more data streams. -/// -/// -public sealed partial class DataStreamsStatsRequest : PlainRequest -{ - public DataStreamsStatsRequest() - { - } - - public DataStreamsStatsRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDataStreamsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.data_streams_stats"; - - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } -} - -/// -/// -/// Get data stream stats. -/// Retrieves statistics for one or more data streams. -/// -/// -public sealed partial class DataStreamsStatsRequestDescriptor : RequestDescriptor -{ - internal DataStreamsStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamsStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? name) : base(r => r.Optional("name", name)) - { - } - - public DataStreamsStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDataStreamsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.data_streams_stats"; - - public DataStreamsStatsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - - public DataStreamsStatsRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.IndexName? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsResponse.g.cs deleted file mode 100644 index 138befc6cfe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DataStreamsStatsResponse.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamsStatsResponse : ElasticsearchResponse -{ - /// - /// - /// Total number of backing indices for the selected data streams. - /// - /// - [JsonInclude, JsonPropertyName("backing_indices")] - public int BackingIndices { get; init; } - - /// - /// - /// Total number of selected data streams. - /// - /// - [JsonInclude, JsonPropertyName("data_stream_count")] - public int DataStreamCount { get; init; } - - /// - /// - /// Contains statistics for the selected data streams. - /// - /// - [JsonInclude, JsonPropertyName("data_streams")] - public IReadOnlyCollection DataStreams { get; init; } - - /// - /// - /// Contains information about shards that attempted to execute the request. - /// - /// - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - - /// - /// - /// Total size, in bytes, of all shards for the selected data streams. - /// - /// - [JsonInclude, JsonPropertyName("total_store_size_bytes")] - public long TotalStoreSizeBytes { get; init; } - - /// - /// - /// Total size of all shards for the selected data streams. - /// This property is included only if the human query parameter is true - /// - /// - [JsonInclude, JsonPropertyName("total_store_sizes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TotalStoreSizes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs deleted file mode 100644 index 7e96e2d1523..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs +++ /dev/null @@ -1,177 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteAliasRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete an alias. -/// Removes a data stream or index from an alias. -/// -/// -public sealed partial class DeleteAliasRequest : PlainRequest -{ - public DeleteAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("index", indices).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_alias"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete an alias. -/// Removes a data stream or index from an alias. -/// -/// -public sealed partial class DeleteAliasRequestDescriptor : RequestDescriptor, DeleteAliasRequestParameters> -{ - internal DeleteAliasRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("index", indices).Required("name", name)) - { - } - - public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : this(typeof(TDocument), name) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_alias"; - - public DeleteAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - public DeleteAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete an alias. -/// Removes a data stream or index from an alias. -/// -/// -public sealed partial class DeleteAliasRequestDescriptor : RequestDescriptor -{ - internal DeleteAliasRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("index", indices).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_alias"; - - public DeleteAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - public DeleteAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs deleted file mode 100644 index befb38314ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteAliasResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteAliasResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs deleted file mode 100644 index d51c20ece9f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleRequest.g.cs +++ /dev/null @@ -1,137 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteDataLifecycleRequestParameters : RequestParameters -{ - /// - /// - /// Whether wildcard expressions should get expanded to open or closed indices (default: open) - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Specify timeout for connection to master - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit timestamp for the document - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete data stream lifecycles. -/// Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. -/// -/// -public sealed partial class DeleteDataLifecycleRequest : PlainRequest -{ - public DeleteDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_data_lifecycle"; - - /// - /// - /// Whether wildcard expressions should get expanded to open or closed indices (default: open) - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Specify timeout for connection to master - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit timestamp for the document - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete data stream lifecycles. -/// Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. -/// -/// -public sealed partial class DeleteDataLifecycleRequestDescriptor : RequestDescriptor -{ - internal DeleteDataLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_data_lifecycle"; - - public DeleteDataLifecycleRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public DeleteDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteDataLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteDataLifecycleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleResponse.g.cs deleted file mode 100644 index eae7ae00e1b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataLifecycleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteDataLifecycleResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs deleted file mode 100644 index bf4d32f7578..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteDataStreamRequestParameters : RequestParameters -{ - /// - /// - /// Type of data stream that wildcard patterns can match. Supports comma-separated values,such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Delete data streams. -/// Deletes one or more data streams and their backing indices. -/// -/// -public sealed partial class DeleteDataStreamRequest : PlainRequest -{ - public DeleteDataStreamRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_data_stream"; - - /// - /// - /// Type of data stream that wildcard patterns can match. Supports comma-separated values,such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Delete data streams. -/// Deletes one or more data streams and their backing indices. -/// -/// -public sealed partial class DeleteDataStreamRequestDescriptor : RequestDescriptor -{ - internal DeleteDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_data_stream"; - - public DeleteDataStreamRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public DeleteDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public DeleteDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamResponse.g.cs deleted file mode 100644 index 74b889a2db1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteDataStreamResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteDataStreamResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs deleted file mode 100644 index b9999ccd09b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs +++ /dev/null @@ -1,224 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteIndexRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete indices. -/// Deletes one or more indices. -/// -/// -public sealed partial class DeleteIndexRequest : PlainRequest -{ - public DeleteIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete indices. -/// Deletes one or more indices. -/// -/// -public sealed partial class DeleteIndexRequestDescriptor : RequestDescriptor, DeleteIndexRequestParameters> -{ - internal DeleteIndexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public DeleteIndexRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete"; - - public DeleteIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public DeleteIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public DeleteIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete indices. -/// Deletes one or more indices. -/// -/// -public sealed partial class DeleteIndexRequestDescriptor : RequestDescriptor -{ - internal DeleteIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete"; - - public DeleteIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public DeleteIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public DeleteIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public DeleteIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexResponse.g.cs deleted file mode 100644 index b0aee2bc50b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexResponse.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteIndexResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs deleted file mode 100644 index 41a810306d5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateRequest.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteIndexTemplateRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete an index template. -/// The provided <index-template> may contain multiple template names separated by a comma. If multiple template -/// names are specified then there is no wildcard support and the provided names should match completely with -/// existing templates. -/// -/// -public sealed partial class DeleteIndexTemplateRequest : PlainRequest -{ - public DeleteIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_index_template"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete an index template. -/// The provided <index-template> may contain multiple template names separated by a comma. If multiple template -/// names are specified then there is no wildcard support and the provided names should match completely with -/// existing templates. -/// -/// -public sealed partial class DeleteIndexTemplateRequestDescriptor : RequestDescriptor -{ - internal DeleteIndexTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementDeleteIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.delete_index_template"; - - public DeleteIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteIndexTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateResponse.g.cs deleted file mode 100644 index f90d768e4c0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/DeleteIndexTemplateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DeleteIndexTemplateResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs deleted file mode 100644 index 8eb2b3e9c0e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs +++ /dev/null @@ -1,225 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExistsAliasRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, requests that include a missing data stream or index in the target indices or data streams return an error. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Check aliases. -/// Checks if one or more data stream or index aliases exist. -/// -/// -public sealed partial class ExistsAliasRequest : PlainRequest -{ - public ExistsAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - public ExistsAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Optional("index", indices).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExistsAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists_alias"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, requests that include a missing data stream or index in the target indices or data streams return an error. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Check aliases. -/// Checks if one or more data stream or index aliases exist. -/// -/// -public sealed partial class ExistsAliasRequestDescriptor : RequestDescriptor, ExistsAliasRequestParameters> -{ - internal ExistsAliasRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Optional("index", indices).Required("name", name)) - { - } - - public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExistsAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists_alias"; - - public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ExistsAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ExistsAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public ExistsAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public ExistsAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Check aliases. -/// Checks if one or more data stream or index aliases exist. -/// -/// -public sealed partial class ExistsAliasRequestDescriptor : RequestDescriptor -{ - internal ExistsAliasRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Optional("index", indices).Required("name", name)) - { - } - - public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExistsAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists_alias"; - - public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ExistsAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ExistsAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public ExistsAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public ExistsAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasResponse.g.cs deleted file mode 100644 index 228b5a39e5d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsAliasResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExistsAliasResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs deleted file mode 100644 index f6c50a64295..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExistsIndexTemplateRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Check index templates. -/// Check whether index templates exist. -/// -/// -public sealed partial class ExistsIndexTemplateRequest : PlainRequest -{ - public ExistsIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExistsIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists_index_template"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Check index templates. -/// Check whether index templates exist. -/// -/// -public sealed partial class ExistsIndexTemplateRequestDescriptor : RequestDescriptor -{ - internal ExistsIndexTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExistsIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExistsIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists_index_template"; - - public ExistsIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public ExistsIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateResponse.g.cs deleted file mode 100644 index 870f4b00dc8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsIndexTemplateResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExistsIndexTemplateResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsRequest.g.cs deleted file mode 100644 index 0236d6f8fb4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsRequest.g.cs +++ /dev/null @@ -1,237 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExistsRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } -} - -/// -/// -/// Check indices. -/// Checks if one or more indices, index aliases, or data streams exist. -/// -/// -public sealed partial class ExistsRequest : PlainRequest -{ - public ExistsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExists; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } -} - -/// -/// -/// Check indices. -/// Checks if one or more indices, index aliases, or data streams exist. -/// -/// -public sealed partial class ExistsRequestDescriptor : RequestDescriptor, ExistsRequestParameters> -{ - internal ExistsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public ExistsRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExists; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists"; - - public ExistsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ExistsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ExistsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public ExistsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ExistsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public ExistsRequestDescriptor Local(bool? local = true) => Qs("local", local); - - public ExistsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Check indices. -/// Checks if one or more indices, index aliases, or data streams exist. -/// -/// -public sealed partial class ExistsRequestDescriptor : RequestDescriptor -{ - internal ExistsRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExists; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.exists"; - - public ExistsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ExistsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ExistsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public ExistsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ExistsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public ExistsRequestDescriptor Local(bool? local = true) => Qs("local", local); - - public ExistsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsResponse.g.cs deleted file mode 100644 index 3c3e6a3cfcb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExistsResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExistsResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs deleted file mode 100644 index c9e18ea9330..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleRequest.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExplainDataLifecycleRequestParameters : RequestParameters -{ - /// - /// - /// indicates if the API should return the default values the system uses for the index's lifecycle - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Specify timeout for connection to master - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get the status for a data stream lifecycle. -/// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. -/// -/// -public sealed partial class ExplainDataLifecycleRequest : PlainRequest -{ - public ExplainDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExplainDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.explain_data_lifecycle"; - - /// - /// - /// indicates if the API should return the default values the system uses for the index's lifecycle - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Specify timeout for connection to master - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get the status for a data stream lifecycle. -/// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. -/// -/// -public sealed partial class ExplainDataLifecycleRequestDescriptor : RequestDescriptor, ExplainDataLifecycleRequestParameters> -{ - internal ExplainDataLifecycleRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExplainDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public ExplainDataLifecycleRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExplainDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.explain_data_lifecycle"; - - public ExplainDataLifecycleRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public ExplainDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public ExplainDataLifecycleRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get the status for a data stream lifecycle. -/// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. -/// -/// -public sealed partial class ExplainDataLifecycleRequestDescriptor : RequestDescriptor -{ - internal ExplainDataLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExplainDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementExplainDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.explain_data_lifecycle"; - - public ExplainDataLifecycleRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public ExplainDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public ExplainDataLifecycleRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleResponse.g.cs deleted file mode 100644 index 00f3c417846..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ExplainDataLifecycleResponse.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ExplainDataLifecycleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("indices")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleExplain))] - public IReadOnlyDictionary Indices { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushRequest.g.cs deleted file mode 100644 index 7b5eebb2719..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushRequest.g.cs +++ /dev/null @@ -1,263 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class FlushRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, the request forces a flush even if there are no changes to commit to the index. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, the flush operation blocks until execution when another flush operation is running. - /// If false, Elasticsearch returns an error if you request a flush when another flush operation is running. - /// - /// - public bool? WaitIfOngoing { get => Q("wait_if_ongoing"); set => Q("wait_if_ongoing", value); } -} - -/// -/// -/// Flush data streams or indices. -/// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. -/// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. -/// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. -/// -/// -/// After each operation has been flushed it is permanently stored in the Lucene index. -/// This may mean that there is no need to maintain an additional copy of it in the transaction log. -/// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. -/// -/// -/// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. -/// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. -/// -/// -public sealed partial class FlushRequest : PlainRequest -{ - public FlushRequest() - { - } - - public FlushRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementFlush; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.flush"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, the request forces a flush even if there are no changes to commit to the index. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, the flush operation blocks until execution when another flush operation is running. - /// If false, Elasticsearch returns an error if you request a flush when another flush operation is running. - /// - /// - [JsonIgnore] - public bool? WaitIfOngoing { get => Q("wait_if_ongoing"); set => Q("wait_if_ongoing", value); } -} - -/// -/// -/// Flush data streams or indices. -/// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. -/// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. -/// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. -/// -/// -/// After each operation has been flushed it is permanently stored in the Lucene index. -/// This may mean that there is no need to maintain an additional copy of it in the transaction log. -/// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. -/// -/// -/// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. -/// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. -/// -/// -public sealed partial class FlushRequestDescriptor : RequestDescriptor, FlushRequestParameters> -{ - internal FlushRequestDescriptor(Action> configure) => configure.Invoke(this); - - public FlushRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public FlushRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementFlush; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.flush"; - - public FlushRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public FlushRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public FlushRequestDescriptor Force(bool? force = true) => Qs("force", force); - public FlushRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public FlushRequestDescriptor WaitIfOngoing(bool? waitIfOngoing = true) => Qs("wait_if_ongoing", waitIfOngoing); - - public FlushRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Flush data streams or indices. -/// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. -/// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. -/// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. -/// -/// -/// After each operation has been flushed it is permanently stored in the Lucene index. -/// This may mean that there is no need to maintain an additional copy of it in the transaction log. -/// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. -/// -/// -/// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. -/// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. -/// -/// -public sealed partial class FlushRequestDescriptor : RequestDescriptor -{ - internal FlushRequestDescriptor(Action configure) => configure.Invoke(this); - - public FlushRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public FlushRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementFlush; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.flush"; - - public FlushRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public FlushRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public FlushRequestDescriptor Force(bool? force = true) => Qs("force", force); - public FlushRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public FlushRequestDescriptor WaitIfOngoing(bool? waitIfOngoing = true) => Qs("wait_if_ongoing", waitIfOngoing); - - public FlushRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs deleted file mode 100644 index 687c6c94df6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class FlushResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs deleted file mode 100644 index 059b8f1fe40..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs +++ /dev/null @@ -1,293 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ForcemergeRequestParameters : RequestParameters -{ - /// - /// - /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Specify whether the index should be flushed after performing the operation (default: true) - /// - /// - public bool? Flush { get => Q("flush"); set => Q("flush", value); } - - /// - /// - /// Whether specified concrete indices should be ignored when unavailable (missing or closed) - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// The number of segments the index should be merged into (default: dynamic) - /// - /// - public long? MaxNumSegments { get => Q("max_num_segments"); set => Q("max_num_segments", value); } - - /// - /// - /// Specify whether the operation should only expunge deleted documents - /// - /// - public bool? OnlyExpungeDeletes { get => Q("only_expunge_deletes"); set => Q("only_expunge_deletes", value); } - - /// - /// - /// Should the request wait until the force merge is completed. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Force a merge. -/// Perform the force merge operation on the shards of one or more indices. -/// For data streams, the API forces a merge on the shards of the stream's backing indices. -/// -/// -/// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. -/// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. -/// -/// -/// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). -/// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". -/// These soft-deleted documents are automatically cleaned up during regular segment merges. -/// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. -/// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. -/// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. -/// -/// -public sealed partial class ForcemergeRequest : PlainRequest -{ - public ForcemergeRequest() - { - } - - public ForcemergeRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementForcemerge; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.forcemerge"; - - /// - /// - /// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified) - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Specify whether the index should be flushed after performing the operation (default: true) - /// - /// - [JsonIgnore] - public bool? Flush { get => Q("flush"); set => Q("flush", value); } - - /// - /// - /// Whether specified concrete indices should be ignored when unavailable (missing or closed) - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// The number of segments the index should be merged into (default: dynamic) - /// - /// - [JsonIgnore] - public long? MaxNumSegments { get => Q("max_num_segments"); set => Q("max_num_segments", value); } - - /// - /// - /// Specify whether the operation should only expunge deleted documents - /// - /// - [JsonIgnore] - public bool? OnlyExpungeDeletes { get => Q("only_expunge_deletes"); set => Q("only_expunge_deletes", value); } - - /// - /// - /// Should the request wait until the force merge is completed. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Force a merge. -/// Perform the force merge operation on the shards of one or more indices. -/// For data streams, the API forces a merge on the shards of the stream's backing indices. -/// -/// -/// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. -/// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. -/// -/// -/// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). -/// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". -/// These soft-deleted documents are automatically cleaned up during regular segment merges. -/// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. -/// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. -/// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. -/// -/// -public sealed partial class ForcemergeRequestDescriptor : RequestDescriptor, ForcemergeRequestParameters> -{ - internal ForcemergeRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ForcemergeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public ForcemergeRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementForcemerge; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.forcemerge"; - - public ForcemergeRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ForcemergeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ForcemergeRequestDescriptor Flush(bool? flush = true) => Qs("flush", flush); - public ForcemergeRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ForcemergeRequestDescriptor MaxNumSegments(long? maxNumSegments) => Qs("max_num_segments", maxNumSegments); - public ForcemergeRequestDescriptor OnlyExpungeDeletes(bool? onlyExpungeDeletes = true) => Qs("only_expunge_deletes", onlyExpungeDeletes); - public ForcemergeRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public ForcemergeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Force a merge. -/// Perform the force merge operation on the shards of one or more indices. -/// For data streams, the API forces a merge on the shards of the stream's backing indices. -/// -/// -/// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. -/// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. -/// -/// -/// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). -/// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". -/// These soft-deleted documents are automatically cleaned up during regular segment merges. -/// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. -/// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. -/// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. -/// -/// -public sealed partial class ForcemergeRequestDescriptor : RequestDescriptor -{ - internal ForcemergeRequestDescriptor(Action configure) => configure.Invoke(this); - - public ForcemergeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public ForcemergeRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementForcemerge; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.forcemerge"; - - public ForcemergeRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ForcemergeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ForcemergeRequestDescriptor Flush(bool? flush = true) => Qs("flush", flush); - public ForcemergeRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ForcemergeRequestDescriptor MaxNumSegments(long? maxNumSegments) => Qs("max_num_segments", maxNumSegments); - public ForcemergeRequestDescriptor OnlyExpungeDeletes(bool? onlyExpungeDeletes = true) => Qs("only_expunge_deletes", onlyExpungeDeletes); - public ForcemergeRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public ForcemergeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs deleted file mode 100644 index a26e677edd8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ForcemergeResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } - - /// - /// - /// task contains a task id returned when wait_for_completion=false, - /// you can use the task_id to get the status of the task at _tasks/<task_id> - /// - /// - [JsonInclude, JsonPropertyName("task")] - public string? Task { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasRequest.g.cs deleted file mode 100644 index 3c367b7acb3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasRequest.g.cs +++ /dev/null @@ -1,233 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetAliasRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get aliases. -/// Retrieves information for one or more data stream or index aliases. -/// -/// -public sealed partial class GetAliasRequest : PlainRequest -{ - public GetAliasRequest() - { - } - - public GetAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - public GetAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) - { - } - - public GetAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_alias"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get aliases. -/// Retrieves information for one or more data stream or index aliases. -/// -/// -public sealed partial class GetAliasRequestDescriptor : RequestDescriptor, GetAliasRequestParameters> -{ - internal GetAliasRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) - { - } - - public GetAliasRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_alias"; - - public GetAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public GetAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get aliases. -/// Retrieves information for one or more data stream or index aliases. -/// -/// -public sealed partial class GetAliasRequestDescriptor : RequestDescriptor -{ - internal GetAliasRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) - { - } - - public GetAliasRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_alias"; - - public GetAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public GetAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasResponse.g.cs deleted file mode 100644 index 8a3bdeb2e55..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetAliasResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetAliasResponse : DictionaryResponse -{ - public GetAliasResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetAliasResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs deleted file mode 100644 index d01d9a3cf0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleRequest.g.cs +++ /dev/null @@ -1,141 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetDataLifecycleRequestParameters : RequestParameters -{ - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get data stream lifecycles. -/// Retrieves the data stream lifecycle configuration of one or more data streams. -/// -/// -public sealed partial class GetDataLifecycleRequest : PlainRequest -{ - public GetDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_data_lifecycle"; - - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get data stream lifecycles. -/// Retrieves the data stream lifecycle configuration of one or more data streams. -/// -/// -public sealed partial class GetDataLifecycleRequestDescriptor : RequestDescriptor -{ - internal GetDataLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_data_lifecycle"; - - public GetDataLifecycleRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetDataLifecycleRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetDataLifecycleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleResponse.g.cs deleted file mode 100644 index 4a0274cceec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataLifecycleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetDataLifecycleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("data_streams")] - public IReadOnlyCollection DataStreams { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs deleted file mode 100644 index 0875d040842..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamRequest.g.cs +++ /dev/null @@ -1,163 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetDataStreamRequestParameters : RequestParameters -{ - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Whether the maximum timestamp for each data stream should be calculated and returned. - /// - /// - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get data streams. -/// Retrieves information about one or more data streams. -/// -/// -public sealed partial class GetDataStreamRequest : PlainRequest -{ - public GetDataStreamRequest() - { - } - - public GetDataStreamRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_data_stream"; - - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Whether the maximum timestamp for each data stream should be calculated and returned. - /// - /// - [JsonIgnore] - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get data streams. -/// Retrieves information about one or more data streams. -/// -/// -public sealed partial class GetDataStreamRequestDescriptor : RequestDescriptor -{ - internal GetDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name) : base(r => r.Optional("name", name)) - { - } - - public GetDataStreamRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_data_stream"; - - public GetDataStreamRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetDataStreamRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public GetDataStreamRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public GetDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamResponse.g.cs deleted file mode 100644 index 6ce14db89d9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetDataStreamResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetDataStreamResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("data_streams")] - public IReadOnlyCollection DataStreams { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs deleted file mode 100644 index b75468eb210..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexRequest.g.cs +++ /dev/null @@ -1,274 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetIndexRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only - /// missing or closed indices. This behavior applies even if the request targets other open indices. For example, - /// a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard expressions can match. If the request can target data streams, this argument - /// determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - /// such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Return only information on specified index features - /// - /// - public ICollection? Features { get => Q?>("features"); set => Q("features", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If false, requests that target a missing index return an error. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get index information. -/// Returns information about one or more indices. For data streams, the API returns information about the -/// stream’s backing indices. -/// -/// -public sealed partial class GetIndexRequest : PlainRequest -{ - public GetIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only - /// missing or closed indices. This behavior applies even if the request targets other open indices. For example, - /// a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard expressions can match. If the request can target data streams, this argument - /// determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - /// such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Return only information on specified index features - /// - /// - [JsonIgnore] - public ICollection? Features { get => Q?>("features"); set => Q("features", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If false, requests that target a missing index return an error. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get index information. -/// Returns information about one or more indices. For data streams, the API returns information about the -/// stream’s backing indices. -/// -/// -public sealed partial class GetIndexRequestDescriptor : RequestDescriptor, GetIndexRequestParameters> -{ - internal GetIndexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public GetIndexRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get"; - - public GetIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetIndexRequestDescriptor Features(ICollection? features) => Qs("features", features); - public GetIndexRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetIndexRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetIndexRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get index information. -/// Returns information about one or more indices. For data streams, the API returns information about the -/// stream’s backing indices. -/// -/// -public sealed partial class GetIndexRequestDescriptor : RequestDescriptor -{ - internal GetIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get"; - - public GetIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetIndexRequestDescriptor Features(ICollection? features) => Qs("features", features); - public GetIndexRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetIndexRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetIndexRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexResponse.g.cs deleted file mode 100644 index b5a079fd310..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetIndexResponse : DictionaryResponse -{ - public GetIndexResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetIndexResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs deleted file mode 100644 index e75aa237879..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetIndexTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get index templates. -/// Returns information about one or more index templates. -/// -/// -public sealed partial class GetIndexTemplateRequest : PlainRequest -{ - public GetIndexTemplateRequest() - { - } - - public GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_index_template"; - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get index templates. -/// Returns information about one or more index templates. -/// -/// -public sealed partial class GetIndexTemplateRequestDescriptor : RequestDescriptor -{ - internal GetIndexTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - public GetIndexTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_index_template"; - - public GetIndexTemplateRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetIndexTemplateRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateResponse.g.cs deleted file mode 100644 index 101331f8170..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndexTemplateResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetIndexTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("index_templates")] - public IReadOnlyCollection IndexTemplates { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs deleted file mode 100644 index 0c47c6f8d5a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs +++ /dev/null @@ -1,295 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetIndicesSettingsRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index - /// alias, or _all value targets only missing or closed indices. This - /// behavior applies even if the request targets other open indices. For - /// example, a request targeting foo*,bar* returns an error if an index - /// starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. If - /// false, information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get index settings. -/// Returns setting information for one or more indices. For data streams, -/// returns setting information for the stream’s backing indices. -/// -/// -public sealed partial class GetIndicesSettingsRequest : PlainRequest -{ - public GetIndicesSettingsRequest() - { - } - - public GetIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public GetIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) - { - } - - public GetIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_settings"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index - /// alias, or _all value targets only missing or closed indices. This - /// behavior applies even if the request targets other open indices. For - /// example, a request targeting foo*,bar* returns an error if an index - /// starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, return all default settings in the response. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. If - /// false, information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get index settings. -/// Returns setting information for one or more indices. For data streams, -/// returns setting information for the stream’s backing indices. -/// -/// -public sealed partial class GetIndicesSettingsRequestDescriptor : RequestDescriptor, GetIndicesSettingsRequestParameters> -{ - internal GetIndicesSettingsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) - { - } - - public GetIndicesSettingsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_settings"; - - public GetIndicesSettingsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetIndicesSettingsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetIndicesSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetIndicesSettingsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetIndicesSettingsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetIndicesSettingsRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetIndicesSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIndicesSettingsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public GetIndicesSettingsRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get index settings. -/// Returns setting information for one or more indices. For data streams, -/// returns setting information for the stream’s backing indices. -/// -/// -public sealed partial class GetIndicesSettingsRequestDescriptor : RequestDescriptor -{ - internal GetIndicesSettingsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) - { - } - - public GetIndicesSettingsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_settings"; - - public GetIndicesSettingsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetIndicesSettingsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetIndicesSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public GetIndicesSettingsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetIndicesSettingsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public GetIndicesSettingsRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetIndicesSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIndicesSettingsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public GetIndicesSettingsRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs deleted file mode 100644 index 022f66617ee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetIndicesSettingsResponse : DictionaryResponse -{ - public GetIndicesSettingsResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetIndicesSettingsResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingRequest.g.cs deleted file mode 100644 index 966e283780e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingRequest.g.cs +++ /dev/null @@ -1,233 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetMappingRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get mapping definitions. -/// Retrieves mapping definitions for one or more indices. -/// For data streams, the API retrieves mappings for the stream’s backing indices. -/// -/// -public sealed partial class GetMappingRequest : PlainRequest -{ - public GetMappingRequest() - { - } - - public GetMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_mapping"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, the request retrieves information from the local node only. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get mapping definitions. -/// Retrieves mapping definitions for one or more indices. -/// For data streams, the API retrieves mappings for the stream’s backing indices. -/// -/// -public sealed partial class GetMappingRequestDescriptor : RequestDescriptor, GetMappingRequestParameters> -{ - internal GetMappingRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public GetMappingRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_mapping"; - - public GetMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetMappingRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetMappingRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get mapping definitions. -/// Retrieves mapping definitions for one or more indices. -/// For data streams, the API retrieves mappings for the stream’s backing indices. -/// -/// -public sealed partial class GetMappingRequestDescriptor : RequestDescriptor -{ - internal GetMappingRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public GetMappingRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.get_mapping"; - - public GetMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public GetMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public GetMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetMappingRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetMappingRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingResponse.g.cs deleted file mode 100644 index c809d68c529..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/GetMappingResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class GetMappingResponse : DictionaryResponse -{ - public GetMappingResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetMappingResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs deleted file mode 100644 index 99464aa8b9a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsRequest.g.cs +++ /dev/null @@ -1,348 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndicesStatsRequestParameters : RequestParameters -{ - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? CompletionFields { get => Q("completion_fields"); set => Q("completion_fields", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument - /// determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - /// such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata statistics. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? FielddataFields { get => Q("fielddata_fields"); set => Q("fielddata_fields", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If true, statistics are not collected from closed indices. - /// - /// - public bool? ForbidClosedIndices { get => Q("forbid_closed_indices"); set => Q("forbid_closed_indices", value); } - - /// - /// - /// Comma-separated list of search groups to include in the search statistics. - /// - /// - public ICollection? Groups { get => Q?>("groups"); set => Q("groups", value); } - - /// - /// - /// If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). - /// - /// - public bool? IncludeSegmentFileSizes { get => Q("include_segment_file_sizes"); set => Q("include_segment_file_sizes", value); } - - /// - /// - /// If true, the response includes information from segments that are not loaded into memory. - /// - /// - public bool? IncludeUnloadedSegments { get => Q("include_unloaded_segments"); set => Q("include_unloaded_segments", value); } - - /// - /// - /// Indicates whether statistics are aggregated at the cluster, index, or shard level. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Level? Level { get => Q("level"); set => Q("level", value); } -} - -/// -/// -/// Get index statistics. -/// For data streams, the API retrieves statistics for the stream's backing indices. -/// -/// -/// By default, the returned statistics are index-level with primaries and total aggregations. -/// primaries are the values for only the primary shards. -/// total are the accumulated values for both primary and replica shards. -/// -/// -/// To get shard-level statistics, set the level parameter to shards. -/// -/// -/// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. -/// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. -/// -/// -public sealed partial class IndicesStatsRequest : PlainRequest -{ - public IndicesStatsRequest() - { - } - - public IndicesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("metric", metric)) - { - } - - public IndicesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public IndicesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("index", indices).Optional("metric", metric)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.stats"; - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CompletionFields { get => Q("completion_fields"); set => Q("completion_fields", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument - /// determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - /// such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata statistics. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? FielddataFields { get => Q("fielddata_fields"); set => Q("fielddata_fields", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If true, statistics are not collected from closed indices. - /// - /// - [JsonIgnore] - public bool? ForbidClosedIndices { get => Q("forbid_closed_indices"); set => Q("forbid_closed_indices", value); } - - /// - /// - /// Comma-separated list of search groups to include in the search statistics. - /// - /// - [JsonIgnore] - public ICollection? Groups { get => Q?>("groups"); set => Q("groups", value); } - - /// - /// - /// If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). - /// - /// - [JsonIgnore] - public bool? IncludeSegmentFileSizes { get => Q("include_segment_file_sizes"); set => Q("include_segment_file_sizes", value); } - - /// - /// - /// If true, the response includes information from segments that are not loaded into memory. - /// - /// - [JsonIgnore] - public bool? IncludeUnloadedSegments { get => Q("include_unloaded_segments"); set => Q("include_unloaded_segments", value); } - - /// - /// - /// Indicates whether statistics are aggregated at the cluster, index, or shard level. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Level? Level { get => Q("level"); set => Q("level", value); } -} - -/// -/// -/// Get index statistics. -/// For data streams, the API retrieves statistics for the stream's backing indices. -/// -/// -/// By default, the returned statistics are index-level with primaries and total aggregations. -/// primaries are the values for only the primary shards. -/// total are the accumulated values for both primary and replica shards. -/// -/// -/// To get shard-level statistics, set the level parameter to shards. -/// -/// -/// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. -/// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. -/// -/// -public sealed partial class IndicesStatsRequestDescriptor : RequestDescriptor, IndicesStatsRequestParameters> -{ - internal IndicesStatsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public IndicesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("index", indices).Optional("metric", metric)) - { - } - - public IndicesStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.stats"; - - public IndicesStatsRequestDescriptor CompletionFields(Elastic.Clients.Elasticsearch.Serverless.Fields? completionFields) => Qs("completion_fields", completionFields); - public IndicesStatsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public IndicesStatsRequestDescriptor FielddataFields(Elastic.Clients.Elasticsearch.Serverless.Fields? fielddataFields) => Qs("fielddata_fields", fielddataFields); - public IndicesStatsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public IndicesStatsRequestDescriptor ForbidClosedIndices(bool? forbidClosedIndices = true) => Qs("forbid_closed_indices", forbidClosedIndices); - public IndicesStatsRequestDescriptor Groups(ICollection? groups) => Qs("groups", groups); - public IndicesStatsRequestDescriptor IncludeSegmentFileSizes(bool? includeSegmentFileSizes = true) => Qs("include_segment_file_sizes", includeSegmentFileSizes); - public IndicesStatsRequestDescriptor IncludeUnloadedSegments(bool? includeUnloadedSegments = true) => Qs("include_unloaded_segments", includeUnloadedSegments); - public IndicesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Serverless.Level? level) => Qs("level", level); - - public IndicesStatsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public IndicesStatsRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) - { - RouteValues.Optional("metric", metric); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get index statistics. -/// For data streams, the API retrieves statistics for the stream's backing indices. -/// -/// -/// By default, the returned statistics are index-level with primaries and total aggregations. -/// primaries are the values for only the primary shards. -/// total are the accumulated values for both primary and replica shards. -/// -/// -/// To get shard-level statistics, set the level parameter to shards. -/// -/// -/// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. -/// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. -/// -/// -public sealed partial class IndicesStatsRequestDescriptor : RequestDescriptor -{ - internal IndicesStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public IndicesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("index", indices).Optional("metric", metric)) - { - } - - public IndicesStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.stats"; - - public IndicesStatsRequestDescriptor CompletionFields(Elastic.Clients.Elasticsearch.Serverless.Fields? completionFields) => Qs("completion_fields", completionFields); - public IndicesStatsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public IndicesStatsRequestDescriptor FielddataFields(Elastic.Clients.Elasticsearch.Serverless.Fields? fielddataFields) => Qs("fielddata_fields", fielddataFields); - public IndicesStatsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public IndicesStatsRequestDescriptor ForbidClosedIndices(bool? forbidClosedIndices = true) => Qs("forbid_closed_indices", forbidClosedIndices); - public IndicesStatsRequestDescriptor Groups(ICollection? groups) => Qs("groups", groups); - public IndicesStatsRequestDescriptor IncludeSegmentFileSizes(bool? includeSegmentFileSizes = true) => Qs("include_segment_file_sizes", includeSegmentFileSizes); - public IndicesStatsRequestDescriptor IncludeUnloadedSegments(bool? includeUnloadedSegments = true) => Qs("include_unloaded_segments", includeUnloadedSegments); - public IndicesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Serverless.Level? level) => Qs("level", level); - - public IndicesStatsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - public IndicesStatsRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) - { - RouteValues.Optional("metric", metric); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs deleted file mode 100644 index adfc57c3a06..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/IndicesStatsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndicesStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("_all")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndicesStats All { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyDictionary? Indices { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs deleted file mode 100644 index 9bdaa0a0cfc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs +++ /dev/null @@ -1,139 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MigrateToDataStreamRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Convert an index alias to a data stream. -/// Converts an index alias to a data stream. -/// You must have a matching index template that is data stream enabled. -/// The alias must meet the following criteria: -/// The alias must have a write index; -/// All indices for the alias must have a @timestamp field mapping of a date or date_nanos field type; -/// The alias must not have any filters; -/// The alias must not use custom routing. -/// If successful, the request removes the alias and creates a data stream with the same name. -/// The indices for the alias become hidden backing indices for the stream. -/// The write index for the alias becomes the write index for the stream. -/// -/// -public sealed partial class MigrateToDataStreamRequest : PlainRequest -{ - public MigrateToDataStreamRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementMigrateToDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.migrate_to_data_stream"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Convert an index alias to a data stream. -/// Converts an index alias to a data stream. -/// You must have a matching index template that is data stream enabled. -/// The alias must meet the following criteria: -/// The alias must have a write index; -/// All indices for the alias must have a @timestamp field mapping of a date or date_nanos field type; -/// The alias must not have any filters; -/// The alias must not use custom routing. -/// If successful, the request removes the alias and creates a data stream with the same name. -/// The indices for the alias become hidden backing indices for the stream. -/// The write index for the alias becomes the write index for the stream. -/// -/// -public sealed partial class MigrateToDataStreamRequestDescriptor : RequestDescriptor -{ - internal MigrateToDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); - - public MigrateToDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementMigrateToDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.migrate_to_data_stream"; - - public MigrateToDataStreamRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public MigrateToDataStreamRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public MigrateToDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.IndexName name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.g.cs deleted file mode 100644 index 5e5077e08bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MigrateToDataStreamResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamRequest.g.cs deleted file mode 100644 index 13a2456efc9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamRequest.g.cs +++ /dev/null @@ -1,166 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ModifyDataStreamRequestParameters : RequestParameters -{ -} - -/// -/// -/// Update data streams. -/// Performs one or more data stream modification actions in a single atomic operation. -/// -/// -public sealed partial class ModifyDataStreamRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementModifyDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.modify_data_stream"; - - /// - /// - /// Actions to perform. - /// - /// - [JsonInclude, JsonPropertyName("actions")] - public ICollection Actions { get; set; } -} - -/// -/// -/// Update data streams. -/// Performs one or more data stream modification actions in a single atomic operation. -/// -/// -public sealed partial class ModifyDataStreamRequestDescriptor : RequestDescriptor -{ - internal ModifyDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); - - public ModifyDataStreamRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementModifyDataStream; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.modify_data_stream"; - - private ICollection ActionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexModifyDataStreamActionDescriptor ActionsDescriptor { get; set; } - private Action ActionsDescriptorAction { get; set; } - private Action[] ActionsDescriptorActions { get; set; } - - /// - /// - /// Actions to perform. - /// - /// - public ModifyDataStreamRequestDescriptor Actions(ICollection actions) - { - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = null; - ActionsValue = actions; - return Self; - } - - public ModifyDataStreamRequestDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexModifyDataStreamActionDescriptor descriptor) - { - ActionsValue = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = null; - ActionsDescriptor = descriptor; - return Self; - } - - public ModifyDataStreamRequestDescriptor Actions(Action configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorActions = null; - ActionsDescriptorAction = configure; - return Self; - } - - public ModifyDataStreamRequestDescriptor Actions(params Action[] configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsDescriptor is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ActionsDescriptor, options); - writer.WriteEndArray(); - } - else if (ActionsDescriptorAction is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexModifyDataStreamActionDescriptor(ActionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ActionsDescriptorActions is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - foreach (var action in ActionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexModifyDataStreamActionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamResponse.g.cs deleted file mode 100644 index 70e5ef0f6a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ModifyDataStreamResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ModifyDataStreamResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs deleted file mode 100644 index 2c0a31fa6b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs +++ /dev/null @@ -1,243 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class OpenIndexRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Opens a closed index. -/// For data streams, the API opens any closed backing indices. -/// -/// -public sealed partial class OpenIndexRequest : PlainRequest -{ - public OpenIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementOpen; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.open"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Opens a closed index. -/// For data streams, the API opens any closed backing indices. -/// -/// -public sealed partial class OpenIndexRequestDescriptor : RequestDescriptor, OpenIndexRequestParameters> -{ - internal OpenIndexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public OpenIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public OpenIndexRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementOpen; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.open"; - - public OpenIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public OpenIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public OpenIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public OpenIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public OpenIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public OpenIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public OpenIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Opens a closed index. -/// For data streams, the API opens any closed backing indices. -/// -/// -public sealed partial class OpenIndexRequestDescriptor : RequestDescriptor -{ - internal OpenIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public OpenIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementOpen; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.open"; - - public OpenIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public OpenIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public OpenIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public OpenIndexRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public OpenIndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public OpenIndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public OpenIndexRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexResponse.g.cs deleted file mode 100644 index 196b23e35d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/OpenIndexResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class OpenIndexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("shards_acknowledged")] - public bool ShardsAcknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasRequest.g.cs deleted file mode 100644 index 9a41aa815c3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasRequest.g.cs +++ /dev/null @@ -1,487 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutAliasRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update an alias. -/// Adds a data stream or index to an alias. -/// -/// -public sealed partial class PutAliasRequest : PlainRequest -{ - public PutAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("index", indices).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_alias"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// Data stream aliases don’t support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("index_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRouting { get; set; } - - /// - /// - /// If true, sets the write index or data stream for the alias. - /// If an alias points to multiple indices or data streams and is_write_index isn’t set, the alias rejects write requests. - /// If an index alias points to one index and is_write_index isn’t set, the index automatically acts as the write index. - /// Data stream aliases don’t automatically set a write data stream, even if the alias points to one data stream. - /// - /// - [JsonInclude, JsonPropertyName("is_write_index")] - public bool? IsWriteIndex { get; set; } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// Data stream aliases don’t support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// Data stream aliases don’t support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("search_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRouting { get; set; } -} - -/// -/// -/// Create or update an alias. -/// Adds a data stream or index to an alias. -/// -/// -public sealed partial class PutAliasRequestDescriptor : RequestDescriptor, PutAliasRequestParameters> -{ - internal PutAliasRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("index", indices).Required("name", name)) - { - } - - public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : this(typeof(TDocument), name) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_alias"; - - public PutAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - public PutAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } - private bool? IsWriteIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - public PutAliasRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public PutAliasRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public PutAliasRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public PutAliasRequestDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? indexRouting) - { - IndexRoutingValue = indexRouting; - return Self; - } - - /// - /// - /// If true, sets the write index or data stream for the alias. - /// If an alias points to multiple indices or data streams and is_write_index isn’t set, the alias rejects write requests. - /// If an index alias points to one index and is_write_index isn’t set, the index automatically acts as the write index. - /// Data stream aliases don’t automatically set a write data stream, even if the alias points to one data stream. - /// - /// - public PutAliasRequestDescriptor IsWriteIndex(bool? isWriteIndex = true) - { - IsWriteIndexValue = isWriteIndex; - return Self; - } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// Data stream aliases don’t support this parameter. - /// - /// - public PutAliasRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public PutAliasRequestDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? searchRouting) - { - SearchRoutingValue = searchRouting; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexRoutingValue is not null) - { - writer.WritePropertyName("index_routing"); - JsonSerializer.Serialize(writer, IndexRoutingValue, options); - } - - if (IsWriteIndexValue.HasValue) - { - writer.WritePropertyName("is_write_index"); - writer.WriteBooleanValue(IsWriteIndexValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchRoutingValue is not null) - { - writer.WritePropertyName("search_routing"); - JsonSerializer.Serialize(writer, SearchRoutingValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update an alias. -/// Adds a data stream or index to an alias. -/// -/// -public sealed partial class PutAliasRequestDescriptor : RequestDescriptor -{ - internal PutAliasRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("index", indices).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_alias"; - - public PutAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - public PutAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } - private bool? IsWriteIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - public PutAliasRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public PutAliasRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public PutAliasRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public PutAliasRequestDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? indexRouting) - { - IndexRoutingValue = indexRouting; - return Self; - } - - /// - /// - /// If true, sets the write index or data stream for the alias. - /// If an alias points to multiple indices or data streams and is_write_index isn’t set, the alias rejects write requests. - /// If an index alias points to one index and is_write_index isn’t set, the index automatically acts as the write index. - /// Data stream aliases don’t automatically set a write data stream, even if the alias points to one data stream. - /// - /// - public PutAliasRequestDescriptor IsWriteIndex(bool? isWriteIndex = true) - { - IsWriteIndexValue = isWriteIndex; - return Self; - } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// Data stream aliases don’t support this parameter. - /// - /// - public PutAliasRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public PutAliasRequestDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? searchRouting) - { - SearchRoutingValue = searchRouting; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexRoutingValue is not null) - { - writer.WritePropertyName("index_routing"); - JsonSerializer.Serialize(writer, IndexRoutingValue, options); - } - - if (IsWriteIndexValue.HasValue) - { - writer.WritePropertyName("is_write_index"); - writer.WriteBooleanValue(IsWriteIndexValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchRoutingValue is not null) - { - writer.WritePropertyName("search_routing"); - JsonSerializer.Serialize(writer, SearchRoutingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasResponse.g.cs deleted file mode 100644 index f22ac858682..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutAliasResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutAliasResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs deleted file mode 100644 index 39f545869db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs +++ /dev/null @@ -1,180 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutDataLifecycleRequestParameters : RequestParameters -{ - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, hidden, open, closed, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Update data stream lifecycles. -/// Update the data stream lifecycle of the specified data streams. -/// -/// -public sealed partial class PutDataLifecycleRequest : PlainRequest, ISelfSerializable -{ - public PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_data_lifecycle"; - - /// - /// - /// Type of data stream that wildcard patterns can match. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, hidden, open, closed, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle Lifecycle { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, Lifecycle, options); - } -} - -/// -/// -/// Update data stream lifecycles. -/// Update the data stream lifecycle of the specified data streams. -/// -/// -public sealed partial class PutDataLifecycleRequestDescriptor : RequestDescriptor -{ - internal PutDataLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - public PutDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) : base(r => r.Required("name", name)) => LifecycleValue = lifecycle; - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutDataLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_data_lifecycle"; - - public PutDataLifecycleRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutDataLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutDataLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutDataLifecycleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name) - { - RouteValues.Required("name", name); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - - public PutDataLifecycleRequestDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public PutDataLifecycleRequestDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public PutDataLifecycleRequestDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, LifecycleValue, options); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleResponse.g.cs deleted file mode 100644 index 633a0f789a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutDataLifecycleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutDataLifecycleResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs deleted file mode 100644 index 5ff90d349b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ /dev/null @@ -1,784 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutIndexTemplateRequestParameters : RequestParameters -{ - /// - /// - /// User defined reason for creating/updating the index template - /// - /// - public string? Cause { get => Q("cause"); set => Q("cause", value); } - - /// - /// - /// If true, this request cannot replace or update existing index templates. - /// - /// - public bool? Create { get => Q("create"); set => Q("create", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Create or update an index template. -/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. -/// -/// -public sealed partial class PutIndexTemplateRequest : PlainRequest -{ - public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_index_template"; - - /// - /// - /// User defined reason for creating/updating the index template - /// - /// - [JsonIgnore] - public string? Cause { get => Q("cause"); set => Q("cause", value); } - - /// - /// - /// If true, this request cannot replace or update existing index templates. - /// - /// - [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// This setting overrides the value of the action.auto_create_index cluster setting. - /// If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. - /// If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. - /// - /// - [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - [JsonInclude, JsonPropertyName("composed_of")] - public ICollection? ComposedOf { get; set; } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; set; } - - /// - /// - /// The configuration option ignore_missing_component_templates can be used when an index template - /// references a component template that might not exist - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] - public ICollection? IgnoreMissingComponentTemplates { get; set; } - - /// - /// - /// Name of the index template to create. - /// - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } - - /// - /// - /// Optional user metadata about the index template. - /// May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("priority")] - public long? Priority { get; set; } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { get; set; } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -/// -/// -/// Create or update an index template. -/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. -/// -/// -public sealed partial class PutIndexTemplateRequestDescriptor : RequestDescriptor, PutIndexTemplateRequestParameters> -{ - internal PutIndexTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_index_template"; - - public PutIndexTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); - public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public PutIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private bool? DeprecatedValue { get; set; } - private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// This setting overrides the value of the action.auto_create_index cluster setting. - /// If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. - /// If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. - /// - /// - public PutIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - public PutIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - public PutIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public PutIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - public PutIndexTemplateRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// The configuration option ignore_missing_component_templates can be used when an index template - /// references a component template that might not exist - /// - /// - public PutIndexTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) - { - IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; - return Self; - } - - /// - /// - /// Name of the index template to create. - /// - /// - public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// - /// Optional user metadata about the index template. - /// May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - public PutIndexTemplateRequestDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - public PutIndexTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (IgnoreMissingComponentTemplatesValue is not null) - { - writer.WritePropertyName("ignore_missing_component_templates"); - JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update an index template. -/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. -/// -/// -public sealed partial class PutIndexTemplateRequestDescriptor : RequestDescriptor -{ - internal PutIndexTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_index_template"; - - public PutIndexTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); - public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public PutIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private bool? DeprecatedValue { get; set; } - private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// This setting overrides the value of the action.auto_create_index cluster setting. - /// If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. - /// If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. - /// - /// - public PutIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - public PutIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - public PutIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public PutIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - public PutIndexTemplateRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// The configuration option ignore_missing_component_templates can be used when an index template - /// references a component template that might not exist - /// - /// - public PutIndexTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) - { - IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; - return Self; - } - - /// - /// - /// Name of the index template to create. - /// - /// - public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// - /// Optional user metadata about the index template. - /// May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - public PutIndexTemplateRequestDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public PutIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - public PutIndexTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (IgnoreMissingComponentTemplatesValue is not null) - { - writer.WritePropertyName("ignore_missing_component_templates"); - JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateResponse.g.cs deleted file mode 100644 index 0296d8cd3c5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutIndexTemplateResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs deleted file mode 100644 index ea49bfef5ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs +++ /dev/null @@ -1,330 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutIndicesSettingsRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index - /// alias, or _all value targets only missing or closed indices. This - /// behavior applies even if the request targets other open indices. For - /// example, a request targeting foo*,bar* returns an error if an index - /// starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target - /// data streams, this argument determines whether wildcard expressions match - /// hidden data streams. Supports comma-separated values, such as - /// open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// If true, existing index settings remain unchanged. - /// - /// - public bool? PreserveExisting { get => Q("preserve_existing"); set => Q("preserve_existing", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the - /// timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Update index settings. -/// Changes dynamic index settings in real time. For data streams, index setting -/// changes are applied to all backing indices by default. -/// -/// -public sealed partial class PutIndicesSettingsRequest : PlainRequest, ISelfSerializable -{ - public PutIndicesSettingsRequest() - { - } - - public PutIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_settings"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index - /// alias, or _all value targets only missing or closed indices. This - /// behavior applies even if the request targets other open indices. For - /// example, a request targeting foo*,bar* returns an error if an index - /// starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target - /// data streams, this argument determines whether wildcard expressions match - /// hidden data streams. Supports comma-separated values, such as - /// open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is - /// received before the timeout expires, the request fails and returns an - /// error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// If true, existing index settings remain unchanged. - /// - /// - [JsonIgnore] - public bool? PreserveExisting { get => Q("preserve_existing"); set => Q("preserve_existing", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the - /// timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings Settings { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, Settings, options); - } -} - -/// -/// -/// Update index settings. -/// Changes dynamic index settings in real time. For data streams, index setting -/// changes are applied to all backing indices by default. -/// -/// -public sealed partial class PutIndicesSettingsRequestDescriptor : RequestDescriptor, PutIndicesSettingsRequestParameters> -{ - internal PutIndicesSettingsRequestDescriptor(Action> configure) => configure.Invoke(this); - public PutIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) => SettingsValue = settings; - public PutIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings) => SettingsValue = settings; - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_settings"; - - public PutIndicesSettingsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutIndicesSettingsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutIndicesSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public PutIndicesSettingsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public PutIndicesSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutIndicesSettingsRequestDescriptor PreserveExisting(bool? preserveExisting = true) => Qs("preserve_existing", preserveExisting); - public PutIndicesSettingsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutIndicesSettingsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - - public PutIndicesSettingsRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public PutIndicesSettingsRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public PutIndicesSettingsRequestDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, SettingsValue, options); - } -} - -/// -/// -/// Update index settings. -/// Changes dynamic index settings in real time. For data streams, index setting -/// changes are applied to all backing indices by default. -/// -/// -public sealed partial class PutIndicesSettingsRequestDescriptor : RequestDescriptor -{ - internal PutIndicesSettingsRequestDescriptor(Action configure) => configure.Invoke(this); - public PutIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) => SettingsValue = settings; - public PutIndicesSettingsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings) => SettingsValue = settings; - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutSettings; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_settings"; - - public PutIndicesSettingsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutIndicesSettingsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutIndicesSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public PutIndicesSettingsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public PutIndicesSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutIndicesSettingsRequestDescriptor PreserveExisting(bool? preserveExisting = true) => Qs("preserve_existing", preserveExisting); - public PutIndicesSettingsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutIndicesSettingsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - - public PutIndicesSettingsRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public PutIndicesSettingsRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public PutIndicesSettingsRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, SettingsValue, options); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsResponse.g.cs deleted file mode 100644 index bf6e6f4e7ae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndicesSettingsResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutIndicesSettingsResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs deleted file mode 100644 index 64cd0a8f573..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ /dev/null @@ -1,1009 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutMappingRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If true, the mappings are applied only to the current write index for the target. - /// - /// - public bool? WriteIndexOnly { get => Q("write_index_only"); set => Q("write_index_only", value); } -} - -/// -/// -/// Update field mappings. -/// Adds new fields to an existing data stream or index. -/// You can also use this API to change the search settings of existing fields. -/// For data streams, these changes are applied to all backing indices by default. -/// -/// -public sealed partial class PutMappingRequest : PlainRequest -{ - public PutMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_mapping"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If true, the mappings are applied only to the current write index for the target. - /// - /// - [JsonIgnore] - public bool? WriteIndexOnly { get => Q("write_index_only"); set => Q("write_index_only", value); } - - /// - /// - /// Controls whether dynamic date detection is enabled. - /// - /// - [JsonInclude, JsonPropertyName("date_detection")] - public bool? DateDetection { get; set; } - - /// - /// - /// Controls whether new fields are added dynamically. - /// - /// - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - - /// - /// - /// If date detection is enabled then new string fields are checked - /// against 'dynamic_date_formats' and if the value matches then - /// a new date field is added instead of string. - /// - /// - [JsonInclude, JsonPropertyName("dynamic_date_formats")] - public ICollection? DynamicDateFormats { get; set; } - - /// - /// - /// Specify dynamic templates for the mapping. - /// - /// - [JsonInclude, JsonPropertyName("dynamic_templates")] - [SingleOrManyCollectionConverter(typeof(IReadOnlyDictionary))] - public ICollection>? DynamicTemplates { get; set; } - - /// - /// - /// Control whether field names are enabled for the index. - /// - /// - [JsonInclude, JsonPropertyName("_field_names")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNames { get; set; } - - /// - /// - /// A mapping type can have custom meta data associated with it. These are - /// not used at all by Elasticsearch, but can be used to store - /// application-specific metadata. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// Automatically map strings into numeric data types for all fields. - /// - /// - [JsonInclude, JsonPropertyName("numeric_detection")] - public bool? NumericDetection { get; set; } - - /// - /// - /// Mapping for a field. For new fields, this mapping can include: - /// - /// - /// - /// - /// Field name - /// - /// - /// - /// - /// Field data type - /// - /// - /// - /// - /// Mapping parameters - /// - /// - /// - /// - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - /// - /// - /// Enable making a routing value required on indexed documents. - /// - /// - [JsonInclude, JsonPropertyName("_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? Routing { get; set; } - - /// - /// - /// Mapping of runtime fields for the index. - /// - /// - [JsonInclude, JsonPropertyName("runtime")] - public IDictionary? Runtime { get; set; } - - /// - /// - /// Control whether the _source field is enabled on the index. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? Source { get; set; } -} - -/// -/// -/// Update field mappings. -/// Adds new fields to an existing data stream or index. -/// You can also use this API to change the search settings of existing fields. -/// For data streams, these changes are applied to all backing indices by default. -/// -/// -public sealed partial class PutMappingRequestDescriptor : RequestDescriptor, PutMappingRequestParameters> -{ - internal PutMappingRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public PutMappingRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_mapping"; - - public PutMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public PutMappingRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutMappingRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public PutMappingRequestDescriptor WriteIndexOnly(bool? writeIndexOnly = true) => Qs("write_index_only", writeIndexOnly); - - public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } - private Action FieldNamesDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } - private Action RoutingDescriptorAction { get; set; } - private IDictionary> RuntimeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - /// - /// - /// Controls whether dynamic date detection is enabled. - /// - /// - public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) - { - DateDetectionValue = dateDetection; - return Self; - } - - /// - /// - /// Controls whether new fields are added dynamically. - /// - /// - public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - /// - /// - /// If date detection is enabled then new string fields are checked - /// against 'dynamic_date_formats' and if the value matches then - /// a new date field is added instead of string. - /// - /// - public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) - { - DynamicDateFormatsValue = dynamicDateFormats; - return Self; - } - - /// - /// - /// Specify dynamic templates for the mapping. - /// - /// - public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) - { - DynamicTemplatesValue = dynamicTemplates; - return Self; - } - - /// - /// - /// Control whether field names are enabled for the index. - /// - /// - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Action configure) - { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; - return Self; - } - - /// - /// - /// A mapping type can have custom meta data associated with it. These are - /// not used at all by Elasticsearch, but can be used to store - /// application-specific metadata. - /// - /// - public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Automatically map strings into numeric data types for all fields. - /// - /// - public PutMappingRequestDescriptor NumericDetection(bool? numericDetection = true) - { - NumericDetectionValue = numericDetection; - return Self; - } - - /// - /// - /// Mapping for a field. For new fields, this mapping can include: - /// - /// - /// - /// - /// Field name - /// - /// - /// - /// - /// Field data type - /// - /// - /// - /// - /// Mapping parameters - /// - /// - /// - /// - public PutMappingRequestDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PutMappingRequestDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PutMappingRequestDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - /// - /// - /// Enable making a routing value required on indexed documents. - /// - /// - public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - - /// - /// - /// Mapping of runtime fields for the index. - /// - /// - public PutMappingRequestDescriptor Runtime(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Control whether the _source field is enabled on the index. - /// - /// - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); - } - - if (FieldNamesDescriptor is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesDescriptor, options); - } - else if (FieldNamesDescriptorAction is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor(FieldNamesDescriptorAction), options); - } - else if (FieldNamesValue is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RoutingDescriptor is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingDescriptor, options); - } - else if (RoutingDescriptorAction is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor(RoutingDescriptorAction), options); - } - else if (RoutingValue is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update field mappings. -/// Adds new fields to an existing data stream or index. -/// You can also use this API to change the search settings of existing fields. -/// For data streams, these changes are applied to all backing indices by default. -/// -/// -public sealed partial class PutMappingRequestDescriptor : RequestDescriptor -{ - internal PutMappingRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.put_mapping"; - - public PutMappingRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutMappingRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutMappingRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public PutMappingRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutMappingRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public PutMappingRequestDescriptor WriteIndexOnly(bool? writeIndexOnly = true) => Qs("write_index_only", writeIndexOnly); - - public PutMappingRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } - private Action FieldNamesDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } - private Action RoutingDescriptorAction { get; set; } - private IDictionary RuntimeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - /// - /// - /// Controls whether dynamic date detection is enabled. - /// - /// - public PutMappingRequestDescriptor DateDetection(bool? dateDetection = true) - { - DateDetectionValue = dateDetection; - return Self; - } - - /// - /// - /// Controls whether new fields are added dynamically. - /// - /// - public PutMappingRequestDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - /// - /// - /// If date detection is enabled then new string fields are checked - /// against 'dynamic_date_formats' and if the value matches then - /// a new date field is added instead of string. - /// - /// - public PutMappingRequestDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) - { - DynamicDateFormatsValue = dynamicDateFormats; - return Self; - } - - /// - /// - /// Specify dynamic templates for the mapping. - /// - /// - public PutMappingRequestDescriptor DynamicTemplates(ICollection>? dynamicTemplates) - { - DynamicTemplatesValue = dynamicTemplates; - return Self; - } - - /// - /// - /// Control whether field names are enabled for the index. - /// - /// - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor FieldNames(Action configure) - { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; - return Self; - } - - /// - /// - /// A mapping type can have custom meta data associated with it. These are - /// not used at all by Elasticsearch, but can be used to store - /// application-specific metadata. - /// - /// - public PutMappingRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Automatically map strings into numeric data types for all fields. - /// - /// - public PutMappingRequestDescriptor NumericDetection(bool? numericDetection = true) - { - NumericDetectionValue = numericDetection; - return Self; - } - - /// - /// - /// Mapping for a field. For new fields, this mapping can include: - /// - /// - /// - /// - /// Field name - /// - /// - /// - /// - /// Field data type - /// - /// - /// - /// - /// Mapping parameters - /// - /// - /// - /// - public PutMappingRequestDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PutMappingRequestDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PutMappingRequestDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - /// - /// - /// Enable making a routing value required on indexed documents. - /// - /// - public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public PutMappingRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - - /// - /// - /// Mapping of runtime fields for the index. - /// - /// - public PutMappingRequestDescriptor Runtime(Func, FluentDescriptorDictionary> selector) - { - RuntimeValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Control whether the _source field is enabled on the index. - /// - /// - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutMappingRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutMappingRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options); - } - - if (FieldNamesDescriptor is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesDescriptor, options); - } - else if (FieldNamesDescriptorAction is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor(FieldNamesDescriptorAction), options); - } - else if (FieldNamesValue is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RoutingDescriptor is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingDescriptor, options); - } - else if (RoutingDescriptorAction is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor(RoutingDescriptorAction), options); - } - else if (RoutingValue is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingResponse.g.cs deleted file mode 100644 index 3e6986a7ede..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutMappingResponse.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class PutMappingResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryRequest.g.cs deleted file mode 100644 index cfd93778ad2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryRequest.g.cs +++ /dev/null @@ -1,313 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryRequestParameters : RequestParameters -{ - /// - /// - /// If true, the response only includes ongoing shard recoveries. - /// - /// - public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); } - - /// - /// - /// If true, the response includes detailed information about shard recoveries. - /// - /// - public bool? Detailed { get => Q("detailed"); set => Q("detailed", value); } -} - -/// -/// -/// Get index recovery information. -/// Get information about ongoing and completed shard recoveries for one or more indices. -/// For data streams, the API returns information for the stream's backing indices. -/// -/// -/// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. -/// When a shard recovery completes, the recovered shard is available for search and indexing. -/// -/// -/// Recovery automatically occurs during the following processes: -/// -/// -/// -/// -/// When creating an index for the first time. -/// -/// -/// -/// -/// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. -/// -/// -/// -/// -/// Creation of new replica shard copies from the primary. -/// -/// -/// -/// -/// Relocation of a shard copy to a different node in the same cluster. -/// -/// -/// -/// -/// A snapshot restore operation. -/// -/// -/// -/// -/// A clone, shrink, or split operation. -/// -/// -/// -/// -/// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. -/// -/// -/// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. -/// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. -/// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. -/// -/// -public sealed partial class RecoveryRequest : PlainRequest -{ - public RecoveryRequest() - { - } - - public RecoveryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRecovery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.recovery"; - - /// - /// - /// If true, the response only includes ongoing shard recoveries. - /// - /// - [JsonIgnore] - public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); } - - /// - /// - /// If true, the response includes detailed information about shard recoveries. - /// - /// - [JsonIgnore] - public bool? Detailed { get => Q("detailed"); set => Q("detailed", value); } -} - -/// -/// -/// Get index recovery information. -/// Get information about ongoing and completed shard recoveries for one or more indices. -/// For data streams, the API returns information for the stream's backing indices. -/// -/// -/// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. -/// When a shard recovery completes, the recovered shard is available for search and indexing. -/// -/// -/// Recovery automatically occurs during the following processes: -/// -/// -/// -/// -/// When creating an index for the first time. -/// -/// -/// -/// -/// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. -/// -/// -/// -/// -/// Creation of new replica shard copies from the primary. -/// -/// -/// -/// -/// Relocation of a shard copy to a different node in the same cluster. -/// -/// -/// -/// -/// A snapshot restore operation. -/// -/// -/// -/// -/// A clone, shrink, or split operation. -/// -/// -/// -/// -/// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. -/// -/// -/// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. -/// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. -/// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. -/// -/// -public sealed partial class RecoveryRequestDescriptor : RequestDescriptor, RecoveryRequestParameters> -{ - internal RecoveryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public RecoveryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public RecoveryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRecovery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.recovery"; - - public RecoveryRequestDescriptor ActiveOnly(bool? activeOnly = true) => Qs("active_only", activeOnly); - public RecoveryRequestDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); - - public RecoveryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get index recovery information. -/// Get information about ongoing and completed shard recoveries for one or more indices. -/// For data streams, the API returns information for the stream's backing indices. -/// -/// -/// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. -/// When a shard recovery completes, the recovered shard is available for search and indexing. -/// -/// -/// Recovery automatically occurs during the following processes: -/// -/// -/// -/// -/// When creating an index for the first time. -/// -/// -/// -/// -/// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. -/// -/// -/// -/// -/// Creation of new replica shard copies from the primary. -/// -/// -/// -/// -/// Relocation of a shard copy to a different node in the same cluster. -/// -/// -/// -/// -/// A snapshot restore operation. -/// -/// -/// -/// -/// A clone, shrink, or split operation. -/// -/// -/// -/// -/// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. -/// -/// -/// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. -/// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. -/// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. -/// -/// -public sealed partial class RecoveryRequestDescriptor : RequestDescriptor -{ - internal RecoveryRequestDescriptor(Action configure) => configure.Invoke(this); - - public RecoveryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public RecoveryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRecovery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.recovery"; - - public RecoveryRequestDescriptor ActiveOnly(bool? activeOnly = true) => Qs("active_only", activeOnly); - public RecoveryRequestDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); - - public RecoveryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryResponse.g.cs deleted file mode 100644 index 839cb26c277..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RecoveryResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryResponse : DictionaryResponse -{ - public RecoveryResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public RecoveryResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshRequest.g.cs deleted file mode 100644 index d8b77384e22..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshRequest.g.cs +++ /dev/null @@ -1,197 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RefreshRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Refresh an index. -/// A refresh makes recent operations performed on one or more indices available for search. -/// For data streams, the API runs the refresh operation on the stream’s backing indices. -/// -/// -public sealed partial class RefreshRequest : PlainRequest -{ - public RefreshRequest() - { - } - - public RefreshRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRefresh; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.refresh"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Refresh an index. -/// A refresh makes recent operations performed on one or more indices available for search. -/// For data streams, the API runs the refresh operation on the stream’s backing indices. -/// -/// -public sealed partial class RefreshRequestDescriptor : RequestDescriptor, RefreshRequestParameters> -{ - internal RefreshRequestDescriptor(Action> configure) => configure.Invoke(this); - - public RefreshRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public RefreshRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRefresh; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.refresh"; - - public RefreshRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public RefreshRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public RefreshRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public RefreshRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Refresh an index. -/// A refresh makes recent operations performed on one or more indices available for search. -/// For data streams, the API runs the refresh operation on the stream’s backing indices. -/// -/// -public sealed partial class RefreshRequestDescriptor : RequestDescriptor -{ - internal RefreshRequestDescriptor(Action configure) => configure.Invoke(this); - - public RefreshRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public RefreshRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRefresh; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.refresh"; - - public RefreshRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public RefreshRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public RefreshRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public RefreshRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs deleted file mode 100644 index 52956bca56e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RefreshResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs deleted file mode 100644 index eeb834c823a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexRequest.g.cs +++ /dev/null @@ -1,149 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ResolveIndexRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Resolve indices. -/// Resolve the names and/or index patterns for indices, aliases, and data streams. -/// Multiple patterns and remote clusters are supported. -/// -/// -public sealed partial class ResolveIndexRequest : PlainRequest -{ - public ResolveIndexRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementResolveIndex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.resolve_index"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Resolve indices. -/// Resolve the names and/or index patterns for indices, aliases, and data streams. -/// Multiple patterns and remote clusters are supported. -/// -/// -public sealed partial class ResolveIndexRequestDescriptor : RequestDescriptor -{ - internal ResolveIndexRequestDescriptor(Action configure) => configure.Invoke(this); - - public ResolveIndexRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementResolveIndex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.resolve_index"; - - public ResolveIndexRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ResolveIndexRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ResolveIndexRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public ResolveIndexRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexResponse.g.cs deleted file mode 100644 index ec8b5501790..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ResolveIndexResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ResolveIndexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aliases")] - public IReadOnlyCollection Aliases { get; init; } - [JsonInclude, JsonPropertyName("data_streams")] - public IReadOnlyCollection DataStreams { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverRequest.g.cs deleted file mode 100644 index 8fb0a81cfd2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverRequest.g.cs +++ /dev/null @@ -1,544 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RolloverRequestParameters : RequestParameters -{ - /// - /// - /// If true, checks whether the current index satisfies the specified conditions but does not perform a rollover. - /// - /// - public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Roll over to a new index. -/// Creates a new index for a data stream or index alias. -/// -/// -public sealed partial class RolloverRequest : PlainRequest -{ - public RolloverRequest(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias) : base(r => r.Required("alias", alias)) - { - } - - public RolloverRequest(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex) : base(r => r.Required("alias", alias).Optional("new_index", newIndex)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRollover; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.rollover"; - - /// - /// - /// If true, checks whether the current index satisfies the specified conditions but does not perform a rollover. - /// - /// - [JsonIgnore] - public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// Aliases for the target index. - /// Data streams do not support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("aliases")] - public IDictionary? Aliases { get; set; } - - /// - /// - /// Conditions for the rollover. - /// If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions. - /// If this parameter is not specified, Elasticsearch performs the rollover unconditionally. - /// If conditions are specified, at least one of them must be a max_* condition. - /// The index will rollover if any max_* condition is satisfied and all min_* conditions are satisfied. - /// - /// - [JsonInclude, JsonPropertyName("conditions")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditions? Conditions { get; set; } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping paramaters. - /// - /// - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; set; } - - /// - /// - /// Configuration options for the index. - /// Data streams do not support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public IDictionary? Settings { get; set; } -} - -/// -/// -/// Roll over to a new index. -/// Creates a new index for a data stream or index alias. -/// -/// -public sealed partial class RolloverRequestDescriptor : RequestDescriptor, RolloverRequestParameters> -{ - internal RolloverRequestDescriptor(Action> configure) => configure.Invoke(this); - - public RolloverRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex) : base(r => r.Required("alias", alias).Optional("new_index", newIndex)) - { - } - - public RolloverRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias) : this(alias, typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRollover; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.rollover"; - - public RolloverRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); - public RolloverRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public RolloverRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public RolloverRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public RolloverRequestDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias) - { - RouteValues.Required("alias", alias); - return Self; - } - - public RolloverRequestDescriptor NewIndex(Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex) - { - RouteValues.Optional("new_index", newIndex); - return Self; - } - - private IDictionary> AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditions? ConditionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditionsDescriptor ConditionsDescriptor { get; set; } - private Action ConditionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action> MappingsDescriptorAction { get; set; } - private IDictionary? SettingsValue { get; set; } - - /// - /// - /// Aliases for the target index. - /// Data streams do not support this parameter. - /// - /// - public RolloverRequestDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Conditions for the rollover. - /// If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions. - /// If this parameter is not specified, Elasticsearch performs the rollover unconditionally. - /// If conditions are specified, at least one of them must be a max_* condition. - /// The index will rollover if any max_* condition is satisfied and all min_* conditions are satisfied. - /// - /// - public RolloverRequestDescriptor Conditions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditions? conditions) - { - ConditionsDescriptor = null; - ConditionsDescriptorAction = null; - ConditionsValue = conditions; - return Self; - } - - public RolloverRequestDescriptor Conditions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditionsDescriptor descriptor) - { - ConditionsValue = null; - ConditionsDescriptorAction = null; - ConditionsDescriptor = descriptor; - return Self; - } - - public RolloverRequestDescriptor Conditions(Action configure) - { - ConditionsValue = null; - ConditionsDescriptor = null; - ConditionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping paramaters. - /// - /// - public RolloverRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public RolloverRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public RolloverRequestDescriptor Mappings(Action> configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configuration options for the index. - /// Data streams do not support this parameter. - /// - /// - public RolloverRequestDescriptor Settings(Func, FluentDictionary> selector) - { - SettingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (ConditionsDescriptor is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, ConditionsDescriptor, options); - } - else if (ConditionsDescriptorAction is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditionsDescriptor(ConditionsDescriptorAction), options); - } - else if (ConditionsValue is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, ConditionsValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Roll over to a new index. -/// Creates a new index for a data stream or index alias. -/// -/// -public sealed partial class RolloverRequestDescriptor : RequestDescriptor -{ - internal RolloverRequestDescriptor(Action configure) => configure.Invoke(this); - - public RolloverRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex) : base(r => r.Required("alias", alias).Optional("new_index", newIndex)) - { - } - - public RolloverRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias) : base(r => r.Required("alias", alias)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementRollover; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.rollover"; - - public RolloverRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); - public RolloverRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public RolloverRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public RolloverRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public RolloverRequestDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias) - { - RouteValues.Required("alias", alias); - return Self; - } - - public RolloverRequestDescriptor NewIndex(Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex) - { - RouteValues.Optional("new_index", newIndex); - return Self; - } - - private IDictionary AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditions? ConditionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditionsDescriptor ConditionsDescriptor { get; set; } - private Action ConditionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action MappingsDescriptorAction { get; set; } - private IDictionary? SettingsValue { get; set; } - - /// - /// - /// Aliases for the target index. - /// Data streams do not support this parameter. - /// - /// - public RolloverRequestDescriptor Aliases(Func, FluentDescriptorDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Conditions for the rollover. - /// If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions. - /// If this parameter is not specified, Elasticsearch performs the rollover unconditionally. - /// If conditions are specified, at least one of them must be a max_* condition. - /// The index will rollover if any max_* condition is satisfied and all min_* conditions are satisfied. - /// - /// - public RolloverRequestDescriptor Conditions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditions? conditions) - { - ConditionsDescriptor = null; - ConditionsDescriptorAction = null; - ConditionsValue = conditions; - return Self; - } - - public RolloverRequestDescriptor Conditions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditionsDescriptor descriptor) - { - ConditionsValue = null; - ConditionsDescriptorAction = null; - ConditionsDescriptor = descriptor; - return Self; - } - - public RolloverRequestDescriptor Conditions(Action configure) - { - ConditionsValue = null; - ConditionsDescriptor = null; - ConditionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping paramaters. - /// - /// - public RolloverRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public RolloverRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public RolloverRequestDescriptor Mappings(Action configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configuration options for the index. - /// Data streams do not support this parameter. - /// - /// - public RolloverRequestDescriptor Settings(Func, FluentDictionary> selector) - { - SettingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (ConditionsDescriptor is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, ConditionsDescriptor, options); - } - else if (ConditionsDescriptorAction is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RolloverConditionsDescriptor(ConditionsDescriptorAction), options); - } - else if (ConditionsValue is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, ConditionsValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverResponse.g.cs deleted file mode 100644 index ffdebd2dbda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RolloverResponse.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RolloverResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("conditions")] - public IReadOnlyDictionary Conditions { get; init; } - [JsonInclude, JsonPropertyName("dry_run")] - public bool DryRun { get; init; } - [JsonInclude, JsonPropertyName("new_index")] - public string NewIndex { get; init; } - [JsonInclude, JsonPropertyName("old_index")] - public string OldIndex { get; init; } - [JsonInclude, JsonPropertyName("rolled_over")] - public bool RolledOver { get; init; } - [JsonInclude, JsonPropertyName("shards_acknowledged")] - public bool ShardsAcknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsRequest.g.cs deleted file mode 100644 index 7df19f21d9d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsRequest.g.cs +++ /dev/null @@ -1,197 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SegmentsRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Get index segments. -/// Get low-level information about the Lucene segments in index shards. -/// For data streams, the API returns information about the stream's backing indices. -/// -/// -public sealed partial class SegmentsRequest : PlainRequest -{ - public SegmentsRequest() - { - } - - public SegmentsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSegments; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.segments"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Get index segments. -/// Get low-level information about the Lucene segments in index shards. -/// For data streams, the API returns information about the stream's backing indices. -/// -/// -public sealed partial class SegmentsRequestDescriptor : RequestDescriptor, SegmentsRequestParameters> -{ - internal SegmentsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SegmentsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SegmentsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSegments; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.segments"; - - public SegmentsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SegmentsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SegmentsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public SegmentsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get index segments. -/// Get low-level information about the Lucene segments in index shards. -/// For data streams, the API returns information about the stream's backing indices. -/// -/// -public sealed partial class SegmentsRequestDescriptor : RequestDescriptor -{ - internal SegmentsRequestDescriptor(Action configure) => configure.Invoke(this); - - public SegmentsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SegmentsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSegments; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.segments"; - - public SegmentsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SegmentsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SegmentsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public SegmentsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsResponse.g.cs deleted file mode 100644 index a013b743050..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SegmentsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SegmentsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyDictionary Indices { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs deleted file mode 100644 index b5ec5a933a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SimulateIndexTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Simulate an index. -/// Returns the index configuration that would be applied to the specified index from an existing index template. -/// -/// -public sealed partial class SimulateIndexTemplateRequest : PlainRequest -{ - public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.simulate_index_template"; - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Simulate an index. -/// Returns the index configuration that would be applied to the specified index from an existing index template. -/// -/// -public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor -{ - internal SimulateIndexTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "indices.simulate_index_template"; - - public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs deleted file mode 100644 index d5f4ab63e53..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SimulateIndexTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("overlapping")] - public IReadOnlyCollection? Overlapping { get; init; } - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Template Template { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs deleted file mode 100644 index 0eda30d559e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ /dev/null @@ -1,794 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SimulateTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. - /// - /// - public bool? Create { get => Q("create"); set => Q("create", value); } - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Simulate an index template. -/// Returns the index configuration that would be applied by a particular index template. -/// -/// -public sealed partial class SimulateTemplateRequest : PlainRequest -{ - public SimulateTemplateRequest() - { - } - - public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.simulate_template"; - - /// - /// - /// If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. - /// - /// - [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } - - /// - /// - /// If true, returns all relevant default configurations for the index template. - /// - /// - [JsonIgnore] - public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// This setting overrides the value of the action.auto_create_index cluster setting. - /// If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. - /// If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. - /// - /// - [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - [JsonInclude, JsonPropertyName("composed_of")] - public ICollection? ComposedOf { get; set; } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; set; } - - /// - /// - /// The configuration option ignore_missing_component_templates can be used when an index template - /// references a component template that might not exist - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] - public ICollection? IgnoreMissingComponentTemplates { get; set; } - - /// - /// - /// Array of wildcard (*) expressions used to match the names of data streams and indices during creation. - /// - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } - - /// - /// - /// Optional user metadata about the index template. - /// May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("priority")] - public long? Priority { get; set; } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { get; set; } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -/// -/// -/// Simulate an index template. -/// Returns the index configuration that would be applied by a particular index template. -/// -/// -public sealed partial class SimulateTemplateRequestDescriptor : RequestDescriptor, SimulateTemplateRequestParameters> -{ - internal SimulateTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SimulateTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - public SimulateTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.simulate_template"; - - public SimulateTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public SimulateTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public SimulateTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public SimulateTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - RouteValues.Optional("name", name); - return Self; - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private bool? DeprecatedValue { get; set; } - private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// This setting overrides the value of the action.auto_create_index cluster setting. - /// If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. - /// If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. - /// - /// - public SimulateTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - public SimulateTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public SimulateTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - public SimulateTemplateRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// The configuration option ignore_missing_component_templates can be used when an index template - /// references a component template that might not exist - /// - /// - public SimulateTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) - { - IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; - return Self; - } - - /// - /// - /// Array of wildcard (*) expressions used to match the names of data streams and indices during creation. - /// - /// - public SimulateTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// - /// Optional user metadata about the index template. - /// May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - public SimulateTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - public SimulateTemplateRequestDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - public SimulateTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (IgnoreMissingComponentTemplatesValue is not null) - { - writer.WritePropertyName("ignore_missing_component_templates"); - JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Simulate an index template. -/// Returns the index configuration that would be applied by a particular index template. -/// -/// -public sealed partial class SimulateTemplateRequestDescriptor : RequestDescriptor -{ - internal SimulateTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public SimulateTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Optional("name", name)) - { - } - - public SimulateTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.simulate_template"; - - public SimulateTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public SimulateTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public SimulateTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public SimulateTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - RouteValues.Optional("name", name); - return Self; - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private bool? DeprecatedValue { get; set; } - private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// This setting overrides the value of the action.auto_create_index cluster setting. - /// If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. - /// If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. - /// - /// - public SimulateTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - public SimulateTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public SimulateTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// - /// Marks this index template as deprecated. When creating or updating a non-deprecated index template - /// that uses deprecated components, Elasticsearch will emit a deprecation warning. - /// - /// - public SimulateTemplateRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// The configuration option ignore_missing_component_templates can be used when an index template - /// references a component template that might not exist - /// - /// - public SimulateTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) - { - IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; - return Self; - } - - /// - /// - /// Array of wildcard (*) expressions used to match the names of data streams and indices during creation. - /// - /// - public SimulateTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// - /// Optional user metadata about the index template. - /// May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - public SimulateTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - public SimulateTemplateRequestDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - public SimulateTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (IgnoreMissingComponentTemplatesValue is not null) - { - writer.WritePropertyName("ignore_missing_component_templates"); - JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateResponse.g.cs deleted file mode 100644 index 2cc6cb2844c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SimulateTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("overlapping")] - public IReadOnlyCollection? Overlapping { get; init; } - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Template Template { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs deleted file mode 100644 index eb681f76ea7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs +++ /dev/null @@ -1,311 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class UpdateAliasesRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update an alias. -/// Adds a data stream or index to an alias. -/// -/// -public sealed partial class UpdateAliasesRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementUpdateAliases; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.update_aliases"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Actions to perform. - /// - /// - [JsonInclude, JsonPropertyName("actions")] - public ICollection? Actions { get; set; } -} - -/// -/// -/// Create or update an alias. -/// Adds a data stream or index to an alias. -/// -/// -public sealed partial class UpdateAliasesRequestDescriptor : RequestDescriptor, UpdateAliasesRequestParameters> -{ - internal UpdateAliasesRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateAliasesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementUpdateAliases; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.update_aliases"; - - public UpdateAliasesRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - private ICollection? ActionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor ActionsDescriptor { get; set; } - private Action> ActionsDescriptorAction { get; set; } - private Action>[] ActionsDescriptorActions { get; set; } - - /// - /// - /// Actions to perform. - /// - /// - public UpdateAliasesRequestDescriptor Actions(ICollection? actions) - { - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = null; - ActionsValue = actions; - return Self; - } - - public UpdateAliasesRequestDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor descriptor) - { - ActionsValue = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = null; - ActionsDescriptor = descriptor; - return Self; - } - - public UpdateAliasesRequestDescriptor Actions(Action> configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorActions = null; - ActionsDescriptorAction = configure; - return Self; - } - - public UpdateAliasesRequestDescriptor Actions(params Action>[] configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsDescriptor is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ActionsDescriptor, options); - writer.WriteEndArray(); - } - else if (ActionsDescriptorAction is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor(ActionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ActionsDescriptorActions is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - foreach (var action in ActionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ActionsValue is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update an alias. -/// Adds a data stream or index to an alias. -/// -/// -public sealed partial class UpdateAliasesRequestDescriptor : RequestDescriptor -{ - internal UpdateAliasesRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateAliasesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementUpdateAliases; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.update_aliases"; - - public UpdateAliasesRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - private ICollection? ActionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor ActionsDescriptor { get; set; } - private Action ActionsDescriptorAction { get; set; } - private Action[] ActionsDescriptorActions { get; set; } - - /// - /// - /// Actions to perform. - /// - /// - public UpdateAliasesRequestDescriptor Actions(ICollection? actions) - { - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = null; - ActionsValue = actions; - return Self; - } - - public UpdateAliasesRequestDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor descriptor) - { - ActionsValue = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = null; - ActionsDescriptor = descriptor; - return Self; - } - - public UpdateAliasesRequestDescriptor Actions(Action configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorActions = null; - ActionsDescriptorAction = configure; - return Self; - } - - public UpdateAliasesRequestDescriptor Actions(params Action[] configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsDescriptor is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ActionsDescriptor, options); - writer.WriteEndArray(); - } - else if (ActionsDescriptorAction is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor(ActionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ActionsDescriptorActions is not null) - { - writer.WritePropertyName("actions"); - writer.WriteStartArray(); - foreach (var action in ActionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesActionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ActionsValue is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.cs deleted file mode 100644 index cca0075dcba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class UpdateAliasesResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryRequest.g.cs deleted file mode 100644 index 74dcc20cc2e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryRequest.g.cs +++ /dev/null @@ -1,461 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ValidateQueryRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, the validation is executed on all shards instead of one random shard per index. - /// - /// - public bool? AllShards { get => Q("all_shards"); set => Q("all_shards", value); } - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, the response returns detailed information if an error has occurred. - /// - /// - public bool? Explain { get => Q("explain"); set => Q("explain", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, returns a more detailed explanation showing the actual Lucene query that will be executed. - /// - /// - public bool? Rewrite { get => Q("rewrite"); set => Q("rewrite", value); } -} - -/// -/// -/// Validate a query. -/// Validates a query without running it. -/// -/// -public sealed partial class ValidateQueryRequest : PlainRequest -{ - public ValidateQueryRequest() - { - } - - public ValidateQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementValidateQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.validate_query"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, the validation is executed on all shards instead of one random shard per index. - /// - /// - [JsonIgnore] - public bool? AllShards { get => Q("all_shards"); set => Q("all_shards", value); } - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, the response returns detailed information if an error has occurred. - /// - /// - [JsonIgnore] - public bool? Explain { get => Q("explain"); set => Q("explain", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, returns a more detailed explanation showing the actual Lucene query that will be executed. - /// - /// - [JsonIgnore] - public bool? Rewrite { get => Q("rewrite"); set => Q("rewrite", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } -} - -/// -/// -/// Validate a query. -/// Validates a query without running it. -/// -/// -public sealed partial class ValidateQueryRequestDescriptor : RequestDescriptor, ValidateQueryRequestParameters> -{ - internal ValidateQueryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ValidateQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public ValidateQueryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementValidateQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.validate_query"; - - public ValidateQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ValidateQueryRequestDescriptor AllShards(bool? allShards = true) => Qs("all_shards", allShards); - public ValidateQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public ValidateQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public ValidateQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public ValidateQueryRequestDescriptor Df(string? df) => Qs("df", df); - public ValidateQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ValidateQueryRequestDescriptor Explain(bool? explain = true) => Qs("explain", explain); - public ValidateQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ValidateQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public ValidateQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public ValidateQueryRequestDescriptor Rewrite(bool? rewrite = true) => Qs("rewrite", rewrite); - - public ValidateQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public ValidateQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ValidateQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ValidateQueryRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Validate a query. -/// Validates a query without running it. -/// -/// -public sealed partial class ValidateQueryRequestDescriptor : RequestDescriptor -{ - internal ValidateQueryRequestDescriptor(Action configure) => configure.Invoke(this); - - public ValidateQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public ValidateQueryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementValidateQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.validate_query"; - - public ValidateQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public ValidateQueryRequestDescriptor AllShards(bool? allShards = true) => Qs("all_shards", allShards); - public ValidateQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public ValidateQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public ValidateQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public ValidateQueryRequestDescriptor Df(string? df) => Qs("df", df); - public ValidateQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public ValidateQueryRequestDescriptor Explain(bool? explain = true) => Qs("explain", explain); - public ValidateQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public ValidateQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public ValidateQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public ValidateQueryRequestDescriptor Rewrite(bool? rewrite = true) => Qs("rewrite", rewrite); - - public ValidateQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public ValidateQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ValidateQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ValidateQueryRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryResponse.g.cs deleted file mode 100644 index 6d138d626de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ValidateQueryResponse.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ValidateQueryResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("error")] - public string? Error { get; init; } - [JsonInclude, JsonPropertyName("explanations")] - public IReadOnlyCollection? Explanations { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } - [JsonInclude, JsonPropertyName("valid")] - public bool Valid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs deleted file mode 100644 index de8f1f2caf9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexRequest.g.cs +++ /dev/null @@ -1,322 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class IndexRequestParameters : RequestParameters -{ - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// Set to create to only index the document if it does not already exist (put if absent). - /// If a document with the specified _id already exists, the indexing operation will fail. - /// Same as using the <index>/_create endpoint. - /// Valid values: index, create. - /// If document id is specified, it defaults to index. - /// Otherwise, it defaults to create. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.OpType? OpType { get => Q("op_type"); set => Q("op_type", value); } - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the destination must be an index alias. - /// - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Index a document. -/// Adds a JSON document to the specified data stream or index and makes it searchable. -/// If the target is an index and the document already exists, the request updates the document and increments its version. -/// -/// -public sealed partial class IndexRequest : PlainRequest, ISelfSerializable -{ - public IndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Required("index", index).Optional("id", id)) - { - } - - public IndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceIndex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "index"; - - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - [JsonIgnore] - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - [JsonIgnore] - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// Set to create to only index the document if it does not already exist (put if absent). - /// If a document with the specified _id already exists, the indexing operation will fail. - /// Same as using the <index>/_create endpoint. - /// Valid values: index, create. - /// If document id is specified, it defaults to index. - /// Otherwise, it defaults to create. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.OpType? OpType { get => Q("op_type"); set => Q("op_type", value); } - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - [JsonIgnore] - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. - /// Valid values: true, false, wait_for. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the destination must be an index alias. - /// - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Explicit version number for concurrency control. - /// The specified version must match the current version of the document for the request to succeed. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type: external, external_gte. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - [JsonIgnore] - public TDocument Document { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - settings.SourceSerializer.Serialize(Document, writer); - } -} - -/// -/// -/// Index a document. -/// Adds a JSON document to the specified data stream or index and makes it searchable. -/// If the target is an index and the document already exists, the request updates the document and increments its version. -/// -/// -public sealed partial class IndexRequestDescriptor : RequestDescriptor, IndexRequestParameters> -{ - internal IndexRequestDescriptor(Action> configure) => configure.Invoke(this); - public IndexRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Required("index", index).Optional("id", id)) => DocumentValue = document; - - public IndexRequestDescriptor(TDocument document) : this(document, typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public IndexRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(document, index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public IndexRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id) : this(document, typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceIndex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "index"; - - public IndexRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); - public IndexRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); - public IndexRequestDescriptor OpType(Elastic.Clients.Elasticsearch.Serverless.OpType? opType) => Qs("op_type", opType); - public IndexRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); - public IndexRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public IndexRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); - public IndexRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public IndexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public IndexRequestDescriptor Version(long? version) => Qs("version", version); - public IndexRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - public IndexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public IndexRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - public IndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private TDocument DocumentValue { get; set; } - - public IndexRequestDescriptor Document(TDocument document) - { - DocumentValue = document; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - settings.SourceSerializer.Serialize(DocumentValue, writer); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs deleted file mode 100644 index ce056a65bd4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class IndexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("forced_refresh")] - public bool? ForcedRefresh { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs deleted file mode 100644 index b2db5f61ffa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs +++ /dev/null @@ -1,133 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class DeleteInferenceRequestParameters : RequestParameters -{ - /// - /// - /// When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned - /// - /// - public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Delete an inference endpoint -/// -/// -public sealed partial class DeleteInferenceRequest : PlainRequest -{ - public DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) - { - } - - public DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "inference.delete"; - - /// - /// - /// When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned - /// - /// - [JsonIgnore] - public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Delete an inference endpoint -/// -/// -public sealed partial class DeleteInferenceRequestDescriptor : RequestDescriptor -{ - internal DeleteInferenceRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) - { - } - - public DeleteInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "inference.delete"; - - public DeleteInferenceRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); - public DeleteInferenceRequestDescriptor Force(bool? force = true) => Qs("force", force); - - public DeleteInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) - { - RouteValues.Required("inference_id", inferenceId); - return Self; - } - - public DeleteInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) - { - RouteValues.Optional("task_type", taskType); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceResponse.g.cs deleted file mode 100644 index 87912c59bf7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceResponse.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class DeleteInferenceResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("pipelines")] - public IReadOnlyCollection Pipelines { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs deleted file mode 100644 index f18bb03711f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class GetInferenceRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get an inference endpoint -/// -/// -public sealed partial class GetInferenceRequest : PlainRequest -{ - public GetInferenceRequest() - { - } - - public GetInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) : base(r => r.Optional("inference_id", inferenceId)) - { - } - - public GetInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) : base(r => r.Optional("task_type", taskType).Optional("inference_id", inferenceId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "inference.get"; -} - -/// -/// -/// Get an inference endpoint -/// -/// -public sealed partial class GetInferenceRequestDescriptor : RequestDescriptor -{ - internal GetInferenceRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) : base(r => r.Optional("task_type", taskType).Optional("inference_id", inferenceId)) - { - } - - public GetInferenceRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "inference.get"; - - public GetInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) - { - RouteValues.Optional("inference_id", inferenceId); - return Self; - } - - public GetInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) - { - RouteValues.Optional("task_type", taskType); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs deleted file mode 100644 index eadcef93ac5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class GetInferenceResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("endpoints")] - public IReadOnlyCollection Endpoints { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs deleted file mode 100644 index 6e94c6b33af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs +++ /dev/null @@ -1,199 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class InferenceRequestParameters : RequestParameters -{ - /// - /// - /// Specifies the amount of time to wait for the inference request to complete. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Perform inference on the service -/// -/// -public sealed partial class InferenceRequest : PlainRequest -{ - public InferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) - { - } - - public InferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceInference; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "inference.inference"; - - /// - /// - /// Specifies the amount of time to wait for the inference request to complete. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Inference input. - /// Either a string or an array of strings. - /// - /// - [JsonInclude, JsonPropertyName("input")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection Input { get; set; } - - /// - /// - /// Query input, required for rerank task. - /// Not required for other tasks. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string? Query { get; set; } - - /// - /// - /// Optional task settings - /// - /// - [JsonInclude, JsonPropertyName("task_settings")] - public object? TaskSettings { get; set; } -} - -/// -/// -/// Perform inference on the service -/// -/// -public sealed partial class InferenceRequestDescriptor : RequestDescriptor -{ - internal InferenceRequestDescriptor(Action configure) => configure.Invoke(this); - - public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) - { - } - - public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceInference; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "inference.inference"; - - public InferenceRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public InferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) - { - RouteValues.Required("inference_id", inferenceId); - return Self; - } - - public InferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) - { - RouteValues.Optional("task_type", taskType); - return Self; - } - - private ICollection InputValue { get; set; } - private string? QueryValue { get; set; } - private object? TaskSettingsValue { get; set; } - - /// - /// - /// Inference input. - /// Either a string or an array of strings. - /// - /// - public InferenceRequestDescriptor Input(ICollection input) - { - InputValue = input; - return Self; - } - - /// - /// - /// Query input, required for rerank task. - /// Not required for other tasks. - /// - /// - public InferenceRequestDescriptor Query(string? query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// Optional task settings - /// - /// - public InferenceRequestDescriptor TaskSettings(object? taskSettings) - { - TaskSettingsValue = taskSettings; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("input"); - SingleOrManySerializationHelper.Serialize(InputValue, writer, options); - if (!string.IsNullOrEmpty(QueryValue)) - { - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - } - - if (TaskSettingsValue is not null) - { - writer.WritePropertyName("task_settings"); - JsonSerializer.Serialize(writer, TaskSettingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.g.cs deleted file mode 100644 index 0e2891aecf9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class InferenceResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs deleted file mode 100644 index eadac2de1ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs +++ /dev/null @@ -1,152 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class PutInferenceRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create an inference endpoint. -/// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. -/// After creating the endpoint, wait for the model deployment to complete before using it. -/// To verify the deployment status, use the get trained model statistics API. -/// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". -/// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. -/// -/// -/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. -/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. -/// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. -/// -/// -public sealed partial class PutInferenceRequest : PlainRequest, ISelfSerializable -{ - public PutInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) - { - } - - public PutInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferencePut; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "inference.put"; - - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint InferenceConfig { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, InferenceConfig, options); - } -} - -/// -/// -/// Create an inference endpoint. -/// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. -/// After creating the endpoint, wait for the model deployment to complete before using it. -/// To verify the deployment status, use the get trained model statistics API. -/// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". -/// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. -/// -/// -/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. -/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. -/// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. -/// -/// -public sealed partial class PutInferenceRequestDescriptor : RequestDescriptor -{ - internal PutInferenceRequestDescriptor(Action configure) => configure.Invoke(this); - public PutInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) => InferenceConfigValue = inferenceConfig; - public PutInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) => InferenceConfigValue = inferenceConfig; - - internal override ApiUrls ApiUrls => ApiUrlLookup.InferencePut; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "inference.put"; - - public PutInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) - { - RouteValues.Required("inference_id", inferenceId); - return Self; - } - - public PutInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) - { - RouteValues.Optional("task_type", taskType); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpointDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } - - public PutInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public PutInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpointDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public PutInferenceRequestDescriptor InferenceConfig(Action configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs deleted file mode 100644 index 88c831242f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs +++ /dev/null @@ -1,70 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public sealed partial class PutInferenceResponse : ElasticsearchResponse -{ - /// - /// - /// The inference Id - /// - /// - [JsonInclude, JsonPropertyName("inference_id")] - public string InferenceId { get; init; } - - /// - /// - /// The service type - /// - /// - [JsonInclude, JsonPropertyName("service")] - public string Service { get; init; } - - /// - /// - /// Settings specific to the service - /// - /// - [JsonInclude, JsonPropertyName("service_settings")] - public object ServiceSettings { get; init; } - - /// - /// - /// Task settings specific to the service and task type - /// - /// - [JsonInclude, JsonPropertyName("task_settings")] - public object? TaskSettings { get; init; } - - /// - /// - /// The task type - /// - /// - [JsonInclude, JsonPropertyName("task_type")] - public Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType TaskType { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoRequest.g.cs deleted file mode 100644 index 7b25a03ae4e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoRequest.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class InfoRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get cluster info. -/// Returns basic information about the cluster. -/// -/// -public sealed partial class InfoRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "info"; -} - -/// -/// -/// Get cluster info. -/// Returns basic information about the cluster. -/// -/// -public sealed partial class InfoRequestDescriptor : RequestDescriptor -{ - internal InfoRequestDescriptor(Action configure) => configure.Invoke(this); - - public InfoRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "info"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoResponse.g.cs deleted file mode 100644 index d700df38225..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/InfoResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class InfoResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("cluster_uuid")] - public string ClusterUuid { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("tagline")] - public string Tagline { get; init; } - [JsonInclude, JsonPropertyName("version")] - public Elastic.Clients.Elasticsearch.Serverless.ElasticsearchVersionInfo Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseRequest.g.cs deleted file mode 100644 index 6825d0efc96..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseRequest.g.cs +++ /dev/null @@ -1,159 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DeleteGeoipDatabaseRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete GeoIP database configurations. -/// Delete one or more IP geolocation database configurations. -/// -/// -public sealed partial class DeleteGeoipDatabaseRequest : PlainRequest -{ - public DeleteGeoipDatabaseRequest(Elastic.Clients.Elasticsearch.Serverless.Ids id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeleteGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_geoip_database"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete GeoIP database configurations. -/// Delete one or more IP geolocation database configurations. -/// -/// -public sealed partial class DeleteGeoipDatabaseRequestDescriptor : RequestDescriptor, DeleteGeoipDatabaseRequestParameters> -{ - internal DeleteGeoipDatabaseRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteGeoipDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeleteGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_geoip_database"; - - public DeleteGeoipDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteGeoipDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteGeoipDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete GeoIP database configurations. -/// Delete one or more IP geolocation database configurations. -/// -/// -public sealed partial class DeleteGeoipDatabaseRequestDescriptor : RequestDescriptor -{ - internal DeleteGeoipDatabaseRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteGeoipDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeleteGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_geoip_database"; - - public DeleteGeoipDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteGeoipDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteGeoipDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseResponse.g.cs deleted file mode 100644 index d25a7acde05..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteGeoipDatabaseResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DeleteGeoipDatabaseResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseRequest.g.cs deleted file mode 100644 index 4ef93c572ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseRequest.g.cs +++ /dev/null @@ -1,162 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DeleteIpLocationDatabaseRequestParameters : RequestParameters -{ - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// The period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete IP geolocation database configurations. -/// -/// -public sealed partial class DeleteIpLocationDatabaseRequest : PlainRequest -{ - public DeleteIpLocationDatabaseRequest(Elastic.Clients.Elasticsearch.Serverless.Ids id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeleteIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_ip_location_database"; - - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// The period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete IP geolocation database configurations. -/// -/// -public sealed partial class DeleteIpLocationDatabaseRequestDescriptor : RequestDescriptor, DeleteIpLocationDatabaseRequestParameters> -{ - internal DeleteIpLocationDatabaseRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteIpLocationDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeleteIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_ip_location_database"; - - public DeleteIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteIpLocationDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteIpLocationDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete IP geolocation database configurations. -/// -/// -public sealed partial class DeleteIpLocationDatabaseRequestDescriptor : RequestDescriptor -{ - internal DeleteIpLocationDatabaseRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteIpLocationDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeleteIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_ip_location_database"; - - public DeleteIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteIpLocationDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteIpLocationDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseResponse.g.cs deleted file mode 100644 index faadfbc99b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeleteIpLocationDatabaseResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DeleteIpLocationDatabaseResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineRequest.g.cs deleted file mode 100644 index 7ca30807a48..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineRequest.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DeletePipelineRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete pipelines. -/// Delete one or more ingest pipelines. -/// -/// -public sealed partial class DeletePipelineRequest : PlainRequest -{ - public DeletePipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeletePipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_pipeline"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete pipelines. -/// Delete one or more ingest pipelines. -/// -/// -public sealed partial class DeletePipelineRequestDescriptor : RequestDescriptor, DeletePipelineRequestParameters> -{ - internal DeletePipelineRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeletePipelineRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeletePipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_pipeline"; - - public DeletePipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeletePipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeletePipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete pipelines. -/// Delete one or more ingest pipelines. -/// -/// -public sealed partial class DeletePipelineRequestDescriptor : RequestDescriptor -{ - internal DeletePipelineRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeletePipelineRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestDeletePipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.delete_pipeline"; - - public DeletePipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeletePipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeletePipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineResponse.g.cs deleted file mode 100644 index a607d2fedf7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/DeletePipelineResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DeletePipelineResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs deleted file mode 100644 index 6c5d918bd4c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsRequest.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GeoIpStatsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get GeoIP statistics. -/// Get download statistics for GeoIP2 databases that are used with the GeoIP processor. -/// -/// -public sealed partial class GeoIpStatsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGeoIpStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.geo_ip_stats"; -} - -/// -/// -/// Get GeoIP statistics. -/// Get download statistics for GeoIP2 databases that are used with the GeoIP processor. -/// -/// -public sealed partial class GeoIpStatsRequestDescriptor : RequestDescriptor -{ - internal GeoIpStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GeoIpStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGeoIpStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.geo_ip_stats"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsResponse.g.cs deleted file mode 100644 index cf6f1342cd0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GeoIpStatsResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GeoIpStatsResponse : ElasticsearchResponse -{ - /// - /// - /// Downloaded GeoIP2 databases for each node. - /// - /// - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - - /// - /// - /// Download statistics for all GeoIP2 databases. - /// - /// - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpDownloadStatistics Stats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseRequest.g.cs deleted file mode 100644 index 86dbc98c407..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseRequest.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GetGeoipDatabaseRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get GeoIP database configurations. -/// Get information about one or more IP geolocation database configurations. -/// -/// -public sealed partial class GetGeoipDatabaseRequest : PlainRequest -{ - public GetGeoipDatabaseRequest() - { - } - - public GetGeoipDatabaseRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_geoip_database"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get GeoIP database configurations. -/// Get information about one or more IP geolocation database configurations. -/// -/// -public sealed partial class GetGeoipDatabaseRequestDescriptor : RequestDescriptor, GetGeoipDatabaseRequestParameters> -{ - internal GetGeoipDatabaseRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetGeoipDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? id) : base(r => r.Optional("id", id)) - { - } - - public GetGeoipDatabaseRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_geoip_database"; - - public GetGeoipDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetGeoipDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get GeoIP database configurations. -/// Get information about one or more IP geolocation database configurations. -/// -/// -public sealed partial class GetGeoipDatabaseRequestDescriptor : RequestDescriptor -{ - internal GetGeoipDatabaseRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetGeoipDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? id) : base(r => r.Optional("id", id)) - { - } - - public GetGeoipDatabaseRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_geoip_database"; - - public GetGeoipDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetGeoipDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseResponse.g.cs deleted file mode 100644 index 92e10c2b774..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetGeoipDatabaseResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GetGeoipDatabaseResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("databases")] - public IReadOnlyCollection Databases { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs deleted file mode 100644 index 587dfb864e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseRequest.g.cs +++ /dev/null @@ -1,153 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GetIpLocationDatabaseRequestParameters : RequestParameters -{ - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get IP geolocation database configurations. -/// -/// -public sealed partial class GetIpLocationDatabaseRequest : PlainRequest -{ - public GetIpLocationDatabaseRequest() - { - } - - public GetIpLocationDatabaseRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_ip_location_database"; - - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get IP geolocation database configurations. -/// -/// -public sealed partial class GetIpLocationDatabaseRequestDescriptor : RequestDescriptor, GetIpLocationDatabaseRequestParameters> -{ - internal GetIpLocationDatabaseRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetIpLocationDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? id) : base(r => r.Optional("id", id)) - { - } - - public GetIpLocationDatabaseRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_ip_location_database"; - - public GetIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIpLocationDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get IP geolocation database configurations. -/// -/// -public sealed partial class GetIpLocationDatabaseRequestDescriptor : RequestDescriptor -{ - internal GetIpLocationDatabaseRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetIpLocationDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? id) : base(r => r.Optional("id", id)) - { - } - - public GetIpLocationDatabaseRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_ip_location_database"; - - public GetIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetIpLocationDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Ids? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseResponse.g.cs deleted file mode 100644 index 3413683d5e0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetIpLocationDatabaseResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GetIpLocationDatabaseResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("databases")] - public IReadOnlyCollection Databases { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineRequest.g.cs deleted file mode 100644 index b7c807774e5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineRequest.g.cs +++ /dev/null @@ -1,174 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GetPipelineRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Return pipelines without their definitions (default: false) - /// - /// - public bool? Summary { get => Q("summary"); set => Q("summary", value); } -} - -/// -/// -/// Get pipelines. -/// Get information about one or more ingest pipelines. -/// This API returns a local reference of the pipeline. -/// -/// -public sealed partial class GetPipelineRequest : PlainRequest -{ - public GetPipelineRequest() - { - } - - public GetPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetPipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_pipeline"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Return pipelines without their definitions (default: false) - /// - /// - [JsonIgnore] - public bool? Summary { get => Q("summary"); set => Q("summary", value); } -} - -/// -/// -/// Get pipelines. -/// Get information about one or more ingest pipelines. -/// This API returns a local reference of the pipeline. -/// -/// -public sealed partial class GetPipelineRequestDescriptor : RequestDescriptor, GetPipelineRequestParameters> -{ - internal GetPipelineRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetPipelineRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public GetPipelineRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetPipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_pipeline"; - - public GetPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public GetPipelineRequestDescriptor Summary(bool? summary = true) => Qs("summary", summary); - - public GetPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get pipelines. -/// Get information about one or more ingest pipelines. -/// This API returns a local reference of the pipeline. -/// -/// -public sealed partial class GetPipelineRequestDescriptor : RequestDescriptor -{ - internal GetPipelineRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetPipelineRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public GetPipelineRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestGetPipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.get_pipeline"; - - public GetPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public GetPipelineRequestDescriptor Summary(bool? summary = true) => Qs("summary", summary); - - public GetPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineResponse.g.cs deleted file mode 100644 index 489c01f2f17..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/GetPipelineResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GetPipelineResponse : DictionaryResponse -{ - public GetPipelineResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetPipelineResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokRequest.g.cs deleted file mode 100644 index 6478185d553..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class ProcessorGrokRequestParameters : RequestParameters -{ -} - -/// -/// -/// Run a grok processor. -/// Extract structured fields out of a single text field within a document. -/// You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. -/// A grok pattern is like a regular expression that supports aliased expressions that can be reused. -/// -/// -public sealed partial class ProcessorGrokRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestProcessorGrok; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.processor_grok"; -} - -/// -/// -/// Run a grok processor. -/// Extract structured fields out of a single text field within a document. -/// You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. -/// A grok pattern is like a regular expression that supports aliased expressions that can be reused. -/// -/// -public sealed partial class ProcessorGrokRequestDescriptor : RequestDescriptor -{ - internal ProcessorGrokRequestDescriptor(Action configure) => configure.Invoke(this); - - public ProcessorGrokRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestProcessorGrok; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ingest.processor_grok"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokResponse.g.cs deleted file mode 100644 index ec998cacb5b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/ProcessorGrokResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class ProcessorGrokResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("patterns")] - public IReadOnlyDictionary Patterns { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseRequest.g.cs deleted file mode 100644 index ebb0017a9bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseRequest.g.cs +++ /dev/null @@ -1,308 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PutGeoipDatabaseRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update a GeoIP database configuration. -/// Refer to the create or update IP geolocation database configuration API. -/// -/// -public sealed partial class PutGeoipDatabaseRequest : PlainRequest -{ - public PutGeoipDatabaseRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_geoip_database"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. - /// At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured. - /// - /// - [JsonInclude, JsonPropertyName("maxmind")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind Maxmind { get; set; } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name Name { get; set; } -} - -/// -/// -/// Create or update a GeoIP database configuration. -/// Refer to the create or update IP geolocation database configuration API. -/// -/// -public sealed partial class PutGeoipDatabaseRequestDescriptor : RequestDescriptor, PutGeoipDatabaseRequestParameters> -{ - internal PutGeoipDatabaseRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutGeoipDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_geoip_database"; - - public PutGeoipDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutGeoipDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutGeoipDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind MaxmindValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.MaxmindDescriptor MaxmindDescriptor { get; set; } - private Action MaxmindDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - - /// - /// - /// The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. - /// At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured. - /// - /// - public PutGeoipDatabaseRequestDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) - { - MaxmindDescriptor = null; - MaxmindDescriptorAction = null; - MaxmindValue = maxmind; - return Self; - } - - public PutGeoipDatabaseRequestDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.MaxmindDescriptor descriptor) - { - MaxmindValue = null; - MaxmindDescriptorAction = null; - MaxmindDescriptor = descriptor; - return Self; - } - - public PutGeoipDatabaseRequestDescriptor Maxmind(Action configure) - { - MaxmindValue = null; - MaxmindDescriptor = null; - MaxmindDescriptorAction = configure; - return Self; - } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - public PutGeoipDatabaseRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxmindDescriptor is not null) - { - writer.WritePropertyName("maxmind"); - JsonSerializer.Serialize(writer, MaxmindDescriptor, options); - } - else if (MaxmindDescriptorAction is not null) - { - writer.WritePropertyName("maxmind"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.MaxmindDescriptor(MaxmindDescriptorAction), options); - } - else - { - writer.WritePropertyName("maxmind"); - JsonSerializer.Serialize(writer, MaxmindValue, options); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update a GeoIP database configuration. -/// Refer to the create or update IP geolocation database configuration API. -/// -/// -public sealed partial class PutGeoipDatabaseRequestDescriptor : RequestDescriptor -{ - internal PutGeoipDatabaseRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutGeoipDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutGeoipDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_geoip_database"; - - public PutGeoipDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutGeoipDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutGeoipDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind MaxmindValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.MaxmindDescriptor MaxmindDescriptor { get; set; } - private Action MaxmindDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - - /// - /// - /// The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. - /// At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured. - /// - /// - public PutGeoipDatabaseRequestDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) - { - MaxmindDescriptor = null; - MaxmindDescriptorAction = null; - MaxmindValue = maxmind; - return Self; - } - - public PutGeoipDatabaseRequestDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.MaxmindDescriptor descriptor) - { - MaxmindValue = null; - MaxmindDescriptorAction = null; - MaxmindDescriptor = descriptor; - return Self; - } - - public PutGeoipDatabaseRequestDescriptor Maxmind(Action configure) - { - MaxmindValue = null; - MaxmindDescriptor = null; - MaxmindDescriptorAction = configure; - return Self; - } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - public PutGeoipDatabaseRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxmindDescriptor is not null) - { - writer.WritePropertyName("maxmind"); - JsonSerializer.Serialize(writer, MaxmindDescriptor, options); - } - else if (MaxmindDescriptorAction is not null) - { - writer.WritePropertyName("maxmind"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.MaxmindDescriptor(MaxmindDescriptorAction), options); - } - else - { - writer.WritePropertyName("maxmind"); - JsonSerializer.Serialize(writer, MaxmindValue, options); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseResponse.g.cs deleted file mode 100644 index c098d37a2a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutGeoipDatabaseResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PutGeoipDatabaseResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseRequest.g.cs deleted file mode 100644 index 8f337335f24..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseRequest.g.cs +++ /dev/null @@ -1,221 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PutIpLocationDatabaseRequestParameters : RequestParameters -{ - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response indicates that it was not completely acknowledged. - /// A value of -1 indicates that the request should never time out. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update an IP geolocation database configuration. -/// -/// -public sealed partial class PutIpLocationDatabaseRequest : PlainRequest, ISelfSerializable -{ - public PutIpLocationDatabaseRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_ip_location_database"; - - /// - /// - /// The period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// A value of -1 indicates that the request should never time out. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response indicates that it was not completely acknowledged. - /// A value of -1 indicates that the request should never time out. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration Configuration { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, Configuration, options); - } -} - -/// -/// -/// Create or update an IP geolocation database configuration. -/// -/// -public sealed partial class PutIpLocationDatabaseRequestDescriptor : RequestDescriptor, PutIpLocationDatabaseRequestParameters> -{ - internal PutIpLocationDatabaseRequestDescriptor(Action> configure) => configure.Invoke(this); - public PutIpLocationDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) => ConfigurationValue = configuration; - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_ip_location_database"; - - public PutIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutIpLocationDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutIpLocationDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration ConfigurationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationDescriptor ConfigurationDescriptor { get; set; } - private Action ConfigurationDescriptorAction { get; set; } - - public PutIpLocationDatabaseRequestDescriptor Configuration(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration) - { - ConfigurationDescriptor = null; - ConfigurationDescriptorAction = null; - ConfigurationValue = configuration; - return Self; - } - - public PutIpLocationDatabaseRequestDescriptor Configuration(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationDescriptor descriptor) - { - ConfigurationValue = null; - ConfigurationDescriptorAction = null; - ConfigurationDescriptor = descriptor; - return Self; - } - - public PutIpLocationDatabaseRequestDescriptor Configuration(Action configure) - { - ConfigurationValue = null; - ConfigurationDescriptor = null; - ConfigurationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, ConfigurationValue, options); - } -} - -/// -/// -/// Create or update an IP geolocation database configuration. -/// -/// -public sealed partial class PutIpLocationDatabaseRequestDescriptor : RequestDescriptor -{ - internal PutIpLocationDatabaseRequestDescriptor(Action configure) => configure.Invoke(this); - public PutIpLocationDatabaseRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) => ConfigurationValue = configuration; - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutIpLocationDatabase; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_ip_location_database"; - - public PutIpLocationDatabaseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutIpLocationDatabaseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutIpLocationDatabaseRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration ConfigurationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationDescriptor ConfigurationDescriptor { get; set; } - private Action ConfigurationDescriptorAction { get; set; } - - public PutIpLocationDatabaseRequestDescriptor Configuration(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration) - { - ConfigurationDescriptor = null; - ConfigurationDescriptorAction = null; - ConfigurationValue = configuration; - return Self; - } - - public PutIpLocationDatabaseRequestDescriptor Configuration(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationDescriptor descriptor) - { - ConfigurationValue = null; - ConfigurationDescriptorAction = null; - ConfigurationDescriptor = descriptor; - return Self; - } - - public PutIpLocationDatabaseRequestDescriptor Configuration(Action configure) - { - ConfigurationValue = null; - ConfigurationDescriptor = null; - ConfigurationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, ConfigurationValue, options); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseResponse.g.cs deleted file mode 100644 index 3f5f8d048f0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutIpLocationDatabaseResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PutIpLocationDatabaseResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs deleted file mode 100644 index 74a90e43160..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ /dev/null @@ -1,679 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PutPipelineRequestParameters : RequestParameters -{ - /// - /// - /// Required version for optimistic concurrency control for pipeline updates - /// - /// - public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update a pipeline. -/// Changes made using this API take effect immediately. -/// -/// -public sealed partial class PutPipelineRequest : PlainRequest -{ - public PutPipelineRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutPipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_pipeline"; - - /// - /// - /// Required version for optimistic concurrency control for pipeline updates - /// - /// - [JsonIgnore] - public long? IfVersion { get => Q("if_version"); set => Q("if_version", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Marks this ingest pipeline as deprecated. - /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. - /// - /// - [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; set; } - - /// - /// - /// Description of the ingest pipeline. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// Processors to run immediately after a processor failure. Each processor supports a processor-level on_failure value. If a processor without an on_failure value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. - /// - /// - [JsonInclude, JsonPropertyName("processors")] - public ICollection? Processors { get; set; } - - /// - /// - /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -/// -/// -/// Create or update a pipeline. -/// Changes made using this API take effect immediately. -/// -/// -public sealed partial class PutPipelineRequestDescriptor : RequestDescriptor, PutPipelineRequestParameters> -{ - internal PutPipelineRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutPipelineRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutPipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_pipeline"; - - public PutPipelineRequestDescriptor IfVersion(long? ifVersion) => Qs("if_version", ifVersion); - public PutPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutPipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private bool? DeprecatedValue { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? MetaValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? ProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor ProcessorsDescriptor { get; set; } - private Action> ProcessorsDescriptorAction { get; set; } - private Action>[] ProcessorsDescriptorActions { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Marks this ingest pipeline as deprecated. - /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. - /// - /// - public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// Description of the ingest pipeline. - /// - /// - public PutPipelineRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - /// - public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Processors to run immediately after a processor failure. Each processor supports a processor-level on_failure value. If a processor without an on_failure value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. - /// - /// - public PutPipelineRequestDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PutPipelineRequestDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PutPipelineRequestDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PutPipelineRequestDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. - /// - /// - public PutPipelineRequestDescriptor Processors(ICollection? processors) - { - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsValue = processors; - return Self; - } - - public PutPipelineRequestDescriptor Processors(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - ProcessorsValue = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptor = descriptor; - return Self; - } - - public PutPipelineRequestDescriptor Processors(Action> configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptorAction = configure; - return Self; - } - - public PutPipelineRequestDescriptor Processors(params Action>[] configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. - /// - /// - public PutPipelineRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ProcessorsDescriptor is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(ProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - foreach (var action in ProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ProcessorsValue is not null) - { - writer.WritePropertyName("processors"); - JsonSerializer.Serialize(writer, ProcessorsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update a pipeline. -/// Changes made using this API take effect immediately. -/// -/// -public sealed partial class PutPipelineRequestDescriptor : RequestDescriptor -{ - internal PutPipelineRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutPipelineRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestPutPipeline; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.put_pipeline"; - - public PutPipelineRequestDescriptor IfVersion(long? ifVersion) => Qs("if_version", ifVersion); - public PutPipelineRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutPipelineRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutPipelineRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private bool? DeprecatedValue { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? MetaValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? ProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor ProcessorsDescriptor { get; set; } - private Action ProcessorsDescriptorAction { get; set; } - private Action[] ProcessorsDescriptorActions { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Marks this ingest pipeline as deprecated. - /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. - /// - /// - public PutPipelineRequestDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// Description of the ingest pipeline. - /// - /// - public PutPipelineRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. - /// - /// - public PutPipelineRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Processors to run immediately after a processor failure. Each processor supports a processor-level on_failure value. If a processor without an on_failure value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. - /// - /// - public PutPipelineRequestDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PutPipelineRequestDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PutPipelineRequestDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PutPipelineRequestDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. - /// - /// - public PutPipelineRequestDescriptor Processors(ICollection? processors) - { - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsValue = processors; - return Self; - } - - public PutPipelineRequestDescriptor Processors(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - ProcessorsValue = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptor = descriptor; - return Self; - } - - public PutPipelineRequestDescriptor Processors(Action configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptorAction = configure; - return Self; - } - - public PutPipelineRequestDescriptor Processors(params Action[] configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. - /// - /// - public PutPipelineRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ProcessorsDescriptor is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(ProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - foreach (var action in ProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ProcessorsValue is not null) - { - writer.WritePropertyName("processors"); - JsonSerializer.Serialize(writer, ProcessorsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineResponse.g.cs deleted file mode 100644 index 1e248573d0c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/PutPipelineResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PutPipelineResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs deleted file mode 100644 index 75bbaf50ecf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateRequest.g.cs +++ /dev/null @@ -1,431 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SimulateRequestParameters : RequestParameters -{ - /// - /// - /// If true, the response includes output data for each processor in the executed pipeline. - /// - /// - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Simulate a pipeline. -/// Run an ingest pipeline against a set of provided documents. -/// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. -/// -/// -public sealed partial class SimulateRequest : PlainRequest -{ - public SimulateRequest() - { - } - - public SimulateRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestSimulate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.simulate"; - - /// - /// - /// If true, the response includes output data for each processor in the executed pipeline. - /// - /// - [JsonIgnore] - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } - - /// - /// - /// Sample documents to test in the pipeline. - /// - /// - [JsonInclude, JsonPropertyName("docs")] - public ICollection Docs { get; set; } - - /// - /// - /// Pipeline to test. - /// If you don’t specify the pipeline request path parameter, this parameter is required. - /// If you specify both this and the request path parameter, the API only uses the request path parameter. - /// - /// - [JsonInclude, JsonPropertyName("pipeline")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? Pipeline { get; set; } -} - -/// -/// -/// Simulate a pipeline. -/// Run an ingest pipeline against a set of provided documents. -/// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. -/// -/// -public sealed partial class SimulateRequestDescriptor : RequestDescriptor, SimulateRequestParameters> -{ - internal SimulateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SimulateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public SimulateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestSimulate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.simulate"; - - public SimulateRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private ICollection DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? PipelineValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineDescriptor PipelineDescriptor { get; set; } - private Action> PipelineDescriptorAction { get; set; } - - /// - /// - /// Sample documents to test in the pipeline. - /// - /// - public SimulateRequestDescriptor Docs(ICollection docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public SimulateRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Docs(Action configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public SimulateRequestDescriptor Docs(params Action[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Pipeline to test. - /// If you don’t specify the pipeline request path parameter, this parameter is required. - /// If you specify both this and the request path parameter, the API only uses the request path parameter. - /// - /// - public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? pipeline) - { - PipelineDescriptor = null; - PipelineDescriptorAction = null; - PipelineValue = pipeline; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineDescriptor descriptor) - { - PipelineValue = null; - PipelineDescriptorAction = null; - PipelineDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Action> configure) - { - PipelineValue = null; - PipelineDescriptor = null; - PipelineDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (PipelineDescriptor is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineDescriptor, options); - } - else if (PipelineDescriptorAction is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineDescriptor(PipelineDescriptorAction), options); - } - else if (PipelineValue is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Simulate a pipeline. -/// Run an ingest pipeline against a set of provided documents. -/// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. -/// -/// -public sealed partial class SimulateRequestDescriptor : RequestDescriptor -{ - internal SimulateRequestDescriptor(Action configure) => configure.Invoke(this); - - public SimulateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public SimulateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IngestSimulate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ingest.simulate"; - - public SimulateRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public SimulateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private ICollection DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? PipelineValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineDescriptor PipelineDescriptor { get; set; } - private Action PipelineDescriptorAction { get; set; } - - /// - /// - /// Sample documents to test in the pipeline. - /// - /// - public SimulateRequestDescriptor Docs(ICollection docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public SimulateRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Docs(Action configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public SimulateRequestDescriptor Docs(params Action[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Pipeline to test. - /// If you don’t specify the pipeline request path parameter, this parameter is required. - /// If you specify both this and the request path parameter, the API only uses the request path parameter. - /// - /// - public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.Pipeline? pipeline) - { - PipelineDescriptor = null; - PipelineDescriptorAction = null; - PipelineValue = pipeline; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineDescriptor descriptor) - { - PipelineValue = null; - PipelineDescriptorAction = null; - PipelineDescriptor = descriptor; - return Self; - } - - public SimulateRequestDescriptor Pipeline(Action configure) - { - PipelineValue = null; - PipelineDescriptor = null; - PipelineDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (PipelineDescriptor is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineDescriptor, options); - } - else if (PipelineDescriptorAction is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineDescriptor(PipelineDescriptorAction), options); - } - else if (PipelineValue is not null) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, PipelineValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateResponse.g.cs deleted file mode 100644 index ce9751221ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Ingest/SimulateResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SimulateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("docs")] - public IReadOnlyCollection Docs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs deleted file mode 100644 index 0447d435a07..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.LicenseManagement; - -public sealed partial class GetLicenseRequestParameters : RequestParameters -{ - /// - /// - /// Specifies whether to retrieve local information. The default value is false, which means the information is retrieved from the master node. - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } -} - -/// -/// -/// Get license information. -/// Get information about your Elastic license including its type, its status, when it was issued, and when it expires. -/// -/// -/// NOTE: If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. -/// If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request. -/// -/// -public sealed partial class GetLicenseRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.LicenseManagementGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "license.get"; - - /// - /// - /// Specifies whether to retrieve local information. The default value is false, which means the information is retrieved from the master node. - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } -} - -/// -/// -/// Get license information. -/// Get information about your Elastic license including its type, its status, when it was issued, and when it expires. -/// -/// -/// NOTE: If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. -/// If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request. -/// -/// -public sealed partial class GetLicenseRequestDescriptor : RequestDescriptor -{ - internal GetLicenseRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetLicenseRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.LicenseManagementGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "license.get"; - - public GetLicenseRequestDescriptor Local(bool? local = true) => Qs("local", local); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseResponse.g.cs deleted file mode 100644 index 8fa51607bf7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/LicenseManagement/GetLicenseResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.LicenseManagement; - -public sealed partial class GetLicenseResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("license")] - public Elastic.Clients.Elasticsearch.Serverless.LicenseManagement.LicenseInformation License { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheRequest.g.cs deleted file mode 100644 index b70da8b4f0b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ClearTrainedModelDeploymentCacheRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear trained model deployment cache. -/// Cache will be cleared on all nodes where the trained model is assigned. -/// A trained model deployment may have an inference cache enabled. -/// As requests are handled by each allocated node, their responses may be cached on that individual node. -/// Calling this API clears the caches without restarting the deployment. -/// -/// -public sealed partial class ClearTrainedModelDeploymentCacheRequest : PlainRequest -{ - public ClearTrainedModelDeploymentCacheRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningClearTrainedModelDeploymentCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.clear_trained_model_deployment_cache"; -} - -/// -/// -/// Clear trained model deployment cache. -/// Cache will be cleared on all nodes where the trained model is assigned. -/// A trained model deployment may have an inference cache enabled. -/// As requests are handled by each allocated node, their responses may be cached on that individual node. -/// Calling this API clears the caches without restarting the deployment. -/// -/// -public sealed partial class ClearTrainedModelDeploymentCacheRequestDescriptor : RequestDescriptor -{ - internal ClearTrainedModelDeploymentCacheRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearTrainedModelDeploymentCacheRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningClearTrainedModelDeploymentCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.clear_trained_model_deployment_cache"; - - public ClearTrainedModelDeploymentCacheRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheResponse.g.cs deleted file mode 100644 index 85eda28ed17..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ClearTrainedModelDeploymentCacheResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ClearTrainedModelDeploymentCacheResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cleared")] - public bool Cleared { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobRequest.g.cs deleted file mode 100644 index 58d90c398c7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobRequest.g.cs +++ /dev/null @@ -1,176 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class CloseJobRequestParameters : RequestParameters -{ -} - -/// -/// -/// Close anomaly detection jobs. -/// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. -/// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. -/// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. -/// When a datafeed that has a specified end date stops, it automatically closes its associated job. -/// -/// -public sealed partial class CloseJobRequest : PlainRequest -{ - public CloseJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningCloseJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.close_job"; - - /// - /// - /// Refer to the description for the allow_no_match query parameter. - /// - /// - [JsonInclude, JsonPropertyName("allow_no_match")] - public bool? AllowNoMatch { get; set; } - - /// - /// - /// Refer to the descriptiion for the force query parameter. - /// - /// - [JsonInclude, JsonPropertyName("force")] - public bool? Force { get; set; } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } -} - -/// -/// -/// Close anomaly detection jobs. -/// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. -/// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. -/// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. -/// When a datafeed that has a specified end date stops, it automatically closes its associated job. -/// -/// -public sealed partial class CloseJobRequestDescriptor : RequestDescriptor -{ - internal CloseJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public CloseJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningCloseJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.close_job"; - - public CloseJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private bool? AllowNoMatchValue { get; set; } - private bool? ForceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// Refer to the description for the allow_no_match query parameter. - /// - /// - public CloseJobRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) - { - AllowNoMatchValue = allowNoMatch; - return Self; - } - - /// - /// - /// Refer to the descriptiion for the force query parameter. - /// - /// - public CloseJobRequestDescriptor Force(bool? force = true) - { - ForceValue = force; - return Self; - } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - public CloseJobRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowNoMatchValue.HasValue) - { - writer.WritePropertyName("allow_no_match"); - writer.WriteBooleanValue(AllowNoMatchValue.Value); - } - - if (ForceValue.HasValue) - { - writer.WritePropertyName("force"); - writer.WriteBooleanValue(ForceValue.Value); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobResponse.g.cs deleted file mode 100644 index 77e3416af09..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/CloseJobResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class CloseJobResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("closed")] - public bool Closed { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventRequest.g.cs deleted file mode 100644 index a9193fe4006..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteCalendarEventRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete events from a calendar. -/// -/// -public sealed partial class DeleteCalendarEventRequest : PlainRequest -{ - public DeleteCalendarEventRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Id eventId) : base(r => r.Required("calendar_id", calendarId).Required("event_id", eventId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteCalendarEvent; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_calendar_event"; -} - -/// -/// -/// Delete events from a calendar. -/// -/// -public sealed partial class DeleteCalendarEventRequestDescriptor : RequestDescriptor -{ - internal DeleteCalendarEventRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteCalendarEventRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Id eventId) : base(r => r.Required("calendar_id", calendarId).Required("event_id", eventId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteCalendarEvent; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_calendar_event"; - - public DeleteCalendarEventRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - public DeleteCalendarEventRequestDescriptor EventId(Elastic.Clients.Elasticsearch.Serverless.Id eventId) - { - RouteValues.Required("event_id", eventId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventResponse.g.cs deleted file mode 100644 index f71ba556930..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarEventResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteCalendarEventResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobRequest.g.cs deleted file mode 100644 index 5926fd2b73c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteCalendarJobRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete anomaly jobs from a calendar. -/// -/// -public sealed partial class DeleteCalendarJobRequest : PlainRequest -{ - public DeleteCalendarJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId) : base(r => r.Required("calendar_id", calendarId).Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteCalendarJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_calendar_job"; -} - -/// -/// -/// Delete anomaly jobs from a calendar. -/// -/// -public sealed partial class DeleteCalendarJobRequestDescriptor : RequestDescriptor -{ - internal DeleteCalendarJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteCalendarJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId) : base(r => r.Required("calendar_id", calendarId).Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteCalendarJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_calendar_job"; - - public DeleteCalendarJobRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - public DeleteCalendarJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Ids jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobResponse.g.cs deleted file mode 100644 index 93f5a7e4768..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarJobResponse.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteCalendarJobResponse : ElasticsearchResponse -{ - /// - /// - /// A string that uniquely identifies a calendar. - /// - /// - [JsonInclude, JsonPropertyName("calendar_id")] - public string CalendarId { get; init; } - - /// - /// - /// A description of the calendar. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// A list of anomaly detection job identifiers or group names. - /// - /// - [JsonInclude, JsonPropertyName("job_ids")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection JobIds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarRequest.g.cs deleted file mode 100644 index b77793deb14..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarRequest.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteCalendarRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a calendar. -/// Removes all scheduled events from a calendar, then deletes it. -/// -/// -public sealed partial class DeleteCalendarRequest : PlainRequest -{ - public DeleteCalendarRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteCalendar; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_calendar"; -} - -/// -/// -/// Delete a calendar. -/// Removes all scheduled events from a calendar, then deletes it. -/// -/// -public sealed partial class DeleteCalendarRequestDescriptor : RequestDescriptor -{ - internal DeleteCalendarRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteCalendarRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteCalendar; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_calendar"; - - public DeleteCalendarRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarResponse.g.cs deleted file mode 100644 index e52c9343723..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteCalendarResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteCalendarResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index 7be7cfbcf04..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteDataFrameAnalyticsRequestParameters : RequestParameters -{ - /// - /// - /// If true, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// The time to wait for the job to be deleted. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete a data frame analytics job. -/// -/// -public sealed partial class DeleteDataFrameAnalyticsRequest : PlainRequest -{ - public DeleteDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_data_frame_analytics"; - - /// - /// - /// If true, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// The time to wait for the job to be deleted. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete a data frame analytics job. -/// -/// -public sealed partial class DeleteDataFrameAnalyticsRequestDescriptor : RequestDescriptor, DeleteDataFrameAnalyticsRequestParameters> -{ - internal DeleteDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_data_frame_analytics"; - - public DeleteDataFrameAnalyticsRequestDescriptor Force(bool? force = true) => Qs("force", force); - public DeleteDataFrameAnalyticsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete a data frame analytics job. -/// -/// -public sealed partial class DeleteDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal DeleteDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_data_frame_analytics"; - - public DeleteDataFrameAnalyticsRequestDescriptor Force(bool? force = true) => Qs("force", force); - public DeleteDataFrameAnalyticsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index 25d09960c32..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDataFrameAnalyticsResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteDataFrameAnalyticsResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedRequest.g.cs deleted file mode 100644 index 00d0678ceed..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteDatafeedRequestParameters : RequestParameters -{ - /// - /// - /// Use to forcefully delete a started datafeed; this method is quicker than - /// stopping and deleting the datafeed. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Delete a datafeed. -/// -/// -public sealed partial class DeleteDatafeedRequest : PlainRequest -{ - public DeleteDatafeedRequest(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_datafeed"; - - /// - /// - /// Use to forcefully delete a started datafeed; this method is quicker than - /// stopping and deleting the datafeed. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Delete a datafeed. -/// -/// -public sealed partial class DeleteDatafeedRequestDescriptor : RequestDescriptor -{ - internal DeleteDatafeedRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_datafeed"; - - public DeleteDatafeedRequestDescriptor Force(bool? force = true) => Qs("force", force); - - public DeleteDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedResponse.g.cs deleted file mode 100644 index 82dcab69bde..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteDatafeedResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteDatafeedResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs deleted file mode 100644 index 4731b95db3b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs +++ /dev/null @@ -1,168 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteExpiredDataRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete expired ML data. -/// Deletes all job results, model snapshots and forecast data that have exceeded -/// their retention days period. Machine learning state documents that are not -/// associated with any job are also deleted. -/// You can limit the request to a single or set of anomaly detection jobs by -/// using a job identifier, a group name, a comma-separated list of jobs, or a -/// wildcard expression. You can delete expired data for all anomaly detection -/// jobs by using _all, by specifying * as the <job_id>, or by omitting the -/// <job_id>. -/// -/// -public sealed partial class DeleteExpiredDataRequest : PlainRequest -{ - public DeleteExpiredDataRequest() - { - } - - public DeleteExpiredDataRequest(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) : base(r => r.Optional("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteExpiredData; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.delete_expired_data"; - - /// - /// - /// The desired requests per second for the deletion processes. The default - /// behavior is no throttling. - /// - /// - [JsonInclude, JsonPropertyName("requests_per_second")] - public float? RequestsPerSecond { get; set; } - - /// - /// - /// How long can the underlying delete processes run until they are canceled. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } -} - -/// -/// -/// Delete expired ML data. -/// Deletes all job results, model snapshots and forecast data that have exceeded -/// their retention days period. Machine learning state documents that are not -/// associated with any job are also deleted. -/// You can limit the request to a single or set of anomaly detection jobs by -/// using a job identifier, a group name, a comma-separated list of jobs, or a -/// wildcard expression. You can delete expired data for all anomaly detection -/// jobs by using _all, by specifying * as the <job_id>, or by omitting the -/// <job_id>. -/// -/// -public sealed partial class DeleteExpiredDataRequestDescriptor : RequestDescriptor -{ - internal DeleteExpiredDataRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteExpiredDataRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) : base(r => r.Optional("job_id", jobId)) - { - } - - public DeleteExpiredDataRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteExpiredData; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.delete_expired_data"; - - public DeleteExpiredDataRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - RouteValues.Optional("job_id", jobId); - return Self; - } - - private float? RequestsPerSecondValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// The desired requests per second for the deletion processes. The default - /// behavior is no throttling. - /// - /// - public DeleteExpiredDataRequestDescriptor RequestsPerSecond(float? requestsPerSecond) - { - RequestsPerSecondValue = requestsPerSecond; - return Self; - } - - /// - /// - /// How long can the underlying delete processes run until they are canceled. - /// - /// - public DeleteExpiredDataRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (RequestsPerSecondValue.HasValue) - { - writer.WritePropertyName("requests_per_second"); - writer.WriteNumberValue(RequestsPerSecondValue.Value); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataResponse.g.cs deleted file mode 100644 index 08048c0922c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteExpiredDataResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteExpiredDataResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("deleted")] - public bool Deleted { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterRequest.g.cs deleted file mode 100644 index c7d73bbee0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterRequest.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteFilterRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a filter. -/// If an anomaly detection job references the filter, you cannot delete the -/// filter. You must update or delete the job before you can delete the filter. -/// -/// -public sealed partial class DeleteFilterRequest : PlainRequest -{ - public DeleteFilterRequest(Elastic.Clients.Elasticsearch.Serverless.Id filterId) : base(r => r.Required("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteFilter; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_filter"; -} - -/// -/// -/// Delete a filter. -/// If an anomaly detection job references the filter, you cannot delete the -/// filter. You must update or delete the job before you can delete the filter. -/// -/// -public sealed partial class DeleteFilterRequestDescriptor : RequestDescriptor -{ - internal DeleteFilterRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteFilterRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id filterId) : base(r => r.Required("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteFilter; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_filter"; - - public DeleteFilterRequestDescriptor FilterId(Elastic.Clients.Elasticsearch.Serverless.Id filterId) - { - RouteValues.Required("filter_id", filterId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterResponse.g.cs deleted file mode 100644 index 1cfbc6d6b8b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteFilterResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteFilterResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastRequest.g.cs deleted file mode 100644 index 65e2a4bcba5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastRequest.g.cs +++ /dev/null @@ -1,151 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteForecastRequestParameters : RequestParameters -{ - /// - /// - /// Specifies whether an error occurs when there are no forecasts. In - /// particular, if this parameter is set to false and there are no - /// forecasts associated with the job, attempts to delete all forecasts - /// return an error. - /// - /// - public bool? AllowNoForecasts { get => Q("allow_no_forecasts"); set => Q("allow_no_forecasts", value); } - - /// - /// - /// Specifies the period of time to wait for the completion of the delete - /// operation. When this period of time elapses, the API fails and returns an - /// error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete forecasts from a job. -/// By default, forecasts are retained for 14 days. You can specify a -/// different retention period with the expires_in parameter in the forecast -/// jobs API. The delete forecast API enables you to delete one or more -/// forecasts before they expire. -/// -/// -public sealed partial class DeleteForecastRequest : PlainRequest -{ - public DeleteForecastRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - public DeleteForecastRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? forecastId) : base(r => r.Required("job_id", jobId).Optional("forecast_id", forecastId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteForecast; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_forecast"; - - /// - /// - /// Specifies whether an error occurs when there are no forecasts. In - /// particular, if this parameter is set to false and there are no - /// forecasts associated with the job, attempts to delete all forecasts - /// return an error. - /// - /// - [JsonIgnore] - public bool? AllowNoForecasts { get => Q("allow_no_forecasts"); set => Q("allow_no_forecasts", value); } - - /// - /// - /// Specifies the period of time to wait for the completion of the delete - /// operation. When this period of time elapses, the API fails and returns an - /// error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete forecasts from a job. -/// By default, forecasts are retained for 14 days. You can specify a -/// different retention period with the expires_in parameter in the forecast -/// jobs API. The delete forecast API enables you to delete one or more -/// forecasts before they expire. -/// -/// -public sealed partial class DeleteForecastRequestDescriptor : RequestDescriptor -{ - internal DeleteForecastRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteForecastRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? forecastId) : base(r => r.Required("job_id", jobId).Optional("forecast_id", forecastId)) - { - } - - public DeleteForecastRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteForecast; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_forecast"; - - public DeleteForecastRequestDescriptor AllowNoForecasts(bool? allowNoForecasts = true) => Qs("allow_no_forecasts", allowNoForecasts); - public DeleteForecastRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteForecastRequestDescriptor ForecastId(Elastic.Clients.Elasticsearch.Serverless.Id? forecastId) - { - RouteValues.Optional("forecast_id", forecastId); - return Self; - } - - public DeleteForecastRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastResponse.g.cs deleted file mode 100644 index f2d0e1be4df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteForecastResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteForecastResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobRequest.g.cs deleted file mode 100644 index b3ae38ccd95..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobRequest.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteJobRequestParameters : RequestParameters -{ - /// - /// - /// Specifies whether annotations that have been added by the - /// user should be deleted along with any auto-generated annotations when the job is - /// reset. - /// - /// - public bool? DeleteUserAnnotations { get => Q("delete_user_annotations"); set => Q("delete_user_annotations", value); } - - /// - /// - /// Use to forcefully delete an opened job; this method is quicker than - /// closing and deleting the job. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Specifies whether the request should return immediately or wait until the - /// job deletion completes. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Delete an anomaly detection job. -/// All job configuration, model state and results are deleted. -/// It is not currently possible to delete multiple jobs using wildcards or a -/// comma separated list. If you delete a job that has a datafeed, the request -/// first tries to delete the datafeed. This behavior is equivalent to calling -/// the delete datafeed API with the same timeout and force parameters as the -/// delete job request. -/// -/// -public sealed partial class DeleteJobRequest : PlainRequest -{ - public DeleteJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_job"; - - /// - /// - /// Specifies whether annotations that have been added by the - /// user should be deleted along with any auto-generated annotations when the job is - /// reset. - /// - /// - [JsonIgnore] - public bool? DeleteUserAnnotations { get => Q("delete_user_annotations"); set => Q("delete_user_annotations", value); } - - /// - /// - /// Use to forcefully delete an opened job; this method is quicker than - /// closing and deleting the job. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Specifies whether the request should return immediately or wait until the - /// job deletion completes. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Delete an anomaly detection job. -/// All job configuration, model state and results are deleted. -/// It is not currently possible to delete multiple jobs using wildcards or a -/// comma separated list. If you delete a job that has a datafeed, the request -/// first tries to delete the datafeed. This behavior is equivalent to calling -/// the delete datafeed API with the same timeout and force parameters as the -/// delete job request. -/// -/// -public sealed partial class DeleteJobRequestDescriptor : RequestDescriptor -{ - internal DeleteJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_job"; - - public DeleteJobRequestDescriptor DeleteUserAnnotations(bool? deleteUserAnnotations = true) => Qs("delete_user_annotations", deleteUserAnnotations); - public DeleteJobRequestDescriptor Force(bool? force = true) => Qs("force", force); - public DeleteJobRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public DeleteJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobResponse.g.cs deleted file mode 100644 index eaba9314e44..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteJobResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteJobResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotRequest.g.cs deleted file mode 100644 index f7f45614a18..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotRequest.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteModelSnapshotRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a model snapshot. -/// You cannot delete the active model snapshot. To delete that snapshot, first -/// revert to a different one. To identify the active model snapshot, refer to -/// the model_snapshot_id in the results from the get jobs API. -/// -/// -public sealed partial class DeleteModelSnapshotRequest : PlainRequest -{ - public DeleteModelSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteModelSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_model_snapshot"; -} - -/// -/// -/// Delete a model snapshot. -/// You cannot delete the active model snapshot. To delete that snapshot, first -/// revert to a different one. To identify the active model snapshot, refer to -/// the model_snapshot_id in the results from the get jobs API. -/// -/// -public sealed partial class DeleteModelSnapshotRequestDescriptor : RequestDescriptor -{ - internal DeleteModelSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteModelSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteModelSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_model_snapshot"; - - public DeleteModelSnapshotRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public DeleteModelSnapshotRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) - { - RouteValues.Required("snapshot_id", snapshotId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotResponse.g.cs deleted file mode 100644 index 4dcd0a28b87..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteModelSnapshotResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteModelSnapshotResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasRequest.g.cs deleted file mode 100644 index 8a2bb6f0332..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasRequest.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteTrainedModelAliasRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a trained model alias. -/// This API deletes an existing model alias that refers to a trained model. If -/// the model alias is missing or refers to a model other than the one identified -/// by the model_id, this API returns an error. -/// -/// -public sealed partial class DeleteTrainedModelAliasRequest : PlainRequest -{ - public DeleteTrainedModelAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias) : base(r => r.Required("model_id", modelId).Required("model_alias", modelAlias)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteTrainedModelAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_trained_model_alias"; -} - -/// -/// -/// Delete a trained model alias. -/// This API deletes an existing model alias that refers to a trained model. If -/// the model alias is missing or refers to a model other than the one identified -/// by the model_id, this API returns an error. -/// -/// -public sealed partial class DeleteTrainedModelAliasRequestDescriptor : RequestDescriptor -{ - internal DeleteTrainedModelAliasRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteTrainedModelAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias) : base(r => r.Required("model_id", modelId).Required("model_alias", modelAlias)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteTrainedModelAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_trained_model_alias"; - - public DeleteTrainedModelAliasRequestDescriptor ModelAlias(Elastic.Clients.Elasticsearch.Serverless.Name modelAlias) - { - RouteValues.Required("model_alias", modelAlias); - return Self; - } - - public DeleteTrainedModelAliasRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasResponse.g.cs deleted file mode 100644 index 77efa89d63c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelAliasResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteTrainedModelAliasResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelRequest.g.cs deleted file mode 100644 index a67f6f1a816..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteTrainedModelRequestParameters : RequestParameters -{ - /// - /// - /// Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Delete an unreferenced trained model. -/// The request deletes a trained inference model that is not referenced by an ingest pipeline. -/// -/// -public sealed partial class DeleteTrainedModelRequest : PlainRequest -{ - public DeleteTrainedModelRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_trained_model"; - - /// - /// - /// Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Delete an unreferenced trained model. -/// The request deletes a trained inference model that is not referenced by an ingest pipeline. -/// -/// -public sealed partial class DeleteTrainedModelRequestDescriptor : RequestDescriptor -{ - internal DeleteTrainedModelRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteTrainedModelRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.delete_trained_model"; - - public DeleteTrainedModelRequestDescriptor Force(bool? force = true) => Qs("force", force); - - public DeleteTrainedModelRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelResponse.g.cs deleted file mode 100644 index 6afafbd30f8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/DeleteTrainedModelResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DeleteTrainedModelResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryRequest.g.cs deleted file mode 100644 index 31aba530006..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryRequest.g.cs +++ /dev/null @@ -1,343 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class EstimateModelMemoryRequestParameters : RequestParameters -{ -} - -/// -/// -/// Estimate job model memory usage. -/// Makes an estimation of the memory usage for an anomaly detection job model. -/// It is based on analysis configuration details for the job and cardinality -/// estimates for the fields it references. -/// -/// -public sealed partial class EstimateModelMemoryRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningEstimateModelMemory; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.estimate_model_memory"; - - /// - /// - /// For a list of the properties that you can specify in the - /// analysis_config component of the body of this API. - /// - /// - [JsonInclude, JsonPropertyName("analysis_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? AnalysisConfig { get; set; } - - /// - /// - /// Estimates of the highest cardinality in a single bucket that is observed - /// for influencer fields over the time period that the job analyzes data. - /// To produce a good answer, values must be provided for all influencer - /// fields. Providing values for fields that are not listed as influencers - /// has no effect on the estimation. - /// - /// - [JsonInclude, JsonPropertyName("max_bucket_cardinality")] - public IDictionary? MaxBucketCardinality { get; set; } - - /// - /// - /// Estimates of the cardinality that is observed for fields over the whole - /// time period that the job analyzes data. To produce a good answer, values - /// must be provided for fields referenced in the by_field_name, - /// over_field_name and partition_field_name of any detectors. Providing - /// values for other fields has no effect on the estimation. It can be - /// omitted from the request if no detectors have a by_field_name, - /// over_field_name or partition_field_name. - /// - /// - [JsonInclude, JsonPropertyName("overall_cardinality")] - public IDictionary? OverallCardinality { get; set; } -} - -/// -/// -/// Estimate job model memory usage. -/// Makes an estimation of the memory usage for an anomaly detection job model. -/// It is based on analysis configuration details for the job and cardinality -/// estimates for the fields it references. -/// -/// -public sealed partial class EstimateModelMemoryRequestDescriptor : RequestDescriptor, EstimateModelMemoryRequestParameters> -{ - internal EstimateModelMemoryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public EstimateModelMemoryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningEstimateModelMemory; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.estimate_model_memory"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? AnalysisConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor AnalysisConfigDescriptor { get; set; } - private Action> AnalysisConfigDescriptorAction { get; set; } - private IDictionary? MaxBucketCardinalityValue { get; set; } - private IDictionary? OverallCardinalityValue { get; set; } - - /// - /// - /// For a list of the properties that you can specify in the - /// analysis_config component of the body of this API. - /// - /// - public EstimateModelMemoryRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? analysisConfig) - { - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigValue = analysisConfig; - return Self; - } - - public EstimateModelMemoryRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor descriptor) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigDescriptor = descriptor; - return Self; - } - - public EstimateModelMemoryRequestDescriptor AnalysisConfig(Action> configure) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Estimates of the highest cardinality in a single bucket that is observed - /// for influencer fields over the time period that the job analyzes data. - /// To produce a good answer, values must be provided for all influencer - /// fields. Providing values for fields that are not listed as influencers - /// has no effect on the estimation. - /// - /// - public EstimateModelMemoryRequestDescriptor MaxBucketCardinality(Func, FluentDictionary> selector) - { - MaxBucketCardinalityValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Estimates of the cardinality that is observed for fields over the whole - /// time period that the job analyzes data. To produce a good answer, values - /// must be provided for fields referenced in the by_field_name, - /// over_field_name and partition_field_name of any detectors. Providing - /// values for other fields has no effect on the estimation. It can be - /// omitted from the request if no detectors have a by_field_name, - /// over_field_name or partition_field_name. - /// - /// - public EstimateModelMemoryRequestDescriptor OverallCardinality(Func, FluentDictionary> selector) - { - OverallCardinalityValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisConfigDescriptor is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigDescriptor, options); - } - else if (AnalysisConfigDescriptorAction is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor(AnalysisConfigDescriptorAction), options); - } - else if (AnalysisConfigValue is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigValue, options); - } - - if (MaxBucketCardinalityValue is not null) - { - writer.WritePropertyName("max_bucket_cardinality"); - JsonSerializer.Serialize(writer, MaxBucketCardinalityValue, options); - } - - if (OverallCardinalityValue is not null) - { - writer.WritePropertyName("overall_cardinality"); - JsonSerializer.Serialize(writer, OverallCardinalityValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Estimate job model memory usage. -/// Makes an estimation of the memory usage for an anomaly detection job model. -/// It is based on analysis configuration details for the job and cardinality -/// estimates for the fields it references. -/// -/// -public sealed partial class EstimateModelMemoryRequestDescriptor : RequestDescriptor -{ - internal EstimateModelMemoryRequestDescriptor(Action configure) => configure.Invoke(this); - - public EstimateModelMemoryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningEstimateModelMemory; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.estimate_model_memory"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? AnalysisConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor AnalysisConfigDescriptor { get; set; } - private Action AnalysisConfigDescriptorAction { get; set; } - private IDictionary? MaxBucketCardinalityValue { get; set; } - private IDictionary? OverallCardinalityValue { get; set; } - - /// - /// - /// For a list of the properties that you can specify in the - /// analysis_config component of the body of this API. - /// - /// - public EstimateModelMemoryRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? analysisConfig) - { - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigValue = analysisConfig; - return Self; - } - - public EstimateModelMemoryRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor descriptor) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigDescriptor = descriptor; - return Self; - } - - public EstimateModelMemoryRequestDescriptor AnalysisConfig(Action configure) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Estimates of the highest cardinality in a single bucket that is observed - /// for influencer fields over the time period that the job analyzes data. - /// To produce a good answer, values must be provided for all influencer - /// fields. Providing values for fields that are not listed as influencers - /// has no effect on the estimation. - /// - /// - public EstimateModelMemoryRequestDescriptor MaxBucketCardinality(Func, FluentDictionary> selector) - { - MaxBucketCardinalityValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Estimates of the cardinality that is observed for fields over the whole - /// time period that the job analyzes data. To produce a good answer, values - /// must be provided for fields referenced in the by_field_name, - /// over_field_name and partition_field_name of any detectors. Providing - /// values for other fields has no effect on the estimation. It can be - /// omitted from the request if no detectors have a by_field_name, - /// over_field_name or partition_field_name. - /// - /// - public EstimateModelMemoryRequestDescriptor OverallCardinality(Func, FluentDictionary> selector) - { - OverallCardinalityValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisConfigDescriptor is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigDescriptor, options); - } - else if (AnalysisConfigDescriptorAction is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor(AnalysisConfigDescriptorAction), options); - } - else if (AnalysisConfigValue is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigValue, options); - } - - if (MaxBucketCardinalityValue is not null) - { - writer.WritePropertyName("max_bucket_cardinality"); - JsonSerializer.Serialize(writer, MaxBucketCardinalityValue, options); - } - - if (OverallCardinalityValue is not null) - { - writer.WritePropertyName("overall_cardinality"); - JsonSerializer.Serialize(writer, OverallCardinalityValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryResponse.g.cs deleted file mode 100644 index 922869af4c3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EstimateModelMemoryResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class EstimateModelMemoryResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("model_memory_estimate")] - public string ModelMemoryEstimate { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameRequest.g.cs deleted file mode 100644 index 5e75e055fc7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameRequest.g.cs +++ /dev/null @@ -1,365 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class EvaluateDataFrameRequestParameters : RequestParameters -{ -} - -/// -/// -/// Evaluate data frame analytics. -/// The API packages together commonly used evaluation metrics for various types -/// of machine learning features. This has been designed for use on indexes -/// created by data frame analytics. Evaluation requires both a ground truth -/// field and an analytics result field to be present. -/// -/// -public sealed partial class EvaluateDataFrameRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningEvaluateDataFrame; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.evaluate_data_frame"; - - /// - /// - /// Defines the type of evaluation you want to perform. - /// - /// - [JsonInclude, JsonPropertyName("evaluation")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation Evaluation { get; set; } - - /// - /// - /// Defines the index in which the evaluation will be performed. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } - - /// - /// - /// A query clause that retrieves a subset of data from the source index. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } -} - -/// -/// -/// Evaluate data frame analytics. -/// The API packages together commonly used evaluation metrics for various types -/// of machine learning features. This has been designed for use on indexes -/// created by data frame analytics. Evaluation requires both a ground truth -/// field and an analytics result field to be present. -/// -/// -public sealed partial class EvaluateDataFrameRequestDescriptor : RequestDescriptor, EvaluateDataFrameRequestParameters> -{ - internal EvaluateDataFrameRequestDescriptor(Action> configure) => configure.Invoke(this); - - public EvaluateDataFrameRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningEvaluateDataFrame; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.evaluate_data_frame"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation EvaluationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationDescriptor EvaluationDescriptor { get; set; } - private Action> EvaluationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - - /// - /// - /// Defines the type of evaluation you want to perform. - /// - /// - public EvaluateDataFrameRequestDescriptor Evaluation(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation evaluation) - { - EvaluationDescriptor = null; - EvaluationDescriptorAction = null; - EvaluationValue = evaluation; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Evaluation(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationDescriptor descriptor) - { - EvaluationValue = null; - EvaluationDescriptorAction = null; - EvaluationDescriptor = descriptor; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Evaluation(Action> configure) - { - EvaluationValue = null; - EvaluationDescriptor = null; - EvaluationDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the index in which the evaluation will be performed. - /// - /// - public EvaluateDataFrameRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// A query clause that retrieves a subset of data from the source index. - /// - /// - public EvaluateDataFrameRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EvaluationDescriptor is not null) - { - writer.WritePropertyName("evaluation"); - JsonSerializer.Serialize(writer, EvaluationDescriptor, options); - } - else if (EvaluationDescriptorAction is not null) - { - writer.WritePropertyName("evaluation"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationDescriptor(EvaluationDescriptorAction), options); - } - else - { - writer.WritePropertyName("evaluation"); - JsonSerializer.Serialize(writer, EvaluationValue, options); - } - - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Evaluate data frame analytics. -/// The API packages together commonly used evaluation metrics for various types -/// of machine learning features. This has been designed for use on indexes -/// created by data frame analytics. Evaluation requires both a ground truth -/// field and an analytics result field to be present. -/// -/// -public sealed partial class EvaluateDataFrameRequestDescriptor : RequestDescriptor -{ - internal EvaluateDataFrameRequestDescriptor(Action configure) => configure.Invoke(this); - - public EvaluateDataFrameRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningEvaluateDataFrame; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.evaluate_data_frame"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation EvaluationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationDescriptor EvaluationDescriptor { get; set; } - private Action EvaluationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - /// - /// - /// Defines the type of evaluation you want to perform. - /// - /// - public EvaluateDataFrameRequestDescriptor Evaluation(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation evaluation) - { - EvaluationDescriptor = null; - EvaluationDescriptorAction = null; - EvaluationValue = evaluation; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Evaluation(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationDescriptor descriptor) - { - EvaluationValue = null; - EvaluationDescriptorAction = null; - EvaluationDescriptor = descriptor; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Evaluation(Action configure) - { - EvaluationValue = null; - EvaluationDescriptor = null; - EvaluationDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the index in which the evaluation will be performed. - /// - /// - public EvaluateDataFrameRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// A query clause that retrieves a subset of data from the source index. - /// - /// - public EvaluateDataFrameRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public EvaluateDataFrameRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EvaluationDescriptor is not null) - { - writer.WritePropertyName("evaluation"); - JsonSerializer.Serialize(writer, EvaluationDescriptor, options); - } - else if (EvaluationDescriptorAction is not null) - { - writer.WritePropertyName("evaluation"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationDescriptor(EvaluationDescriptorAction), options); - } - else - { - writer.WritePropertyName("evaluation"); - JsonSerializer.Serialize(writer, EvaluationValue, options); - } - - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs deleted file mode 100644 index 79a1888b49d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class EvaluateDataFrameResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("classification")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeClassificationSummary? Classification { get; init; } - [JsonInclude, JsonPropertyName("outlier_detection")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeOutlierDetectionSummary? OutlierDetection { get; init; } - [JsonInclude, JsonPropertyName("regression")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeRegressionSummary? Regression { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index bcba58a723b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,825 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ExplainDataFrameAnalyticsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Explain data frame analytics config. -/// This API provides explanations for a data frame analytics config that either -/// exists already or one that has not been created yet. The following -/// explanations are provided: -/// -/// -/// -/// -/// which fields are included or not in the analysis and why, -/// -/// -/// -/// -/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. -/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. -/// -/// -/// -/// -public sealed partial class ExplainDataFrameAnalyticsRequest : PlainRequest -{ - public ExplainDataFrameAnalyticsRequest() - { - } - - public ExplainDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningExplainDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.explain_data_frame_analytics"; - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. - /// - /// - [JsonInclude, JsonPropertyName("allow_lazy_start")] - public bool? AllowLazyStart { get; set; } - - /// - /// - /// The analysis configuration, which contains the information necessary to - /// perform one of the following types of analysis: classification, outlier - /// detection, or regression. - /// - /// - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis? Analysis { get; set; } - - /// - /// - /// Specify includes and/or excludes patterns to select which fields will be - /// included in the analysis. The patterns specified in excludes are applied - /// last, therefore excludes takes precedence. In other words, if the same - /// field is specified in both includes and excludes, then the field will not - /// be included in the analysis. - /// - /// - [JsonInclude, JsonPropertyName("analyzed_fields")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFields { get; set; } - - /// - /// - /// A description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The destination configuration, consisting of index and optionally - /// results_field (ml by default). - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination? Dest { get; set; } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - [JsonInclude, JsonPropertyName("max_num_threads")] - public int? MaxNumThreads { get; set; } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try to - /// create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string? ModelMemoryLimit { get; set; } - - /// - /// - /// The configuration of how to source the analysis data. It requires an - /// index. Optionally, query and _source may be specified. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource? Source { get; set; } -} - -/// -/// -/// Explain data frame analytics config. -/// This API provides explanations for a data frame analytics config that either -/// exists already or one that has not been created yet. The following -/// explanations are provided: -/// -/// -/// -/// -/// which fields are included or not in the analysis and why, -/// -/// -/// -/// -/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. -/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. -/// -/// -/// -/// -public sealed partial class ExplainDataFrameAnalyticsRequestDescriptor : RequestDescriptor, ExplainDataFrameAnalyticsRequestParameters> -{ - internal ExplainDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ExplainDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public ExplainDataFrameAnalyticsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningExplainDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.explain_data_frame_analytics"; - - public ExplainDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private bool? AllowLazyStartValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis? AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action> AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor AnalyzedFieldsDescriptor { get; set; } - private Action AnalyzedFieldsDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination? DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor DestDescriptor { get; set; } - private Action> DestDescriptorAction { get; set; } - private int? MaxNumThreadsValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor AllowLazyStart(bool? allowLazyStart = true) - { - AllowLazyStartValue = allowLazyStart; - return Self; - } - - /// - /// - /// The analysis configuration, which contains the information necessary to - /// perform one of the following types of analysis: classification, outlier - /// detection, or regression. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis? analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Analysis(Action> configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specify includes and/or excludes patterns to select which fields will be - /// included in the analysis. The patterns specified in excludes are applied - /// last, therefore excludes takes precedence. In other words, if the same - /// field is specified in both includes and excludes, then the field will not - /// be included in the analysis. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? analyzedFields) - { - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsValue = analyzedFields; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(Action configure) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = configure; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination configuration, consisting of index and optionally - /// results_field (ml by default). - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination? dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Dest(Action> configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try to - /// create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - /// - /// - /// The configuration of how to source the analysis data. It requires an - /// index. Optionally, query and _source may be specified. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyStartValue.HasValue) - { - writer.WritePropertyName("allow_lazy_start"); - writer.WriteBooleanValue(AllowLazyStartValue.Value); - } - - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else if (AnalysisValue is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzedFieldsDescriptor is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsDescriptor, options); - } - else if (AnalyzedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(AnalyzedFieldsDescriptorAction), options); - } - else if (AnalyzedFieldsValue is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor(DestDescriptorAction), options); - } - else if (DestValue is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Explain data frame analytics config. -/// This API provides explanations for a data frame analytics config that either -/// exists already or one that has not been created yet. The following -/// explanations are provided: -/// -/// -/// -/// -/// which fields are included or not in the analysis and why, -/// -/// -/// -/// -/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. -/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. -/// -/// -/// -/// -public sealed partial class ExplainDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal ExplainDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExplainDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public ExplainDataFrameAnalyticsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningExplainDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.explain_data_frame_analytics"; - - public ExplainDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private bool? AllowLazyStartValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis? AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor AnalyzedFieldsDescriptor { get; set; } - private Action AnalyzedFieldsDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination? DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private int? MaxNumThreadsValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor AllowLazyStart(bool? allowLazyStart = true) - { - AllowLazyStartValue = allowLazyStart; - return Self; - } - - /// - /// - /// The analysis configuration, which contains the information necessary to - /// perform one of the following types of analysis: classification, outlier - /// detection, or regression. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis? analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Analysis(Action configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specify includes and/or excludes patterns to select which fields will be - /// included in the analysis. The patterns specified in excludes are applied - /// last, therefore excludes takes precedence. In other words, if the same - /// field is specified in both includes and excludes, then the field will not - /// be included in the analysis. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? analyzedFields) - { - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsValue = analyzedFields; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(Action configure) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = configure; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination configuration, consisting of index and optionally - /// results_field (ml by default). - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination? dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try to - /// create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - /// - /// - /// The configuration of how to source the analysis data. It requires an - /// index. Optionally, query and _source may be specified. - /// - /// - public ExplainDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ExplainDataFrameAnalyticsRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyStartValue.HasValue) - { - writer.WritePropertyName("allow_lazy_start"); - writer.WriteBooleanValue(AllowLazyStartValue.Value); - } - - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else if (AnalysisValue is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzedFieldsDescriptor is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsDescriptor, options); - } - else if (AnalyzedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(AnalyzedFieldsDescriptorAction), options); - } - else if (AnalyzedFieldsValue is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor(DestDescriptorAction), options); - } - else if (DestValue is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index a6c84a58c69..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ExplainDataFrameAnalyticsResponse : ElasticsearchResponse -{ - /// - /// - /// An array of objects that explain selection for each field, sorted by the field names. - /// - /// - [JsonInclude, JsonPropertyName("field_selection")] - public IReadOnlyCollection FieldSelection { get; init; } - - /// - /// - /// An array of objects that explain selection for each field, sorted by the field names. - /// - /// - [JsonInclude, JsonPropertyName("memory_estimation")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsMemoryEstimation MemoryEstimation { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobRequest.g.cs deleted file mode 100644 index 9be14763bfa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobRequest.g.cs +++ /dev/null @@ -1,236 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class FlushJobRequestParameters : RequestParameters -{ -} - -/// -/// -/// Force buffered data to be processed. -/// The flush jobs API is only applicable when sending data for analysis using -/// the post data API. Depending on the content of the buffer, then it might -/// additionally calculate new results. Both flush and close operations are -/// similar, however the flush is more efficient if you are expecting to send -/// more data for analysis. When flushing, the job remains open and is available -/// to continue analyzing data. A close operation additionally prunes and -/// persists the model state to disk and the job must be opened again before -/// analyzing further data. -/// -/// -public sealed partial class FlushJobRequest : PlainRequest -{ - public FlushJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningFlushJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.flush_job"; - - /// - /// - /// Refer to the description for the advance_time query parameter. - /// - /// - [JsonInclude, JsonPropertyName("advance_time")] - public DateTimeOffset? AdvanceTime { get; set; } - - /// - /// - /// Refer to the description for the calc_interim query parameter. - /// - /// - [JsonInclude, JsonPropertyName("calc_interim")] - public bool? CalcInterim { get; set; } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public DateTimeOffset? End { get; set; } - - /// - /// - /// Refer to the description for the skip_time query parameter. - /// - /// - [JsonInclude, JsonPropertyName("skip_time")] - public DateTimeOffset? SkipTime { get; set; } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public DateTimeOffset? Start { get; set; } -} - -/// -/// -/// Force buffered data to be processed. -/// The flush jobs API is only applicable when sending data for analysis using -/// the post data API. Depending on the content of the buffer, then it might -/// additionally calculate new results. Both flush and close operations are -/// similar, however the flush is more efficient if you are expecting to send -/// more data for analysis. When flushing, the job remains open and is available -/// to continue analyzing data. A close operation additionally prunes and -/// persists the model state to disk and the job must be opened again before -/// analyzing further data. -/// -/// -public sealed partial class FlushJobRequestDescriptor : RequestDescriptor -{ - internal FlushJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public FlushJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningFlushJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.flush_job"; - - public FlushJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private DateTimeOffset? AdvanceTimeValue { get; set; } - private bool? CalcInterimValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private DateTimeOffset? SkipTimeValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the advance_time query parameter. - /// - /// - public FlushJobRequestDescriptor AdvanceTime(DateTimeOffset? advanceTime) - { - AdvanceTimeValue = advanceTime; - return Self; - } - - /// - /// - /// Refer to the description for the calc_interim query parameter. - /// - /// - public FlushJobRequestDescriptor CalcInterim(bool? calcInterim = true) - { - CalcInterimValue = calcInterim; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public FlushJobRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the skip_time query parameter. - /// - /// - public FlushJobRequestDescriptor SkipTime(DateTimeOffset? skipTime) - { - SkipTimeValue = skipTime; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public FlushJobRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AdvanceTimeValue is not null) - { - writer.WritePropertyName("advance_time"); - JsonSerializer.Serialize(writer, AdvanceTimeValue, options); - } - - if (CalcInterimValue.HasValue) - { - writer.WritePropertyName("calc_interim"); - writer.WriteBooleanValue(CalcInterimValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (SkipTimeValue is not null) - { - writer.WritePropertyName("skip_time"); - JsonSerializer.Serialize(writer, SkipTimeValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobResponse.g.cs deleted file mode 100644 index 153a31d6ccb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/FlushJobResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class FlushJobResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("flushed")] - public bool Flushed { get; init; } - - /// - /// - /// Provides the timestamp (in milliseconds since the epoch) of the end of - /// the last bucket that was processed. - /// - /// - [JsonInclude, JsonPropertyName("last_finalized_bucket_end")] - public int? LastFinalizedBucketEnd { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastRequest.g.cs deleted file mode 100644 index d7ab688c996..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastRequest.g.cs +++ /dev/null @@ -1,180 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ForecastRequestParameters : RequestParameters -{ -} - -/// -/// -/// Predict future behavior of a time series. -/// -/// -/// Forecasts are not supported for jobs that perform population analysis; an -/// error occurs if you try to create a forecast for a job that has an -/// over_field_name in its configuration. Forcasts predict future behavior -/// based on historical data. -/// -/// -public sealed partial class ForecastRequest : PlainRequest -{ - public ForecastRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningForecast; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.forecast"; - - /// - /// - /// Refer to the description for the duration query parameter. - /// - /// - [JsonInclude, JsonPropertyName("duration")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Duration { get; set; } - - /// - /// - /// Refer to the description for the expires_in query parameter. - /// - /// - [JsonInclude, JsonPropertyName("expires_in")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ExpiresIn { get; set; } - - /// - /// - /// Refer to the description for the max_model_memory query parameter. - /// - /// - [JsonInclude, JsonPropertyName("max_model_memory")] - public string? MaxModelMemory { get; set; } -} - -/// -/// -/// Predict future behavior of a time series. -/// -/// -/// Forecasts are not supported for jobs that perform population analysis; an -/// error occurs if you try to create a forecast for a job that has an -/// over_field_name in its configuration. Forcasts predict future behavior -/// based on historical data. -/// -/// -public sealed partial class ForecastRequestDescriptor : RequestDescriptor -{ - internal ForecastRequestDescriptor(Action configure) => configure.Invoke(this); - - public ForecastRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningForecast; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.forecast"; - - public ForecastRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? DurationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpiresInValue { get; set; } - private string? MaxModelMemoryValue { get; set; } - - /// - /// - /// Refer to the description for the duration query parameter. - /// - /// - public ForecastRequestDescriptor Duration(Elastic.Clients.Elasticsearch.Serverless.Duration? duration) - { - DurationValue = duration; - return Self; - } - - /// - /// - /// Refer to the description for the expires_in query parameter. - /// - /// - public ForecastRequestDescriptor ExpiresIn(Elastic.Clients.Elasticsearch.Serverless.Duration? expiresIn) - { - ExpiresInValue = expiresIn; - return Self; - } - - /// - /// - /// Refer to the description for the max_model_memory query parameter. - /// - /// - public ForecastRequestDescriptor MaxModelMemory(string? maxModelMemory) - { - MaxModelMemoryValue = maxModelMemory; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DurationValue is not null) - { - writer.WritePropertyName("duration"); - JsonSerializer.Serialize(writer, DurationValue, options); - } - - if (ExpiresInValue is not null) - { - writer.WritePropertyName("expires_in"); - JsonSerializer.Serialize(writer, ExpiresInValue, options); - } - - if (!string.IsNullOrEmpty(MaxModelMemoryValue)) - { - writer.WritePropertyName("max_model_memory"); - writer.WriteStringValue(MaxModelMemoryValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastResponse.g.cs deleted file mode 100644 index 1e1980755b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ForecastResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ForecastResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("forecast_id")] - public string ForecastId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs deleted file mode 100644 index 000c92a69a4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs +++ /dev/null @@ -1,627 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetBucketsRequestParameters : RequestParameters -{ - /// - /// - /// Skips the specified number of buckets. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of buckets to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get anomaly detection job results for buckets. -/// The API presents a chronological view of the records, grouped by bucket. -/// -/// -public sealed partial class GetBucketsRequest : PlainRequest -{ - public GetBucketsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp) : base(r => r.Required("job_id", jobId).Optional("timestamp", timestamp)) - { - } - - public GetBucketsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetBuckets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_buckets"; - - /// - /// - /// Skips the specified number of buckets. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of buckets to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Refer to the description for the anomaly_score query parameter. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_score")] - public double? AnomalyScore { get; set; } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - [JsonInclude, JsonPropertyName("desc")] - public bool? Desc { get; set; } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public DateTimeOffset? End { get; set; } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - [JsonInclude, JsonPropertyName("exclude_interim")] - public bool? ExcludeInterim { get; set; } - - /// - /// - /// Refer to the description for the expand query parameter. - /// - /// - [JsonInclude, JsonPropertyName("expand")] - public bool? Expand { get; set; } - [JsonInclude, JsonPropertyName("page")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? Page { get; set; } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Sort { get; set; } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public DateTimeOffset? Start { get; set; } -} - -/// -/// -/// Get anomaly detection job results for buckets. -/// The API presents a chronological view of the records, grouped by bucket. -/// -/// -public sealed partial class GetBucketsRequestDescriptor : RequestDescriptor, GetBucketsRequestParameters> -{ - internal GetBucketsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetBucketsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp) : base(r => r.Required("job_id", jobId).Optional("timestamp", timestamp)) - { - } - - public GetBucketsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetBuckets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_buckets"; - - public GetBucketsRequestDescriptor From(int? from) => Qs("from", from); - public GetBucketsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetBucketsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public GetBucketsRequestDescriptor Timestamp(DateTimeOffset? timestamp) - { - RouteValues.Optional("timestamp", timestamp); - return Self; - } - - private double? AnomalyScoreValue { get; set; } - private bool? DescValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private bool? ExcludeInterimValue { get; set; } - private bool? ExpandValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SortValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the anomaly_score query parameter. - /// - /// - public GetBucketsRequestDescriptor AnomalyScore(double? anomalyScore) - { - AnomalyScoreValue = anomalyScore; - return Self; - } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - public GetBucketsRequestDescriptor Desc(bool? desc = true) - { - DescValue = desc; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetBucketsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - public GetBucketsRequestDescriptor ExcludeInterim(bool? excludeInterim = true) - { - ExcludeInterimValue = excludeInterim; - return Self; - } - - /// - /// - /// Refer to the description for the expand query parameter. - /// - /// - public GetBucketsRequestDescriptor Expand(bool? expand = true) - { - ExpandValue = expand; - return Self; - } - - public GetBucketsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetBucketsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetBucketsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - public GetBucketsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - public GetBucketsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - public GetBucketsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetBucketsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnomalyScoreValue.HasValue) - { - writer.WritePropertyName("anomaly_score"); - writer.WriteNumberValue(AnomalyScoreValue.Value); - } - - if (DescValue.HasValue) - { - writer.WritePropertyName("desc"); - writer.WriteBooleanValue(DescValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (ExcludeInterimValue.HasValue) - { - writer.WritePropertyName("exclude_interim"); - writer.WriteBooleanValue(ExcludeInterimValue.Value); - } - - if (ExpandValue.HasValue) - { - writer.WritePropertyName("expand"); - writer.WriteBooleanValue(ExpandValue.Value); - } - - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get anomaly detection job results for buckets. -/// The API presents a chronological view of the records, grouped by bucket. -/// -/// -public sealed partial class GetBucketsRequestDescriptor : RequestDescriptor -{ - internal GetBucketsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetBucketsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp) : base(r => r.Required("job_id", jobId).Optional("timestamp", timestamp)) - { - } - - public GetBucketsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetBuckets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_buckets"; - - public GetBucketsRequestDescriptor From(int? from) => Qs("from", from); - public GetBucketsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetBucketsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public GetBucketsRequestDescriptor Timestamp(DateTimeOffset? timestamp) - { - RouteValues.Optional("timestamp", timestamp); - return Self; - } - - private double? AnomalyScoreValue { get; set; } - private bool? DescValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private bool? ExcludeInterimValue { get; set; } - private bool? ExpandValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SortValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the anomaly_score query parameter. - /// - /// - public GetBucketsRequestDescriptor AnomalyScore(double? anomalyScore) - { - AnomalyScoreValue = anomalyScore; - return Self; - } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - public GetBucketsRequestDescriptor Desc(bool? desc = true) - { - DescValue = desc; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetBucketsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - public GetBucketsRequestDescriptor ExcludeInterim(bool? excludeInterim = true) - { - ExcludeInterimValue = excludeInterim; - return Self; - } - - /// - /// - /// Refer to the description for the expand query parameter. - /// - /// - public GetBucketsRequestDescriptor Expand(bool? expand = true) - { - ExpandValue = expand; - return Self; - } - - public GetBucketsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetBucketsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetBucketsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - public GetBucketsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - public GetBucketsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the desription for the sort query parameter. - /// - /// - public GetBucketsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetBucketsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnomalyScoreValue.HasValue) - { - writer.WritePropertyName("anomaly_score"); - writer.WriteNumberValue(AnomalyScoreValue.Value); - } - - if (DescValue.HasValue) - { - writer.WritePropertyName("desc"); - writer.WriteBooleanValue(DescValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (ExcludeInterimValue.HasValue) - { - writer.WritePropertyName("exclude_interim"); - writer.WriteBooleanValue(ExcludeInterimValue.Value); - } - - if (ExpandValue.HasValue) - { - writer.WritePropertyName("expand"); - writer.WriteBooleanValue(ExpandValue.Value); - } - - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsResponse.g.cs deleted file mode 100644 index 39a5dfa7a94..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetBucketsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetBucketsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsRequest.g.cs deleted file mode 100644 index 89dc4aec915..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsRequest.g.cs +++ /dev/null @@ -1,167 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetCalendarEventsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies to get events with timestamps earlier than this time. - /// - /// - public DateTimeOffset? End { get => Q("end"); set => Q("end", value); } - - /// - /// - /// Skips the specified number of events. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of _all or *. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get => Q("job_id"); set => Q("job_id", value); } - - /// - /// - /// Specifies the maximum number of events to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Specifies to get events with timestamps after this time. - /// - /// - public DateTimeOffset? Start { get => Q("start"); set => Q("start", value); } -} - -/// -/// -/// Get info about events in calendars. -/// -/// -public sealed partial class GetCalendarEventsRequest : PlainRequest -{ - public GetCalendarEventsRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetCalendarEvents; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_calendar_events"; - - /// - /// - /// Specifies to get events with timestamps earlier than this time. - /// - /// - [JsonIgnore] - public DateTimeOffset? End { get => Q("end"); set => Q("end", value); } - - /// - /// - /// Skips the specified number of events. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of _all or *. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get => Q("job_id"); set => Q("job_id", value); } - - /// - /// - /// Specifies the maximum number of events to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Specifies to get events with timestamps after this time. - /// - /// - [JsonIgnore] - public DateTimeOffset? Start { get => Q("start"); set => Q("start", value); } -} - -/// -/// -/// Get info about events in calendars. -/// -/// -public sealed partial class GetCalendarEventsRequestDescriptor : RequestDescriptor -{ - internal GetCalendarEventsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetCalendarEventsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetCalendarEvents; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_calendar_events"; - - public GetCalendarEventsRequestDescriptor End(DateTimeOffset? end) => Qs("end", end); - public GetCalendarEventsRequestDescriptor From(int? from) => Qs("from", from); - public GetCalendarEventsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) => Qs("job_id", jobId); - public GetCalendarEventsRequestDescriptor Size(int? size) => Qs("size", size); - public GetCalendarEventsRequestDescriptor Start(DateTimeOffset? start) => Qs("start", start); - - public GetCalendarEventsRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsResponse.g.cs deleted file mode 100644 index e283a01a1d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarEventsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetCalendarEventsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("events")] - public IReadOnlyCollection Events { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsRequest.g.cs deleted file mode 100644 index 4ea7f49c534..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsRequest.g.cs +++ /dev/null @@ -1,186 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetCalendarsRequestParameters : RequestParameters -{ - /// - /// - /// Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get calendar configuration info. -/// -/// -public sealed partial class GetCalendarsRequest : PlainRequest -{ - public GetCalendarsRequest() - { - } - - public GetCalendarsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId) : base(r => r.Optional("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetCalendars; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_calendars"; - - /// - /// - /// Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// This object is supported only when you omit the calendar identifier. - /// - /// - [JsonInclude, JsonPropertyName("page")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? Page { get; set; } -} - -/// -/// -/// Get calendar configuration info. -/// -/// -public sealed partial class GetCalendarsRequestDescriptor : RequestDescriptor -{ - internal GetCalendarsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetCalendarsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId) : base(r => r.Optional("calendar_id", calendarId)) - { - } - - public GetCalendarsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetCalendars; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_calendars"; - - public GetCalendarsRequestDescriptor From(int? from) => Qs("from", from); - public GetCalendarsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetCalendarsRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId) - { - RouteValues.Optional("calendar_id", calendarId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - - /// - /// - /// This object is supported only when you omit the calendar identifier. - /// - /// - public GetCalendarsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetCalendarsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetCalendarsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsResponse.g.cs deleted file mode 100644 index afda50d69dd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCalendarsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetCalendarsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("calendars")] - public IReadOnlyCollection Calendars { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesRequest.g.cs deleted file mode 100644 index 22c6ffe83ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesRequest.g.cs +++ /dev/null @@ -1,210 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetCategoriesRequestParameters : RequestParameters -{ - /// - /// - /// Skips the specified number of categories. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Only return categories for the specified partition. - /// - /// - public string? PartitionFieldValue { get => Q("partition_field_value"); set => Q("partition_field_value", value); } - - /// - /// - /// Specifies the maximum number of categories to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get anomaly detection job results for categories. -/// -/// -public sealed partial class GetCategoriesRequest : PlainRequest -{ - public GetCategoriesRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, string? categoryId) : base(r => r.Required("job_id", jobId).Optional("category_id", categoryId)) - { - } - - public GetCategoriesRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetCategories; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_categories"; - - /// - /// - /// Skips the specified number of categories. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Only return categories for the specified partition. - /// - /// - [JsonIgnore] - public string? PartitionFieldValue { get => Q("partition_field_value"); set => Q("partition_field_value", value); } - - /// - /// - /// Specifies the maximum number of categories to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Configures pagination. - /// This parameter has the from and size properties. - /// - /// - [JsonInclude, JsonPropertyName("page")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? Page { get; set; } -} - -/// -/// -/// Get anomaly detection job results for categories. -/// -/// -public sealed partial class GetCategoriesRequestDescriptor : RequestDescriptor -{ - internal GetCategoriesRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetCategoriesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, string? categoryId) : base(r => r.Required("job_id", jobId).Optional("category_id", categoryId)) - { - } - - public GetCategoriesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetCategories; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_categories"; - - public GetCategoriesRequestDescriptor From(int? from) => Qs("from", from); - public GetCategoriesRequestDescriptor PartitionFieldValue(string? partitionFieldValue) => Qs("partition_field_value", partitionFieldValue); - public GetCategoriesRequestDescriptor Size(int? size) => Qs("size", size); - - public GetCategoriesRequestDescriptor CategoryId(string? categoryId) - { - RouteValues.Optional("category_id", categoryId); - return Self; - } - - public GetCategoriesRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - - /// - /// - /// Configures pagination. - /// This parameter has the from and size properties. - /// - /// - public GetCategoriesRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetCategoriesRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetCategoriesRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesResponse.g.cs deleted file mode 100644 index 024ea36bf85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetCategoriesResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetCategoriesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("categories")] - public IReadOnlyCollection Categories { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index 978f87804b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,261 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDataFrameAnalyticsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value returns an empty data_frame_analytics array when there - /// are no matches and the subset of results when there are partial matches. - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } - - /// - /// - /// Skips the specified number of data frame analytics jobs. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of data frame analytics jobs to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get data frame analytics job configuration info. -/// You can get information for multiple data frame analytics jobs in a single -/// API request by using a comma-separated list of data frame analytics jobs or a -/// wildcard expression. -/// -/// -public sealed partial class GetDataFrameAnalyticsRequest : PlainRequest -{ - public GetDataFrameAnalyticsRequest() - { - } - - public GetDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_data_frame_analytics"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value returns an empty data_frame_analytics array when there - /// are no matches and the subset of results when there are partial matches. - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - [JsonIgnore] - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } - - /// - /// - /// Skips the specified number of data frame analytics jobs. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of data frame analytics jobs to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get data frame analytics job configuration info. -/// You can get information for multiple data frame analytics jobs in a single -/// API request by using a comma-separated list of data frame analytics jobs or a -/// wildcard expression. -/// -/// -public sealed partial class GetDataFrameAnalyticsRequestDescriptor : RequestDescriptor, GetDataFrameAnalyticsRequestParameters> -{ - internal GetDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public GetDataFrameAnalyticsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_data_frame_analytics"; - - public GetDataFrameAnalyticsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetDataFrameAnalyticsRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated); - public GetDataFrameAnalyticsRequestDescriptor From(int? from) => Qs("from", from); - public GetDataFrameAnalyticsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get data frame analytics job configuration info. -/// You can get information for multiple data frame analytics jobs in a single -/// API request by using a comma-separated list of data frame analytics jobs or a -/// wildcard expression. -/// -/// -public sealed partial class GetDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal GetDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public GetDataFrameAnalyticsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_data_frame_analytics"; - - public GetDataFrameAnalyticsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetDataFrameAnalyticsRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated); - public GetDataFrameAnalyticsRequestDescriptor From(int? from) => Qs("from", from); - public GetDataFrameAnalyticsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index 42dc76a3e59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDataFrameAnalyticsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// An array of data frame analytics job resources, which are sorted by the id value in ascending order. - /// - /// - [JsonInclude, JsonPropertyName("data_frame_analytics")] - public IReadOnlyCollection DataFrameAnalytics { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsRequest.g.cs deleted file mode 100644 index 37e600dff08..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsRequest.g.cs +++ /dev/null @@ -1,248 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDataFrameAnalyticsStatsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value returns an empty data_frame_analytics array when there - /// are no matches and the subset of results when there are partial matches. - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Skips the specified number of data frame analytics jobs. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of data frame analytics jobs to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Defines whether the stats response should be verbose. - /// - /// - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get data frame analytics jobs usage info. -/// -/// -public sealed partial class GetDataFrameAnalyticsStatsRequest : PlainRequest -{ - public GetDataFrameAnalyticsStatsRequest() - { - } - - public GetDataFrameAnalyticsStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalyticsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_data_frame_analytics_stats"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value returns an empty data_frame_analytics array when there - /// are no matches and the subset of results when there are partial matches. - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Skips the specified number of data frame analytics jobs. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of data frame analytics jobs to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Defines whether the stats response should be verbose. - /// - /// - [JsonIgnore] - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get data frame analytics jobs usage info. -/// -/// -public sealed partial class GetDataFrameAnalyticsStatsRequestDescriptor : RequestDescriptor, GetDataFrameAnalyticsStatsRequestParameters> -{ - internal GetDataFrameAnalyticsStatsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetDataFrameAnalyticsStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public GetDataFrameAnalyticsStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalyticsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_data_frame_analytics_stats"; - - public GetDataFrameAnalyticsStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetDataFrameAnalyticsStatsRequestDescriptor From(int? from) => Qs("from", from); - public GetDataFrameAnalyticsStatsRequestDescriptor Size(int? size) => Qs("size", size); - public GetDataFrameAnalyticsStatsRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public GetDataFrameAnalyticsStatsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get data frame analytics jobs usage info. -/// -/// -public sealed partial class GetDataFrameAnalyticsStatsRequestDescriptor : RequestDescriptor -{ - internal GetDataFrameAnalyticsStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetDataFrameAnalyticsStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public GetDataFrameAnalyticsStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalyticsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_data_frame_analytics_stats"; - - public GetDataFrameAnalyticsStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetDataFrameAnalyticsStatsRequestDescriptor From(int? from) => Qs("from", from); - public GetDataFrameAnalyticsStatsRequestDescriptor Size(int? size) => Qs("size", size); - public GetDataFrameAnalyticsStatsRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public GetDataFrameAnalyticsStatsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsResponse.g.cs deleted file mode 100644 index 771939f5968..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDataFrameAnalyticsStatsResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDataFrameAnalyticsStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// An array of objects that contain usage information for data frame analytics jobs, which are sorted by the id value in ascending order. - /// - /// - [JsonInclude, JsonPropertyName("data_frame_analytics")] - public IReadOnlyCollection DataFrameAnalytics { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsRequest.g.cs deleted file mode 100644 index 202bb74adaa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsRequest.g.cs +++ /dev/null @@ -1,169 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDatafeedStatsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no datafeeds that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty datafeeds array - /// when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a - /// 404 status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } -} - -/// -/// -/// Get datafeeds usage info. -/// You can get statistics for multiple datafeeds in a single API request by -/// using a comma-separated list of datafeeds or a wildcard expression. You can -/// get statistics for all datafeeds by using _all, by specifying * as the -/// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the -/// only information you receive is the datafeed_id and the state. -/// This API returns a maximum of 10,000 datafeeds. -/// -/// -public sealed partial class GetDatafeedStatsRequest : PlainRequest -{ - public GetDatafeedStatsRequest() - { - } - - public GetDatafeedStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId) : base(r => r.Optional("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDatafeedStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_datafeed_stats"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no datafeeds that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty datafeeds array - /// when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a - /// 404 status code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } -} - -/// -/// -/// Get datafeeds usage info. -/// You can get statistics for multiple datafeeds in a single API request by -/// using a comma-separated list of datafeeds or a wildcard expression. You can -/// get statistics for all datafeeds by using _all, by specifying * as the -/// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the -/// only information you receive is the datafeed_id and the state. -/// This API returns a maximum of 10,000 datafeeds. -/// -/// -public sealed partial class GetDatafeedStatsRequestDescriptor : RequestDescriptor -{ - internal GetDatafeedStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetDatafeedStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId) : base(r => r.Optional("datafeed_id", datafeedId)) - { - } - - public GetDatafeedStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDatafeedStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_datafeed_stats"; - - public GetDatafeedStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - - public GetDatafeedStatsRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId) - { - RouteValues.Optional("datafeed_id", datafeedId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsResponse.g.cs deleted file mode 100644 index cc43d913335..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedStatsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDatafeedStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("datafeeds")] - public IReadOnlyCollection Datafeeds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsRequest.g.cs deleted file mode 100644 index 0c7a6c9e4bb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsRequest.g.cs +++ /dev/null @@ -1,187 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDatafeedsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no datafeeds that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty datafeeds array - /// when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a - /// 404 status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } -} - -/// -/// -/// Get datafeeds configuration info. -/// You can get information for multiple datafeeds in a single API request by -/// using a comma-separated list of datafeeds or a wildcard expression. You can -/// get information for all datafeeds by using _all, by specifying * as the -/// <feed_id>, or by omitting the <feed_id>. -/// This API returns a maximum of 10,000 datafeeds. -/// -/// -public sealed partial class GetDatafeedsRequest : PlainRequest -{ - public GetDatafeedsRequest() - { - } - - public GetDatafeedsRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId) : base(r => r.Optional("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDatafeeds; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_datafeeds"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no datafeeds that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty datafeeds array - /// when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a - /// 404 status code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - [JsonIgnore] - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } -} - -/// -/// -/// Get datafeeds configuration info. -/// You can get information for multiple datafeeds in a single API request by -/// using a comma-separated list of datafeeds or a wildcard expression. You can -/// get information for all datafeeds by using _all, by specifying * as the -/// <feed_id>, or by omitting the <feed_id>. -/// This API returns a maximum of 10,000 datafeeds. -/// -/// -public sealed partial class GetDatafeedsRequestDescriptor : RequestDescriptor -{ - internal GetDatafeedsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetDatafeedsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId) : base(r => r.Optional("datafeed_id", datafeedId)) - { - } - - public GetDatafeedsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDatafeeds; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_datafeeds"; - - public GetDatafeedsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetDatafeedsRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated); - - public GetDatafeedsRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId) - { - RouteValues.Optional("datafeed_id", datafeedId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsResponse.g.cs deleted file mode 100644 index caa45e6562a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetDatafeedsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetDatafeedsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("datafeeds")] - public IReadOnlyCollection Datafeeds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersRequest.g.cs deleted file mode 100644 index 50976e51819..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersRequest.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetFiltersRequestParameters : RequestParameters -{ - /// - /// - /// Skips the specified number of filters. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of filters to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get filters. -/// You can get a single filter or all filters. -/// -/// -public sealed partial class GetFiltersRequest : PlainRequest -{ - public GetFiltersRequest() - { - } - - public GetFiltersRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId) : base(r => r.Optional("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetFilters; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_filters"; - - /// - /// - /// Skips the specified number of filters. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of filters to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get filters. -/// You can get a single filter or all filters. -/// -/// -public sealed partial class GetFiltersRequestDescriptor : RequestDescriptor -{ - internal GetFiltersRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetFiltersRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId) : base(r => r.Optional("filter_id", filterId)) - { - } - - public GetFiltersRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetFilters; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_filters"; - - public GetFiltersRequestDescriptor From(int? from) => Qs("from", from); - public GetFiltersRequestDescriptor Size(int? size) => Qs("size", size); - - public GetFiltersRequestDescriptor FilterId(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId) - { - RouteValues.Optional("filter_id", filterId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersResponse.g.cs deleted file mode 100644 index 428014f53fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetFiltersResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetFiltersResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("filters")] - public IReadOnlyCollection Filters { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersRequest.g.cs deleted file mode 100644 index a2bfb5349fc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersRequest.g.cs +++ /dev/null @@ -1,390 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetInfluencersRequestParameters : RequestParameters -{ - /// - /// - /// If true, the results are sorted in descending order. - /// - /// - public bool? Desc { get => Q("desc"); set => Q("desc", value); } - - /// - /// - /// Returns influencers with timestamps earlier than this time. - /// The default value means it is unset and results are not limited to - /// specific timestamps. - /// - /// - public DateTimeOffset? End { get => Q("end"); set => Q("end", value); } - - /// - /// - /// If true, the output excludes interim results. By default, interim results - /// are included. - /// - /// - public bool? ExcludeInterim { get => Q("exclude_interim"); set => Q("exclude_interim", value); } - - /// - /// - /// Skips the specified number of influencers. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Returns influencers with anomaly scores greater than or equal to this - /// value. - /// - /// - public double? InfluencerScore { get => Q("influencer_score"); set => Q("influencer_score", value); } - - /// - /// - /// Specifies the maximum number of influencers to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Specifies the sort field for the requested influencers. By default, the - /// influencers are sorted by the influencer_score value. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Field? Sort { get => Q("sort"); set => Q("sort", value); } - - /// - /// - /// Returns influencers with timestamps after this time. The default value - /// means it is unset and results are not limited to specific timestamps. - /// - /// - public DateTimeOffset? Start { get => Q("start"); set => Q("start", value); } -} - -/// -/// -/// Get anomaly detection job results for influencers. -/// Influencers are the entities that have contributed to, or are to blame for, -/// the anomalies. Influencer results are available only if an -/// influencer_field_name is specified in the job configuration. -/// -/// -public sealed partial class GetInfluencersRequest : PlainRequest -{ - public GetInfluencersRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetInfluencers; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_influencers"; - - /// - /// - /// If true, the results are sorted in descending order. - /// - /// - [JsonIgnore] - public bool? Desc { get => Q("desc"); set => Q("desc", value); } - - /// - /// - /// Returns influencers with timestamps earlier than this time. - /// The default value means it is unset and results are not limited to - /// specific timestamps. - /// - /// - [JsonIgnore] - public DateTimeOffset? End { get => Q("end"); set => Q("end", value); } - - /// - /// - /// If true, the output excludes interim results. By default, interim results - /// are included. - /// - /// - [JsonIgnore] - public bool? ExcludeInterim { get => Q("exclude_interim"); set => Q("exclude_interim", value); } - - /// - /// - /// Skips the specified number of influencers. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Returns influencers with anomaly scores greater than or equal to this - /// value. - /// - /// - [JsonIgnore] - public double? InfluencerScore { get => Q("influencer_score"); set => Q("influencer_score", value); } - - /// - /// - /// Specifies the maximum number of influencers to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Specifies the sort field for the requested influencers. By default, the - /// influencers are sorted by the influencer_score value. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Field? Sort { get => Q("sort"); set => Q("sort", value); } - - /// - /// - /// Returns influencers with timestamps after this time. The default value - /// means it is unset and results are not limited to specific timestamps. - /// - /// - [JsonIgnore] - public DateTimeOffset? Start { get => Q("start"); set => Q("start", value); } - - /// - /// - /// Configures pagination. - /// This parameter has the from and size properties. - /// - /// - [JsonInclude, JsonPropertyName("page")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? Page { get; set; } -} - -/// -/// -/// Get anomaly detection job results for influencers. -/// Influencers are the entities that have contributed to, or are to blame for, -/// the anomalies. Influencer results are available only if an -/// influencer_field_name is specified in the job configuration. -/// -/// -public sealed partial class GetInfluencersRequestDescriptor : RequestDescriptor, GetInfluencersRequestParameters> -{ - internal GetInfluencersRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetInfluencersRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetInfluencers; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_influencers"; - - public GetInfluencersRequestDescriptor Desc(bool? desc = true) => Qs("desc", desc); - public GetInfluencersRequestDescriptor End(DateTimeOffset? end) => Qs("end", end); - public GetInfluencersRequestDescriptor ExcludeInterim(bool? excludeInterim = true) => Qs("exclude_interim", excludeInterim); - public GetInfluencersRequestDescriptor From(int? from) => Qs("from", from); - public GetInfluencersRequestDescriptor InfluencerScore(double? influencerScore) => Qs("influencer_score", influencerScore); - public GetInfluencersRequestDescriptor Size(int? size) => Qs("size", size); - public GetInfluencersRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) => Qs("sort", sort); - public GetInfluencersRequestDescriptor Start(DateTimeOffset? start) => Qs("start", start); - - public GetInfluencersRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - - /// - /// - /// Configures pagination. - /// This parameter has the from and size properties. - /// - /// - public GetInfluencersRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetInfluencersRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetInfluencersRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get anomaly detection job results for influencers. -/// Influencers are the entities that have contributed to, or are to blame for, -/// the anomalies. Influencer results are available only if an -/// influencer_field_name is specified in the job configuration. -/// -/// -public sealed partial class GetInfluencersRequestDescriptor : RequestDescriptor -{ - internal GetInfluencersRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetInfluencersRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetInfluencers; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_influencers"; - - public GetInfluencersRequestDescriptor Desc(bool? desc = true) => Qs("desc", desc); - public GetInfluencersRequestDescriptor End(DateTimeOffset? end) => Qs("end", end); - public GetInfluencersRequestDescriptor ExcludeInterim(bool? excludeInterim = true) => Qs("exclude_interim", excludeInterim); - public GetInfluencersRequestDescriptor From(int? from) => Qs("from", from); - public GetInfluencersRequestDescriptor InfluencerScore(double? influencerScore) => Qs("influencer_score", influencerScore); - public GetInfluencersRequestDescriptor Size(int? size) => Qs("size", size); - public GetInfluencersRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) => Qs("sort", sort); - public GetInfluencersRequestDescriptor Start(DateTimeOffset? start) => Qs("start", start); - - public GetInfluencersRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - - /// - /// - /// Configures pagination. - /// This parameter has the from and size properties. - /// - /// - public GetInfluencersRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetInfluencersRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetInfluencersRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersResponse.g.cs deleted file mode 100644 index 3d09d58a4df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetInfluencersResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetInfluencersResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// Array of influencer objects - /// - /// - [JsonInclude, JsonPropertyName("influencers")] - public IReadOnlyCollection Influencers { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsRequest.g.cs deleted file mode 100644 index bcaf990b9ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsRequest.g.cs +++ /dev/null @@ -1,157 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetJobStatsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If true, the API returns an empty jobs array when - /// there are no matches and the subset of results when there are partial - /// matches. If false, the API returns a 404 status - /// code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } -} - -/// -/// -/// Get anomaly detection jobs usage info. -/// -/// -public sealed partial class GetJobStatsRequest : PlainRequest -{ - public GetJobStatsRequest() - { - } - - public GetJobStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) : base(r => r.Optional("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetJobStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_job_stats"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If true, the API returns an empty jobs array when - /// there are no matches and the subset of results when there are partial - /// matches. If false, the API returns a 404 status - /// code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } -} - -/// -/// -/// Get anomaly detection jobs usage info. -/// -/// -public sealed partial class GetJobStatsRequestDescriptor : RequestDescriptor -{ - internal GetJobStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetJobStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) : base(r => r.Optional("job_id", jobId)) - { - } - - public GetJobStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetJobStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_job_stats"; - - public GetJobStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - - public GetJobStatsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - RouteValues.Optional("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsResponse.g.cs deleted file mode 100644 index 52145377e72..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobStatsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetJobStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("jobs")] - public IReadOnlyCollection Jobs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsRequest.g.cs deleted file mode 100644 index 57b18c0b024..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsRequest.g.cs +++ /dev/null @@ -1,185 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetJobsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty jobs array when - /// there are no matches and the subset of results when there are partial - /// matches. If this parameter is false, the request returns a 404 status - /// code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } -} - -/// -/// -/// Get anomaly detection jobs configuration info. -/// You can get information for multiple anomaly detection jobs in a single API -/// request by using a group name, a comma-separated list of jobs, or a wildcard -/// expression. You can get information for all anomaly detection jobs by using -/// _all, by specifying * as the <job_id>, or by omitting the <job_id>. -/// -/// -public sealed partial class GetJobsRequest : PlainRequest -{ - public GetJobsRequest() - { - } - - public GetJobsRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId) : base(r => r.Optional("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetJobs; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_jobs"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty jobs array when - /// there are no matches and the subset of results when there are partial - /// matches. If this parameter is false, the request returns a 404 status - /// code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - [JsonIgnore] - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } -} - -/// -/// -/// Get anomaly detection jobs configuration info. -/// You can get information for multiple anomaly detection jobs in a single API -/// request by using a group name, a comma-separated list of jobs, or a wildcard -/// expression. You can get information for all anomaly detection jobs by using -/// _all, by specifying * as the <job_id>, or by omitting the <job_id>. -/// -/// -public sealed partial class GetJobsRequestDescriptor : RequestDescriptor -{ - internal GetJobsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetJobsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId) : base(r => r.Optional("job_id", jobId)) - { - } - - public GetJobsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetJobs; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_jobs"; - - public GetJobsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetJobsRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated); - - public GetJobsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId) - { - RouteValues.Optional("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsResponse.g.cs deleted file mode 100644 index c49c0f0fc55..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetJobsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetJobsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("jobs")] - public IReadOnlyCollection Jobs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsRequest.g.cs deleted file mode 100644 index 566744ca06f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsRequest.g.cs +++ /dev/null @@ -1,135 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetMemoryStatsRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout - /// expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request - /// fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get machine learning memory usage info. -/// Get information about how machine learning jobs and trained models are using memory, -/// on each node, both within the JVM heap, and natively, outside of the JVM. -/// -/// -public sealed partial class GetMemoryStatsRequest : PlainRequest -{ - public GetMemoryStatsRequest() - { - } - - public GetMemoryStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetMemoryStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_memory_stats"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout - /// expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request - /// fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get machine learning memory usage info. -/// Get information about how machine learning jobs and trained models are using memory, -/// on each node, both within the JVM heap, and natively, outside of the JVM. -/// -/// -public sealed partial class GetMemoryStatsRequestDescriptor : RequestDescriptor -{ - internal GetMemoryStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetMemoryStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - public GetMemoryStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetMemoryStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_memory_stats"; - - public GetMemoryStatsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public GetMemoryStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public GetMemoryStatsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsResponse.g.cs deleted file mode 100644 index 5160f398936..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetMemoryStatsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetMemoryStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStatistics { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsRequest.g.cs deleted file mode 100644 index 794d29a8ffa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsRequest.g.cs +++ /dev/null @@ -1,153 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetModelSnapshotUpgradeStatsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty jobs array when there are no matches and the subset of results - /// when there are partial matches. If this parameter is false, the request returns a 404 status code when there are - /// no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } -} - -/// -/// -/// Get anomaly detection job model snapshot upgrade usage info. -/// -/// -public sealed partial class GetModelSnapshotUpgradeStatsRequest : PlainRequest -{ - public GetModelSnapshotUpgradeStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetModelSnapshotUpgradeStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_model_snapshot_upgrade_stats"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty jobs array when there are no matches and the subset of results - /// when there are partial matches. If this parameter is false, the request returns a 404 status code when there are - /// no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } -} - -/// -/// -/// Get anomaly detection job model snapshot upgrade usage info. -/// -/// -public sealed partial class GetModelSnapshotUpgradeStatsRequestDescriptor : RequestDescriptor -{ - internal GetModelSnapshotUpgradeStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetModelSnapshotUpgradeStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetModelSnapshotUpgradeStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_model_snapshot_upgrade_stats"; - - public GetModelSnapshotUpgradeStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - - public GetModelSnapshotUpgradeStatsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public GetModelSnapshotUpgradeStatsRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) - { - RouteValues.Required("snapshot_id", snapshotId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsResponse.g.cs deleted file mode 100644 index da5c014af7e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotUpgradeStatsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetModelSnapshotUpgradeStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_upgrades")] - public IReadOnlyCollection ModelSnapshotUpgrades { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs deleted file mode 100644 index c222148d131..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs +++ /dev/null @@ -1,492 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetModelSnapshotsRequestParameters : RequestParameters -{ - /// - /// - /// Skips the specified number of snapshots. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of snapshots to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get model snapshots info. -/// -/// -public sealed partial class GetModelSnapshotsRequest : PlainRequest -{ - public GetModelSnapshotsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId) : base(r => r.Required("job_id", jobId).Optional("snapshot_id", snapshotId)) - { - } - - public GetModelSnapshotsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetModelSnapshots; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_model_snapshots"; - - /// - /// - /// Skips the specified number of snapshots. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of snapshots to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - [JsonInclude, JsonPropertyName("desc")] - public bool? Desc { get; set; } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public DateTimeOffset? End { get; set; } - [JsonInclude, JsonPropertyName("page")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? Page { get; set; } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Sort { get; set; } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public DateTimeOffset? Start { get; set; } -} - -/// -/// -/// Get model snapshots info. -/// -/// -public sealed partial class GetModelSnapshotsRequestDescriptor : RequestDescriptor, GetModelSnapshotsRequestParameters> -{ - internal GetModelSnapshotsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetModelSnapshotsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId) : base(r => r.Required("job_id", jobId).Optional("snapshot_id", snapshotId)) - { - } - - public GetModelSnapshotsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetModelSnapshots; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_model_snapshots"; - - public GetModelSnapshotsRequestDescriptor From(int? from) => Qs("from", from); - public GetModelSnapshotsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetModelSnapshotsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public GetModelSnapshotsRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId) - { - RouteValues.Optional("snapshot_id", snapshotId); - return Self; - } - - private bool? DescValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SortValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Desc(bool? desc = true) - { - DescValue = desc; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - public GetModelSnapshotsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetModelSnapshotsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetModelSnapshotsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DescValue.HasValue) - { - writer.WritePropertyName("desc"); - writer.WriteBooleanValue(DescValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get model snapshots info. -/// -/// -public sealed partial class GetModelSnapshotsRequestDescriptor : RequestDescriptor -{ - internal GetModelSnapshotsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetModelSnapshotsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId) : base(r => r.Required("job_id", jobId).Optional("snapshot_id", snapshotId)) - { - } - - public GetModelSnapshotsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetModelSnapshots; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_model_snapshots"; - - public GetModelSnapshotsRequestDescriptor From(int? from) => Qs("from", from); - public GetModelSnapshotsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetModelSnapshotsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public GetModelSnapshotsRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId) - { - RouteValues.Optional("snapshot_id", snapshotId); - return Self; - } - - private bool? DescValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SortValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Desc(bool? desc = true) - { - DescValue = desc; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - public GetModelSnapshotsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetModelSnapshotsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetModelSnapshotsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetModelSnapshotsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DescValue.HasValue) - { - writer.WritePropertyName("desc"); - writer.WriteBooleanValue(DescValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsResponse.g.cs deleted file mode 100644 index 080fdc6766e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetModelSnapshotsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetModelSnapshotsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("model_snapshots")] - public IReadOnlyCollection ModelSnapshots { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs deleted file mode 100644 index 1e2877a88e7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs +++ /dev/null @@ -1,312 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetOverallBucketsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get overall bucket results. -/// -/// -/// Retrievs overall bucket results that summarize the bucket results of -/// multiple anomaly detection jobs. -/// -/// -/// The overall_score is calculated by combining the scores of all the -/// buckets within the overall bucket span. First, the maximum -/// anomaly_score per anomaly detection job in the overall bucket is -/// calculated. Then the top_n of those scores are averaged to result in -/// the overall_score. This means that you can fine-tune the -/// overall_score so that it is more or less sensitive to the number of -/// jobs that detect an anomaly at the same time. For example, if you set -/// top_n to 1, the overall_score is the maximum bucket score in the -/// overall bucket. Alternatively, if you set top_n to the number of jobs, -/// the overall_score is high only when all jobs detect anomalies in that -/// overall bucket. If you set the bucket_span parameter (to a value -/// greater than its default), the overall_score is the maximum -/// overall_score of the overall buckets that have a span equal to the -/// jobs' largest bucket span. -/// -/// -public sealed partial class GetOverallBucketsRequest : PlainRequest -{ - public GetOverallBucketsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetOverallBuckets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_overall_buckets"; - - /// - /// - /// Refer to the description for the allow_no_match query parameter. - /// - /// - [JsonInclude, JsonPropertyName("allow_no_match")] - public bool? AllowNoMatch { get; set; } - - /// - /// - /// Refer to the description for the bucket_span query parameter. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BucketSpan { get; set; } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public DateTimeOffset? End { get; set; } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - [JsonInclude, JsonPropertyName("exclude_interim")] - public bool? ExcludeInterim { get; set; } - - /// - /// - /// Refer to the description for the overall_score query parameter. - /// - /// - [JsonInclude, JsonPropertyName("overall_score")] - public object? OverallScore { get; set; } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public DateTimeOffset? Start { get; set; } - - /// - /// - /// Refer to the description for the top_n query parameter. - /// - /// - [JsonInclude, JsonPropertyName("top_n")] - public int? TopN { get; set; } -} - -/// -/// -/// Get overall bucket results. -/// -/// -/// Retrievs overall bucket results that summarize the bucket results of -/// multiple anomaly detection jobs. -/// -/// -/// The overall_score is calculated by combining the scores of all the -/// buckets within the overall bucket span. First, the maximum -/// anomaly_score per anomaly detection job in the overall bucket is -/// calculated. Then the top_n of those scores are averaged to result in -/// the overall_score. This means that you can fine-tune the -/// overall_score so that it is more or less sensitive to the number of -/// jobs that detect an anomaly at the same time. For example, if you set -/// top_n to 1, the overall_score is the maximum bucket score in the -/// overall bucket. Alternatively, if you set top_n to the number of jobs, -/// the overall_score is high only when all jobs detect anomalies in that -/// overall bucket. If you set the bucket_span parameter (to a value -/// greater than its default), the overall_score is the maximum -/// overall_score of the overall buckets that have a span equal to the -/// jobs' largest bucket span. -/// -/// -public sealed partial class GetOverallBucketsRequestDescriptor : RequestDescriptor -{ - internal GetOverallBucketsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetOverallBucketsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetOverallBuckets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_overall_buckets"; - - public GetOverallBucketsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private bool? AllowNoMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? BucketSpanValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private bool? ExcludeInterimValue { get; set; } - private object? OverallScoreValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - private int? TopNValue { get; set; } - - /// - /// - /// Refer to the description for the allow_no_match query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) - { - AllowNoMatchValue = allowNoMatch; - return Self; - } - - /// - /// - /// Refer to the description for the bucket_span query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor BucketSpan(Elastic.Clients.Elasticsearch.Serverless.Duration? bucketSpan) - { - BucketSpanValue = bucketSpan; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor ExcludeInterim(bool? excludeInterim = true) - { - ExcludeInterimValue = excludeInterim; - return Self; - } - - /// - /// - /// Refer to the description for the overall_score query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor OverallScore(object? overallScore) - { - OverallScoreValue = overallScore; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - /// - /// - /// Refer to the description for the top_n query parameter. - /// - /// - public GetOverallBucketsRequestDescriptor TopN(int? topN) - { - TopNValue = topN; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowNoMatchValue.HasValue) - { - writer.WritePropertyName("allow_no_match"); - writer.WriteBooleanValue(AllowNoMatchValue.Value); - } - - if (BucketSpanValue is not null) - { - writer.WritePropertyName("bucket_span"); - JsonSerializer.Serialize(writer, BucketSpanValue, options); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (ExcludeInterimValue.HasValue) - { - writer.WritePropertyName("exclude_interim"); - writer.WriteBooleanValue(ExcludeInterimValue.Value); - } - - if (OverallScoreValue is not null) - { - writer.WritePropertyName("overall_score"); - JsonSerializer.Serialize(writer, OverallScoreValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - if (TopNValue.HasValue) - { - writer.WritePropertyName("top_n"); - writer.WriteNumberValue(TopNValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsResponse.g.cs deleted file mode 100644 index f5d132ee50e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetOverallBucketsResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetOverallBucketsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// Array of overall bucket objects - /// - /// - [JsonInclude, JsonPropertyName("overall_buckets")] - public IReadOnlyCollection OverallBuckets { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs deleted file mode 100644 index 5c1469f0ce4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs +++ /dev/null @@ -1,586 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetRecordsRequestParameters : RequestParameters -{ - /// - /// - /// Skips the specified number of records. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of records to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get anomaly records for an anomaly detection job. -/// Records contain the detailed analytical results. They describe the anomalous -/// activity that has been identified in the input data based on the detector -/// configuration. -/// There can be many anomaly records depending on the characteristics and size -/// of the input data. In practice, there are often too many to be able to -/// manually process them. The machine learning features therefore perform a -/// sophisticated aggregation of the anomaly records into buckets. -/// The number of record results depends on the number of anomalies found in each -/// bucket, which relates to the number of time series being modeled and the -/// number of detectors. -/// -/// -public sealed partial class GetRecordsRequest : PlainRequest -{ - public GetRecordsRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetRecords; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_records"; - - /// - /// - /// Skips the specified number of records. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of records to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - [JsonInclude, JsonPropertyName("desc")] - public bool? Desc { get; set; } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public DateTimeOffset? End { get; set; } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - [JsonInclude, JsonPropertyName("exclude_interim")] - public bool? ExcludeInterim { get; set; } - [JsonInclude, JsonPropertyName("page")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? Page { get; set; } - - /// - /// - /// Refer to the description for the record_score query parameter. - /// - /// - [JsonInclude, JsonPropertyName("record_score")] - public double? RecordScore { get; set; } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Sort { get; set; } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public DateTimeOffset? Start { get; set; } -} - -/// -/// -/// Get anomaly records for an anomaly detection job. -/// Records contain the detailed analytical results. They describe the anomalous -/// activity that has been identified in the input data based on the detector -/// configuration. -/// There can be many anomaly records depending on the characteristics and size -/// of the input data. In practice, there are often too many to be able to -/// manually process them. The machine learning features therefore perform a -/// sophisticated aggregation of the anomaly records into buckets. -/// The number of record results depends on the number of anomalies found in each -/// bucket, which relates to the number of time series being modeled and the -/// number of detectors. -/// -/// -public sealed partial class GetRecordsRequestDescriptor : RequestDescriptor, GetRecordsRequestParameters> -{ - internal GetRecordsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetRecordsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetRecords; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_records"; - - public GetRecordsRequestDescriptor From(int? from) => Qs("from", from); - public GetRecordsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetRecordsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private bool? DescValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private bool? ExcludeInterimValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - private double? RecordScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SortValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - public GetRecordsRequestDescriptor Desc(bool? desc = true) - { - DescValue = desc; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetRecordsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - public GetRecordsRequestDescriptor ExcludeInterim(bool? excludeInterim = true) - { - ExcludeInterimValue = excludeInterim; - return Self; - } - - public GetRecordsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetRecordsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetRecordsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Refer to the description for the record_score query parameter. - /// - /// - public GetRecordsRequestDescriptor RecordScore(double? recordScore) - { - RecordScoreValue = recordScore; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetRecordsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetRecordsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetRecordsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetRecordsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DescValue.HasValue) - { - writer.WritePropertyName("desc"); - writer.WriteBooleanValue(DescValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (ExcludeInterimValue.HasValue) - { - writer.WritePropertyName("exclude_interim"); - writer.WriteBooleanValue(ExcludeInterimValue.Value); - } - - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - if (RecordScoreValue.HasValue) - { - writer.WritePropertyName("record_score"); - writer.WriteNumberValue(RecordScoreValue.Value); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get anomaly records for an anomaly detection job. -/// Records contain the detailed analytical results. They describe the anomalous -/// activity that has been identified in the input data based on the detector -/// configuration. -/// There can be many anomaly records depending on the characteristics and size -/// of the input data. In practice, there are often too many to be able to -/// manually process them. The machine learning features therefore perform a -/// sophisticated aggregation of the anomaly records into buckets. -/// The number of record results depends on the number of anomalies found in each -/// bucket, which relates to the number of time series being modeled and the -/// number of detectors. -/// -/// -public sealed partial class GetRecordsRequestDescriptor : RequestDescriptor -{ - internal GetRecordsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRecordsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetRecords; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.get_records"; - - public GetRecordsRequestDescriptor From(int? from) => Qs("from", from); - public GetRecordsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetRecordsRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private bool? DescValue { get; set; } - private DateTimeOffset? EndValue { get; set; } - private bool? ExcludeInterimValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? PageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor PageDescriptor { get; set; } - private Action PageDescriptorAction { get; set; } - private double? RecordScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SortValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - - /// - /// - /// Refer to the description for the desc query parameter. - /// - /// - public GetRecordsRequestDescriptor Desc(bool? desc = true) - { - DescValue = desc; - return Self; - } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public GetRecordsRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the exclude_interim query parameter. - /// - /// - public GetRecordsRequestDescriptor ExcludeInterim(bool? excludeInterim = true) - { - ExcludeInterimValue = excludeInterim; - return Self; - } - - public GetRecordsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Page? page) - { - PageDescriptor = null; - PageDescriptorAction = null; - PageValue = page; - return Self; - } - - public GetRecordsRequestDescriptor Page(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor descriptor) - { - PageValue = null; - PageDescriptorAction = null; - PageDescriptor = descriptor; - return Self; - } - - public GetRecordsRequestDescriptor Page(Action configure) - { - PageValue = null; - PageDescriptor = null; - PageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Refer to the description for the record_score query parameter. - /// - /// - public GetRecordsRequestDescriptor RecordScore(double? recordScore) - { - RecordScoreValue = recordScore; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetRecordsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetRecordsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the sort query parameter. - /// - /// - public GetRecordsRequestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public GetRecordsRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DescValue.HasValue) - { - writer.WritePropertyName("desc"); - writer.WriteBooleanValue(DescValue.Value); - } - - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (ExcludeInterimValue.HasValue) - { - writer.WritePropertyName("exclude_interim"); - writer.WriteBooleanValue(ExcludeInterimValue.Value); - } - - if (PageDescriptor is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageDescriptor, options); - } - else if (PageDescriptorAction is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PageDescriptor(PageDescriptorAction), options); - } - else if (PageValue is not null) - { - writer.WritePropertyName("page"); - JsonSerializer.Serialize(writer, PageValue, options); - } - - if (RecordScoreValue.HasValue) - { - writer.WritePropertyName("record_score"); - writer.WriteNumberValue(RecordScoreValue.Value); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsResponse.g.cs deleted file mode 100644 index a7e647c1031..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetRecordsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetRecordsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("records")] - public IReadOnlyCollection Records { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs deleted file mode 100644 index 309d344b1ad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs +++ /dev/null @@ -1,261 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetTrainedModelsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no models that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If true, it returns an empty array when there are no matches and the - /// subset of results when there are partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Specifies whether the included model definition should be returned as a - /// JSON map (true) or in a custom compressed format (false). - /// - /// - public bool? DecompressDefinition { get => Q("decompress_definition"); set => Q("decompress_definition", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } - - /// - /// - /// Skips the specified number of models. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// A comma delimited string of optional fields to include in the response - /// body. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Include? Include { get => Q("include"); set => Q("include", value); } - - /// - /// - /// Specifies the maximum number of models to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// A comma delimited string of tags. A trained model can have many tags, or - /// none. When supplied, only trained models that contain all the supplied - /// tags are returned. - /// - /// - public ICollection? Tags { get => Q?>("tags"); set => Q("tags", value); } -} - -/// -/// -/// Get trained model configuration info. -/// -/// -public sealed partial class GetTrainedModelsRequest : PlainRequest -{ - public GetTrainedModelsRequest() - { - } - - public GetTrainedModelsRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId) : base(r => r.Optional("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetTrainedModels; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_trained_models"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no models that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If true, it returns an empty array when there are no matches and the - /// subset of results when there are partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Specifies whether the included model definition should be returned as a - /// JSON map (true) or in a custom compressed format (false). - /// - /// - [JsonIgnore] - public bool? DecompressDefinition { get => Q("decompress_definition"); set => Q("decompress_definition", value); } - - /// - /// - /// Indicates if certain fields should be removed from the configuration on - /// retrieval. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - [JsonIgnore] - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } - - /// - /// - /// Skips the specified number of models. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// A comma delimited string of optional fields to include in the response - /// body. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Include? Include { get => Q("include"); set => Q("include", value); } - - /// - /// - /// Specifies the maximum number of models to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// A comma delimited string of tags. A trained model can have many tags, or - /// none. When supplied, only trained models that contain all the supplied - /// tags are returned. - /// - /// - [JsonIgnore] - public ICollection? Tags { get => Q?>("tags"); set => Q("tags", value); } -} - -/// -/// -/// Get trained model configuration info. -/// -/// -public sealed partial class GetTrainedModelsRequestDescriptor : RequestDescriptor -{ - internal GetTrainedModelsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetTrainedModelsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId) : base(r => r.Optional("model_id", modelId)) - { - } - - public GetTrainedModelsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetTrainedModels; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_trained_models"; - - public GetTrainedModelsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetTrainedModelsRequestDescriptor DecompressDefinition(bool? decompressDefinition = true) => Qs("decompress_definition", decompressDefinition); - public GetTrainedModelsRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated); - public GetTrainedModelsRequestDescriptor From(int? from) => Qs("from", from); - public GetTrainedModelsRequestDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Include? include) => Qs("include", include); - public GetTrainedModelsRequestDescriptor Size(int? size) => Qs("size", size); - public GetTrainedModelsRequestDescriptor Tags(ICollection? tags) => Qs("tags", tags); - - public GetTrainedModelsRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId) - { - RouteValues.Optional("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsResponse.g.cs deleted file mode 100644 index cd391598dfc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetTrainedModelsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// An array of trained model resources, which are sorted by the model_id value in ascending order. - /// - /// - [JsonInclude, JsonPropertyName("trained_model_configs")] - public IReadOnlyCollection TrainedModelConfigs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsRequest.g.cs deleted file mode 100644 index 8bdac0c39d1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsRequest.g.cs +++ /dev/null @@ -1,189 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetTrainedModelsStatsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no models that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If true, it returns an empty array when there are no matches and the - /// subset of results when there are partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Skips the specified number of models. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of models to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get trained models usage info. -/// You can get usage information for multiple trained -/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. -/// -/// -public sealed partial class GetTrainedModelsStatsRequest : PlainRequest -{ - public GetTrainedModelsStatsRequest() - { - } - - public GetTrainedModelsStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId) : base(r => r.Optional("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetTrainedModelsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_trained_models_stats"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no models that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If true, it returns an empty array when there are no matches and the - /// subset of results when there are partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Skips the specified number of models. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of models to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get trained models usage info. -/// You can get usage information for multiple trained -/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. -/// -/// -public sealed partial class GetTrainedModelsStatsRequestDescriptor : RequestDescriptor -{ - internal GetTrainedModelsStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetTrainedModelsStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId) : base(r => r.Optional("model_id", modelId)) - { - } - - public GetTrainedModelsStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetTrainedModelsStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.get_trained_models_stats"; - - public GetTrainedModelsStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetTrainedModelsStatsRequestDescriptor From(int? from) => Qs("from", from); - public GetTrainedModelsStatsRequestDescriptor Size(int? size) => Qs("size", size); - - public GetTrainedModelsStatsRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId) - { - RouteValues.Optional("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsResponse.g.cs deleted file mode 100644 index ae4dc05f018..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/GetTrainedModelsStatsResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GetTrainedModelsStatsResponse : ElasticsearchResponse -{ - /// - /// - /// The total number of trained model statistics that matched the requested ID patterns. Could be higher than the number of items in the trained_model_stats array as the size of the array is restricted by the supplied size parameter. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// An array of trained model statistics, which are sorted by the model_id value in ascending order. - /// - /// - [JsonInclude, JsonPropertyName("trained_model_stats")] - public IReadOnlyCollection TrainedModelStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelRequest.g.cs deleted file mode 100644 index 93354770d71..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelRequest.g.cs +++ /dev/null @@ -1,289 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class InferTrainedModelRequestParameters : RequestParameters -{ - /// - /// - /// Controls the amount of time to wait for inference results. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Evaluate a trained model. -/// -/// -public sealed partial class InferTrainedModelRequest : PlainRequest -{ - public InferTrainedModelRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningInferTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.infer_trained_model"; - - /// - /// - /// Controls the amount of time to wait for inference results. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// An array of objects to pass to the model for inference. The objects should contain a fields matching your - /// configured trained model input. Typically, for NLP models, the field name is text_field. - /// Currently, for NLP models, only a single value is allowed. - /// - /// - [JsonInclude, JsonPropertyName("docs")] - public ICollection> Docs { get; set; } - - /// - /// - /// The inference configuration updates to apply on the API call - /// - /// - [JsonInclude, JsonPropertyName("inference_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate? InferenceConfig { get; set; } -} - -/// -/// -/// Evaluate a trained model. -/// -/// -public sealed partial class InferTrainedModelRequestDescriptor : RequestDescriptor, InferTrainedModelRequestParameters> -{ - internal InferTrainedModelRequestDescriptor(Action> configure) => configure.Invoke(this); - - public InferTrainedModelRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningInferTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.infer_trained_model"; - - public InferTrainedModelRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public InferTrainedModelRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - private ICollection> DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdateDescriptor InferenceConfigDescriptor { get; set; } - private Action> InferenceConfigDescriptorAction { get; set; } - - /// - /// - /// An array of objects to pass to the model for inference. The objects should contain a fields matching your - /// configured trained model input. Typically, for NLP models, the field name is text_field. - /// Currently, for NLP models, only a single value is allowed. - /// - /// - public InferTrainedModelRequestDescriptor Docs(ICollection> docs) - { - DocsValue = docs; - return Self; - } - - /// - /// - /// The inference configuration updates to apply on the API call - /// - /// - public InferTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public InferTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdateDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public InferTrainedModelRequestDescriptor InferenceConfig(Action> configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdateDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Evaluate a trained model. -/// -/// -public sealed partial class InferTrainedModelRequestDescriptor : RequestDescriptor -{ - internal InferTrainedModelRequestDescriptor(Action configure) => configure.Invoke(this); - - public InferTrainedModelRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningInferTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.infer_trained_model"; - - public InferTrainedModelRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public InferTrainedModelRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - private ICollection> DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdateDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } - - /// - /// - /// An array of objects to pass to the model for inference. The objects should contain a fields matching your - /// configured trained model input. Typically, for NLP models, the field name is text_field. - /// Currently, for NLP models, only a single value is allowed. - /// - /// - public InferTrainedModelRequestDescriptor Docs(ICollection> docs) - { - DocsValue = docs; - return Self; - } - - /// - /// - /// The inference configuration updates to apply on the API call - /// - /// - public InferTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public InferTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdateDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public InferTrainedModelRequestDescriptor InferenceConfig(Action configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdateDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelResponse.g.cs deleted file mode 100644 index 098482e4cab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/InferTrainedModelResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class InferTrainedModelResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("inference_results")] - public IReadOnlyCollection InferenceResults { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoRequest.g.cs deleted file mode 100644 index 7d93065f664..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoRequest.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class MlInfoRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get machine learning information. -/// Get defaults and limits used by machine learning. -/// This endpoint is designed to be used by a user interface that needs to fully -/// understand machine learning configurations where some options are not -/// specified, meaning that the defaults should be used. This endpoint may be -/// used to find out what those defaults are. It also provides information about -/// the maximum size of machine learning jobs that could run in the current -/// cluster configuration. -/// -/// -public sealed partial class MlInfoRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.info"; -} - -/// -/// -/// Get machine learning information. -/// Get defaults and limits used by machine learning. -/// This endpoint is designed to be used by a user interface that needs to fully -/// understand machine learning configurations where some options are not -/// specified, meaning that the defaults should be used. This endpoint may be -/// used to find out what those defaults are. It also provides information about -/// the maximum size of machine learning jobs that could run in the current -/// cluster configuration. -/// -/// -public sealed partial class MlInfoRequestDescriptor : RequestDescriptor -{ - internal MlInfoRequestDescriptor(Action configure) => configure.Invoke(this); - - public MlInfoRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.info"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoResponse.g.cs deleted file mode 100644 index 259dbfea229..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/MlInfoResponse.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class MlInfoResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("defaults")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Defaults Defaults { get; init; } - [JsonInclude, JsonPropertyName("limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Limits Limits { get; init; } - [JsonInclude, JsonPropertyName("native_code")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NativeCode NativeCode { get; init; } - [JsonInclude, JsonPropertyName("upgrade_mode")] - public bool UpgradeMode { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobRequest.g.cs deleted file mode 100644 index 079c74ffe3e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class OpenJobRequestParameters : RequestParameters -{ -} - -/// -/// -/// Open anomaly detection jobs. -/// An anomaly detection job must be opened to be ready to receive and analyze -/// data. It can be opened and closed multiple times throughout its lifecycle. -/// When you open a new job, it starts with an empty model. -/// When you open an existing job, the most recent model state is automatically -/// loaded. The job is ready to resume its analysis from where it left off, once -/// new data is received. -/// -/// -public sealed partial class OpenJobRequest : PlainRequest -{ - public OpenJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningOpenJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.open_job"; - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } -} - -/// -/// -/// Open anomaly detection jobs. -/// An anomaly detection job must be opened to be ready to receive and analyze -/// data. It can be opened and closed multiple times throughout its lifecycle. -/// When you open a new job, it starts with an empty model. -/// When you open an existing job, the most recent model state is automatically -/// loaded. The job is ready to resume its analysis from where it left off, once -/// new data is received. -/// -/// -public sealed partial class OpenJobRequestDescriptor : RequestDescriptor -{ - internal OpenJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public OpenJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningOpenJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.open_job"; - - public OpenJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - public OpenJobRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobResponse.g.cs deleted file mode 100644 index cd43a5e3eda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/OpenJobResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class OpenJobResponse : ElasticsearchResponse -{ - /// - /// - /// The ID of the node that the job was started on. In serverless this will be the "serverless". - /// If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string. - /// - /// - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } - [JsonInclude, JsonPropertyName("opened")] - public bool Opened { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsRequest.g.cs deleted file mode 100644 index a4fe8a7aa03..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsRequest.g.cs +++ /dev/null @@ -1,174 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PostCalendarEventsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Add scheduled events to the calendar. -/// -/// -public sealed partial class PostCalendarEventsRequest : PlainRequest -{ - public PostCalendarEventsRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPostCalendarEvents; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.post_calendar_events"; - - /// - /// - /// A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format. - /// - /// - [JsonInclude, JsonPropertyName("events")] - public ICollection Events { get; set; } -} - -/// -/// -/// Add scheduled events to the calendar. -/// -/// -public sealed partial class PostCalendarEventsRequestDescriptor : RequestDescriptor -{ - internal PostCalendarEventsRequestDescriptor(Action configure) => configure.Invoke(this); - - public PostCalendarEventsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPostCalendarEvents; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.post_calendar_events"; - - public PostCalendarEventsRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - private ICollection EventsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CalendarEventDescriptor EventsDescriptor { get; set; } - private Action EventsDescriptorAction { get; set; } - private Action[] EventsDescriptorActions { get; set; } - - /// - /// - /// A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format. - /// - /// - public PostCalendarEventsRequestDescriptor Events(ICollection events) - { - EventsDescriptor = null; - EventsDescriptorAction = null; - EventsDescriptorActions = null; - EventsValue = events; - return Self; - } - - public PostCalendarEventsRequestDescriptor Events(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CalendarEventDescriptor descriptor) - { - EventsValue = null; - EventsDescriptorAction = null; - EventsDescriptorActions = null; - EventsDescriptor = descriptor; - return Self; - } - - public PostCalendarEventsRequestDescriptor Events(Action configure) - { - EventsValue = null; - EventsDescriptor = null; - EventsDescriptorActions = null; - EventsDescriptorAction = configure; - return Self; - } - - public PostCalendarEventsRequestDescriptor Events(params Action[] configure) - { - EventsValue = null; - EventsDescriptor = null; - EventsDescriptorAction = null; - EventsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EventsDescriptor is not null) - { - writer.WritePropertyName("events"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, EventsDescriptor, options); - writer.WriteEndArray(); - } - else if (EventsDescriptorAction is not null) - { - writer.WritePropertyName("events"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CalendarEventDescriptor(EventsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (EventsDescriptorActions is not null) - { - writer.WritePropertyName("events"); - writer.WriteStartArray(); - foreach (var action in EventsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CalendarEventDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("events"); - JsonSerializer.Serialize(writer, EventsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsResponse.g.cs deleted file mode 100644 index f667f11c4bb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PostCalendarEventsResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PostCalendarEventsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("events")] - public IReadOnlyCollection Events { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index 18255393669..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,250 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PreviewDataFrameAnalyticsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Preview features used by data frame analytics. -/// Previews the extracted features used by a data frame analytics config. -/// -/// -public sealed partial class PreviewDataFrameAnalyticsRequest : PlainRequest -{ - public PreviewDataFrameAnalyticsRequest() - { - } - - public PreviewDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPreviewDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.preview_data_frame_analytics"; - - /// - /// - /// A data frame analytics config as described in create data frame analytics - /// jobs. Note that id and dest don’t need to be provided in the context of - /// this API. - /// - /// - [JsonInclude, JsonPropertyName("config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfig? Config { get; set; } -} - -/// -/// -/// Preview features used by data frame analytics. -/// Previews the extracted features used by a data frame analytics config. -/// -/// -public sealed partial class PreviewDataFrameAnalyticsRequestDescriptor : RequestDescriptor, PreviewDataFrameAnalyticsRequestParameters> -{ - internal PreviewDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PreviewDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public PreviewDataFrameAnalyticsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPreviewDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.preview_data_frame_analytics"; - - public PreviewDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfig? ConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfigDescriptor ConfigDescriptor { get; set; } - private Action> ConfigDescriptorAction { get; set; } - - /// - /// - /// A data frame analytics config as described in create data frame analytics - /// jobs. Note that id and dest don’t need to be provided in the context of - /// this API. - /// - /// - public PreviewDataFrameAnalyticsRequestDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfig? config) - { - ConfigDescriptor = null; - ConfigDescriptorAction = null; - ConfigValue = config; - return Self; - } - - public PreviewDataFrameAnalyticsRequestDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfigDescriptor descriptor) - { - ConfigValue = null; - ConfigDescriptorAction = null; - ConfigDescriptor = descriptor; - return Self; - } - - public PreviewDataFrameAnalyticsRequestDescriptor Config(Action> configure) - { - ConfigValue = null; - ConfigDescriptor = null; - ConfigDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConfigDescriptor is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigDescriptor, options); - } - else if (ConfigDescriptorAction is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfigDescriptor(ConfigDescriptorAction), options); - } - else if (ConfigValue is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Preview features used by data frame analytics. -/// Previews the extracted features used by a data frame analytics config. -/// -/// -public sealed partial class PreviewDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal PreviewDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public PreviewDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public PreviewDataFrameAnalyticsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPreviewDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.preview_data_frame_analytics"; - - public PreviewDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfig? ConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfigDescriptor ConfigDescriptor { get; set; } - private Action ConfigDescriptorAction { get; set; } - - /// - /// - /// A data frame analytics config as described in create data frame analytics - /// jobs. Note that id and dest don’t need to be provided in the context of - /// this API. - /// - /// - public PreviewDataFrameAnalyticsRequestDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfig? config) - { - ConfigDescriptor = null; - ConfigDescriptorAction = null; - ConfigValue = config; - return Self; - } - - public PreviewDataFrameAnalyticsRequestDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfigDescriptor descriptor) - { - ConfigValue = null; - ConfigDescriptorAction = null; - ConfigDescriptor = descriptor; - return Self; - } - - public PreviewDataFrameAnalyticsRequestDescriptor Config(Action configure) - { - ConfigValue = null; - ConfigDescriptor = null; - ConfigDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConfigDescriptor is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigDescriptor, options); - } - else if (ConfigDescriptorAction is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframePreviewConfigDescriptor(ConfigDescriptorAction), options); - } - else if (ConfigValue is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index aaa361ed3cb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PreviewDataFrameAnalyticsResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PreviewDataFrameAnalyticsResponse : ElasticsearchResponse -{ - /// - /// - /// An array of objects that contain feature name and value pairs. The features have been processed and indicate what will be sent to the model for training. - /// - /// - [JsonInclude, JsonPropertyName("feature_values")] - public IReadOnlyCollection> FeatureValues { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobRequest.g.cs deleted file mode 100644 index f14d06fa9be..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutCalendarJobRequestParameters : RequestParameters -{ -} - -/// -/// -/// Add anomaly detection job to calendar. -/// -/// -public sealed partial class PutCalendarJobRequest : PlainRequest -{ - public PutCalendarJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId) : base(r => r.Required("calendar_id", calendarId).Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutCalendarJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.put_calendar_job"; -} - -/// -/// -/// Add anomaly detection job to calendar. -/// -/// -public sealed partial class PutCalendarJobRequestDescriptor : RequestDescriptor -{ - internal PutCalendarJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutCalendarJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId) : base(r => r.Required("calendar_id", calendarId).Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutCalendarJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.put_calendar_job"; - - public PutCalendarJobRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - public PutCalendarJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Ids jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobResponse.g.cs deleted file mode 100644 index b1d318b6602..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarJobResponse.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutCalendarJobResponse : ElasticsearchResponse -{ - /// - /// - /// A string that uniquely identifies a calendar. - /// - /// - [JsonInclude, JsonPropertyName("calendar_id")] - public string CalendarId { get; init; } - - /// - /// - /// A description of the calendar. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// A list of anomaly detection job identifiers or group names. - /// - /// - [JsonInclude, JsonPropertyName("job_ids")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection JobIds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarRequest.g.cs deleted file mode 100644 index 30744c748b0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarRequest.g.cs +++ /dev/null @@ -1,142 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutCalendarRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create a calendar. -/// -/// -public sealed partial class PutCalendarRequest : PlainRequest -{ - public PutCalendarRequest(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutCalendar; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_calendar"; - - /// - /// - /// A description of the calendar. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// An array of anomaly detection job identifiers. - /// - /// - [JsonInclude, JsonPropertyName("job_ids")] - public ICollection? JobIds { get; set; } -} - -/// -/// -/// Create a calendar. -/// -/// -public sealed partial class PutCalendarRequestDescriptor : RequestDescriptor -{ - internal PutCalendarRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutCalendarRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) : base(r => r.Required("calendar_id", calendarId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutCalendar; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_calendar"; - - public PutCalendarRequestDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id calendarId) - { - RouteValues.Required("calendar_id", calendarId); - return Self; - } - - private string? DescriptionValue { get; set; } - private ICollection? JobIdsValue { get; set; } - - /// - /// - /// A description of the calendar. - /// - /// - public PutCalendarRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// An array of anomaly detection job identifiers. - /// - /// - public PutCalendarRequestDescriptor JobIds(ICollection? jobIds) - { - JobIdsValue = jobIds; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (JobIdsValue is not null) - { - writer.WritePropertyName("job_ids"); - JsonSerializer.Serialize(writer, JobIdsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarResponse.g.cs deleted file mode 100644 index 6196799ffd7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutCalendarResponse.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutCalendarResponse : ElasticsearchResponse -{ - /// - /// - /// A string that uniquely identifies a calendar. - /// - /// - [JsonInclude, JsonPropertyName("calendar_id")] - public string CalendarId { get; init; } - - /// - /// - /// A description of the calendar. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// A list of anomaly detection job identifiers or group names. - /// - /// - [JsonInclude, JsonPropertyName("job_ids")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection JobIds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index 24199785d0d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,936 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutDataFrameAnalyticsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create a data frame analytics job. -/// This API creates a data frame analytics job that performs an analysis on the -/// source indices and stores the outcome in a destination index. -/// -/// -public sealed partial class PutDataFrameAnalyticsRequest : PlainRequest -{ - public PutDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_data_frame_analytics"; - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. If - /// set to false and a machine learning node with capacity to run the job - /// cannot be immediately found, the API returns an error. If set to true, - /// the API does not return an error; the job waits in the starting state - /// until sufficient machine learning node capacity is available. This - /// behavior is also affected by the cluster-wide - /// xpack.ml.max_lazy_ml_nodes setting. - /// - /// - [JsonInclude, JsonPropertyName("allow_lazy_start")] - public bool? AllowLazyStart { get; set; } - - /// - /// - /// The analysis configuration, which contains the information necessary to - /// perform one of the following types of analysis: classification, outlier - /// detection, or regression. - /// - /// - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis Analysis { get; set; } - - /// - /// - /// Specifies includes and/or excludes patterns to select which fields - /// will be included in the analysis. The patterns specified in excludes - /// are applied last, therefore excludes takes precedence. In other words, - /// if the same field is specified in both includes and excludes, then - /// the field will not be included in the analysis. If analyzed_fields is - /// not set, only the relevant fields will be included. For example, all the - /// numeric fields for outlier detection. - /// The supported fields vary for each type of analysis. Outlier detection - /// requires numeric or boolean data to analyze. The algorithms don’t - /// support missing values therefore fields that have data types other than - /// numeric or boolean are ignored. Documents where included fields contain - /// missing values, null values, or an array are also ignored. Therefore the - /// dest index may contain documents that don’t have an outlier score. - /// Regression supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the regression analysis. - /// Classification supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the classification analysis. - /// Classification analysis can be improved by mapping ordinal variable - /// values to a single number. For example, in case of age ranges, you can - /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. - /// - /// - [JsonInclude, JsonPropertyName("analyzed_fields")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFields { get; set; } - - /// - /// - /// A description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The destination configuration. - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination Dest { get; set; } - [JsonInclude, JsonPropertyName("headers")] - public IDictionary>>? Headers { get; set; } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - [JsonInclude, JsonPropertyName("max_num_threads")] - public int? MaxNumThreads { get; set; } - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try - /// to create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string? ModelMemoryLimit { get; set; } - - /// - /// - /// The configuration of how to source the analysis data. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource Source { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -/// -/// -/// Create a data frame analytics job. -/// This API creates a data frame analytics job that performs an analysis on the -/// source indices and stores the outcome in a destination index. -/// -/// -public sealed partial class PutDataFrameAnalyticsRequestDescriptor : RequestDescriptor, PutDataFrameAnalyticsRequestParameters> -{ - internal PutDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_data_frame_analytics"; - - public PutDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private bool? AllowLazyStartValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action> AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor AnalyzedFieldsDescriptor { get; set; } - private Action AnalyzedFieldsDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor DestDescriptor { get; set; } - private Action> DestDescriptorAction { get; set; } - private IDictionary>>? HeadersValue { get; set; } - private int? MaxNumThreadsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - private string? VersionValue { get; set; } - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. If - /// set to false and a machine learning node with capacity to run the job - /// cannot be immediately found, the API returns an error. If set to true, - /// the API does not return an error; the job waits in the starting state - /// until sufficient machine learning node capacity is available. This - /// behavior is also affected by the cluster-wide - /// xpack.ml.max_lazy_ml_nodes setting. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor AllowLazyStart(bool? allowLazyStart = true) - { - AllowLazyStartValue = allowLazyStart; - return Self; - } - - /// - /// - /// The analysis configuration, which contains the information necessary to - /// perform one of the following types of analysis: classification, outlier - /// detection, or regression. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Analysis(Action> configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies includes and/or excludes patterns to select which fields - /// will be included in the analysis. The patterns specified in excludes - /// are applied last, therefore excludes takes precedence. In other words, - /// if the same field is specified in both includes and excludes, then - /// the field will not be included in the analysis. If analyzed_fields is - /// not set, only the relevant fields will be included. For example, all the - /// numeric fields for outlier detection. - /// The supported fields vary for each type of analysis. Outlier detection - /// requires numeric or boolean data to analyze. The algorithms don’t - /// support missing values therefore fields that have data types other than - /// numeric or boolean are ignored. Documents where included fields contain - /// missing values, null values, or an array are also ignored. Therefore the - /// dest index may contain documents that don’t have an outlier score. - /// Regression supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the regression analysis. - /// Classification supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the classification analysis. - /// Classification analysis can be improved by mapping ordinal variable - /// values to a single number. For example, in case of age ranges, you can - /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? analyzedFields) - { - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsValue = analyzedFields; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(Action configure) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = configure; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination configuration. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Dest(Action> configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Headers(Func>>, FluentDictionary>>> selector) - { - HeadersValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try - /// to create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - /// - /// - /// The configuration of how to source the analysis data. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyStartValue.HasValue) - { - writer.WritePropertyName("allow_lazy_start"); - writer.WriteBooleanValue(AllowLazyStartValue.Value); - } - - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzedFieldsDescriptor is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsDescriptor, options); - } - else if (AnalyzedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(AnalyzedFieldsDescriptorAction), options); - } - else if (AnalyzedFieldsValue is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor(DestDescriptorAction), options); - } - else - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (HeadersValue is not null) - { - writer.WritePropertyName("headers"); - JsonSerializer.Serialize(writer, HeadersValue, options); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create a data frame analytics job. -/// This API creates a data frame analytics job that performs an analysis on the -/// source indices and stores the outcome in a destination index. -/// -/// -public sealed partial class PutDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal PutDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_data_frame_analytics"; - - public PutDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private bool? AllowLazyStartValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor AnalyzedFieldsDescriptor { get; set; } - private Action AnalyzedFieldsDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private IDictionary>>? HeadersValue { get; set; } - private int? MaxNumThreadsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - private string? VersionValue { get; set; } - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. If - /// set to false and a machine learning node with capacity to run the job - /// cannot be immediately found, the API returns an error. If set to true, - /// the API does not return an error; the job waits in the starting state - /// until sufficient machine learning node capacity is available. This - /// behavior is also affected by the cluster-wide - /// xpack.ml.max_lazy_ml_nodes setting. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor AllowLazyStart(bool? allowLazyStart = true) - { - AllowLazyStartValue = allowLazyStart; - return Self; - } - - /// - /// - /// The analysis configuration, which contains the information necessary to - /// perform one of the following types of analysis: classification, outlier - /// detection, or regression. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Analysis(Action configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies includes and/or excludes patterns to select which fields - /// will be included in the analysis. The patterns specified in excludes - /// are applied last, therefore excludes takes precedence. In other words, - /// if the same field is specified in both includes and excludes, then - /// the field will not be included in the analysis. If analyzed_fields is - /// not set, only the relevant fields will be included. For example, all the - /// numeric fields for outlier detection. - /// The supported fields vary for each type of analysis. Outlier detection - /// requires numeric or boolean data to analyze. The algorithms don’t - /// support missing values therefore fields that have data types other than - /// numeric or boolean are ignored. Documents where included fields contain - /// missing values, null values, or an array are also ignored. Therefore the - /// dest index may contain documents that don’t have an outlier score. - /// Regression supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the regression analysis. - /// Classification supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the classification analysis. - /// Classification analysis can be improved by mapping ordinal variable - /// values to a single number. For example, in case of age ranges, you can - /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? analyzedFields) - { - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsValue = analyzedFields; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(Action configure) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = configure; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination configuration. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Headers(Func>>, FluentDictionary>>> selector) - { - HeadersValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try - /// to create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - /// - /// - /// The configuration of how to source the analysis data. - /// - /// - public PutDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - public PutDataFrameAnalyticsRequestDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyStartValue.HasValue) - { - writer.WritePropertyName("allow_lazy_start"); - writer.WriteBooleanValue(AllowLazyStartValue.Value); - } - - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzedFieldsDescriptor is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsDescriptor, options); - } - else if (AnalyzedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(AnalyzedFieldsDescriptorAction), options); - } - else if (AnalyzedFieldsValue is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestinationDescriptor(DestDescriptorAction), options); - } - else - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (HeadersValue is not null) - { - writer.WritePropertyName("headers"); - JsonSerializer.Serialize(writer, HeadersValue, options); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index 60f90198ccf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDataFrameAnalyticsResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutDataFrameAnalyticsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("allow_lazy_start")] - public bool AllowLazyStart { get; init; } - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis Analysis { get; init; } - [JsonInclude, JsonPropertyName("analyzed_fields")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFields { get; init; } - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsAuthorization? Authorization { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public long CreateTime { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination Dest { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("max_num_threads")] - public int MaxNumThreads { get; init; } - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string ModelMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource Source { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs deleted file mode 100644 index b014e0cd7d3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs +++ /dev/null @@ -1,1314 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutDatafeedRequestParameters : RequestParameters -{ - /// - /// - /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the _all - /// string or when no indices are specified. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines - /// whether wildcard expressions match hidden data streams. Supports comma-separated values. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, unavailable indices (missing or closed) are ignored. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -internal sealed partial class PutDatafeedRequestConverter : JsonConverter -{ - public override PutDatafeedRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new PutDatafeedRequest(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "chunking_config") - { - variant.ChunkingConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "delayed_data_check_config") - { - variant.DelayedDataCheckConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "frequency") - { - variant.Frequency = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "headers") - { - variant.Headers = JsonSerializer.Deserialize>>?>(ref reader, options); - continue; - } - - if (property == "indices" || property == "indexes") - { - variant.Indices = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices_options") - { - variant.IndicesOptions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "job_id") - { - variant.JobId = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_empty_searches") - { - variant.MaxEmptySearches = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query_delay") - { - variant.QueryDelay = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "scroll_size") - { - variant.ScrollSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, PutDatafeedRequest value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.ChunkingConfig is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, value.ChunkingConfig, options); - } - - if (value.DelayedDataCheckConfig is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, value.DelayedDataCheckConfig, options); - } - - if (value.Frequency is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, value.Frequency, options); - } - - if (value.Headers is not null) - { - writer.WritePropertyName("headers"); - JsonSerializer.Serialize(writer, value.Headers, options); - } - - if (value.Indices is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, value.Indices, options); - } - - if (value.IndicesOptions is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, value.IndicesOptions, options); - } - - if (value.JobId is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, value.JobId, options); - } - - if (value.MaxEmptySearches.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(value.MaxEmptySearches.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.QueryDelay is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, value.QueryDelay, options); - } - - if (value.RuntimeMappings is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); - } - - if (value.ScriptFields is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, value.ScriptFields, options); - } - - if (value.ScrollSize.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(value.ScrollSize.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create a datafeed. -/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. -/// You can associate only one datafeed with each anomaly detection job. -/// The datafeed contains a query that runs at a defined interval (frequency). -/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had -/// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, -/// those credentials are used instead. -/// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed -/// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. -/// -/// -[JsonConverter(typeof(PutDatafeedRequestConverter))] -public sealed partial class PutDatafeedRequest : PlainRequest -{ - public PutDatafeedRequest(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - public PutDatafeedRequest() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_datafeed"; - - /// - /// - /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the _all - /// string or when no indices are specified. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines - /// whether wildcard expressions match hidden data streams. Supports comma-separated values. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, unavailable indices (missing or closed) are ignored. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If set, the datafeed performs aggregation searches. - /// Support for aggregations is limited and should be used only with low cardinality data. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - - /// - /// - /// Datafeeds might be required to search over long time periods, for several months or years. - /// This search is split into time chunks in order to ensure the load on Elasticsearch is managed. - /// Chunking configuration controls how the size of these time chunks are calculated; - /// it is an advanced configuration option. - /// - /// - [JsonInclude, JsonPropertyName("chunking_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfig { get; set; } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. - /// The datafeed can optionally search over indices that have already been read in an effort to determine whether - /// any data has subsequently been added to the index. If missing data is found, it is a good indication that the - /// query_delay is set too low and the data is being indexed after the datafeed has passed that moment in time. - /// This check runs only on real-time datafeeds. - /// - /// - [JsonInclude, JsonPropertyName("delayed_data_check_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfig { get; set; } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. - /// The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible - /// fraction of the bucket span. When frequency is shorter than the bucket span, interim results for the last - /// (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses - /// aggregations, this value must be divisible by the interval of the date histogram aggregation. - /// - /// - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; set; } - [JsonInclude, JsonPropertyName("headers")] - public IDictionary>>? Headers { get; set; } - - /// - /// - /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine - /// learning nodes must have the remote_cluster_client role. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// Specifies index expansion options that are used during search - /// - /// - [JsonInclude, JsonPropertyName("indices_options")] - public Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptions { get; set; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get; set; } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period), it automatically - /// stops and closes the associated job after this many real-time searches return no documents. In other words, - /// it stops after frequency times max_empty_searches of real-time operation. If not set, a datafeed with no - /// end time that sees no data remains started until it is explicitly stopped. By default, it is not set. - /// - /// - [JsonInclude, JsonPropertyName("max_empty_searches")] - public int? MaxEmptySearches { get; set; } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an - /// Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this - /// object is passed verbatim to Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might - /// not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default - /// value is randomly selected between 60s and 120s. This randomness improves the query performance - /// when there are multiple jobs running on the same node. - /// - /// - [JsonInclude, JsonPropertyName("query_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelay { get; set; } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. - /// The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - [JsonInclude, JsonPropertyName("script_fields")] - public IDictionary? ScriptFields { get; set; } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. - /// The maximum value is the value of index.max_result_window, which is 10,000 by default. - /// - /// - [JsonInclude, JsonPropertyName("scroll_size")] - public int? ScrollSize { get; set; } -} - -/// -/// -/// Create a datafeed. -/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. -/// You can associate only one datafeed with each anomaly detection job. -/// The datafeed contains a query that runs at a defined interval (frequency). -/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had -/// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, -/// those credentials are used instead. -/// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed -/// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. -/// -/// -public sealed partial class PutDatafeedRequestDescriptor : RequestDescriptor, PutDatafeedRequestParameters> -{ - internal PutDatafeedRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_datafeed"; - - public PutDatafeedRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutDatafeedRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutDatafeedRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public PutDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - private IDictionary> AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor ChunkingConfigDescriptor { get; set; } - private Action ChunkingConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor DelayedDataCheckConfigDescriptor { get; set; } - private Action DelayedDataCheckConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private IDictionary>>? HeadersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor IndicesOptionsDescriptor { get; set; } - private Action IndicesOptionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private int? MaxEmptySearchesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelayValue { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private int? ScrollSizeValue { get; set; } - - /// - /// - /// If set, the datafeed performs aggregation searches. - /// Support for aggregations is limited and should be used only with low cardinality data. - /// - /// - public PutDatafeedRequestDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Datafeeds might be required to search over long time periods, for several months or years. - /// This search is split into time chunks in order to ensure the load on Elasticsearch is managed. - /// Chunking configuration controls how the size of these time chunks are calculated; - /// it is an advanced configuration option. - /// - /// - public PutDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig) - { - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigValue = chunkingConfig; - return Self; - } - - public PutDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor descriptor) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor ChunkingConfig(Action configure) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. - /// The datafeed can optionally search over indices that have already been read in an effort to determine whether - /// any data has subsequently been added to the index. If missing data is found, it is a good indication that the - /// query_delay is set too low and the data is being indexed after the datafeed has passed that moment in time. - /// This check runs only on real-time datafeeds. - /// - /// - public PutDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? delayedDataCheckConfig) - { - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigValue = delayedDataCheckConfig; - return Self; - } - - public PutDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor descriptor) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor DelayedDataCheckConfig(Action configure) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. - /// The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible - /// fraction of the bucket span. When frequency is shorter than the bucket span, interim results for the last - /// (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses - /// aggregations, this value must be divisible by the interval of the date histogram aggregation. - /// - /// - public PutDatafeedRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - public PutDatafeedRequestDescriptor Headers(Func>>, FluentDictionary>>> selector) - { - HeadersValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine - /// learning nodes must have the remote_cluster_client role. - /// - /// - public PutDatafeedRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies index expansion options that are used during search - /// - /// - public PutDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions) - { - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsValue = indicesOptions; - return Self; - } - - public PutDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor descriptor) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor IndicesOptions(Action configure) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - public PutDatafeedRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period), it automatically - /// stops and closes the associated job after this many real-time searches return no documents. In other words, - /// it stops after frequency times max_empty_searches of real-time operation. If not set, a datafeed with no - /// end time that sees no data remains started until it is explicitly stopped. By default, it is not set. - /// - /// - public PutDatafeedRequestDescriptor MaxEmptySearches(int? maxEmptySearches) - { - MaxEmptySearchesValue = maxEmptySearches; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an - /// Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this - /// object is passed verbatim to Elasticsearch. - /// - /// - public PutDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public PutDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might - /// not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default - /// value is randomly selected between 60s and 120s. This randomness improves the query performance - /// when there are multiple jobs running on the same node. - /// - /// - public PutDatafeedRequestDescriptor QueryDelay(Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay) - { - QueryDelayValue = queryDelay; - return Self; - } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public PutDatafeedRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. - /// The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public PutDatafeedRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. - /// The maximum value is the value of index.max_result_window, which is 10,000 by default. - /// - /// - public PutDatafeedRequestDescriptor ScrollSize(int? scrollSize) - { - ScrollSizeValue = scrollSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (ChunkingConfigDescriptor is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigDescriptor, options); - } - else if (ChunkingConfigDescriptorAction is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor(ChunkingConfigDescriptorAction), options); - } - else if (ChunkingConfigValue is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigValue, options); - } - - if (DelayedDataCheckConfigDescriptor is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigDescriptor, options); - } - else if (DelayedDataCheckConfigDescriptorAction is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor(DelayedDataCheckConfigDescriptorAction), options); - } - else if (DelayedDataCheckConfigValue is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (HeadersValue is not null) - { - writer.WritePropertyName("headers"); - JsonSerializer.Serialize(writer, HeadersValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IndicesOptionsDescriptor is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsDescriptor, options); - } - else if (IndicesOptionsDescriptorAction is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor(IndicesOptionsDescriptorAction), options); - } - else if (IndicesOptionsValue is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (MaxEmptySearchesValue.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(MaxEmptySearchesValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryDelayValue is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, QueryDelayValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (ScrollSizeValue.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(ScrollSizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create a datafeed. -/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. -/// You can associate only one datafeed with each anomaly detection job. -/// The datafeed contains a query that runs at a defined interval (frequency). -/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had -/// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, -/// those credentials are used instead. -/// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed -/// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. -/// -/// -public sealed partial class PutDatafeedRequestDescriptor : RequestDescriptor -{ - internal PutDatafeedRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_datafeed"; - - public PutDatafeedRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutDatafeedRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutDatafeedRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public PutDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - private IDictionary AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor ChunkingConfigDescriptor { get; set; } - private Action ChunkingConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor DelayedDataCheckConfigDescriptor { get; set; } - private Action DelayedDataCheckConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private IDictionary>>? HeadersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor IndicesOptionsDescriptor { get; set; } - private Action IndicesOptionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private int? MaxEmptySearchesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelayValue { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private int? ScrollSizeValue { get; set; } - - /// - /// - /// If set, the datafeed performs aggregation searches. - /// Support for aggregations is limited and should be used only with low cardinality data. - /// - /// - public PutDatafeedRequestDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Datafeeds might be required to search over long time periods, for several months or years. - /// This search is split into time chunks in order to ensure the load on Elasticsearch is managed. - /// Chunking configuration controls how the size of these time chunks are calculated; - /// it is an advanced configuration option. - /// - /// - public PutDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig) - { - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigValue = chunkingConfig; - return Self; - } - - public PutDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor descriptor) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor ChunkingConfig(Action configure) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. - /// The datafeed can optionally search over indices that have already been read in an effort to determine whether - /// any data has subsequently been added to the index. If missing data is found, it is a good indication that the - /// query_delay is set too low and the data is being indexed after the datafeed has passed that moment in time. - /// This check runs only on real-time datafeeds. - /// - /// - public PutDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? delayedDataCheckConfig) - { - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigValue = delayedDataCheckConfig; - return Self; - } - - public PutDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor descriptor) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor DelayedDataCheckConfig(Action configure) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. - /// The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible - /// fraction of the bucket span. When frequency is shorter than the bucket span, interim results for the last - /// (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses - /// aggregations, this value must be divisible by the interval of the date histogram aggregation. - /// - /// - public PutDatafeedRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - public PutDatafeedRequestDescriptor Headers(Func>>, FluentDictionary>>> selector) - { - HeadersValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine - /// learning nodes must have the remote_cluster_client role. - /// - /// - public PutDatafeedRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies index expansion options that are used during search - /// - /// - public PutDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions) - { - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsValue = indicesOptions; - return Self; - } - - public PutDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor descriptor) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor IndicesOptions(Action configure) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - public PutDatafeedRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period), it automatically - /// stops and closes the associated job after this many real-time searches return no documents. In other words, - /// it stops after frequency times max_empty_searches of real-time operation. If not set, a datafeed with no - /// end time that sees no data remains started until it is explicitly stopped. By default, it is not set. - /// - /// - public PutDatafeedRequestDescriptor MaxEmptySearches(int? maxEmptySearches) - { - MaxEmptySearchesValue = maxEmptySearches; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an - /// Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this - /// object is passed verbatim to Elasticsearch. - /// - /// - public PutDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public PutDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public PutDatafeedRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might - /// not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default - /// value is randomly selected between 60s and 120s. This randomness improves the query performance - /// when there are multiple jobs running on the same node. - /// - /// - public PutDatafeedRequestDescriptor QueryDelay(Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay) - { - QueryDelayValue = queryDelay; - return Self; - } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public PutDatafeedRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. - /// The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public PutDatafeedRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. - /// The maximum value is the value of index.max_result_window, which is 10,000 by default. - /// - /// - public PutDatafeedRequestDescriptor ScrollSize(int? scrollSize) - { - ScrollSizeValue = scrollSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (ChunkingConfigDescriptor is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigDescriptor, options); - } - else if (ChunkingConfigDescriptorAction is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor(ChunkingConfigDescriptorAction), options); - } - else if (ChunkingConfigValue is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigValue, options); - } - - if (DelayedDataCheckConfigDescriptor is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigDescriptor, options); - } - else if (DelayedDataCheckConfigDescriptorAction is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor(DelayedDataCheckConfigDescriptorAction), options); - } - else if (DelayedDataCheckConfigValue is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (HeadersValue is not null) - { - writer.WritePropertyName("headers"); - JsonSerializer.Serialize(writer, HeadersValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IndicesOptionsDescriptor is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsDescriptor, options); - } - else if (IndicesOptionsDescriptorAction is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor(IndicesOptionsDescriptorAction), options); - } - else if (IndicesOptionsValue is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (MaxEmptySearchesValue.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(MaxEmptySearchesValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryDelayValue is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, QueryDelayValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (ScrollSizeValue.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(ScrollSizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs deleted file mode 100644 index ddabcb1e4ee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs +++ /dev/null @@ -1,61 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutDatafeedResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregations")] - public IReadOnlyDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedAuthorization? Authorization { get; init; } - [JsonInclude, JsonPropertyName("chunking_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig ChunkingConfig { get; init; } - [JsonInclude, JsonPropertyName("datafeed_id")] - public string DatafeedId { get; init; } - [JsonInclude, JsonPropertyName("delayed_data_check_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfig { get; init; } - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("indices_options")] - public Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptions { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("max_empty_searches")] - public int? MaxEmptySearches { get; init; } - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; init; } - [JsonInclude, JsonPropertyName("query_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration QueryDelay { get; init; } - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IReadOnlyDictionary? RuntimeMappings { get; init; } - [JsonInclude, JsonPropertyName("script_fields")] - public IReadOnlyDictionary? ScriptFields { get; init; } - [JsonInclude, JsonPropertyName("scroll_size")] - public int ScrollSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterRequest.g.cs deleted file mode 100644 index 83aece34c13..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterRequest.g.cs +++ /dev/null @@ -1,148 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutFilterRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create a filter. -/// A filter contains a list of strings. It can be used by one or more anomaly detection jobs. -/// Specifically, filters are referenced in the custom_rules property of detector configuration objects. -/// -/// -public sealed partial class PutFilterRequest : PlainRequest -{ - public PutFilterRequest(Elastic.Clients.Elasticsearch.Serverless.Id filterId) : base(r => r.Required("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutFilter; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_filter"; - - /// - /// - /// A description of the filter. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The items of the filter. A wildcard * can be used at the beginning or the end of an item. - /// Up to 10000 items are allowed in each filter. - /// - /// - [JsonInclude, JsonPropertyName("items")] - public ICollection? Items { get; set; } -} - -/// -/// -/// Create a filter. -/// A filter contains a list of strings. It can be used by one or more anomaly detection jobs. -/// Specifically, filters are referenced in the custom_rules property of detector configuration objects. -/// -/// -public sealed partial class PutFilterRequestDescriptor : RequestDescriptor -{ - internal PutFilterRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutFilterRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id filterId) : base(r => r.Required("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutFilter; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_filter"; - - public PutFilterRequestDescriptor FilterId(Elastic.Clients.Elasticsearch.Serverless.Id filterId) - { - RouteValues.Required("filter_id", filterId); - return Self; - } - - private string? DescriptionValue { get; set; } - private ICollection? ItemsValue { get; set; } - - /// - /// - /// A description of the filter. - /// - /// - public PutFilterRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The items of the filter. A wildcard * can be used at the beginning or the end of an item. - /// Up to 10000 items are allowed in each filter. - /// - /// - public PutFilterRequestDescriptor Items(ICollection? items) - { - ItemsValue = items; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (ItemsValue is not null) - { - writer.WritePropertyName("items"); - JsonSerializer.Serialize(writer, ItemsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterResponse.g.cs deleted file mode 100644 index 20f12bc44f0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutFilterResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutFilterResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("filter_id")] - public string FilterId { get; init; } - [JsonInclude, JsonPropertyName("items")] - public IReadOnlyCollection Items { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobRequest.g.cs deleted file mode 100644 index c507002aedb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobRequest.g.cs +++ /dev/null @@ -1,1222 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutJobRequestParameters : RequestParameters -{ - /// - /// - /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the - /// _all string or when no indices are specified. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines - /// whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: - /// - /// - /// - /// - /// all: Match any data stream or index, including hidden ones. - /// - /// - /// - /// - /// closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. - /// - /// - /// - /// - /// hidden: Match hidden data streams and hidden indices. Must be combined with open, closed, or both. - /// - /// - /// - /// - /// none: Wildcard patterns are not accepted. - /// - /// - /// - /// - /// open: Match open, non-hidden indices. Also matches any non-hidden data stream. - /// - /// - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, unavailable indices (missing or closed) are ignored. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -/// -/// -/// Create an anomaly detection job. -/// If you include a datafeed_config, you must have read index privileges on the source index. -/// -/// -public sealed partial class PutJobRequest : PlainRequest -{ - public PutJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_job"; - - /// - /// - /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the - /// _all string or when no indices are specified. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines - /// whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: - /// - /// - /// - /// - /// all: Match any data stream or index, including hidden ones. - /// - /// - /// - /// - /// closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. - /// - /// - /// - /// - /// hidden: Match hidden data streams and hidden indices. Must be combined with open, closed, or both. - /// - /// - /// - /// - /// none: Wildcard patterns are not accepted. - /// - /// - /// - /// - /// open: Match open, non-hidden indices. Also matches any non-hidden data stream. - /// - /// - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, unavailable indices (missing or closed) are ignored. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide xpack.ml.max_lazy_ml_nodes setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available. - /// - /// - [JsonInclude, JsonPropertyName("allow_lazy_open")] - public bool? AllowLazyOpen { get; set; } - - /// - /// - /// Specifies how to analyze the data. After you create a job, you cannot change the analysis configuration; all the properties are informational. - /// - /// - [JsonInclude, JsonPropertyName("analysis_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig AnalysisConfig { get; set; } - - /// - /// - /// Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. - /// - /// - [JsonInclude, JsonPropertyName("analysis_limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimits { get; set; } - - /// - /// - /// Advanced configuration option. The time between each periodic persistence of the model. The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. The smallest allowed value is 1 hour. For very large models (several GB), persistence could take 10-20 minutes, so do not set the background_persist_interval value too low. - /// - /// - [JsonInclude, JsonPropertyName("background_persist_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistInterval { get; set; } - - /// - /// - /// Advanced configuration option. Contains custom meta data about the job. - /// - /// - [JsonInclude, JsonPropertyName("custom_settings")] - public object? CustomSettings { get; set; } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to model_snapshot_retention_days. - /// - /// - [JsonInclude, JsonPropertyName("daily_model_snapshot_retention_after_days")] - public long? DailyModelSnapshotRetentionAfterDays { get; set; } - - /// - /// - /// Defines the format of the input data when you send data to the job by using the post data API. Note that when configure a datafeed, these properties are automatically set. When data is received via the post data API, it is not stored in Elasticsearch. Only the results for anomaly detection are retained. - /// - /// - [JsonInclude, JsonPropertyName("data_description")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription DataDescription { get; set; } - - /// - /// - /// Defines a datafeed for the anomaly detection job. If Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. - /// - /// - [JsonInclude, JsonPropertyName("datafeed_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfig? DatafeedConfig { get; set; } - - /// - /// - /// A description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// A list of job groups. A job can belong to no groups or many. - /// - /// - [JsonInclude, JsonPropertyName("groups")] - public ICollection? Groups { get; set; } - - /// - /// - /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get; set; } - - /// - /// - /// This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. - /// - /// - [JsonInclude, JsonPropertyName("model_plot_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfig { get; set; } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted. - /// - /// - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public long? ModelSnapshotRetentionDays { get; set; } - - /// - /// - /// Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen. The default value is the longer of 30 days or 100 bucket spans. - /// - /// - [JsonInclude, JsonPropertyName("renormalization_window_days")] - public long? RenormalizationWindowDays { get; set; } - - /// - /// - /// A text string that affects the name of the machine learning results index. By default, the job generates an index named .ml-anomalies-shared. - /// - /// - [JsonInclude, JsonPropertyName("results_index_name")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? ResultsIndexName { get; set; } - - /// - /// - /// Advanced configuration option. The period of time (in days) that results are retained. Age is calculated relative to the timestamp of the latest bucket result. If this property has a non-null value, once per day at 00:30 (server time), results that are the specified number of days older than the latest bucket result are deleted from Elasticsearch. The default value is null, which means all results are retained. Annotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results. Annotations added by users are retained forever. - /// - /// - [JsonInclude, JsonPropertyName("results_retention_days")] - public long? ResultsRetentionDays { get; set; } -} - -/// -/// -/// Create an anomaly detection job. -/// If you include a datafeed_config, you must have read index privileges on the source index. -/// -/// -public sealed partial class PutJobRequestDescriptor : RequestDescriptor, PutJobRequestParameters> -{ - internal PutJobRequestDescriptor(Action> configure) => configure.Invoke(this); - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_job"; - - public PutJobRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutJobRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutJobRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - private bool? AllowLazyOpenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig AnalysisConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor AnalysisConfigDescriptor { get; set; } - private Action> AnalysisConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor AnalysisLimitsDescriptor { get; set; } - private Action AnalysisLimitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistIntervalValue { get; set; } - private object? CustomSettingsValue { get; set; } - private long? DailyModelSnapshotRetentionAfterDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription DataDescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor DataDescriptionDescriptor { get; set; } - private Action> DataDescriptionDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfig? DatafeedConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfigDescriptor DatafeedConfigDescriptor { get; set; } - private Action> DatafeedConfigDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? GroupsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor ModelPlotConfigDescriptor { get; set; } - private Action> ModelPlotConfigDescriptorAction { get; set; } - private long? ModelSnapshotRetentionDaysValue { get; set; } - private long? RenormalizationWindowDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? ResultsIndexNameValue { get; set; } - private long? ResultsRetentionDaysValue { get; set; } - - /// - /// - /// Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide xpack.ml.max_lazy_ml_nodes setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available. - /// - /// - public PutJobRequestDescriptor AllowLazyOpen(bool? allowLazyOpen = true) - { - AllowLazyOpenValue = allowLazyOpen; - return Self; - } - - /// - /// - /// Specifies how to analyze the data. After you create a job, you cannot change the analysis configuration; all the properties are informational. - /// - /// - public PutJobRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig analysisConfig) - { - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigValue = analysisConfig; - return Self; - } - - public PutJobRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor descriptor) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor AnalysisConfig(Action> configure) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. - /// - /// - public PutJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? analysisLimits) - { - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsValue = analysisLimits; - return Self; - } - - public PutJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor descriptor) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor AnalysisLimits(Action configure) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. The time between each periodic persistence of the model. The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. The smallest allowed value is 1 hour. For very large models (several GB), persistence could take 10-20 minutes, so do not set the background_persist_interval value too low. - /// - /// - public PutJobRequestDescriptor BackgroundPersistInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? backgroundPersistInterval) - { - BackgroundPersistIntervalValue = backgroundPersistInterval; - return Self; - } - - /// - /// - /// Advanced configuration option. Contains custom meta data about the job. - /// - /// - public PutJobRequestDescriptor CustomSettings(object? customSettings) - { - CustomSettingsValue = customSettings; - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to model_snapshot_retention_days. - /// - /// - public PutJobRequestDescriptor DailyModelSnapshotRetentionAfterDays(long? dailyModelSnapshotRetentionAfterDays) - { - DailyModelSnapshotRetentionAfterDaysValue = dailyModelSnapshotRetentionAfterDays; - return Self; - } - - /// - /// - /// Defines the format of the input data when you send data to the job by using the post data API. Note that when configure a datafeed, these properties are automatically set. When data is received via the post data API, it is not stored in Elasticsearch. Only the results for anomaly detection are retained. - /// - /// - public PutJobRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription dataDescription) - { - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = null; - DataDescriptionValue = dataDescription; - return Self; - } - - public PutJobRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor descriptor) - { - DataDescriptionValue = null; - DataDescriptionDescriptorAction = null; - DataDescriptionDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor DataDescription(Action> configure) - { - DataDescriptionValue = null; - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a datafeed for the anomaly detection job. If Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. - /// - /// - public PutJobRequestDescriptor DatafeedConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfig? datafeedConfig) - { - DatafeedConfigDescriptor = null; - DatafeedConfigDescriptorAction = null; - DatafeedConfigValue = datafeedConfig; - return Self; - } - - public PutJobRequestDescriptor DatafeedConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfigDescriptor descriptor) - { - DatafeedConfigValue = null; - DatafeedConfigDescriptorAction = null; - DatafeedConfigDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor DatafeedConfig(Action> configure) - { - DatafeedConfigValue = null; - DatafeedConfigDescriptor = null; - DatafeedConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public PutJobRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A list of job groups. A job can belong to no groups or many. - /// - /// - public PutJobRequestDescriptor Groups(ICollection? groups) - { - GroupsValue = groups; - return Self; - } - - /// - /// - /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. - /// - /// - public PutJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. - /// - /// - public PutJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? modelPlotConfig) - { - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigValue = modelPlotConfig; - return Self; - } - - public PutJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor descriptor) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor ModelPlotConfig(Action> configure) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted. - /// - /// - public PutJobRequestDescriptor ModelSnapshotRetentionDays(long? modelSnapshotRetentionDays) - { - ModelSnapshotRetentionDaysValue = modelSnapshotRetentionDays; - return Self; - } - - /// - /// - /// Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen. The default value is the longer of 30 days or 100 bucket spans. - /// - /// - public PutJobRequestDescriptor RenormalizationWindowDays(long? renormalizationWindowDays) - { - RenormalizationWindowDaysValue = renormalizationWindowDays; - return Self; - } - - /// - /// - /// A text string that affects the name of the machine learning results index. By default, the job generates an index named .ml-anomalies-shared. - /// - /// - public PutJobRequestDescriptor ResultsIndexName(Elastic.Clients.Elasticsearch.Serverless.IndexName? resultsIndexName) - { - ResultsIndexNameValue = resultsIndexName; - return Self; - } - - /// - /// - /// Advanced configuration option. The period of time (in days) that results are retained. Age is calculated relative to the timestamp of the latest bucket result. If this property has a non-null value, once per day at 00:30 (server time), results that are the specified number of days older than the latest bucket result are deleted from Elasticsearch. The default value is null, which means all results are retained. Annotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results. Annotations added by users are retained forever. - /// - /// - public PutJobRequestDescriptor ResultsRetentionDays(long? resultsRetentionDays) - { - ResultsRetentionDaysValue = resultsRetentionDays; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyOpenValue.HasValue) - { - writer.WritePropertyName("allow_lazy_open"); - writer.WriteBooleanValue(AllowLazyOpenValue.Value); - } - - if (AnalysisConfigDescriptor is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigDescriptor, options); - } - else if (AnalysisConfigDescriptorAction is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor(AnalysisConfigDescriptorAction), options); - } - else - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigValue, options); - } - - if (AnalysisLimitsDescriptor is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsDescriptor, options); - } - else if (AnalysisLimitsDescriptorAction is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor(AnalysisLimitsDescriptorAction), options); - } - else if (AnalysisLimitsValue is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsValue, options); - } - - if (BackgroundPersistIntervalValue is not null) - { - writer.WritePropertyName("background_persist_interval"); - JsonSerializer.Serialize(writer, BackgroundPersistIntervalValue, options); - } - - if (CustomSettingsValue is not null) - { - writer.WritePropertyName("custom_settings"); - JsonSerializer.Serialize(writer, CustomSettingsValue, options); - } - - if (DailyModelSnapshotRetentionAfterDaysValue.HasValue) - { - writer.WritePropertyName("daily_model_snapshot_retention_after_days"); - writer.WriteNumberValue(DailyModelSnapshotRetentionAfterDaysValue.Value); - } - - if (DataDescriptionDescriptor is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionDescriptor, options); - } - else if (DataDescriptionDescriptorAction is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor(DataDescriptionDescriptorAction), options); - } - else - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionValue, options); - } - - if (DatafeedConfigDescriptor is not null) - { - writer.WritePropertyName("datafeed_config"); - JsonSerializer.Serialize(writer, DatafeedConfigDescriptor, options); - } - else if (DatafeedConfigDescriptorAction is not null) - { - writer.WritePropertyName("datafeed_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfigDescriptor(DatafeedConfigDescriptorAction), options); - } - else if (DatafeedConfigValue is not null) - { - writer.WritePropertyName("datafeed_config"); - JsonSerializer.Serialize(writer, DatafeedConfigValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (GroupsValue is not null) - { - writer.WritePropertyName("groups"); - JsonSerializer.Serialize(writer, GroupsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (ModelPlotConfigDescriptor is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigDescriptor, options); - } - else if (ModelPlotConfigDescriptorAction is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor(ModelPlotConfigDescriptorAction), options); - } - else if (ModelPlotConfigValue is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigValue, options); - } - - if (ModelSnapshotRetentionDaysValue.HasValue) - { - writer.WritePropertyName("model_snapshot_retention_days"); - writer.WriteNumberValue(ModelSnapshotRetentionDaysValue.Value); - } - - if (RenormalizationWindowDaysValue.HasValue) - { - writer.WritePropertyName("renormalization_window_days"); - writer.WriteNumberValue(RenormalizationWindowDaysValue.Value); - } - - if (ResultsIndexNameValue is not null) - { - writer.WritePropertyName("results_index_name"); - JsonSerializer.Serialize(writer, ResultsIndexNameValue, options); - } - - if (ResultsRetentionDaysValue.HasValue) - { - writer.WritePropertyName("results_retention_days"); - writer.WriteNumberValue(ResultsRetentionDaysValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create an anomaly detection job. -/// If you include a datafeed_config, you must have read index privileges on the source index. -/// -/// -public sealed partial class PutJobRequestDescriptor : RequestDescriptor -{ - internal PutJobRequestDescriptor(Action configure) => configure.Invoke(this); - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_job"; - - public PutJobRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public PutJobRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public PutJobRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - private bool? AllowLazyOpenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig AnalysisConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor AnalysisConfigDescriptor { get; set; } - private Action AnalysisConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor AnalysisLimitsDescriptor { get; set; } - private Action AnalysisLimitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistIntervalValue { get; set; } - private object? CustomSettingsValue { get; set; } - private long? DailyModelSnapshotRetentionAfterDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription DataDescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor DataDescriptionDescriptor { get; set; } - private Action DataDescriptionDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfig? DatafeedConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfigDescriptor DatafeedConfigDescriptor { get; set; } - private Action DatafeedConfigDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? GroupsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor ModelPlotConfigDescriptor { get; set; } - private Action ModelPlotConfigDescriptorAction { get; set; } - private long? ModelSnapshotRetentionDaysValue { get; set; } - private long? RenormalizationWindowDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? ResultsIndexNameValue { get; set; } - private long? ResultsRetentionDaysValue { get; set; } - - /// - /// - /// Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide xpack.ml.max_lazy_ml_nodes setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available. - /// - /// - public PutJobRequestDescriptor AllowLazyOpen(bool? allowLazyOpen = true) - { - AllowLazyOpenValue = allowLazyOpen; - return Self; - } - - /// - /// - /// Specifies how to analyze the data. After you create a job, you cannot change the analysis configuration; all the properties are informational. - /// - /// - public PutJobRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig analysisConfig) - { - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigValue = analysisConfig; - return Self; - } - - public PutJobRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor descriptor) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor AnalysisConfig(Action configure) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. - /// - /// - public PutJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? analysisLimits) - { - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsValue = analysisLimits; - return Self; - } - - public PutJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor descriptor) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor AnalysisLimits(Action configure) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. The time between each periodic persistence of the model. The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. The smallest allowed value is 1 hour. For very large models (several GB), persistence could take 10-20 minutes, so do not set the background_persist_interval value too low. - /// - /// - public PutJobRequestDescriptor BackgroundPersistInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? backgroundPersistInterval) - { - BackgroundPersistIntervalValue = backgroundPersistInterval; - return Self; - } - - /// - /// - /// Advanced configuration option. Contains custom meta data about the job. - /// - /// - public PutJobRequestDescriptor CustomSettings(object? customSettings) - { - CustomSettingsValue = customSettings; - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to model_snapshot_retention_days. - /// - /// - public PutJobRequestDescriptor DailyModelSnapshotRetentionAfterDays(long? dailyModelSnapshotRetentionAfterDays) - { - DailyModelSnapshotRetentionAfterDaysValue = dailyModelSnapshotRetentionAfterDays; - return Self; - } - - /// - /// - /// Defines the format of the input data when you send data to the job by using the post data API. Note that when configure a datafeed, these properties are automatically set. When data is received via the post data API, it is not stored in Elasticsearch. Only the results for anomaly detection are retained. - /// - /// - public PutJobRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription dataDescription) - { - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = null; - DataDescriptionValue = dataDescription; - return Self; - } - - public PutJobRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor descriptor) - { - DataDescriptionValue = null; - DataDescriptionDescriptorAction = null; - DataDescriptionDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor DataDescription(Action configure) - { - DataDescriptionValue = null; - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a datafeed for the anomaly detection job. If Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. - /// - /// - public PutJobRequestDescriptor DatafeedConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfig? datafeedConfig) - { - DatafeedConfigDescriptor = null; - DatafeedConfigDescriptorAction = null; - DatafeedConfigValue = datafeedConfig; - return Self; - } - - public PutJobRequestDescriptor DatafeedConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfigDescriptor descriptor) - { - DatafeedConfigValue = null; - DatafeedConfigDescriptorAction = null; - DatafeedConfigDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor DatafeedConfig(Action configure) - { - DatafeedConfigValue = null; - DatafeedConfigDescriptor = null; - DatafeedConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public PutJobRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A list of job groups. A job can belong to no groups or many. - /// - /// - public PutJobRequestDescriptor Groups(ICollection? groups) - { - GroupsValue = groups; - return Self; - } - - /// - /// - /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. - /// - /// - public PutJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. - /// - /// - public PutJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? modelPlotConfig) - { - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigValue = modelPlotConfig; - return Self; - } - - public PutJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor descriptor) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigDescriptor = descriptor; - return Self; - } - - public PutJobRequestDescriptor ModelPlotConfig(Action configure) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted. - /// - /// - public PutJobRequestDescriptor ModelSnapshotRetentionDays(long? modelSnapshotRetentionDays) - { - ModelSnapshotRetentionDaysValue = modelSnapshotRetentionDays; - return Self; - } - - /// - /// - /// Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen. The default value is the longer of 30 days or 100 bucket spans. - /// - /// - public PutJobRequestDescriptor RenormalizationWindowDays(long? renormalizationWindowDays) - { - RenormalizationWindowDaysValue = renormalizationWindowDays; - return Self; - } - - /// - /// - /// A text string that affects the name of the machine learning results index. By default, the job generates an index named .ml-anomalies-shared. - /// - /// - public PutJobRequestDescriptor ResultsIndexName(Elastic.Clients.Elasticsearch.Serverless.IndexName? resultsIndexName) - { - ResultsIndexNameValue = resultsIndexName; - return Self; - } - - /// - /// - /// Advanced configuration option. The period of time (in days) that results are retained. Age is calculated relative to the timestamp of the latest bucket result. If this property has a non-null value, once per day at 00:30 (server time), results that are the specified number of days older than the latest bucket result are deleted from Elasticsearch. The default value is null, which means all results are retained. Annotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results. Annotations added by users are retained forever. - /// - /// - public PutJobRequestDescriptor ResultsRetentionDays(long? resultsRetentionDays) - { - ResultsRetentionDaysValue = resultsRetentionDays; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyOpenValue.HasValue) - { - writer.WritePropertyName("allow_lazy_open"); - writer.WriteBooleanValue(AllowLazyOpenValue.Value); - } - - if (AnalysisConfigDescriptor is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigDescriptor, options); - } - else if (AnalysisConfigDescriptorAction is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor(AnalysisConfigDescriptorAction), options); - } - else - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigValue, options); - } - - if (AnalysisLimitsDescriptor is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsDescriptor, options); - } - else if (AnalysisLimitsDescriptorAction is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor(AnalysisLimitsDescriptorAction), options); - } - else if (AnalysisLimitsValue is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsValue, options); - } - - if (BackgroundPersistIntervalValue is not null) - { - writer.WritePropertyName("background_persist_interval"); - JsonSerializer.Serialize(writer, BackgroundPersistIntervalValue, options); - } - - if (CustomSettingsValue is not null) - { - writer.WritePropertyName("custom_settings"); - JsonSerializer.Serialize(writer, CustomSettingsValue, options); - } - - if (DailyModelSnapshotRetentionAfterDaysValue.HasValue) - { - writer.WritePropertyName("daily_model_snapshot_retention_after_days"); - writer.WriteNumberValue(DailyModelSnapshotRetentionAfterDaysValue.Value); - } - - if (DataDescriptionDescriptor is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionDescriptor, options); - } - else if (DataDescriptionDescriptorAction is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor(DataDescriptionDescriptorAction), options); - } - else - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionValue, options); - } - - if (DatafeedConfigDescriptor is not null) - { - writer.WritePropertyName("datafeed_config"); - JsonSerializer.Serialize(writer, DatafeedConfigDescriptor, options); - } - else if (DatafeedConfigDescriptorAction is not null) - { - writer.WritePropertyName("datafeed_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedConfigDescriptor(DatafeedConfigDescriptorAction), options); - } - else if (DatafeedConfigValue is not null) - { - writer.WritePropertyName("datafeed_config"); - JsonSerializer.Serialize(writer, DatafeedConfigValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (GroupsValue is not null) - { - writer.WritePropertyName("groups"); - JsonSerializer.Serialize(writer, GroupsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (ModelPlotConfigDescriptor is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigDescriptor, options); - } - else if (ModelPlotConfigDescriptorAction is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor(ModelPlotConfigDescriptorAction), options); - } - else if (ModelPlotConfigValue is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigValue, options); - } - - if (ModelSnapshotRetentionDaysValue.HasValue) - { - writer.WritePropertyName("model_snapshot_retention_days"); - writer.WriteNumberValue(ModelSnapshotRetentionDaysValue.Value); - } - - if (RenormalizationWindowDaysValue.HasValue) - { - writer.WritePropertyName("renormalization_window_days"); - writer.WriteNumberValue(RenormalizationWindowDaysValue.Value); - } - - if (ResultsIndexNameValue is not null) - { - writer.WritePropertyName("results_index_name"); - JsonSerializer.Serialize(writer, ResultsIndexNameValue, options); - } - - if (ResultsRetentionDaysValue.HasValue) - { - writer.WritePropertyName("results_retention_days"); - writer.WriteNumberValue(ResultsRetentionDaysValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobResponse.g.cs deleted file mode 100644 index 4046c33265f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutJobResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutJobResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("allow_lazy_open")] - public bool AllowLazyOpen { get; init; } - [JsonInclude, JsonPropertyName("analysis_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigRead AnalysisConfig { get; init; } - [JsonInclude, JsonPropertyName("analysis_limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits AnalysisLimits { get; init; } - [JsonInclude, JsonPropertyName("background_persist_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistInterval { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public DateTimeOffset CreateTime { get; init; } - [JsonInclude, JsonPropertyName("custom_settings")] - public object? CustomSettings { get; init; } - [JsonInclude, JsonPropertyName("daily_model_snapshot_retention_after_days")] - public long DailyModelSnapshotRetentionAfterDays { get; init; } - [JsonInclude, JsonPropertyName("data_description")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription DataDescription { get; init; } - [JsonInclude, JsonPropertyName("datafeed_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Datafeed? DatafeedConfig { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("groups")] - public IReadOnlyCollection? Groups { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("job_type")] - public string JobType { get; init; } - [JsonInclude, JsonPropertyName("job_version")] - public string JobVersion { get; init; } - [JsonInclude, JsonPropertyName("model_plot_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfig { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_id")] - public string? ModelSnapshotId { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public long ModelSnapshotRetentionDays { get; init; } - [JsonInclude, JsonPropertyName("renormalization_window_days")] - public long? RenormalizationWindowDays { get; init; } - [JsonInclude, JsonPropertyName("results_index_name")] - public string ResultsIndexName { get; init; } - [JsonInclude, JsonPropertyName("results_retention_days")] - public long? ResultsRetentionDays { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasRequest.g.cs deleted file mode 100644 index 7e1b3290619..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasRequest.g.cs +++ /dev/null @@ -1,145 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelAliasRequestParameters : RequestParameters -{ - /// - /// - /// Specifies whether the alias gets reassigned to the specified trained - /// model if it is already assigned to a different model. If the alias is - /// already assigned and this parameter is false, the API returns an error. - /// - /// - public bool? Reassign { get => Q("reassign"); set => Q("reassign", value); } -} - -/// -/// -/// Create or update a trained model alias. -/// A trained model alias is a logical name used to reference a single trained -/// model. -/// You can use aliases instead of trained model identifiers to make it easier to -/// reference your models. For example, you can use aliases in inference -/// aggregations and processors. -/// An alias must be unique and refer to only a single trained model. However, -/// you can have multiple aliases for each trained model. -/// If you use this API to update an alias such that it references a different -/// trained model ID and the model uses a different type of data frame analytics, -/// an error occurs. For example, this situation occurs if you have a trained -/// model for regression analysis and a trained model for classification -/// analysis; you cannot reassign an alias from one type of trained model to -/// another. -/// If you use this API to update an alias and there are very few input fields in -/// common between the old and new trained models for the model alias, the API -/// returns a warning. -/// -/// -public sealed partial class PutTrainedModelAliasRequest : PlainRequest -{ - public PutTrainedModelAliasRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias) : base(r => r.Required("model_id", modelId).Required("model_alias", modelAlias)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModelAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.put_trained_model_alias"; - - /// - /// - /// Specifies whether the alias gets reassigned to the specified trained - /// model if it is already assigned to a different model. If the alias is - /// already assigned and this parameter is false, the API returns an error. - /// - /// - [JsonIgnore] - public bool? Reassign { get => Q("reassign"); set => Q("reassign", value); } -} - -/// -/// -/// Create or update a trained model alias. -/// A trained model alias is a logical name used to reference a single trained -/// model. -/// You can use aliases instead of trained model identifiers to make it easier to -/// reference your models. For example, you can use aliases in inference -/// aggregations and processors. -/// An alias must be unique and refer to only a single trained model. However, -/// you can have multiple aliases for each trained model. -/// If you use this API to update an alias such that it references a different -/// trained model ID and the model uses a different type of data frame analytics, -/// an error occurs. For example, this situation occurs if you have a trained -/// model for regression analysis and a trained model for classification -/// analysis; you cannot reassign an alias from one type of trained model to -/// another. -/// If you use this API to update an alias and there are very few input fields in -/// common between the old and new trained models for the model alias, the API -/// returns a warning. -/// -/// -public sealed partial class PutTrainedModelAliasRequestDescriptor : RequestDescriptor -{ - internal PutTrainedModelAliasRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutTrainedModelAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias) : base(r => r.Required("model_id", modelId).Required("model_alias", modelAlias)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModelAlias; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.put_trained_model_alias"; - - public PutTrainedModelAliasRequestDescriptor Reassign(bool? reassign = true) => Qs("reassign", reassign); - - public PutTrainedModelAliasRequestDescriptor ModelAlias(Elastic.Clients.Elasticsearch.Serverless.Name modelAlias) - { - RouteValues.Required("model_alias", modelAlias); - return Self; - } - - public PutTrainedModelAliasRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasResponse.g.cs deleted file mode 100644 index 8fa9c7fa77b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelAliasResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelAliasResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartRequest.g.cs deleted file mode 100644 index 46b073093ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartRequest.g.cs +++ /dev/null @@ -1,162 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelDefinitionPartRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create part of a trained model definition. -/// -/// -public sealed partial class PutTrainedModelDefinitionPartRequest : PlainRequest -{ - public PutTrainedModelDefinitionPartRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId, int part) : base(r => r.Required("model_id", modelId).Required("part", part)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModelDefinitionPart; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model_definition_part"; - - /// - /// - /// The definition part for the model. Must be a base64 encoded string. - /// - /// - [JsonInclude, JsonPropertyName("definition")] - public string Definition { get; set; } - - /// - /// - /// The total uncompressed definition length in bytes. Not base64 encoded. - /// - /// - [JsonInclude, JsonPropertyName("total_definition_length")] - public long TotalDefinitionLength { get; set; } - - /// - /// - /// The total number of parts that will be uploaded. Must be greater than 0. - /// - /// - [JsonInclude, JsonPropertyName("total_parts")] - public int TotalParts { get; set; } -} - -/// -/// -/// Create part of a trained model definition. -/// -/// -public sealed partial class PutTrainedModelDefinitionPartRequestDescriptor : RequestDescriptor -{ - internal PutTrainedModelDefinitionPartRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutTrainedModelDefinitionPartRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId, int part) : base(r => r.Required("model_id", modelId).Required("part", part)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModelDefinitionPart; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model_definition_part"; - - public PutTrainedModelDefinitionPartRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - public PutTrainedModelDefinitionPartRequestDescriptor Part(int part) - { - RouteValues.Required("part", part); - return Self; - } - - private string DefinitionValue { get; set; } - private long TotalDefinitionLengthValue { get; set; } - private int TotalPartsValue { get; set; } - - /// - /// - /// The definition part for the model. Must be a base64 encoded string. - /// - /// - public PutTrainedModelDefinitionPartRequestDescriptor Definition(string definition) - { - DefinitionValue = definition; - return Self; - } - - /// - /// - /// The total uncompressed definition length in bytes. Not base64 encoded. - /// - /// - public PutTrainedModelDefinitionPartRequestDescriptor TotalDefinitionLength(long totalDefinitionLength) - { - TotalDefinitionLengthValue = totalDefinitionLength; - return Self; - } - - /// - /// - /// The total number of parts that will be uploaded. Must be greater than 0. - /// - /// - public PutTrainedModelDefinitionPartRequestDescriptor TotalParts(int totalParts) - { - TotalPartsValue = totalParts; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("definition"); - writer.WriteStringValue(DefinitionValue); - writer.WritePropertyName("total_definition_length"); - writer.WriteNumberValue(TotalDefinitionLengthValue); - writer.WritePropertyName("total_parts"); - writer.WriteNumberValue(TotalPartsValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartResponse.g.cs deleted file mode 100644 index dd3c200a6b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelDefinitionPartResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelDefinitionPartResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs deleted file mode 100644 index 7d4e626063e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs +++ /dev/null @@ -1,935 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelRequestParameters : RequestParameters -{ - /// - /// - /// If set to true and a compressed_definition is provided, - /// the request defers definition decompression and skips relevant - /// validations. - /// - /// - public bool? DeferDefinitionDecompression { get => Q("defer_definition_decompression"); set => Q("defer_definition_decompression", value); } - - /// - /// - /// Whether to wait for all child operations (e.g. model download) - /// to complete. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Create a trained model. -/// Enable you to supply a trained model that is not created by data frame analytics. -/// -/// -public sealed partial class PutTrainedModelRequest : PlainRequest -{ - public PutTrainedModelRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model"; - - /// - /// - /// If set to true and a compressed_definition is provided, - /// the request defers definition decompression and skips relevant - /// validations. - /// - /// - [JsonIgnore] - public bool? DeferDefinitionDecompression { get => Q("defer_definition_decompression"); set => Q("defer_definition_decompression", value); } - - /// - /// - /// Whether to wait for all child operations (e.g. model download) - /// to complete. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// - /// The compressed (GZipped and Base64 encoded) inference definition of the - /// model. If compressed_definition is specified, then definition cannot be - /// specified. - /// - /// - [JsonInclude, JsonPropertyName("compressed_definition")] - public string? CompressedDefinition { get; set; } - - /// - /// - /// The inference definition for the model. If definition is specified, then - /// compressed_definition cannot be specified. - /// - /// - [JsonInclude, JsonPropertyName("definition")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Definition? Definition { get; set; } - - /// - /// - /// A human-readable description of the inference trained model. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The default configuration for inference. This can be either a regression - /// or classification configuration. It must match the underlying - /// definition.trained_model's target_type. For pre-packaged models such as - /// ELSER the config is not required. - /// - /// - [JsonInclude, JsonPropertyName("inference_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? InferenceConfig { get; set; } - - /// - /// - /// The input field names for the model definition. - /// - /// - [JsonInclude, JsonPropertyName("input")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Input? Input { get; set; } - - /// - /// - /// An object map that contains metadata about the model. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public object? Metadata { get; set; } - - /// - /// - /// The estimated memory usage in bytes to keep the trained model in memory. - /// This property is supported only if defer_definition_decompression is true - /// or the model definition is not supplied. - /// - /// - [JsonInclude, JsonPropertyName("model_size_bytes")] - public long? ModelSizeBytes { get; set; } - - /// - /// - /// The model type. - /// - /// - [JsonInclude, JsonPropertyName("model_type")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? ModelType { get; set; } - - /// - /// - /// The platform architecture (if applicable) of the trained mode. If the model - /// only works on one platform, because it is heavily optimized for a particular - /// processor architecture and OS combination, then this field specifies which. - /// The format of the string must match the platform identifiers used by Elasticsearch, - /// so one of, linux-x86_64, linux-aarch64, darwin-x86_64, darwin-aarch64, - /// or windows-x86_64. For portable models (those that work independent of processor - /// architecture or OS features), leave this field unset. - /// - /// - [JsonInclude, JsonPropertyName("platform_architecture")] - public string? PlatformArchitecture { get; set; } - - /// - /// - /// Optional prefix strings applied at inference - /// - /// - [JsonInclude, JsonPropertyName("prefix_strings")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? PrefixStrings { get; set; } - - /// - /// - /// An array of tags to organize the model. - /// - /// - [JsonInclude, JsonPropertyName("tags")] - public ICollection? Tags { get; set; } -} - -/// -/// -/// Create a trained model. -/// Enable you to supply a trained model that is not created by data frame analytics. -/// -/// -public sealed partial class PutTrainedModelRequestDescriptor : RequestDescriptor, PutTrainedModelRequestParameters> -{ - internal PutTrainedModelRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutTrainedModelRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model"; - - public PutTrainedModelRequestDescriptor DeferDefinitionDecompression(bool? deferDefinitionDecompression = true) => Qs("defer_definition_decompression", deferDefinitionDecompression); - public PutTrainedModelRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public PutTrainedModelRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - private string? CompressedDefinitionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Definition? DefinitionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DefinitionDescriptor DefinitionDescriptor { get; set; } - private Action DefinitionDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreateDescriptor InferenceConfigDescriptor { get; set; } - private Action> InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Input? InputValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InputDescriptor InputDescriptor { get; set; } - private Action InputDescriptorAction { get; set; } - private object? MetadataValue { get; set; } - private long? ModelSizeBytesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? ModelTypeValue { get; set; } - private string? PlatformArchitectureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? PrefixStringsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStringsDescriptor PrefixStringsDescriptor { get; set; } - private Action PrefixStringsDescriptorAction { get; set; } - private ICollection? TagsValue { get; set; } - - /// - /// - /// The compressed (GZipped and Base64 encoded) inference definition of the - /// model. If compressed_definition is specified, then definition cannot be - /// specified. - /// - /// - public PutTrainedModelRequestDescriptor CompressedDefinition(string? compressedDefinition) - { - CompressedDefinitionValue = compressedDefinition; - return Self; - } - - /// - /// - /// The inference definition for the model. If definition is specified, then - /// compressed_definition cannot be specified. - /// - /// - public PutTrainedModelRequestDescriptor Definition(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Definition? definition) - { - DefinitionDescriptor = null; - DefinitionDescriptorAction = null; - DefinitionValue = definition; - return Self; - } - - public PutTrainedModelRequestDescriptor Definition(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DefinitionDescriptor descriptor) - { - DefinitionValue = null; - DefinitionDescriptorAction = null; - DefinitionDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor Definition(Action configure) - { - DefinitionValue = null; - DefinitionDescriptor = null; - DefinitionDescriptorAction = configure; - return Self; - } - - /// - /// - /// A human-readable description of the inference trained model. - /// - /// - public PutTrainedModelRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The default configuration for inference. This can be either a regression - /// or classification configuration. It must match the underlying - /// definition.trained_model's target_type. For pre-packaged models such as - /// ELSER the config is not required. - /// - /// - public PutTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public PutTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreateDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor InferenceConfig(Action> configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The input field names for the model definition. - /// - /// - public PutTrainedModelRequestDescriptor Input(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Input? input) - { - InputDescriptor = null; - InputDescriptorAction = null; - InputValue = input; - return Self; - } - - public PutTrainedModelRequestDescriptor Input(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InputDescriptor descriptor) - { - InputValue = null; - InputDescriptorAction = null; - InputDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor Input(Action configure) - { - InputValue = null; - InputDescriptor = null; - InputDescriptorAction = configure; - return Self; - } - - /// - /// - /// An object map that contains metadata about the model. - /// - /// - public PutTrainedModelRequestDescriptor Metadata(object? metadata) - { - MetadataValue = metadata; - return Self; - } - - /// - /// - /// The estimated memory usage in bytes to keep the trained model in memory. - /// This property is supported only if defer_definition_decompression is true - /// or the model definition is not supplied. - /// - /// - public PutTrainedModelRequestDescriptor ModelSizeBytes(long? modelSizeBytes) - { - ModelSizeBytesValue = modelSizeBytes; - return Self; - } - - /// - /// - /// The model type. - /// - /// - public PutTrainedModelRequestDescriptor ModelType(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? modelType) - { - ModelTypeValue = modelType; - return Self; - } - - /// - /// - /// The platform architecture (if applicable) of the trained mode. If the model - /// only works on one platform, because it is heavily optimized for a particular - /// processor architecture and OS combination, then this field specifies which. - /// The format of the string must match the platform identifiers used by Elasticsearch, - /// so one of, linux-x86_64, linux-aarch64, darwin-x86_64, darwin-aarch64, - /// or windows-x86_64. For portable models (those that work independent of processor - /// architecture or OS features), leave this field unset. - /// - /// - public PutTrainedModelRequestDescriptor PlatformArchitecture(string? platformArchitecture) - { - PlatformArchitectureValue = platformArchitecture; - return Self; - } - - /// - /// - /// Optional prefix strings applied at inference - /// - /// - public PutTrainedModelRequestDescriptor PrefixStrings(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? prefixStrings) - { - PrefixStringsDescriptor = null; - PrefixStringsDescriptorAction = null; - PrefixStringsValue = prefixStrings; - return Self; - } - - public PutTrainedModelRequestDescriptor PrefixStrings(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStringsDescriptor descriptor) - { - PrefixStringsValue = null; - PrefixStringsDescriptorAction = null; - PrefixStringsDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor PrefixStrings(Action configure) - { - PrefixStringsValue = null; - PrefixStringsDescriptor = null; - PrefixStringsDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of tags to organize the model. - /// - /// - public PutTrainedModelRequestDescriptor Tags(ICollection? tags) - { - TagsValue = tags; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CompressedDefinitionValue)) - { - writer.WritePropertyName("compressed_definition"); - writer.WriteStringValue(CompressedDefinitionValue); - } - - if (DefinitionDescriptor is not null) - { - writer.WritePropertyName("definition"); - JsonSerializer.Serialize(writer, DefinitionDescriptor, options); - } - else if (DefinitionDescriptorAction is not null) - { - writer.WritePropertyName("definition"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DefinitionDescriptor(DefinitionDescriptorAction), options); - } - else if (DefinitionValue is not null) - { - writer.WritePropertyName("definition"); - JsonSerializer.Serialize(writer, DefinitionValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreateDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - if (InputDescriptor is not null) - { - writer.WritePropertyName("input"); - JsonSerializer.Serialize(writer, InputDescriptor, options); - } - else if (InputDescriptorAction is not null) - { - writer.WritePropertyName("input"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InputDescriptor(InputDescriptorAction), options); - } - else if (InputValue is not null) - { - writer.WritePropertyName("input"); - JsonSerializer.Serialize(writer, InputValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (ModelSizeBytesValue.HasValue) - { - writer.WritePropertyName("model_size_bytes"); - writer.WriteNumberValue(ModelSizeBytesValue.Value); - } - - if (ModelTypeValue is not null) - { - writer.WritePropertyName("model_type"); - JsonSerializer.Serialize(writer, ModelTypeValue, options); - } - - if (!string.IsNullOrEmpty(PlatformArchitectureValue)) - { - writer.WritePropertyName("platform_architecture"); - writer.WriteStringValue(PlatformArchitectureValue); - } - - if (PrefixStringsDescriptor is not null) - { - writer.WritePropertyName("prefix_strings"); - JsonSerializer.Serialize(writer, PrefixStringsDescriptor, options); - } - else if (PrefixStringsDescriptorAction is not null) - { - writer.WritePropertyName("prefix_strings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStringsDescriptor(PrefixStringsDescriptorAction), options); - } - else if (PrefixStringsValue is not null) - { - writer.WritePropertyName("prefix_strings"); - JsonSerializer.Serialize(writer, PrefixStringsValue, options); - } - - if (TagsValue is not null) - { - writer.WritePropertyName("tags"); - JsonSerializer.Serialize(writer, TagsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create a trained model. -/// Enable you to supply a trained model that is not created by data frame analytics. -/// -/// -public sealed partial class PutTrainedModelRequestDescriptor : RequestDescriptor -{ - internal PutTrainedModelRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutTrainedModelRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModel; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model"; - - public PutTrainedModelRequestDescriptor DeferDefinitionDecompression(bool? deferDefinitionDecompression = true) => Qs("defer_definition_decompression", deferDefinitionDecompression); - public PutTrainedModelRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public PutTrainedModelRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - private string? CompressedDefinitionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Definition? DefinitionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DefinitionDescriptor DefinitionDescriptor { get; set; } - private Action DefinitionDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreateDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Input? InputValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InputDescriptor InputDescriptor { get; set; } - private Action InputDescriptorAction { get; set; } - private object? MetadataValue { get; set; } - private long? ModelSizeBytesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? ModelTypeValue { get; set; } - private string? PlatformArchitectureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? PrefixStringsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStringsDescriptor PrefixStringsDescriptor { get; set; } - private Action PrefixStringsDescriptorAction { get; set; } - private ICollection? TagsValue { get; set; } - - /// - /// - /// The compressed (GZipped and Base64 encoded) inference definition of the - /// model. If compressed_definition is specified, then definition cannot be - /// specified. - /// - /// - public PutTrainedModelRequestDescriptor CompressedDefinition(string? compressedDefinition) - { - CompressedDefinitionValue = compressedDefinition; - return Self; - } - - /// - /// - /// The inference definition for the model. If definition is specified, then - /// compressed_definition cannot be specified. - /// - /// - public PutTrainedModelRequestDescriptor Definition(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Definition? definition) - { - DefinitionDescriptor = null; - DefinitionDescriptorAction = null; - DefinitionValue = definition; - return Self; - } - - public PutTrainedModelRequestDescriptor Definition(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DefinitionDescriptor descriptor) - { - DefinitionValue = null; - DefinitionDescriptorAction = null; - DefinitionDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor Definition(Action configure) - { - DefinitionValue = null; - DefinitionDescriptor = null; - DefinitionDescriptorAction = configure; - return Self; - } - - /// - /// - /// A human-readable description of the inference trained model. - /// - /// - public PutTrainedModelRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The default configuration for inference. This can be either a regression - /// or classification configuration. It must match the underlying - /// definition.trained_model's target_type. For pre-packaged models such as - /// ELSER the config is not required. - /// - /// - public PutTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public PutTrainedModelRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreateDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor InferenceConfig(Action configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The input field names for the model definition. - /// - /// - public PutTrainedModelRequestDescriptor Input(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Input? input) - { - InputDescriptor = null; - InputDescriptorAction = null; - InputValue = input; - return Self; - } - - public PutTrainedModelRequestDescriptor Input(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InputDescriptor descriptor) - { - InputValue = null; - InputDescriptorAction = null; - InputDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor Input(Action configure) - { - InputValue = null; - InputDescriptor = null; - InputDescriptorAction = configure; - return Self; - } - - /// - /// - /// An object map that contains metadata about the model. - /// - /// - public PutTrainedModelRequestDescriptor Metadata(object? metadata) - { - MetadataValue = metadata; - return Self; - } - - /// - /// - /// The estimated memory usage in bytes to keep the trained model in memory. - /// This property is supported only if defer_definition_decompression is true - /// or the model definition is not supplied. - /// - /// - public PutTrainedModelRequestDescriptor ModelSizeBytes(long? modelSizeBytes) - { - ModelSizeBytesValue = modelSizeBytes; - return Self; - } - - /// - /// - /// The model type. - /// - /// - public PutTrainedModelRequestDescriptor ModelType(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? modelType) - { - ModelTypeValue = modelType; - return Self; - } - - /// - /// - /// The platform architecture (if applicable) of the trained mode. If the model - /// only works on one platform, because it is heavily optimized for a particular - /// processor architecture and OS combination, then this field specifies which. - /// The format of the string must match the platform identifiers used by Elasticsearch, - /// so one of, linux-x86_64, linux-aarch64, darwin-x86_64, darwin-aarch64, - /// or windows-x86_64. For portable models (those that work independent of processor - /// architecture or OS features), leave this field unset. - /// - /// - public PutTrainedModelRequestDescriptor PlatformArchitecture(string? platformArchitecture) - { - PlatformArchitectureValue = platformArchitecture; - return Self; - } - - /// - /// - /// Optional prefix strings applied at inference - /// - /// - public PutTrainedModelRequestDescriptor PrefixStrings(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? prefixStrings) - { - PrefixStringsDescriptor = null; - PrefixStringsDescriptorAction = null; - PrefixStringsValue = prefixStrings; - return Self; - } - - public PutTrainedModelRequestDescriptor PrefixStrings(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStringsDescriptor descriptor) - { - PrefixStringsValue = null; - PrefixStringsDescriptorAction = null; - PrefixStringsDescriptor = descriptor; - return Self; - } - - public PutTrainedModelRequestDescriptor PrefixStrings(Action configure) - { - PrefixStringsValue = null; - PrefixStringsDescriptor = null; - PrefixStringsDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of tags to organize the model. - /// - /// - public PutTrainedModelRequestDescriptor Tags(ICollection? tags) - { - TagsValue = tags; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CompressedDefinitionValue)) - { - writer.WritePropertyName("compressed_definition"); - writer.WriteStringValue(CompressedDefinitionValue); - } - - if (DefinitionDescriptor is not null) - { - writer.WritePropertyName("definition"); - JsonSerializer.Serialize(writer, DefinitionDescriptor, options); - } - else if (DefinitionDescriptorAction is not null) - { - writer.WritePropertyName("definition"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DefinitionDescriptor(DefinitionDescriptorAction), options); - } - else if (DefinitionValue is not null) - { - writer.WritePropertyName("definition"); - JsonSerializer.Serialize(writer, DefinitionValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreateDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - if (InputDescriptor is not null) - { - writer.WritePropertyName("input"); - JsonSerializer.Serialize(writer, InputDescriptor, options); - } - else if (InputDescriptorAction is not null) - { - writer.WritePropertyName("input"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InputDescriptor(InputDescriptorAction), options); - } - else if (InputValue is not null) - { - writer.WritePropertyName("input"); - JsonSerializer.Serialize(writer, InputValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (ModelSizeBytesValue.HasValue) - { - writer.WritePropertyName("model_size_bytes"); - writer.WriteNumberValue(ModelSizeBytesValue.Value); - } - - if (ModelTypeValue is not null) - { - writer.WritePropertyName("model_type"); - JsonSerializer.Serialize(writer, ModelTypeValue, options); - } - - if (!string.IsNullOrEmpty(PlatformArchitectureValue)) - { - writer.WritePropertyName("platform_architecture"); - writer.WriteStringValue(PlatformArchitectureValue); - } - - if (PrefixStringsDescriptor is not null) - { - writer.WritePropertyName("prefix_strings"); - JsonSerializer.Serialize(writer, PrefixStringsDescriptor, options); - } - else if (PrefixStringsDescriptorAction is not null) - { - writer.WritePropertyName("prefix_strings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStringsDescriptor(PrefixStringsDescriptorAction), options); - } - else if (PrefixStringsValue is not null) - { - writer.WritePropertyName("prefix_strings"); - JsonSerializer.Serialize(writer, PrefixStringsValue, options); - } - - if (TagsValue is not null) - { - writer.WritePropertyName("tags"); - JsonSerializer.Serialize(writer, TagsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs deleted file mode 100644 index 93ed85a9966..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("compressed_definition")] - public string? CompressedDefinition { get; init; } - - /// - /// - /// Information on the creator of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("created_by")] - public string? CreatedBy { get; init; } - - /// - /// - /// The time when the trained model was created. - /// - /// - [JsonInclude, JsonPropertyName("create_time")] - public DateTimeOffset? CreateTime { get; init; } - - /// - /// - /// Any field map described in the inference configuration takes precedence. - /// - /// - [JsonInclude, JsonPropertyName("default_field_map")] - public IReadOnlyDictionary? DefaultFieldMap { get; init; } - - /// - /// - /// The free-text description of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// The estimated heap usage in bytes to keep the trained model in memory. - /// - /// - [JsonInclude, JsonPropertyName("estimated_heap_memory_usage_bytes")] - public int? EstimatedHeapMemoryUsageBytes { get; init; } - - /// - /// - /// The estimated number of operations to use the trained model. - /// - /// - [JsonInclude, JsonPropertyName("estimated_operations")] - public int? EstimatedOperations { get; init; } - - /// - /// - /// True if the full model definition is present. - /// - /// - [JsonInclude, JsonPropertyName("fully_defined")] - public bool? FullyDefined { get; init; } - - /// - /// - /// The default configuration for inference. This can be either a regression, classification, or one of the many NLP focused configurations. It must match the underlying definition.trained_model's target_type. For pre-packaged models such as ELSER the config is not required. - /// - /// - [JsonInclude, JsonPropertyName("inference_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? InferenceConfig { get; init; } - - /// - /// - /// The input field names for the model definition. - /// - /// - [JsonInclude, JsonPropertyName("input")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelConfigInput Input { get; init; } - - /// - /// - /// The license level of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("license_level")] - public string? LicenseLevel { get; init; } - [JsonInclude, JsonPropertyName("location")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelLocation? Location { get; init; } - - /// - /// - /// An object containing metadata about the trained model. For example, models created by data frame analytics contain analysis_config and input objects. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelConfigMetadata? Metadata { get; init; } - - /// - /// - /// Identifier for the trained model. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; init; } - [JsonInclude, JsonPropertyName("model_package")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPackageConfig? ModelPackage { get; init; } - [JsonInclude, JsonPropertyName("model_size_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ModelSizeBytes { get; init; } - - /// - /// - /// The model type - /// - /// - [JsonInclude, JsonPropertyName("model_type")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? ModelType { get; init; } - [JsonInclude, JsonPropertyName("prefix_strings")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? PrefixStrings { get; init; } - - /// - /// - /// A comma delimited string of tags. A trained model can have many tags, or none. - /// - /// - [JsonInclude, JsonPropertyName("tags")] - public IReadOnlyCollection Tags { get; init; } - - /// - /// - /// The Elasticsearch version number in which the trained model was created. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyRequest.g.cs deleted file mode 100644 index 726bb60eafc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyRequest.g.cs +++ /dev/null @@ -1,168 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelVocabularyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create a trained model vocabulary. -/// This API is supported only for natural language processing (NLP) models. -/// The vocabulary is stored in the index as described in inference_config.*.vocabulary of the trained model definition. -/// -/// -public sealed partial class PutTrainedModelVocabularyRequest : PlainRequest -{ - public PutTrainedModelVocabularyRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModelVocabulary; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model_vocabulary"; - - /// - /// - /// The optional model merges if required by the tokenizer. - /// - /// - [JsonInclude, JsonPropertyName("merges")] - public ICollection? Merges { get; set; } - - /// - /// - /// The optional vocabulary value scores if required by the tokenizer. - /// - /// - [JsonInclude, JsonPropertyName("scores")] - public ICollection? Scores { get; set; } - - /// - /// - /// The model vocabulary, which must not be empty. - /// - /// - [JsonInclude, JsonPropertyName("vocabulary")] - public ICollection Vocabulary { get; set; } -} - -/// -/// -/// Create a trained model vocabulary. -/// This API is supported only for natural language processing (NLP) models. -/// The vocabulary is stored in the index as described in inference_config.*.vocabulary of the trained model definition. -/// -/// -public sealed partial class PutTrainedModelVocabularyRequestDescriptor : RequestDescriptor -{ - internal PutTrainedModelVocabularyRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutTrainedModelVocabularyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningPutTrainedModelVocabulary; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.put_trained_model_vocabulary"; - - public PutTrainedModelVocabularyRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - private ICollection? MergesValue { get; set; } - private ICollection? ScoresValue { get; set; } - private ICollection VocabularyValue { get; set; } - - /// - /// - /// The optional model merges if required by the tokenizer. - /// - /// - public PutTrainedModelVocabularyRequestDescriptor Merges(ICollection? merges) - { - MergesValue = merges; - return Self; - } - - /// - /// - /// The optional vocabulary value scores if required by the tokenizer. - /// - /// - public PutTrainedModelVocabularyRequestDescriptor Scores(ICollection? scores) - { - ScoresValue = scores; - return Self; - } - - /// - /// - /// The model vocabulary, which must not be empty. - /// - /// - public PutTrainedModelVocabularyRequestDescriptor Vocabulary(ICollection vocabulary) - { - VocabularyValue = vocabulary; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MergesValue is not null) - { - writer.WritePropertyName("merges"); - JsonSerializer.Serialize(writer, MergesValue, options); - } - - if (ScoresValue is not null) - { - writer.WritePropertyName("scores"); - JsonSerializer.Serialize(writer, ScoresValue, options); - } - - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyResponse.g.cs deleted file mode 100644 index aeb196b185e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/PutTrainedModelVocabularyResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PutTrainedModelVocabularyResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobRequest.g.cs deleted file mode 100644 index aa3f166a8e7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobRequest.g.cs +++ /dev/null @@ -1,133 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ResetJobRequestParameters : RequestParameters -{ - /// - /// - /// Specifies whether annotations that have been added by the - /// user should be deleted along with any auto-generated annotations when the job is - /// reset. - /// - /// - public bool? DeleteUserAnnotations { get => Q("delete_user_annotations"); set => Q("delete_user_annotations", value); } - - /// - /// - /// Should this request wait until the operation has completed before - /// returning. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Reset an anomaly detection job. -/// All model state and results are deleted. The job is ready to start over as if -/// it had just been created. -/// It is not currently possible to reset multiple jobs using wildcards or a -/// comma separated list. -/// -/// -public sealed partial class ResetJobRequest : PlainRequest -{ - public ResetJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningResetJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.reset_job"; - - /// - /// - /// Specifies whether annotations that have been added by the - /// user should be deleted along with any auto-generated annotations when the job is - /// reset. - /// - /// - [JsonIgnore] - public bool? DeleteUserAnnotations { get => Q("delete_user_annotations"); set => Q("delete_user_annotations", value); } - - /// - /// - /// Should this request wait until the operation has completed before - /// returning. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Reset an anomaly detection job. -/// All model state and results are deleted. The job is ready to start over as if -/// it had just been created. -/// It is not currently possible to reset multiple jobs using wildcards or a -/// comma separated list. -/// -/// -public sealed partial class ResetJobRequestDescriptor : RequestDescriptor -{ - internal ResetJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public ResetJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningResetJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.reset_job"; - - public ResetJobRequestDescriptor DeleteUserAnnotations(bool? deleteUserAnnotations = true) => Qs("delete_user_annotations", deleteUserAnnotations); - public ResetJobRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public ResetJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobResponse.g.cs deleted file mode 100644 index b0d56d75278..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ResetJobResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ResetJobResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs deleted file mode 100644 index facea174277..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs +++ /dev/null @@ -1,136 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class RevertModelSnapshotRequestParameters : RequestParameters -{ -} - -/// -/// -/// Revert to a snapshot. -/// The machine learning features react quickly to anomalous input, learning new -/// behaviors in data. Highly anomalous input increases the variance in the -/// models whilst the system learns whether this is a new step-change in behavior -/// or a one-off event. In the case where this anomalous input is known to be a -/// one-off, then it might be appropriate to reset the model state to a time -/// before this event. For example, you might consider reverting to a saved -/// snapshot after Black Friday or a critical system failure. -/// -/// -public sealed partial class RevertModelSnapshotRequest : PlainRequest -{ - public RevertModelSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningRevertModelSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.revert_model_snapshot"; - - /// - /// - /// Refer to the description for the delete_intervening_results query parameter. - /// - /// - [JsonInclude, JsonPropertyName("delete_intervening_results")] - public bool? DeleteInterveningResults { get; set; } -} - -/// -/// -/// Revert to a snapshot. -/// The machine learning features react quickly to anomalous input, learning new -/// behaviors in data. Highly anomalous input increases the variance in the -/// models whilst the system learns whether this is a new step-change in behavior -/// or a one-off event. In the case where this anomalous input is known to be a -/// one-off, then it might be appropriate to reset the model state to a time -/// before this event. For example, you might consider reverting to a saved -/// snapshot after Black Friday or a critical system failure. -/// -/// -public sealed partial class RevertModelSnapshotRequestDescriptor : RequestDescriptor -{ - internal RevertModelSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public RevertModelSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningRevertModelSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.revert_model_snapshot"; - - public RevertModelSnapshotRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public RevertModelSnapshotRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) - { - RouteValues.Required("snapshot_id", snapshotId); - return Self; - } - - private bool? DeleteInterveningResultsValue { get; set; } - - /// - /// - /// Refer to the description for the delete_intervening_results query parameter. - /// - /// - public RevertModelSnapshotRequestDescriptor DeleteInterveningResults(bool? deleteInterveningResults = true) - { - DeleteInterveningResultsValue = deleteInterveningResults; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeleteInterveningResultsValue.HasValue) - { - writer.WritePropertyName("delete_intervening_results"); - writer.WriteBooleanValue(DeleteInterveningResultsValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotResponse.g.cs deleted file mode 100644 index 019c156ac8b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/RevertModelSnapshotResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class RevertModelSnapshotResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("model")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelSnapshot Model { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeRequest.g.cs deleted file mode 100644 index 5e1a6f0f920..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeRequest.g.cs +++ /dev/null @@ -1,137 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class SetUpgradeModeRequestParameters : RequestParameters -{ - /// - /// - /// When true, it enables upgrade_mode which temporarily halts all job - /// and datafeed tasks and prohibits new job and datafeed tasks from - /// starting. - /// - /// - public bool? Enabled { get => Q("enabled"); set => Q("enabled", value); } - - /// - /// - /// The time to wait for the request to be completed. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Set upgrade_mode for ML indices. -/// Sets a cluster wide upgrade_mode setting that prepares machine learning -/// indices for an upgrade. -/// When upgrading your cluster, in some circumstances you must restart your -/// nodes and reindex your machine learning indices. In those circumstances, -/// there must be no machine learning jobs running. You can close the machine -/// learning jobs, do the upgrade, then open all the jobs again. Alternatively, -/// you can use this API to temporarily halt tasks associated with the jobs and -/// datafeeds and prevent new jobs from opening. You can also use this API -/// during upgrades that do not require you to reindex your machine learning -/// indices, though stopping jobs is not a requirement in that case. -/// You can see the current value for the upgrade_mode setting by using the get -/// machine learning info API. -/// -/// -public sealed partial class SetUpgradeModeRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningSetUpgradeMode; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.set_upgrade_mode"; - - /// - /// - /// When true, it enables upgrade_mode which temporarily halts all job - /// and datafeed tasks and prohibits new job and datafeed tasks from - /// starting. - /// - /// - [JsonIgnore] - public bool? Enabled { get => Q("enabled"); set => Q("enabled", value); } - - /// - /// - /// The time to wait for the request to be completed. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Set upgrade_mode for ML indices. -/// Sets a cluster wide upgrade_mode setting that prepares machine learning -/// indices for an upgrade. -/// When upgrading your cluster, in some circumstances you must restart your -/// nodes and reindex your machine learning indices. In those circumstances, -/// there must be no machine learning jobs running. You can close the machine -/// learning jobs, do the upgrade, then open all the jobs again. Alternatively, -/// you can use this API to temporarily halt tasks associated with the jobs and -/// datafeeds and prevent new jobs from opening. You can also use this API -/// during upgrades that do not require you to reindex your machine learning -/// indices, though stopping jobs is not a requirement in that case. -/// You can see the current value for the upgrade_mode setting by using the get -/// machine learning info API. -/// -/// -public sealed partial class SetUpgradeModeRequestDescriptor : RequestDescriptor -{ - internal SetUpgradeModeRequestDescriptor(Action configure) => configure.Invoke(this); - - public SetUpgradeModeRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningSetUpgradeMode; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.set_upgrade_mode"; - - public SetUpgradeModeRequestDescriptor Enabled(bool? enabled = true) => Qs("enabled", enabled); - public SetUpgradeModeRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeResponse.g.cs deleted file mode 100644 index 68adcc98b6f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/SetUpgradeModeResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class SetUpgradeModeResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index c4967363ed4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,172 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StartDataFrameAnalyticsRequestParameters : RequestParameters -{ - /// - /// - /// Controls the amount of time to wait until the data frame analytics job - /// starts. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Start a data frame analytics job. -/// A data frame analytics job can be started and stopped multiple times -/// throughout its lifecycle. -/// If the destination index does not exist, it is created automatically the -/// first time you start the data frame analytics job. The -/// index.number_of_shards and index.number_of_replicas settings for the -/// destination index are copied from the source index. If there are multiple -/// source indices, the destination index copies the highest setting values. The -/// mappings for the destination index are also copied from the source indices. -/// If there are any mapping conflicts, the job fails to start. -/// If the destination index exists, it is used as is. You can therefore set up -/// the destination index in advance with custom settings and mappings. -/// -/// -public sealed partial class StartDataFrameAnalyticsRequest : PlainRequest -{ - public StartDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.start_data_frame_analytics"; - - /// - /// - /// Controls the amount of time to wait until the data frame analytics job - /// starts. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Start a data frame analytics job. -/// A data frame analytics job can be started and stopped multiple times -/// throughout its lifecycle. -/// If the destination index does not exist, it is created automatically the -/// first time you start the data frame analytics job. The -/// index.number_of_shards and index.number_of_replicas settings for the -/// destination index are copied from the source index. If there are multiple -/// source indices, the destination index copies the highest setting values. The -/// mappings for the destination index are also copied from the source indices. -/// If there are any mapping conflicts, the job fails to start. -/// If the destination index exists, it is used as is. You can therefore set up -/// the destination index in advance with custom settings and mappings. -/// -/// -public sealed partial class StartDataFrameAnalyticsRequestDescriptor : RequestDescriptor, StartDataFrameAnalyticsRequestParameters> -{ - internal StartDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public StartDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.start_data_frame_analytics"; - - public StartDataFrameAnalyticsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public StartDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Start a data frame analytics job. -/// A data frame analytics job can be started and stopped multiple times -/// throughout its lifecycle. -/// If the destination index does not exist, it is created automatically the -/// first time you start the data frame analytics job. The -/// index.number_of_shards and index.number_of_replicas settings for the -/// destination index are copied from the source index. If there are multiple -/// source indices, the destination index copies the highest setting values. The -/// mappings for the destination index are also copied from the source indices. -/// If there are any mapping conflicts, the job fails to start. -/// If the destination index exists, it is used as is. You can therefore set up -/// the destination index in advance with custom settings and mappings. -/// -/// -public sealed partial class StartDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal StartDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public StartDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.start_data_frame_analytics"; - - public StartDataFrameAnalyticsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public StartDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index 87442b0d491..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDataFrameAnalyticsResponse.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StartDataFrameAnalyticsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - - /// - /// - /// The ID of the node that the job was started on. If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string. - /// The node ID of the node the job has been assigned to, or - /// an empty string if it hasn't been assigned to a node. In - /// serverless if the job has been assigned to run then the - /// node ID will be "serverless". - /// - /// - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs deleted file mode 100644 index b13efcbd0ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs +++ /dev/null @@ -1,200 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StartDatafeedRequestParameters : RequestParameters -{ -} - -/// -/// -/// Start datafeeds. -/// -/// -/// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped -/// multiple times throughout its lifecycle. -/// -/// -/// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. -/// -/// -/// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. -/// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. -/// -/// -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or -/// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary -/// authorization headers when you created or updated the datafeed, those credentials are used instead. -/// -/// -public sealed partial class StartDatafeedRequest : PlainRequest -{ - public StartDatafeedRequest(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.start_datafeed"; - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public DateTimeOffset? End { get; set; } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public DateTimeOffset? Start { get; set; } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } -} - -/// -/// -/// Start datafeeds. -/// -/// -/// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped -/// multiple times throughout its lifecycle. -/// -/// -/// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. -/// -/// -/// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. -/// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. -/// -/// -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or -/// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary -/// authorization headers when you created or updated the datafeed, those credentials are used instead. -/// -/// -public sealed partial class StartDatafeedRequestDescriptor : RequestDescriptor -{ - internal StartDatafeedRequestDescriptor(Action configure) => configure.Invoke(this); - - public StartDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.start_datafeed"; - - public StartDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - private DateTimeOffset? EndValue { get; set; } - private DateTimeOffset? StartValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// Refer to the description for the end query parameter. - /// - /// - public StartDatafeedRequestDescriptor End(DateTimeOffset? end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Refer to the description for the start query parameter. - /// - /// - public StartDatafeedRequestDescriptor Start(DateTimeOffset? start) - { - StartValue = start; - return Self; - } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - public StartDatafeedRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EndValue is not null) - { - writer.WritePropertyName("end"); - JsonSerializer.Serialize(writer, EndValue, options); - } - - if (StartValue is not null) - { - writer.WritePropertyName("start"); - JsonSerializer.Serialize(writer, StartValue, options); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedResponse.g.cs deleted file mode 100644 index 032255be81e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartDatafeedResponse.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StartDatafeedResponse : ElasticsearchResponse -{ - /// - /// - /// The ID of the node that the job was started on. In serverless this will be the "serverless". - /// If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string. - /// - /// - [JsonInclude, JsonPropertyName("node")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Node { get; init; } - - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("started")] - public bool Started { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentRequest.g.cs deleted file mode 100644 index f84b0145fcc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentRequest.g.cs +++ /dev/null @@ -1,225 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StartTrainedModelDeploymentRequestParameters : RequestParameters -{ - /// - /// - /// The inference cache size (in memory outside the JVM heap) per node for the model. - /// The default value is the same size as the model_size_bytes. To disable the cache, - /// 0b can be provided. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? CacheSize { get => Q("cache_size"); set => Q("cache_size", value); } - - /// - /// - /// The number of model allocations on each node where the model is deployed. - /// All allocations on a node share the same copy of the model in memory but use - /// a separate set of threads to evaluate the model. - /// Increasing this value generally increases the throughput. - /// If this setting is greater than the number of hardware threads - /// it will automatically be changed to a value less than the number of hardware threads. - /// - /// - public int? NumberOfAllocations { get => Q("number_of_allocations"); set => Q("number_of_allocations", value); } - - /// - /// - /// The deployment priority. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainingPriority? Priority { get => Q("priority"); set => Q("priority", value); } - - /// - /// - /// Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds - /// this value, new requests are rejected with a 429 error. - /// - /// - public int? QueueCapacity { get => Q("queue_capacity"); set => Q("queue_capacity", value); } - - /// - /// - /// Sets the number of threads used by each model allocation during inference. This generally increases - /// the inference speed. The inference process is a compute-bound process; any number - /// greater than the number of available hardware threads on the machine does not increase the - /// inference speed. If this setting is greater than the number of hardware threads - /// it will automatically be changed to a value less than the number of hardware threads. - /// - /// - public int? ThreadsPerAllocation { get => Q("threads_per_allocation"); set => Q("threads_per_allocation", value); } - - /// - /// - /// Specifies the amount of time to wait for the model to deploy. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Specifies the allocation status to wait for before returning. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAllocationState? WaitFor { get => Q("wait_for"); set => Q("wait_for", value); } -} - -/// -/// -/// Start a trained model deployment. -/// It allocates the model to every machine learning node. -/// -/// -public sealed partial class StartTrainedModelDeploymentRequest : PlainRequest -{ - public StartTrainedModelDeploymentRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartTrainedModelDeployment; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.start_trained_model_deployment"; - - /// - /// - /// The inference cache size (in memory outside the JVM heap) per node for the model. - /// The default value is the same size as the model_size_bytes. To disable the cache, - /// 0b can be provided. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? CacheSize { get => Q("cache_size"); set => Q("cache_size", value); } - - /// - /// - /// The number of model allocations on each node where the model is deployed. - /// All allocations on a node share the same copy of the model in memory but use - /// a separate set of threads to evaluate the model. - /// Increasing this value generally increases the throughput. - /// If this setting is greater than the number of hardware threads - /// it will automatically be changed to a value less than the number of hardware threads. - /// - /// - [JsonIgnore] - public int? NumberOfAllocations { get => Q("number_of_allocations"); set => Q("number_of_allocations", value); } - - /// - /// - /// The deployment priority. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainingPriority? Priority { get => Q("priority"); set => Q("priority", value); } - - /// - /// - /// Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds - /// this value, new requests are rejected with a 429 error. - /// - /// - [JsonIgnore] - public int? QueueCapacity { get => Q("queue_capacity"); set => Q("queue_capacity", value); } - - /// - /// - /// Sets the number of threads used by each model allocation during inference. This generally increases - /// the inference speed. The inference process is a compute-bound process; any number - /// greater than the number of available hardware threads on the machine does not increase the - /// inference speed. If this setting is greater than the number of hardware threads - /// it will automatically be changed to a value less than the number of hardware threads. - /// - /// - [JsonIgnore] - public int? ThreadsPerAllocation { get => Q("threads_per_allocation"); set => Q("threads_per_allocation", value); } - - /// - /// - /// Specifies the amount of time to wait for the model to deploy. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Specifies the allocation status to wait for before returning. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAllocationState? WaitFor { get => Q("wait_for"); set => Q("wait_for", value); } -} - -/// -/// -/// Start a trained model deployment. -/// It allocates the model to every machine learning node. -/// -/// -public sealed partial class StartTrainedModelDeploymentRequestDescriptor : RequestDescriptor -{ - internal StartTrainedModelDeploymentRequestDescriptor(Action configure) => configure.Invoke(this); - - public StartTrainedModelDeploymentRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStartTrainedModelDeployment; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.start_trained_model_deployment"; - - public StartTrainedModelDeploymentRequestDescriptor CacheSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? cacheSize) => Qs("cache_size", cacheSize); - public StartTrainedModelDeploymentRequestDescriptor NumberOfAllocations(int? numberOfAllocations) => Qs("number_of_allocations", numberOfAllocations); - public StartTrainedModelDeploymentRequestDescriptor Priority(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainingPriority? priority) => Qs("priority", priority); - public StartTrainedModelDeploymentRequestDescriptor QueueCapacity(int? queueCapacity) => Qs("queue_capacity", queueCapacity); - public StartTrainedModelDeploymentRequestDescriptor ThreadsPerAllocation(int? threadsPerAllocation) => Qs("threads_per_allocation", threadsPerAllocation); - public StartTrainedModelDeploymentRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public StartTrainedModelDeploymentRequestDescriptor WaitFor(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAllocationState? waitFor) => Qs("wait_for", waitFor); - - public StartTrainedModelDeploymentRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentResponse.g.cs deleted file mode 100644 index 0dd0ac3a36d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StartTrainedModelDeploymentResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StartTrainedModelDeploymentResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("assignment")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelAssignment Assignment { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index ee5fbdccf66..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,227 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StopDataFrameAnalyticsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty data_frame_analytics - /// array when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a 404 - /// status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// If true, the data frame analytics job is stopped forcefully. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Controls the amount of time to wait until the data frame analytics job - /// stops. Defaults to 20 seconds. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Stop data frame analytics jobs. -/// A data frame analytics job can be started and stopped multiple times -/// throughout its lifecycle. -/// -/// -public sealed partial class StopDataFrameAnalyticsRequest : PlainRequest -{ - public StopDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.stop_data_frame_analytics"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty data_frame_analytics - /// array when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a 404 - /// status code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// If true, the data frame analytics job is stopped forcefully. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Controls the amount of time to wait until the data frame analytics job - /// stops. Defaults to 20 seconds. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Stop data frame analytics jobs. -/// A data frame analytics job can be started and stopped multiple times -/// throughout its lifecycle. -/// -/// -public sealed partial class StopDataFrameAnalyticsRequestDescriptor : RequestDescriptor, StopDataFrameAnalyticsRequestParameters> -{ - internal StopDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public StopDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.stop_data_frame_analytics"; - - public StopDataFrameAnalyticsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public StopDataFrameAnalyticsRequestDescriptor Force(bool? force = true) => Qs("force", force); - public StopDataFrameAnalyticsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public StopDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Stop data frame analytics jobs. -/// A data frame analytics job can be started and stopped multiple times -/// throughout its lifecycle. -/// -/// -public sealed partial class StopDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal StopDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public StopDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.stop_data_frame_analytics"; - - public StopDataFrameAnalyticsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public StopDataFrameAnalyticsRequestDescriptor Force(bool? force = true) => Qs("force", force); - public StopDataFrameAnalyticsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public StopDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index 1617f80e0a0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDataFrameAnalyticsResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StopDataFrameAnalyticsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("stopped")] - public bool Stopped { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs deleted file mode 100644 index 5e2ff84485d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs +++ /dev/null @@ -1,172 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StopDatafeedRequestParameters : RequestParameters -{ -} - -/// -/// -/// Stop datafeeds. -/// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped -/// multiple times throughout its lifecycle. -/// -/// -public sealed partial class StopDatafeedRequest : PlainRequest -{ - public StopDatafeedRequest(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.stop_datafeed"; - - /// - /// - /// Refer to the description for the allow_no_match query parameter. - /// - /// - [JsonInclude, JsonPropertyName("allow_no_match")] - public bool? AllowNoMatch { get; set; } - - /// - /// - /// Refer to the description for the force query parameter. - /// - /// - [JsonInclude, JsonPropertyName("force")] - public bool? Force { get; set; } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } -} - -/// -/// -/// Stop datafeeds. -/// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped -/// multiple times throughout its lifecycle. -/// -/// -public sealed partial class StopDatafeedRequestDescriptor : RequestDescriptor -{ - internal StopDatafeedRequestDescriptor(Action configure) => configure.Invoke(this); - - public StopDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.stop_datafeed"; - - public StopDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - private bool? AllowNoMatchValue { get; set; } - private bool? ForceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// Refer to the description for the allow_no_match query parameter. - /// - /// - public StopDatafeedRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) - { - AllowNoMatchValue = allowNoMatch; - return Self; - } - - /// - /// - /// Refer to the description for the force query parameter. - /// - /// - public StopDatafeedRequestDescriptor Force(bool? force = true) - { - ForceValue = force; - return Self; - } - - /// - /// - /// Refer to the description for the timeout query parameter. - /// - /// - public StopDatafeedRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowNoMatchValue.HasValue) - { - writer.WritePropertyName("allow_no_match"); - writer.WriteBooleanValue(AllowNoMatchValue.Value); - } - - if (ForceValue.HasValue) - { - writer.WritePropertyName("force"); - writer.WriteBooleanValue(ForceValue.Value); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedResponse.g.cs deleted file mode 100644 index 0b7e5f25c34..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopDatafeedResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StopDatafeedResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("stopped")] - public bool Stopped { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs deleted file mode 100644 index 8caf585fe7d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StopTrainedModelDeploymentRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; - /// contains the _all string or no identifiers and there are no matches; or contains wildcard expressions and - /// there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches. - /// If false, the request returns a 404 status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you - /// restart the model deployment. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Stop a trained model deployment. -/// -/// -public sealed partial class StopTrainedModelDeploymentRequest : PlainRequest -{ - public StopTrainedModelDeploymentRequest(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopTrainedModelDeployment; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.stop_trained_model_deployment"; - - /// - /// - /// Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; - /// contains the _all string or no identifiers and there are no matches; or contains wildcard expressions and - /// there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches. - /// If false, the request returns a 404 status code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you - /// restart the model deployment. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Stop a trained model deployment. -/// -/// -public sealed partial class StopTrainedModelDeploymentRequestDescriptor : RequestDescriptor -{ - internal StopTrainedModelDeploymentRequestDescriptor(Action configure) => configure.Invoke(this); - - public StopTrainedModelDeploymentRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id modelId) : base(r => r.Required("model_id", modelId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningStopTrainedModelDeployment; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.stop_trained_model_deployment"; - - public StopTrainedModelDeploymentRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public StopTrainedModelDeploymentRequestDescriptor Force(bool? force = true) => Qs("force", force); - - public StopTrainedModelDeploymentRequestDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - RouteValues.Required("model_id", modelId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentResponse.g.cs deleted file mode 100644 index 76069cdce24..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/StopTrainedModelDeploymentResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class StopTrainedModelDeploymentResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("stopped")] - public bool Stopped { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs deleted file mode 100644 index 3deec915db0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs +++ /dev/null @@ -1,325 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateDataFrameAnalyticsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Update a data frame analytics job. -/// -/// -public sealed partial class UpdateDataFrameAnalyticsRequest : PlainRequest -{ - public UpdateDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_data_frame_analytics"; - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. - /// - /// - [JsonInclude, JsonPropertyName("allow_lazy_start")] - public bool? AllowLazyStart { get; set; } - - /// - /// - /// A description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - [JsonInclude, JsonPropertyName("max_num_threads")] - public int? MaxNumThreads { get; set; } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try - /// to create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string? ModelMemoryLimit { get; set; } -} - -/// -/// -/// Update a data frame analytics job. -/// -/// -public sealed partial class UpdateDataFrameAnalyticsRequestDescriptor : RequestDescriptor, UpdateDataFrameAnalyticsRequestParameters> -{ - internal UpdateDataFrameAnalyticsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_data_frame_analytics"; - - public UpdateDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private bool? AllowLazyStartValue { get; set; } - private string? DescriptionValue { get; set; } - private int? MaxNumThreadsValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor AllowLazyStart(bool? allowLazyStart = true) - { - AllowLazyStartValue = allowLazyStart; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try - /// to create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyStartValue.HasValue) - { - writer.WritePropertyName("allow_lazy_start"); - writer.WriteBooleanValue(AllowLazyStartValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update a data frame analytics job. -/// -/// -public sealed partial class UpdateDataFrameAnalyticsRequestDescriptor : RequestDescriptor -{ - internal UpdateDataFrameAnalyticsRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateDataFrameAnalytics; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_data_frame_analytics"; - - public UpdateDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private bool? AllowLazyStartValue { get; set; } - private string? DescriptionValue { get; set; } - private int? MaxNumThreadsValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - - /// - /// - /// Specifies whether this job can start when there is insufficient machine - /// learning node capacity for it to be immediately assigned to a node. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor AllowLazyStart(bool? allowLazyStart = true) - { - AllowLazyStartValue = allowLazyStart; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The maximum number of threads to be used by the analysis. Using more - /// threads may decrease the time necessary to complete the analysis at the - /// cost of using more CPU. Note that the process may use additional threads - /// for operational functionality other than the analysis itself. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are permitted for - /// analytical processing. If your elasticsearch.yml file contains an - /// xpack.ml.max_model_memory_limit setting, an error occurs when you try - /// to create data frame analytics jobs that have model_memory_limit values - /// greater than that setting. - /// - /// - public UpdateDataFrameAnalyticsRequestDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyStartValue.HasValue) - { - writer.WritePropertyName("allow_lazy_start"); - writer.WriteBooleanValue(AllowLazyStartValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsResponse.g.cs deleted file mode 100644 index 0f44712ded6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsResponse.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateDataFrameAnalyticsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("allow_lazy_start")] - public bool AllowLazyStart { get; init; } - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis Analysis { get; init; } - [JsonInclude, JsonPropertyName("analyzed_fields")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFields { get; init; } - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsAuthorization? Authorization { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public long CreateTime { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination Dest { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("max_num_threads")] - public int MaxNumThreads { get; init; } - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string ModelMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource Source { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs deleted file mode 100644 index 4a7029991d4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs +++ /dev/null @@ -1,1306 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateDatafeedRequestParameters : RequestParameters -{ - /// - /// - /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the - /// _all string or when no indices are specified. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines - /// whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: - /// - /// - /// - /// - /// all: Match any data stream or index, including hidden ones. - /// - /// - /// - /// - /// closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. - /// - /// - /// - /// - /// hidden: Match hidden data streams and hidden indices. Must be combined with open, closed, or both. - /// - /// - /// - /// - /// none: Wildcard patterns are not accepted. - /// - /// - /// - /// - /// open: Match open, non-hidden indices. Also matches any non-hidden data stream. - /// - /// - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, unavailable indices (missing or closed) are ignored. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } -} - -internal sealed partial class UpdateDatafeedRequestConverter : JsonConverter -{ - public override UpdateDatafeedRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new UpdateDatafeedRequest(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "chunking_config") - { - variant.ChunkingConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "delayed_data_check_config") - { - variant.DelayedDataCheckConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "frequency") - { - variant.Frequency = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices" || property == "indexes") - { - variant.Indices = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "indices_options") - { - variant.IndicesOptions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "job_id") - { - variant.JobId = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_empty_searches") - { - variant.MaxEmptySearches = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query_delay") - { - variant.QueryDelay = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "scroll_size") - { - variant.ScrollSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, UpdateDatafeedRequest value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.ChunkingConfig is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, value.ChunkingConfig, options); - } - - if (value.DelayedDataCheckConfig is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, value.DelayedDataCheckConfig, options); - } - - if (value.Frequency is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, value.Frequency, options); - } - - if (value.Indices is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, value.Indices, options); - } - - if (value.IndicesOptions is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, value.IndicesOptions, options); - } - - if (value.JobId is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, value.JobId, options); - } - - if (value.MaxEmptySearches.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(value.MaxEmptySearches.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.QueryDelay is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, value.QueryDelay, options); - } - - if (value.RuntimeMappings is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); - } - - if (value.ScriptFields is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, value.ScriptFields, options); - } - - if (value.ScrollSize.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(value.ScrollSize.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update a datafeed. -/// You must stop and start the datafeed for the changes to be applied. -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at -/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, -/// those credentials are used instead. -/// -/// -[JsonConverter(typeof(UpdateDatafeedRequestConverter))] -public sealed partial class UpdateDatafeedRequest : PlainRequest -{ - public UpdateDatafeedRequest(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - public UpdateDatafeedRequest() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_datafeed"; - - /// - /// - /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the - /// _all string or when no indices are specified. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines - /// whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: - /// - /// - /// - /// - /// all: Match any data stream or index, including hidden ones. - /// - /// - /// - /// - /// closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. - /// - /// - /// - /// - /// hidden: Match hidden data streams and hidden indices. Must be combined with open, closed, or both. - /// - /// - /// - /// - /// none: Wildcard patterns are not accepted. - /// - /// - /// - /// - /// open: Match open, non-hidden indices. Also matches any non-hidden data stream. - /// - /// - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, unavailable indices (missing or closed) are ignored. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only - /// with low cardinality data. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - - /// - /// - /// Datafeeds might search over long time periods, for several months or years. This search is split into time - /// chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of - /// these time chunks are calculated; it is an advanced configuration option. - /// - /// - [JsonInclude, JsonPropertyName("chunking_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfig { get; set; } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally - /// search over indices that have already been read in an effort to determine whether any data has subsequently been - /// added to the index. If missing data is found, it is a good indication that the query_delay is set too low and - /// the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time - /// datafeeds. - /// - /// - [JsonInclude, JsonPropertyName("delayed_data_check_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfig { get; set; } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is - /// either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket - /// span. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are - /// written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value - /// must be divisible by the interval of the date histogram aggregation. - /// - /// - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; set; } - - /// - /// - /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine - /// learning nodes must have the remote_cluster_client role. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public ICollection? Indices { get; set; } - - /// - /// - /// Specifies index expansion options that are used during search. - /// - /// - [JsonInclude, JsonPropertyName("indices_options")] - public Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptions { get; set; } - [JsonInclude, JsonPropertyName("job_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get; set; } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period), it automatically - /// stops and closes the associated job after this many real-time searches return no documents. In other words, - /// it stops after frequency times max_empty_searches of real-time operation. If not set, a datafeed with no - /// end time that sees no data remains started until it is explicitly stopped. By default, it is not set. - /// - /// - [JsonInclude, JsonPropertyName("max_empty_searches")] - public int? MaxEmptySearches { get; set; } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an - /// Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this - /// object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also - /// changed. Therefore, the time required to learn might be long and the understandability of the results is - /// unpredictable. If you want to make significant changes to the source data, it is recommended that you - /// clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one - /// when you are satisfied with the results of the job. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might - /// not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default - /// value is randomly selected between 60s and 120s. This randomness improves the query performance - /// when there are multiple jobs running on the same node. - /// - /// - [JsonInclude, JsonPropertyName("query_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelay { get; set; } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. - /// The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - [JsonInclude, JsonPropertyName("script_fields")] - public IDictionary? ScriptFields { get; set; } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. - /// The maximum value is the value of index.max_result_window. - /// - /// - [JsonInclude, JsonPropertyName("scroll_size")] - public int? ScrollSize { get; set; } -} - -/// -/// -/// Update a datafeed. -/// You must stop and start the datafeed for the changes to be applied. -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at -/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, -/// those credentials are used instead. -/// -/// -public sealed partial class UpdateDatafeedRequestDescriptor : RequestDescriptor, UpdateDatafeedRequestParameters> -{ - internal UpdateDatafeedRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_datafeed"; - - public UpdateDatafeedRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateDatafeedRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public UpdateDatafeedRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public UpdateDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - private IDictionary> AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor ChunkingConfigDescriptor { get; set; } - private Action ChunkingConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor DelayedDataCheckConfigDescriptor { get; set; } - private Action DelayedDataCheckConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private ICollection? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor IndicesOptionsDescriptor { get; set; } - private Action IndicesOptionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private int? MaxEmptySearchesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelayValue { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private int? ScrollSizeValue { get; set; } - - /// - /// - /// If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only - /// with low cardinality data. - /// - /// - public UpdateDatafeedRequestDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Datafeeds might search over long time periods, for several months or years. This search is split into time - /// chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of - /// these time chunks are calculated; it is an advanced configuration option. - /// - /// - public UpdateDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig) - { - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigValue = chunkingConfig; - return Self; - } - - public UpdateDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor descriptor) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor ChunkingConfig(Action configure) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally - /// search over indices that have already been read in an effort to determine whether any data has subsequently been - /// added to the index. If missing data is found, it is a good indication that the query_delay is set too low and - /// the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time - /// datafeeds. - /// - /// - public UpdateDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? delayedDataCheckConfig) - { - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigValue = delayedDataCheckConfig; - return Self; - } - - public UpdateDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor descriptor) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor DelayedDataCheckConfig(Action configure) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is - /// either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket - /// span. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are - /// written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value - /// must be divisible by the interval of the date histogram aggregation. - /// - /// - public UpdateDatafeedRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine - /// learning nodes must have the remote_cluster_client role. - /// - /// - public UpdateDatafeedRequestDescriptor Indices(ICollection? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies index expansion options that are used during search. - /// - /// - public UpdateDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions) - { - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsValue = indicesOptions; - return Self; - } - - public UpdateDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor descriptor) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor IndicesOptions(Action configure) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = configure; - return Self; - } - - public UpdateDatafeedRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period), it automatically - /// stops and closes the associated job after this many real-time searches return no documents. In other words, - /// it stops after frequency times max_empty_searches of real-time operation. If not set, a datafeed with no - /// end time that sees no data remains started until it is explicitly stopped. By default, it is not set. - /// - /// - public UpdateDatafeedRequestDescriptor MaxEmptySearches(int? maxEmptySearches) - { - MaxEmptySearchesValue = maxEmptySearches; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an - /// Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this - /// object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also - /// changed. Therefore, the time required to learn might be long and the understandability of the results is - /// unpredictable. If you want to make significant changes to the source data, it is recommended that you - /// clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one - /// when you are satisfied with the results of the job. - /// - /// - public UpdateDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public UpdateDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might - /// not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default - /// value is randomly selected between 60s and 120s. This randomness improves the query performance - /// when there are multiple jobs running on the same node. - /// - /// - public UpdateDatafeedRequestDescriptor QueryDelay(Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay) - { - QueryDelayValue = queryDelay; - return Self; - } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public UpdateDatafeedRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. - /// The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public UpdateDatafeedRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. - /// The maximum value is the value of index.max_result_window. - /// - /// - public UpdateDatafeedRequestDescriptor ScrollSize(int? scrollSize) - { - ScrollSizeValue = scrollSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (ChunkingConfigDescriptor is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigDescriptor, options); - } - else if (ChunkingConfigDescriptorAction is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor(ChunkingConfigDescriptorAction), options); - } - else if (ChunkingConfigValue is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigValue, options); - } - - if (DelayedDataCheckConfigDescriptor is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigDescriptor, options); - } - else if (DelayedDataCheckConfigDescriptorAction is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor(DelayedDataCheckConfigDescriptorAction), options); - } - else if (DelayedDataCheckConfigValue is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IndicesOptionsDescriptor is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsDescriptor, options); - } - else if (IndicesOptionsDescriptorAction is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor(IndicesOptionsDescriptorAction), options); - } - else if (IndicesOptionsValue is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (MaxEmptySearchesValue.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(MaxEmptySearchesValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryDelayValue is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, QueryDelayValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (ScrollSizeValue.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(ScrollSizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update a datafeed. -/// You must stop and start the datafeed for the changes to be applied. -/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at -/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, -/// those credentials are used instead. -/// -/// -public sealed partial class UpdateDatafeedRequestDescriptor : RequestDescriptor -{ - internal UpdateDatafeedRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateDatafeedRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) : base(r => r.Required("datafeed_id", datafeedId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateDatafeed; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_datafeed"; - - public UpdateDatafeedRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateDatafeedRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public UpdateDatafeedRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - - public UpdateDatafeedRequestDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId) - { - RouteValues.Required("datafeed_id", datafeedId); - return Self; - } - - private IDictionary AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor ChunkingConfigDescriptor { get; set; } - private Action ChunkingConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor DelayedDataCheckConfigDescriptor { get; set; } - private Action DelayedDataCheckConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private ICollection? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor IndicesOptionsDescriptor { get; set; } - private Action IndicesOptionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private int? MaxEmptySearchesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelayValue { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private int? ScrollSizeValue { get; set; } - - /// - /// - /// If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only - /// with low cardinality data. - /// - /// - public UpdateDatafeedRequestDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Datafeeds might search over long time periods, for several months or years. This search is split into time - /// chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of - /// these time chunks are calculated; it is an advanced configuration option. - /// - /// - public UpdateDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig) - { - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigValue = chunkingConfig; - return Self; - } - - public UpdateDatafeedRequestDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor descriptor) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor ChunkingConfig(Action configure) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally - /// search over indices that have already been read in an effort to determine whether any data has subsequently been - /// added to the index. If missing data is found, it is a good indication that the query_delay is set too low and - /// the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time - /// datafeeds. - /// - /// - public UpdateDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? delayedDataCheckConfig) - { - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigValue = delayedDataCheckConfig; - return Self; - } - - public UpdateDatafeedRequestDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor descriptor) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor DelayedDataCheckConfig(Action configure) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is - /// either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket - /// span. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are - /// written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value - /// must be divisible by the interval of the date histogram aggregation. - /// - /// - public UpdateDatafeedRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine - /// learning nodes must have the remote_cluster_client role. - /// - /// - public UpdateDatafeedRequestDescriptor Indices(ICollection? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies index expansion options that are used during search. - /// - /// - public UpdateDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions) - { - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsValue = indicesOptions; - return Self; - } - - public UpdateDatafeedRequestDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor descriptor) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor IndicesOptions(Action configure) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = configure; - return Self; - } - - public UpdateDatafeedRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period), it automatically - /// stops and closes the associated job after this many real-time searches return no documents. In other words, - /// it stops after frequency times max_empty_searches of real-time operation. If not set, a datafeed with no - /// end time that sees no data remains started until it is explicitly stopped. By default, it is not set. - /// - /// - public UpdateDatafeedRequestDescriptor MaxEmptySearches(int? maxEmptySearches) - { - MaxEmptySearchesValue = maxEmptySearches; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an - /// Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this - /// object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also - /// changed. Therefore, the time required to learn might be long and the understandability of the results is - /// unpredictable. If you want to make significant changes to the source data, it is recommended that you - /// clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one - /// when you are satisfied with the results of the job. - /// - /// - public UpdateDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public UpdateDatafeedRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public UpdateDatafeedRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might - /// not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default - /// value is randomly selected between 60s and 120s. This randomness improves the query performance - /// when there are multiple jobs running on the same node. - /// - /// - public UpdateDatafeedRequestDescriptor QueryDelay(Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay) - { - QueryDelayValue = queryDelay; - return Self; - } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public UpdateDatafeedRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. - /// The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public UpdateDatafeedRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. - /// The maximum value is the value of index.max_result_window. - /// - /// - public UpdateDatafeedRequestDescriptor ScrollSize(int? scrollSize) - { - ScrollSizeValue = scrollSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (ChunkingConfigDescriptor is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigDescriptor, options); - } - else if (ChunkingConfigDescriptorAction is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor(ChunkingConfigDescriptorAction), options); - } - else if (ChunkingConfigValue is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigValue, options); - } - - if (DelayedDataCheckConfigDescriptor is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigDescriptor, options); - } - else if (DelayedDataCheckConfigDescriptorAction is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor(DelayedDataCheckConfigDescriptorAction), options); - } - else if (DelayedDataCheckConfigValue is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IndicesOptionsDescriptor is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsDescriptor, options); - } - else if (IndicesOptionsDescriptorAction is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor(IndicesOptionsDescriptorAction), options); - } - else if (IndicesOptionsValue is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (MaxEmptySearchesValue.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(MaxEmptySearchesValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryDelayValue is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, QueryDelayValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (ScrollSizeValue.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(ScrollSizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs deleted file mode 100644 index dd2d54e3dd8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs +++ /dev/null @@ -1,61 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateDatafeedResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregations")] - public IReadOnlyDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedAuthorization? Authorization { get; init; } - [JsonInclude, JsonPropertyName("chunking_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig ChunkingConfig { get; init; } - [JsonInclude, JsonPropertyName("datafeed_id")] - public string DatafeedId { get; init; } - [JsonInclude, JsonPropertyName("delayed_data_check_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfig { get; init; } - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("indices_options")] - public Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptions { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("max_empty_searches")] - public int? MaxEmptySearches { get; init; } - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; init; } - [JsonInclude, JsonPropertyName("query_delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration QueryDelay { get; init; } - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IReadOnlyDictionary? RuntimeMappings { get; init; } - [JsonInclude, JsonPropertyName("script_fields")] - public IReadOnlyDictionary? ScriptFields { get; init; } - [JsonInclude, JsonPropertyName("scroll_size")] - public int ScrollSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterRequest.g.cs deleted file mode 100644 index fe2b4112df2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterRequest.g.cs +++ /dev/null @@ -1,170 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateFilterRequestParameters : RequestParameters -{ -} - -/// -/// -/// Update a filter. -/// Updates the description of a filter, adds items, or removes items from the list. -/// -/// -public sealed partial class UpdateFilterRequest : PlainRequest -{ - public UpdateFilterRequest(Elastic.Clients.Elasticsearch.Serverless.Id filterId) : base(r => r.Required("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateFilter; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_filter"; - - /// - /// - /// The items to add to the filter. - /// - /// - [JsonInclude, JsonPropertyName("add_items")] - public ICollection? AddItems { get; set; } - - /// - /// - /// A description for the filter. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The items to remove from the filter. - /// - /// - [JsonInclude, JsonPropertyName("remove_items")] - public ICollection? RemoveItems { get; set; } -} - -/// -/// -/// Update a filter. -/// Updates the description of a filter, adds items, or removes items from the list. -/// -/// -public sealed partial class UpdateFilterRequestDescriptor : RequestDescriptor -{ - internal UpdateFilterRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateFilterRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id filterId) : base(r => r.Required("filter_id", filterId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateFilter; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_filter"; - - public UpdateFilterRequestDescriptor FilterId(Elastic.Clients.Elasticsearch.Serverless.Id filterId) - { - RouteValues.Required("filter_id", filterId); - return Self; - } - - private ICollection? AddItemsValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? RemoveItemsValue { get; set; } - - /// - /// - /// The items to add to the filter. - /// - /// - public UpdateFilterRequestDescriptor AddItems(ICollection? addItems) - { - AddItemsValue = addItems; - return Self; - } - - /// - /// - /// A description for the filter. - /// - /// - public UpdateFilterRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The items to remove from the filter. - /// - /// - public UpdateFilterRequestDescriptor RemoveItems(ICollection? removeItems) - { - RemoveItemsValue = removeItems; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AddItemsValue is not null) - { - writer.WritePropertyName("add_items"); - JsonSerializer.Serialize(writer, AddItemsValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (RemoveItemsValue is not null) - { - writer.WritePropertyName("remove_items"); - JsonSerializer.Serialize(writer, RemoveItemsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterResponse.g.cs deleted file mode 100644 index bb37ade045d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateFilterResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateFilterResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("filter_id")] - public string FilterId { get; init; } - [JsonInclude, JsonPropertyName("items")] - public IReadOnlyCollection Items { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs deleted file mode 100644 index 4ff0ec1bb87..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs +++ /dev/null @@ -1,1122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateJobRequestParameters : RequestParameters -{ -} - -/// -/// -/// Update an anomaly detection job. -/// Updates certain properties of an anomaly detection job. -/// -/// -public sealed partial class UpdateJobRequest : PlainRequest -{ - public UpdateJobRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_job"; - - /// - /// - /// Advanced configuration option. Specifies whether this job can open when - /// there is insufficient machine learning node capacity for it to be - /// immediately assigned to a node. If false and a machine learning node - /// with capacity to run the job cannot immediately be found, the open - /// anomaly detection jobs API returns an error. However, this is also - /// subject to the cluster-wide xpack.ml.max_lazy_ml_nodes setting. If this - /// option is set to true, the open anomaly detection jobs API does not - /// return an error and the job waits in the opening state until sufficient - /// machine learning node capacity is available. - /// - /// - [JsonInclude, JsonPropertyName("allow_lazy_open")] - public bool? AllowLazyOpen { get; set; } - [JsonInclude, JsonPropertyName("analysis_limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimit? AnalysisLimits { get; set; } - - /// - /// - /// Advanced configuration option. The time between each periodic persistence - /// of the model. - /// The default value is a randomized value between 3 to 4 hours, which - /// avoids all jobs persisting at exactly the same time. The smallest allowed - /// value is 1 hour. - /// For very large models (several GB), persistence could take 10-20 minutes, - /// so do not set the value too low. - /// If the job is open when you make the update, you must stop the datafeed, - /// close the job, then reopen the job and restart the datafeed for the - /// changes to take effect. - /// - /// - [JsonInclude, JsonPropertyName("background_persist_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistInterval { get; set; } - [JsonInclude, JsonPropertyName("categorization_filters")] - public ICollection? CategorizationFilters { get; set; } - - /// - /// - /// Advanced configuration option. Contains custom meta data about the job. - /// For example, it can contain custom URL information as shown in Adding - /// custom URLs to machine learning results. - /// - /// - [JsonInclude, JsonPropertyName("custom_settings")] - public IDictionary? CustomSettings { get; set; } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old - /// model snapshots for this job. It specifies a period of time (in days) - /// after which only the first snapshot per day is retained. This period is - /// relative to the timestamp of the most recent snapshot for this job. Valid - /// values range from 0 to model_snapshot_retention_days. For jobs created - /// before version 7.8.0, the default value matches - /// model_snapshot_retention_days. - /// - /// - [JsonInclude, JsonPropertyName("daily_model_snapshot_retention_after_days")] - public long? DailyModelSnapshotRetentionAfterDays { get; set; } - - /// - /// - /// A description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// An array of detector update objects. - /// - /// - [JsonInclude, JsonPropertyName("detectors")] - public ICollection? Detectors { get; set; } - - /// - /// - /// A list of job groups. A job can belong to no groups or many. - /// - /// - [JsonInclude, JsonPropertyName("groups")] - public ICollection? Groups { get; set; } - [JsonInclude, JsonPropertyName("model_plot_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfig { get; set; } - [JsonInclude, JsonPropertyName("model_prune_window")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindow { get; set; } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old - /// model snapshots for this job. It specifies the maximum period of time (in - /// days) that snapshots are retained. This period is relative to the - /// timestamp of the most recent snapshot for this job. - /// - /// - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public long? ModelSnapshotRetentionDays { get; set; } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - [JsonInclude, JsonPropertyName("per_partition_categorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorization { get; set; } - - /// - /// - /// Advanced configuration option. The period over which adjustments to the - /// score are applied, as new data is seen. - /// - /// - [JsonInclude, JsonPropertyName("renormalization_window_days")] - public long? RenormalizationWindowDays { get; set; } - - /// - /// - /// Advanced configuration option. The period of time (in days) that results - /// are retained. Age is calculated relative to the timestamp of the latest - /// bucket result. If this property has a non-null value, once per day at - /// 00:30 (server time), results that are the specified number of days older - /// than the latest bucket result are deleted from Elasticsearch. The default - /// value is null, which means all results are retained. - /// - /// - [JsonInclude, JsonPropertyName("results_retention_days")] - public long? ResultsRetentionDays { get; set; } -} - -/// -/// -/// Update an anomaly detection job. -/// Updates certain properties of an anomaly detection job. -/// -/// -public sealed partial class UpdateJobRequestDescriptor : RequestDescriptor, UpdateJobRequestParameters> -{ - internal UpdateJobRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_job"; - - public UpdateJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private bool? AllowLazyOpenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimit? AnalysisLimitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimitDescriptor AnalysisLimitsDescriptor { get; set; } - private Action AnalysisLimitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistIntervalValue { get; set; } - private ICollection? CategorizationFiltersValue { get; set; } - private IDictionary? CustomSettingsValue { get; set; } - private long? DailyModelSnapshotRetentionAfterDaysValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? DetectorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor DetectorsDescriptor { get; set; } - private Action> DetectorsDescriptorAction { get; set; } - private Action>[] DetectorsDescriptorActions { get; set; } - private ICollection? GroupsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor ModelPlotConfigDescriptor { get; set; } - private Action> ModelPlotConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindowValue { get; set; } - private long? ModelSnapshotRetentionDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor PerPartitionCategorizationDescriptor { get; set; } - private Action PerPartitionCategorizationDescriptorAction { get; set; } - private long? RenormalizationWindowDaysValue { get; set; } - private long? ResultsRetentionDaysValue { get; set; } - - /// - /// - /// Advanced configuration option. Specifies whether this job can open when - /// there is insufficient machine learning node capacity for it to be - /// immediately assigned to a node. If false and a machine learning node - /// with capacity to run the job cannot immediately be found, the open - /// anomaly detection jobs API returns an error. However, this is also - /// subject to the cluster-wide xpack.ml.max_lazy_ml_nodes setting. If this - /// option is set to true, the open anomaly detection jobs API does not - /// return an error and the job waits in the opening state until sufficient - /// machine learning node capacity is available. - /// - /// - public UpdateJobRequestDescriptor AllowLazyOpen(bool? allowLazyOpen = true) - { - AllowLazyOpenValue = allowLazyOpen; - return Self; - } - - public UpdateJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimit? analysisLimits) - { - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsValue = analysisLimits; - return Self; - } - - public UpdateJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimitDescriptor descriptor) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor AnalysisLimits(Action configure) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. The time between each periodic persistence - /// of the model. - /// The default value is a randomized value between 3 to 4 hours, which - /// avoids all jobs persisting at exactly the same time. The smallest allowed - /// value is 1 hour. - /// For very large models (several GB), persistence could take 10-20 minutes, - /// so do not set the value too low. - /// If the job is open when you make the update, you must stop the datafeed, - /// close the job, then reopen the job and restart the datafeed for the - /// changes to take effect. - /// - /// - public UpdateJobRequestDescriptor BackgroundPersistInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? backgroundPersistInterval) - { - BackgroundPersistIntervalValue = backgroundPersistInterval; - return Self; - } - - public UpdateJobRequestDescriptor CategorizationFilters(ICollection? categorizationFilters) - { - CategorizationFiltersValue = categorizationFilters; - return Self; - } - - /// - /// - /// Advanced configuration option. Contains custom meta data about the job. - /// For example, it can contain custom URL information as shown in Adding - /// custom URLs to machine learning results. - /// - /// - public UpdateJobRequestDescriptor CustomSettings(Func, FluentDictionary> selector) - { - CustomSettingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old - /// model snapshots for this job. It specifies a period of time (in days) - /// after which only the first snapshot per day is retained. This period is - /// relative to the timestamp of the most recent snapshot for this job. Valid - /// values range from 0 to model_snapshot_retention_days. For jobs created - /// before version 7.8.0, the default value matches - /// model_snapshot_retention_days. - /// - /// - public UpdateJobRequestDescriptor DailyModelSnapshotRetentionAfterDays(long? dailyModelSnapshotRetentionAfterDays) - { - DailyModelSnapshotRetentionAfterDaysValue = dailyModelSnapshotRetentionAfterDays; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public UpdateJobRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// An array of detector update objects. - /// - /// - public UpdateJobRequestDescriptor Detectors(ICollection? detectors) - { - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsValue = detectors; - return Self; - } - - public UpdateJobRequestDescriptor Detectors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor descriptor) - { - DetectorsValue = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor Detectors(Action> configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorActions = null; - DetectorsDescriptorAction = configure; - return Self; - } - - public UpdateJobRequestDescriptor Detectors(params Action>[] configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of job groups. A job can belong to no groups or many. - /// - /// - public UpdateJobRequestDescriptor Groups(ICollection? groups) - { - GroupsValue = groups; - return Self; - } - - public UpdateJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? modelPlotConfig) - { - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigValue = modelPlotConfig; - return Self; - } - - public UpdateJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor descriptor) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor ModelPlotConfig(Action> configure) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = configure; - return Self; - } - - public UpdateJobRequestDescriptor ModelPruneWindow(Elastic.Clients.Elasticsearch.Serverless.Duration? modelPruneWindow) - { - ModelPruneWindowValue = modelPruneWindow; - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old - /// model snapshots for this job. It specifies the maximum period of time (in - /// days) that snapshots are retained. This period is relative to the - /// timestamp of the most recent snapshot for this job. - /// - /// - public UpdateJobRequestDescriptor ModelSnapshotRetentionDays(long? modelSnapshotRetentionDays) - { - ModelSnapshotRetentionDaysValue = modelSnapshotRetentionDays; - return Self; - } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - public UpdateJobRequestDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? perPartitionCategorization) - { - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationValue = perPartitionCategorization; - return Self; - } - - public UpdateJobRequestDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor descriptor) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor PerPartitionCategorization(Action configure) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. The period over which adjustments to the - /// score are applied, as new data is seen. - /// - /// - public UpdateJobRequestDescriptor RenormalizationWindowDays(long? renormalizationWindowDays) - { - RenormalizationWindowDaysValue = renormalizationWindowDays; - return Self; - } - - /// - /// - /// Advanced configuration option. The period of time (in days) that results - /// are retained. Age is calculated relative to the timestamp of the latest - /// bucket result. If this property has a non-null value, once per day at - /// 00:30 (server time), results that are the specified number of days older - /// than the latest bucket result are deleted from Elasticsearch. The default - /// value is null, which means all results are retained. - /// - /// - public UpdateJobRequestDescriptor ResultsRetentionDays(long? resultsRetentionDays) - { - ResultsRetentionDaysValue = resultsRetentionDays; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyOpenValue.HasValue) - { - writer.WritePropertyName("allow_lazy_open"); - writer.WriteBooleanValue(AllowLazyOpenValue.Value); - } - - if (AnalysisLimitsDescriptor is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsDescriptor, options); - } - else if (AnalysisLimitsDescriptorAction is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimitDescriptor(AnalysisLimitsDescriptorAction), options); - } - else if (AnalysisLimitsValue is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsValue, options); - } - - if (BackgroundPersistIntervalValue is not null) - { - writer.WritePropertyName("background_persist_interval"); - JsonSerializer.Serialize(writer, BackgroundPersistIntervalValue, options); - } - - if (CategorizationFiltersValue is not null) - { - writer.WritePropertyName("categorization_filters"); - JsonSerializer.Serialize(writer, CategorizationFiltersValue, options); - } - - if (CustomSettingsValue is not null) - { - writer.WritePropertyName("custom_settings"); - JsonSerializer.Serialize(writer, CustomSettingsValue, options); - } - - if (DailyModelSnapshotRetentionAfterDaysValue.HasValue) - { - writer.WritePropertyName("daily_model_snapshot_retention_after_days"); - writer.WriteNumberValue(DailyModelSnapshotRetentionAfterDaysValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DetectorsDescriptor is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DetectorsDescriptor, options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorAction is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor(DetectorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorActions is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - foreach (var action in DetectorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DetectorsValue is not null) - { - writer.WritePropertyName("detectors"); - JsonSerializer.Serialize(writer, DetectorsValue, options); - } - - if (GroupsValue is not null) - { - writer.WritePropertyName("groups"); - JsonSerializer.Serialize(writer, GroupsValue, options); - } - - if (ModelPlotConfigDescriptor is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigDescriptor, options); - } - else if (ModelPlotConfigDescriptorAction is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor(ModelPlotConfigDescriptorAction), options); - } - else if (ModelPlotConfigValue is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigValue, options); - } - - if (ModelPruneWindowValue is not null) - { - writer.WritePropertyName("model_prune_window"); - JsonSerializer.Serialize(writer, ModelPruneWindowValue, options); - } - - if (ModelSnapshotRetentionDaysValue.HasValue) - { - writer.WritePropertyName("model_snapshot_retention_days"); - writer.WriteNumberValue(ModelSnapshotRetentionDaysValue.Value); - } - - if (PerPartitionCategorizationDescriptor is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationDescriptor, options); - } - else if (PerPartitionCategorizationDescriptorAction is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor(PerPartitionCategorizationDescriptorAction), options); - } - else if (PerPartitionCategorizationValue is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationValue, options); - } - - if (RenormalizationWindowDaysValue.HasValue) - { - writer.WritePropertyName("renormalization_window_days"); - writer.WriteNumberValue(RenormalizationWindowDaysValue.Value); - } - - if (ResultsRetentionDaysValue.HasValue) - { - writer.WritePropertyName("results_retention_days"); - writer.WriteNumberValue(ResultsRetentionDaysValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update an anomaly detection job. -/// Updates certain properties of an anomaly detection job. -/// -/// -public sealed partial class UpdateJobRequestDescriptor : RequestDescriptor -{ - internal UpdateJobRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateJobRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId) : base(r => r.Required("job_id", jobId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateJob; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_job"; - - public UpdateJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - private bool? AllowLazyOpenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimit? AnalysisLimitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimitDescriptor AnalysisLimitsDescriptor { get; set; } - private Action AnalysisLimitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistIntervalValue { get; set; } - private ICollection? CategorizationFiltersValue { get; set; } - private IDictionary? CustomSettingsValue { get; set; } - private long? DailyModelSnapshotRetentionAfterDaysValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? DetectorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor DetectorsDescriptor { get; set; } - private Action DetectorsDescriptorAction { get; set; } - private Action[] DetectorsDescriptorActions { get; set; } - private ICollection? GroupsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor ModelPlotConfigDescriptor { get; set; } - private Action ModelPlotConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindowValue { get; set; } - private long? ModelSnapshotRetentionDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor PerPartitionCategorizationDescriptor { get; set; } - private Action PerPartitionCategorizationDescriptorAction { get; set; } - private long? RenormalizationWindowDaysValue { get; set; } - private long? ResultsRetentionDaysValue { get; set; } - - /// - /// - /// Advanced configuration option. Specifies whether this job can open when - /// there is insufficient machine learning node capacity for it to be - /// immediately assigned to a node. If false and a machine learning node - /// with capacity to run the job cannot immediately be found, the open - /// anomaly detection jobs API returns an error. However, this is also - /// subject to the cluster-wide xpack.ml.max_lazy_ml_nodes setting. If this - /// option is set to true, the open anomaly detection jobs API does not - /// return an error and the job waits in the opening state until sufficient - /// machine learning node capacity is available. - /// - /// - public UpdateJobRequestDescriptor AllowLazyOpen(bool? allowLazyOpen = true) - { - AllowLazyOpenValue = allowLazyOpen; - return Self; - } - - public UpdateJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimit? analysisLimits) - { - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsValue = analysisLimits; - return Self; - } - - public UpdateJobRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimitDescriptor descriptor) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor AnalysisLimits(Action configure) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. The time between each periodic persistence - /// of the model. - /// The default value is a randomized value between 3 to 4 hours, which - /// avoids all jobs persisting at exactly the same time. The smallest allowed - /// value is 1 hour. - /// For very large models (several GB), persistence could take 10-20 minutes, - /// so do not set the value too low. - /// If the job is open when you make the update, you must stop the datafeed, - /// close the job, then reopen the job and restart the datafeed for the - /// changes to take effect. - /// - /// - public UpdateJobRequestDescriptor BackgroundPersistInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? backgroundPersistInterval) - { - BackgroundPersistIntervalValue = backgroundPersistInterval; - return Self; - } - - public UpdateJobRequestDescriptor CategorizationFilters(ICollection? categorizationFilters) - { - CategorizationFiltersValue = categorizationFilters; - return Self; - } - - /// - /// - /// Advanced configuration option. Contains custom meta data about the job. - /// For example, it can contain custom URL information as shown in Adding - /// custom URLs to machine learning results. - /// - /// - public UpdateJobRequestDescriptor CustomSettings(Func, FluentDictionary> selector) - { - CustomSettingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old - /// model snapshots for this job. It specifies a period of time (in days) - /// after which only the first snapshot per day is retained. This period is - /// relative to the timestamp of the most recent snapshot for this job. Valid - /// values range from 0 to model_snapshot_retention_days. For jobs created - /// before version 7.8.0, the default value matches - /// model_snapshot_retention_days. - /// - /// - public UpdateJobRequestDescriptor DailyModelSnapshotRetentionAfterDays(long? dailyModelSnapshotRetentionAfterDays) - { - DailyModelSnapshotRetentionAfterDaysValue = dailyModelSnapshotRetentionAfterDays; - return Self; - } - - /// - /// - /// A description of the job. - /// - /// - public UpdateJobRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// An array of detector update objects. - /// - /// - public UpdateJobRequestDescriptor Detectors(ICollection? detectors) - { - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsValue = detectors; - return Self; - } - - public UpdateJobRequestDescriptor Detectors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor descriptor) - { - DetectorsValue = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor Detectors(Action configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorActions = null; - DetectorsDescriptorAction = configure; - return Self; - } - - public UpdateJobRequestDescriptor Detectors(params Action[] configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of job groups. A job can belong to no groups or many. - /// - /// - public UpdateJobRequestDescriptor Groups(ICollection? groups) - { - GroupsValue = groups; - return Self; - } - - public UpdateJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? modelPlotConfig) - { - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigValue = modelPlotConfig; - return Self; - } - - public UpdateJobRequestDescriptor ModelPlotConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor descriptor) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptorAction = null; - ModelPlotConfigDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor ModelPlotConfig(Action configure) - { - ModelPlotConfigValue = null; - ModelPlotConfigDescriptor = null; - ModelPlotConfigDescriptorAction = configure; - return Self; - } - - public UpdateJobRequestDescriptor ModelPruneWindow(Elastic.Clients.Elasticsearch.Serverless.Duration? modelPruneWindow) - { - ModelPruneWindowValue = modelPruneWindow; - return Self; - } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old - /// model snapshots for this job. It specifies the maximum period of time (in - /// days) that snapshots are retained. This period is relative to the - /// timestamp of the most recent snapshot for this job. - /// - /// - public UpdateJobRequestDescriptor ModelSnapshotRetentionDays(long? modelSnapshotRetentionDays) - { - ModelSnapshotRetentionDaysValue = modelSnapshotRetentionDays; - return Self; - } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - public UpdateJobRequestDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? perPartitionCategorization) - { - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationValue = perPartitionCategorization; - return Self; - } - - public UpdateJobRequestDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor descriptor) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationDescriptor = descriptor; - return Self; - } - - public UpdateJobRequestDescriptor PerPartitionCategorization(Action configure) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. The period over which adjustments to the - /// score are applied, as new data is seen. - /// - /// - public UpdateJobRequestDescriptor RenormalizationWindowDays(long? renormalizationWindowDays) - { - RenormalizationWindowDaysValue = renormalizationWindowDays; - return Self; - } - - /// - /// - /// Advanced configuration option. The period of time (in days) that results - /// are retained. Age is calculated relative to the timestamp of the latest - /// bucket result. If this property has a non-null value, once per day at - /// 00:30 (server time), results that are the specified number of days older - /// than the latest bucket result are deleted from Elasticsearch. The default - /// value is null, which means all results are retained. - /// - /// - public UpdateJobRequestDescriptor ResultsRetentionDays(long? resultsRetentionDays) - { - ResultsRetentionDaysValue = resultsRetentionDays; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLazyOpenValue.HasValue) - { - writer.WritePropertyName("allow_lazy_open"); - writer.WriteBooleanValue(AllowLazyOpenValue.Value); - } - - if (AnalysisLimitsDescriptor is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsDescriptor, options); - } - else if (AnalysisLimitsDescriptorAction is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisMemoryLimitDescriptor(AnalysisLimitsDescriptorAction), options); - } - else if (AnalysisLimitsValue is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsValue, options); - } - - if (BackgroundPersistIntervalValue is not null) - { - writer.WritePropertyName("background_persist_interval"); - JsonSerializer.Serialize(writer, BackgroundPersistIntervalValue, options); - } - - if (CategorizationFiltersValue is not null) - { - writer.WritePropertyName("categorization_filters"); - JsonSerializer.Serialize(writer, CategorizationFiltersValue, options); - } - - if (CustomSettingsValue is not null) - { - writer.WritePropertyName("custom_settings"); - JsonSerializer.Serialize(writer, CustomSettingsValue, options); - } - - if (DailyModelSnapshotRetentionAfterDaysValue.HasValue) - { - writer.WritePropertyName("daily_model_snapshot_retention_after_days"); - writer.WriteNumberValue(DailyModelSnapshotRetentionAfterDaysValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DetectorsDescriptor is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DetectorsDescriptor, options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorAction is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor(DetectorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorActions is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - foreach (var action in DetectorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorUpdateDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DetectorsValue is not null) - { - writer.WritePropertyName("detectors"); - JsonSerializer.Serialize(writer, DetectorsValue, options); - } - - if (GroupsValue is not null) - { - writer.WritePropertyName("groups"); - JsonSerializer.Serialize(writer, GroupsValue, options); - } - - if (ModelPlotConfigDescriptor is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigDescriptor, options); - } - else if (ModelPlotConfigDescriptorAction is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor(ModelPlotConfigDescriptorAction), options); - } - else if (ModelPlotConfigValue is not null) - { - writer.WritePropertyName("model_plot_config"); - JsonSerializer.Serialize(writer, ModelPlotConfigValue, options); - } - - if (ModelPruneWindowValue is not null) - { - writer.WritePropertyName("model_prune_window"); - JsonSerializer.Serialize(writer, ModelPruneWindowValue, options); - } - - if (ModelSnapshotRetentionDaysValue.HasValue) - { - writer.WritePropertyName("model_snapshot_retention_days"); - writer.WriteNumberValue(ModelSnapshotRetentionDaysValue.Value); - } - - if (PerPartitionCategorizationDescriptor is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationDescriptor, options); - } - else if (PerPartitionCategorizationDescriptorAction is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor(PerPartitionCategorizationDescriptorAction), options); - } - else if (PerPartitionCategorizationValue is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationValue, options); - } - - if (RenormalizationWindowDaysValue.HasValue) - { - writer.WritePropertyName("renormalization_window_days"); - writer.WriteNumberValue(RenormalizationWindowDaysValue.Value); - } - - if (ResultsRetentionDaysValue.HasValue) - { - writer.WritePropertyName("results_retention_days"); - writer.WriteNumberValue(ResultsRetentionDaysValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs deleted file mode 100644 index 3ed5d32ed5e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateJobResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("allow_lazy_open")] - public bool AllowLazyOpen { get; init; } - [JsonInclude, JsonPropertyName("analysis_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigRead AnalysisConfig { get; init; } - [JsonInclude, JsonPropertyName("analysis_limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits AnalysisLimits { get; init; } - [JsonInclude, JsonPropertyName("background_persist_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistInterval { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public long CreateTime { get; init; } - [JsonInclude, JsonPropertyName("custom_settings")] - public IReadOnlyDictionary? CustomSettings { get; init; } - [JsonInclude, JsonPropertyName("daily_model_snapshot_retention_after_days")] - public long DailyModelSnapshotRetentionAfterDays { get; init; } - [JsonInclude, JsonPropertyName("data_description")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription DataDescription { get; init; } - [JsonInclude, JsonPropertyName("datafeed_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Datafeed? DatafeedConfig { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("finished_time")] - public long? FinishedTime { get; init; } - [JsonInclude, JsonPropertyName("groups")] - public IReadOnlyCollection? Groups { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("job_type")] - public string JobType { get; init; } - [JsonInclude, JsonPropertyName("job_version")] - public string JobVersion { get; init; } - [JsonInclude, JsonPropertyName("model_plot_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfig { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_id")] - public string? ModelSnapshotId { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public long ModelSnapshotRetentionDays { get; init; } - [JsonInclude, JsonPropertyName("renormalization_window_days")] - public long? RenormalizationWindowDays { get; init; } - [JsonInclude, JsonPropertyName("results_index_name")] - public string ResultsIndexName { get; init; } - [JsonInclude, JsonPropertyName("results_retention_days")] - public long? ResultsRetentionDays { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs deleted file mode 100644 index 482d98fbf97..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateModelSnapshotRequestParameters : RequestParameters -{ -} - -/// -/// -/// Update a snapshot. -/// Updates certain properties of a snapshot. -/// -/// -public sealed partial class UpdateModelSnapshotRequest : PlainRequest -{ - public UpdateModelSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateModelSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_model_snapshot"; - - /// - /// - /// A description of the model snapshot. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// If true, this snapshot will not be deleted during automatic cleanup of - /// snapshots older than model_snapshot_retention_days. However, this - /// snapshot will be deleted when the job is deleted. - /// - /// - [JsonInclude, JsonPropertyName("retain")] - public bool? Retain { get; set; } -} - -/// -/// -/// Update a snapshot. -/// Updates certain properties of a snapshot. -/// -/// -public sealed partial class UpdateModelSnapshotRequestDescriptor : RequestDescriptor -{ - internal UpdateModelSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateModelSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpdateModelSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.update_model_snapshot"; - - public UpdateModelSnapshotRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public UpdateModelSnapshotRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) - { - RouteValues.Required("snapshot_id", snapshotId); - return Self; - } - - private string? DescriptionValue { get; set; } - private bool? RetainValue { get; set; } - - /// - /// - /// A description of the model snapshot. - /// - /// - public UpdateModelSnapshotRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// If true, this snapshot will not be deleted during automatic cleanup of - /// snapshots older than model_snapshot_retention_days. However, this - /// snapshot will be deleted when the job is deleted. - /// - /// - public UpdateModelSnapshotRequestDescriptor Retain(bool? retain = true) - { - RetainValue = retain; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (RetainValue.HasValue) - { - writer.WritePropertyName("retain"); - writer.WriteBooleanValue(RetainValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotResponse.g.cs deleted file mode 100644 index b9b8e2ac13c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpdateModelSnapshotResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpdateModelSnapshotResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } - [JsonInclude, JsonPropertyName("model")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelSnapshot Model { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotRequest.g.cs deleted file mode 100644 index 18b35ba5b71..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotRequest.g.cs +++ /dev/null @@ -1,145 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpgradeJobSnapshotRequestParameters : RequestParameters -{ - /// - /// - /// Controls the time to wait for the request to complete. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// When true, the API won’t respond until the upgrade is complete. - /// Otherwise, it responds as soon as the upgrade task is assigned to a node. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Upgrade a snapshot. -/// Upgrades an anomaly detection model snapshot to the latest major version. -/// Over time, older snapshot formats are deprecated and removed. Anomaly -/// detection jobs support only snapshots that are from the current or previous -/// major version. -/// This API provides a means to upgrade a snapshot to the current major version. -/// This aids in preparing the cluster for an upgrade to the next major version. -/// Only one snapshot per anomaly detection job can be upgraded at a time and the -/// upgraded snapshot cannot be the current snapshot of the anomaly detection -/// job. -/// -/// -public sealed partial class UpgradeJobSnapshotRequest : PlainRequest -{ - public UpgradeJobSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpgradeJobSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.upgrade_job_snapshot"; - - /// - /// - /// Controls the time to wait for the request to complete. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// When true, the API won’t respond until the upgrade is complete. - /// Otherwise, it responds as soon as the upgrade task is assigned to a node. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Upgrade a snapshot. -/// Upgrades an anomaly detection model snapshot to the latest major version. -/// Over time, older snapshot formats are deprecated and removed. Anomaly -/// detection jobs support only snapshots that are from the current or previous -/// major version. -/// This API provides a means to upgrade a snapshot to the current major version. -/// This aids in preparing the cluster for an upgrade to the next major version. -/// Only one snapshot per anomaly detection job can be upgraded at a time and the -/// upgraded snapshot cannot be the current snapshot of the anomaly detection -/// job. -/// -/// -public sealed partial class UpgradeJobSnapshotRequestDescriptor : RequestDescriptor -{ - internal UpgradeJobSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpgradeJobSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) : base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningUpgradeJobSnapshot; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ml.upgrade_job_snapshot"; - - public UpgradeJobSnapshotRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public UpgradeJobSnapshotRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public UpgradeJobSnapshotRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id jobId) - { - RouteValues.Required("job_id", jobId); - return Self; - } - - public UpgradeJobSnapshotRequestDescriptor SnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id snapshotId) - { - RouteValues.Required("snapshot_id", snapshotId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotResponse.g.cs deleted file mode 100644 index 0b0d55c900d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/UpgradeJobSnapshotResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class UpgradeJobSnapshotResponse : ElasticsearchResponse -{ - /// - /// - /// When true, this means the task is complete. When false, it is still running. - /// - /// - [JsonInclude, JsonPropertyName("completed")] - public bool Completed { get; init; } - - /// - /// - /// The ID of the node that the upgrade task was started on if it is still running. In serverless this will be the "serverless". - /// - /// - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorRequest.g.cs deleted file mode 100644 index f911314146a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorRequest.g.cs +++ /dev/null @@ -1,163 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ValidateDetectorRequestParameters : RequestParameters -{ -} - -/// -/// -/// Validate an anomaly detection job. -/// -/// -public sealed partial class ValidateDetectorRequest : PlainRequest, ISelfSerializable -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningValidateDetector; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.validate_detector"; - - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector Detector { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, Detector, options); - } -} - -/// -/// -/// Validate an anomaly detection job. -/// -/// -public sealed partial class ValidateDetectorRequestDescriptor : RequestDescriptor, ValidateDetectorRequestParameters> -{ - internal ValidateDetectorRequestDescriptor(Action> configure) => configure.Invoke(this); - public ValidateDetectorRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector) => DetectorValue = detector; - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningValidateDetector; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.validate_detector"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector DetectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor DetectorDescriptor { get; set; } - private Action> DetectorDescriptorAction { get; set; } - - public ValidateDetectorRequestDescriptor Detector(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector) - { - DetectorDescriptor = null; - DetectorDescriptorAction = null; - DetectorValue = detector; - return Self; - } - - public ValidateDetectorRequestDescriptor Detector(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor descriptor) - { - DetectorValue = null; - DetectorDescriptorAction = null; - DetectorDescriptor = descriptor; - return Self; - } - - public ValidateDetectorRequestDescriptor Detector(Action> configure) - { - DetectorValue = null; - DetectorDescriptor = null; - DetectorDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, DetectorValue, options); - } -} - -/// -/// -/// Validate an anomaly detection job. -/// -/// -public sealed partial class ValidateDetectorRequestDescriptor : RequestDescriptor -{ - internal ValidateDetectorRequestDescriptor(Action configure) => configure.Invoke(this); - public ValidateDetectorRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector) => DetectorValue = detector; - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningValidateDetector; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.validate_detector"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector DetectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor DetectorDescriptor { get; set; } - private Action DetectorDescriptorAction { get; set; } - - public ValidateDetectorRequestDescriptor Detector(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector) - { - DetectorDescriptor = null; - DetectorDescriptorAction = null; - DetectorValue = detector; - return Self; - } - - public ValidateDetectorRequestDescriptor Detector(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor descriptor) - { - DetectorValue = null; - DetectorDescriptorAction = null; - DetectorDescriptor = descriptor; - return Self; - } - - public ValidateDetectorRequestDescriptor Detector(Action configure) - { - DetectorValue = null; - DetectorDescriptor = null; - DetectorDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, DetectorValue, options); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorResponse.g.cs deleted file mode 100644 index 9b25cee80ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateDetectorResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ValidateDetectorResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateRequest.g.cs deleted file mode 100644 index 74f7c612d62..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateRequest.g.cs +++ /dev/null @@ -1,602 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ValidateRequestParameters : RequestParameters -{ -} - -/// -/// -/// Validates an anomaly detection job. -/// -/// -public sealed partial class ValidateRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningValidate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.validate"; - - [JsonInclude, JsonPropertyName("analysis_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? AnalysisConfig { get; set; } - [JsonInclude, JsonPropertyName("analysis_limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimits { get; set; } - [JsonInclude, JsonPropertyName("data_description")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription? DataDescription { get; set; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - [JsonInclude, JsonPropertyName("job_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get; set; } - [JsonInclude, JsonPropertyName("model_plot")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlot { get; set; } - [JsonInclude, JsonPropertyName("model_snapshot_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? ModelSnapshotId { get; set; } - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public long? ModelSnapshotRetentionDays { get; set; } - [JsonInclude, JsonPropertyName("results_index_name")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? ResultsIndexName { get; set; } -} - -/// -/// -/// Validates an anomaly detection job. -/// -/// -public sealed partial class ValidateRequestDescriptor : RequestDescriptor, ValidateRequestParameters> -{ - internal ValidateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ValidateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningValidate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.validate"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? AnalysisConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor AnalysisConfigDescriptor { get; set; } - private Action> AnalysisConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor AnalysisLimitsDescriptor { get; set; } - private Action AnalysisLimitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription? DataDescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor DataDescriptionDescriptor { get; set; } - private Action> DataDescriptionDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor ModelPlotDescriptor { get; set; } - private Action> ModelPlotDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? ModelSnapshotIdValue { get; set; } - private long? ModelSnapshotRetentionDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? ResultsIndexNameValue { get; set; } - - public ValidateRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? analysisConfig) - { - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigValue = analysisConfig; - return Self; - } - - public ValidateRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor descriptor) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor AnalysisConfig(Action> configure) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? analysisLimits) - { - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsValue = analysisLimits; - return Self; - } - - public ValidateRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor descriptor) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor AnalysisLimits(Action configure) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription? dataDescription) - { - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = null; - DataDescriptionValue = dataDescription; - return Self; - } - - public ValidateRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor descriptor) - { - DataDescriptionValue = null; - DataDescriptionDescriptorAction = null; - DataDescriptionDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor DataDescription(Action> configure) - { - DataDescriptionValue = null; - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public ValidateRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - public ValidateRequestDescriptor ModelPlot(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? modelPlot) - { - ModelPlotDescriptor = null; - ModelPlotDescriptorAction = null; - ModelPlotValue = modelPlot; - return Self; - } - - public ValidateRequestDescriptor ModelPlot(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor descriptor) - { - ModelPlotValue = null; - ModelPlotDescriptorAction = null; - ModelPlotDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor ModelPlot(Action> configure) - { - ModelPlotValue = null; - ModelPlotDescriptor = null; - ModelPlotDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor ModelSnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id? modelSnapshotId) - { - ModelSnapshotIdValue = modelSnapshotId; - return Self; - } - - public ValidateRequestDescriptor ModelSnapshotRetentionDays(long? modelSnapshotRetentionDays) - { - ModelSnapshotRetentionDaysValue = modelSnapshotRetentionDays; - return Self; - } - - public ValidateRequestDescriptor ResultsIndexName(Elastic.Clients.Elasticsearch.Serverless.IndexName? resultsIndexName) - { - ResultsIndexNameValue = resultsIndexName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisConfigDescriptor is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigDescriptor, options); - } - else if (AnalysisConfigDescriptorAction is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor(AnalysisConfigDescriptorAction), options); - } - else if (AnalysisConfigValue is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigValue, options); - } - - if (AnalysisLimitsDescriptor is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsDescriptor, options); - } - else if (AnalysisLimitsDescriptorAction is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor(AnalysisLimitsDescriptorAction), options); - } - else if (AnalysisLimitsValue is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsValue, options); - } - - if (DataDescriptionDescriptor is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionDescriptor, options); - } - else if (DataDescriptionDescriptorAction is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor(DataDescriptionDescriptorAction), options); - } - else if (DataDescriptionValue is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (ModelPlotDescriptor is not null) - { - writer.WritePropertyName("model_plot"); - JsonSerializer.Serialize(writer, ModelPlotDescriptor, options); - } - else if (ModelPlotDescriptorAction is not null) - { - writer.WritePropertyName("model_plot"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor(ModelPlotDescriptorAction), options); - } - else if (ModelPlotValue is not null) - { - writer.WritePropertyName("model_plot"); - JsonSerializer.Serialize(writer, ModelPlotValue, options); - } - - if (ModelSnapshotIdValue is not null) - { - writer.WritePropertyName("model_snapshot_id"); - JsonSerializer.Serialize(writer, ModelSnapshotIdValue, options); - } - - if (ModelSnapshotRetentionDaysValue.HasValue) - { - writer.WritePropertyName("model_snapshot_retention_days"); - writer.WriteNumberValue(ModelSnapshotRetentionDaysValue.Value); - } - - if (ResultsIndexNameValue is not null) - { - writer.WritePropertyName("results_index_name"); - JsonSerializer.Serialize(writer, ResultsIndexNameValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Validates an anomaly detection job. -/// -/// -public sealed partial class ValidateRequestDescriptor : RequestDescriptor -{ - internal ValidateRequestDescriptor(Action configure) => configure.Invoke(this); - - public ValidateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningValidate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "ml.validate"; - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? AnalysisConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor AnalysisConfigDescriptor { get; set; } - private Action AnalysisConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor AnalysisLimitsDescriptor { get; set; } - private Action AnalysisLimitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription? DataDescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor DataDescriptionDescriptor { get; set; } - private Action DataDescriptionDescriptorAction { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor ModelPlotDescriptor { get; set; } - private Action ModelPlotDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? ModelSnapshotIdValue { get; set; } - private long? ModelSnapshotRetentionDaysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? ResultsIndexNameValue { get; set; } - - public ValidateRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig? analysisConfig) - { - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigValue = analysisConfig; - return Self; - } - - public ValidateRequestDescriptor AnalysisConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor descriptor) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptorAction = null; - AnalysisConfigDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor AnalysisConfig(Action configure) - { - AnalysisConfigValue = null; - AnalysisConfigDescriptor = null; - AnalysisConfigDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? analysisLimits) - { - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsValue = analysisLimits; - return Self; - } - - public ValidateRequestDescriptor AnalysisLimits(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor descriptor) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptorAction = null; - AnalysisLimitsDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor AnalysisLimits(Action configure) - { - AnalysisLimitsValue = null; - AnalysisLimitsDescriptor = null; - AnalysisLimitsDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription? dataDescription) - { - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = null; - DataDescriptionValue = dataDescription; - return Self; - } - - public ValidateRequestDescriptor DataDescription(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor descriptor) - { - DataDescriptionValue = null; - DataDescriptionDescriptorAction = null; - DataDescriptionDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor DataDescription(Action configure) - { - DataDescriptionValue = null; - DataDescriptionDescriptor = null; - DataDescriptionDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - public ValidateRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - public ValidateRequestDescriptor ModelPlot(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? modelPlot) - { - ModelPlotDescriptor = null; - ModelPlotDescriptorAction = null; - ModelPlotValue = modelPlot; - return Self; - } - - public ValidateRequestDescriptor ModelPlot(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor descriptor) - { - ModelPlotValue = null; - ModelPlotDescriptorAction = null; - ModelPlotDescriptor = descriptor; - return Self; - } - - public ValidateRequestDescriptor ModelPlot(Action configure) - { - ModelPlotValue = null; - ModelPlotDescriptor = null; - ModelPlotDescriptorAction = configure; - return Self; - } - - public ValidateRequestDescriptor ModelSnapshotId(Elastic.Clients.Elasticsearch.Serverless.Id? modelSnapshotId) - { - ModelSnapshotIdValue = modelSnapshotId; - return Self; - } - - public ValidateRequestDescriptor ModelSnapshotRetentionDays(long? modelSnapshotRetentionDays) - { - ModelSnapshotRetentionDaysValue = modelSnapshotRetentionDays; - return Self; - } - - public ValidateRequestDescriptor ResultsIndexName(Elastic.Clients.Elasticsearch.Serverless.IndexName? resultsIndexName) - { - ResultsIndexNameValue = resultsIndexName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisConfigDescriptor is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigDescriptor, options); - } - else if (AnalysisConfigDescriptorAction is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfigDescriptor(AnalysisConfigDescriptorAction), options); - } - else if (AnalysisConfigValue is not null) - { - writer.WritePropertyName("analysis_config"); - JsonSerializer.Serialize(writer, AnalysisConfigValue, options); - } - - if (AnalysisLimitsDescriptor is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsDescriptor, options); - } - else if (AnalysisLimitsDescriptorAction is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimitsDescriptor(AnalysisLimitsDescriptorAction), options); - } - else if (AnalysisLimitsValue is not null) - { - writer.WritePropertyName("analysis_limits"); - JsonSerializer.Serialize(writer, AnalysisLimitsValue, options); - } - - if (DataDescriptionDescriptor is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionDescriptor, options); - } - else if (DataDescriptionDescriptorAction is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescriptionDescriptor(DataDescriptionDescriptorAction), options); - } - else if (DataDescriptionValue is not null) - { - writer.WritePropertyName("data_description"); - JsonSerializer.Serialize(writer, DataDescriptionValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (ModelPlotDescriptor is not null) - { - writer.WritePropertyName("model_plot"); - JsonSerializer.Serialize(writer, ModelPlotDescriptor, options); - } - else if (ModelPlotDescriptorAction is not null) - { - writer.WritePropertyName("model_plot"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfigDescriptor(ModelPlotDescriptorAction), options); - } - else if (ModelPlotValue is not null) - { - writer.WritePropertyName("model_plot"); - JsonSerializer.Serialize(writer, ModelPlotValue, options); - } - - if (ModelSnapshotIdValue is not null) - { - writer.WritePropertyName("model_snapshot_id"); - JsonSerializer.Serialize(writer, ModelSnapshotIdValue, options); - } - - if (ModelSnapshotRetentionDaysValue.HasValue) - { - writer.WritePropertyName("model_snapshot_retention_days"); - writer.WriteNumberValue(ModelSnapshotRetentionDaysValue.Value); - } - - if (ResultsIndexNameValue is not null) - { - writer.WritePropertyName("results_index_name"); - JsonSerializer.Serialize(writer, ResultsIndexNameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateResponse.g.cs deleted file mode 100644 index 338fd739327..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MachineLearning/ValidateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ValidateResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs deleted file mode 100644 index e9954b360ad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetRequest.g.cs +++ /dev/null @@ -1,499 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiGetRequestParameters : RequestParameters -{ - /// - /// - /// Specifies the node or shard the operation should be performed on. Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, the request refreshes relevant shards before retrieving documents. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes query parameter. - /// If the _source parameter is false, this parameter is ignored. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// If true, retrieves the document fields stored in the index rather than the document _source. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } -} - -/// -/// -/// Get multiple documents. -/// -/// -/// Get multiple JSON documents by ID from one or more indices. -/// If you specify an index in the request URI, you only need to specify the document IDs in the request body. -/// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. -/// -/// -public sealed partial class MultiGetRequest : PlainRequest -{ - public MultiGetRequest() - { - } - - public MultiGetRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "mget"; - - /// - /// - /// Specifies the node or shard the operation should be performed on. Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// If true, the request refreshes relevant shards before retrieving documents. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// True or false to return the _source field or not, or a list of fields to return. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes query parameter. - /// If the _source parameter is false, this parameter is ignored. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// If true, retrieves the document fields stored in the index rather than the document _source. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); } - - /// - /// - /// The documents you want to retrieve. Required if no index is specified in the request URI. - /// - /// - [JsonInclude, JsonPropertyName("docs")] - public ICollection? Docs { get; set; } - - /// - /// - /// The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI. - /// - /// - [JsonInclude, JsonPropertyName("ids")] - public Elastic.Clients.Elasticsearch.Serverless.Ids? Ids { get; set; } -} - -/// -/// -/// Get multiple documents. -/// -/// -/// Get multiple JSON documents by ID from one or more indices. -/// If you specify an index in the request URI, you only need to specify the document IDs in the request body. -/// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. -/// -/// -public sealed partial class MultiGetRequestDescriptor : RequestDescriptor, MultiGetRequestParameters> -{ - internal MultiGetRequestDescriptor(Action> configure) => configure.Invoke(this); - - public MultiGetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public MultiGetRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "mget"; - - public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public MultiGetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public MultiGetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - - public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - private ICollection? DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor DocsDescriptor { get; set; } - private Action> DocsDescriptorAction { get; set; } - private Action>[] DocsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ids? IdsValue { get; set; } - - /// - /// - /// The documents you want to retrieve. Required if no index is specified in the request URI. - /// - /// - public MultiGetRequestDescriptor Docs(ICollection? docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public MultiGetRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public MultiGetRequestDescriptor Docs(Action> configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public MultiGetRequestDescriptor Docs(params Action>[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI. - /// - /// - public MultiGetRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.Ids? ids) - { - IdsValue = ids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocsValue is not null) - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (IdsValue is not null) - { - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get multiple documents. -/// -/// -/// Get multiple JSON documents by ID from one or more indices. -/// If you specify an index in the request URI, you only need to specify the document IDs in the request body. -/// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. -/// -/// -public sealed partial class MultiGetRequestDescriptor : RequestDescriptor -{ - internal MultiGetRequestDescriptor(Action configure) => configure.Invoke(this); - - public MultiGetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public MultiGetRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "mget"; - - public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public MultiGetRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source); - public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public MultiGetRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) => Qs("stored_fields", storedFields); - - public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - private ICollection? DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ids? IdsValue { get; set; } - - /// - /// - /// The documents you want to retrieve. Required if no index is specified in the request URI. - /// - /// - public MultiGetRequestDescriptor Docs(ICollection? docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public MultiGetRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public MultiGetRequestDescriptor Docs(Action configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public MultiGetRequestDescriptor Docs(params Action[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI. - /// - /// - public MultiGetRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.Ids? ids) - { - IdsValue = ids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetOperationDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocsValue is not null) - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (IdsValue is not null) - { - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetResponse.g.cs deleted file mode 100644 index 9f71d27fc58..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiGetResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiGetResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("docs")] - public IReadOnlyCollection> Docs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchRequest.g.cs deleted file mode 100644 index 25f73f21209..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchRequest.g.cs +++ /dev/null @@ -1,475 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiSearchRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. - /// - /// - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, concrete, expanded or aliased indices are ignored when frozen. - /// - /// - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Maximum number of concurrent searches the multi search API can execute. - /// - /// - public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } - - /// - /// - /// Maximum number of concurrent shard requests that each sub-search request executes per node. - /// - /// - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - - /// - /// - /// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. - /// - /// - public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } - - /// - /// - /// If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. - /// - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Custom routing value used to route search operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Indicates whether global term and document frequencies should be used when scoring returned documents. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } -} - -/// -/// -/// Run multiple searches. -/// -/// -/// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. -/// The structure is as follows: -/// -/// -/// header\n -/// body\n -/// header\n -/// body\n -/// -/// -/// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. -/// -/// -/// IMPORTANT: The final line of data must end with a newline character \n. -/// Each newline character may be preceded by a carriage return \r. -/// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. -/// -/// -public sealed partial class MultiSearchRequest : PlainRequest, IStreamSerializable -{ - public MultiSearchRequest() - { - } - - public MultiSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "msearch"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. - /// - /// - [JsonIgnore] - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, concrete, expanded or aliased indices are ignored when frozen. - /// - /// - [JsonIgnore] - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Maximum number of concurrent searches the multi search API can execute. - /// - /// - [JsonIgnore] - public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } - - /// - /// - /// Maximum number of concurrent shard requests that each sub-search request executes per node. - /// - /// - [JsonIgnore] - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - - /// - /// - /// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. - /// - /// - [JsonIgnore] - public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } - - /// - /// - /// If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. - /// - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Custom routing value used to route search operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Indicates whether global term and document frequencies should be used when scoring returned documents. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - public List Searches { get; set; } - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (Searches is null) - return; - foreach (var item in Searches) - { - if (item is IStreamSerializable serializable) - serializable.Serialize(stream, settings, formatting); - } - } - - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (Searches is null) - return; - foreach (var item in Searches) - { - if (item is IStreamSerializable serializable) - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - } - } -} - -/// -/// -/// Run multiple searches. -/// -/// -/// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. -/// The structure is as follows: -/// -/// -/// header\n -/// body\n -/// header\n -/// body\n -/// -/// -/// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. -/// -/// -/// IMPORTANT: The final line of data must end with a newline character \n. -/// Each newline character may be preceded by a carriage return \r. -/// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. -/// -/// -public sealed partial class MultiSearchRequestDescriptor : RequestDescriptor, MultiSearchRequestParameters>, IStreamSerializable -{ - internal MultiSearchRequestDescriptor(Action> configure) => configure.Invoke(this); - - public MultiSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public MultiSearchRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "msearch"; - - public MultiSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public MultiSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public MultiSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public MultiSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public MultiSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public MultiSearchRequestDescriptor MaxConcurrentSearches(long? maxConcurrentSearches) => Qs("max_concurrent_searches", maxConcurrentSearches); - public MultiSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); - public MultiSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); - public MultiSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public MultiSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public MultiSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public MultiSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public MultiSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } - - List _items = new(); - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - serializable.Serialize(stream, settings, formatting); - } - } - - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - } - } - - public MultiSearchRequestDescriptor AddSearches(Elastic.Clients.Elasticsearch.Serverless.Core.MSearch.SearchRequestItem searches) - { - _items.Add(searches); - return this; - } -} - -/// -/// -/// Run multiple searches. -/// -/// -/// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. -/// The structure is as follows: -/// -/// -/// header\n -/// body\n -/// header\n -/// body\n -/// -/// -/// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. -/// -/// -/// IMPORTANT: The final line of data must end with a newline character \n. -/// Each newline character may be preceded by a carriage return \r. -/// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. -/// -/// -public sealed partial class MultiSearchRequestDescriptor : RequestDescriptor, IStreamSerializable -{ - internal MultiSearchRequestDescriptor(Action configure) => configure.Invoke(this); - - public MultiSearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public MultiSearchRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "msearch"; - - public MultiSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public MultiSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public MultiSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public MultiSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public MultiSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public MultiSearchRequestDescriptor MaxConcurrentSearches(long? maxConcurrentSearches) => Qs("max_concurrent_searches", maxConcurrentSearches); - public MultiSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); - public MultiSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); - public MultiSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public MultiSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public MultiSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public MultiSearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public MultiSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } - - List _items = new(); - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - serializable.Serialize(stream, settings, formatting); - } - } - - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - } - } - - public MultiSearchRequestDescriptor AddSearches(Elastic.Clients.Elasticsearch.Serverless.Core.MSearch.SearchRequestItem searches) - { - _items.Add(searches); - return this; - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchResponse.g.cs deleted file mode 100644 index 740fdd5233f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiSearchResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("responses")] - public IReadOnlyCollection> Responses { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs deleted file mode 100644 index 1fffa2f1906..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateRequest.g.cs +++ /dev/null @@ -1,306 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiSearchTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If true, network round-trips are minimized for cross-cluster search requests. - /// - /// - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// Maximum number of concurrent searches the API can run. - /// - /// - public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } - - /// - /// - /// If true, the response returns hits.total as an integer. - /// If false, it returns hits.total as an object. - /// - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// The type of the search operation. - /// Available options: query_then_fetch, dfs_query_then_fetch. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// If true, the response prefixes aggregation and suggester names with their respective types. - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } -} - -/// -/// -/// Run multiple templated searches. -/// -/// -public sealed partial class MultiSearchTemplateRequest : PlainRequest, IStreamSerializable -{ - public MultiSearchTemplateRequest() - { - } - - public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "msearch_template"; - - /// - /// - /// If true, network round-trips are minimized for cross-cluster search requests. - /// - /// - [JsonIgnore] - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// Maximum number of concurrent searches the API can run. - /// - /// - [JsonIgnore] - public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } - - /// - /// - /// If true, the response returns hits.total as an integer. - /// If false, it returns hits.total as an object. - /// - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// The type of the search operation. - /// Available options: query_then_fetch, dfs_query_then_fetch. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// If true, the response prefixes aggregation and suggester names with their respective types. - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - public List SearchTemplates { get; set; } - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (SearchTemplates is null) - return; - foreach (var item in SearchTemplates) - { - if (item is IStreamSerializable serializable) - serializable.Serialize(stream, settings, formatting); - } - } - - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (SearchTemplates is null) - return; - foreach (var item in SearchTemplates) - { - if (item is IStreamSerializable serializable) - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - } - } -} - -/// -/// -/// Run multiple templated searches. -/// -/// -public sealed partial class MultiSearchTemplateRequestDescriptor : RequestDescriptor, MultiSearchTemplateRequestParameters>, IStreamSerializable -{ - internal MultiSearchTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public MultiSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public MultiSearchTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "msearch_template"; - - public MultiSearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public MultiSearchTemplateRequestDescriptor MaxConcurrentSearches(long? maxConcurrentSearches) => Qs("max_concurrent_searches", maxConcurrentSearches); - public MultiSearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public MultiSearchTemplateRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public MultiSearchTemplateRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public MultiSearchTemplateRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } - - List _items = new(); - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - serializable.Serialize(stream, settings, formatting); - } - } - - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - } - } - - public MultiSearchTemplateRequestDescriptor AddSearchTemplates(Elastic.Clients.Elasticsearch.Serverless.Core.MSearchTemplate.SearchTemplateRequestItem searchTemplates) - { - _items.Add(searchTemplates); - return this; - } -} - -/// -/// -/// Run multiple templated searches. -/// -/// -public sealed partial class MultiSearchTemplateRequestDescriptor : RequestDescriptor, IStreamSerializable -{ - internal MultiSearchTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public MultiSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public MultiSearchTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMultiSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "msearch_template"; - - public MultiSearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public MultiSearchTemplateRequestDescriptor MaxConcurrentSearches(long? maxConcurrentSearches) => Qs("max_concurrent_searches", maxConcurrentSearches); - public MultiSearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public MultiSearchTemplateRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public MultiSearchTemplateRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public MultiSearchTemplateRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } - - List _items = new(); - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - serializable.Serialize(stream, settings, formatting); - } - } - - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (_items is null) - return; - foreach (var item in _items) - { - if (item is IStreamSerializable serializable) - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - } - } - - public MultiSearchTemplateRequestDescriptor AddSearchTemplates(Elastic.Clients.Elasticsearch.Serverless.Core.MSearchTemplate.SearchTemplateRequestItem searchTemplates) - { - _items.Add(searchTemplates); - return this; - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateResponse.g.cs deleted file mode 100644 index 8c59f80a1ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiSearchTemplateResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiSearchTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("responses")] - public IReadOnlyCollection> Responses { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs deleted file mode 100644 index 40cdd16d284..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsRequest.g.cs +++ /dev/null @@ -1,551 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiTermVectorsRequestParameters : RequestParameters -{ - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - public bool? FieldStatistics { get => Q("field_statistics"); set => Q("field_statistics", value); } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - public bool? Offsets { get => Q("offsets"); set => Q("offsets", value); } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - public bool? Payloads { get => Q("payloads"); set => Q("payloads", value); } - - /// - /// - /// If true, the response includes term positions. - /// - /// - public bool? Positions { get => Q("positions"); set => Q("positions", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - public bool? TermStatistics { get => Q("term_statistics"); set => Q("term_statistics", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Get multiple term vectors. -/// -/// -/// You can specify existing documents by index and ID or provide artificial documents in the body of the request. -/// You can specify the index in the request body or request URI. -/// The response contains a docs array with all the fetched termvectors. -/// Each element has the structure provided by the termvectors API. -/// -/// -public sealed partial class MultiTermVectorsRequest : PlainRequest -{ - public MultiTermVectorsRequest() - { - } - - public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMtermvectors; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "mtermvectors"; - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - [JsonIgnore] - public bool? FieldStatistics { get => Q("field_statistics"); set => Q("field_statistics", value); } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - [JsonIgnore] - public bool? Offsets { get => Q("offsets"); set => Q("offsets", value); } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - [JsonIgnore] - public bool? Payloads { get => Q("payloads"); set => Q("payloads", value); } - - /// - /// - /// If true, the response includes term positions. - /// - /// - [JsonIgnore] - public bool? Positions { get => Q("positions"); set => Q("positions", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - [JsonIgnore] - public bool? TermStatistics { get => Q("term_statistics"); set => Q("term_statistics", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// Array of existing or artificial documents. - /// - /// - [JsonInclude, JsonPropertyName("docs")] - public ICollection? Docs { get; set; } - - /// - /// - /// Simplified syntax to specify documents by their ID if they're in the same index. - /// - /// - [JsonInclude, JsonPropertyName("ids")] - public ICollection? Ids { get; set; } -} - -/// -/// -/// Get multiple term vectors. -/// -/// -/// You can specify existing documents by index and ID or provide artificial documents in the body of the request. -/// You can specify the index in the request body or request URI. -/// The response contains a docs array with all the fetched termvectors. -/// Each element has the structure provided by the termvectors API. -/// -/// -public sealed partial class MultiTermVectorsRequestDescriptor : RequestDescriptor, MultiTermVectorsRequestParameters> -{ - internal MultiTermVectorsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public MultiTermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public MultiTermVectorsRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMtermvectors; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "mtermvectors"; - - public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); - public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); - public MultiTermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); - public MultiTermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); - public MultiTermVectorsRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public MultiTermVectorsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public MultiTermVectorsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public MultiTermVectorsRequestDescriptor TermStatistics(bool? termStatistics = true) => Qs("term_statistics", termStatistics); - public MultiTermVectorsRequestDescriptor Version(long? version) => Qs("version", version); - public MultiTermVectorsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public MultiTermVectorsRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - private ICollection? DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor DocsDescriptor { get; set; } - private Action> DocsDescriptorAction { get; set; } - private Action>[] DocsDescriptorActions { get; set; } - private ICollection? IdsValue { get; set; } - - /// - /// - /// Array of existing or artificial documents. - /// - /// - public MultiTermVectorsRequestDescriptor Docs(ICollection? docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public MultiTermVectorsRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public MultiTermVectorsRequestDescriptor Docs(Action> configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public MultiTermVectorsRequestDescriptor Docs(params Action>[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Simplified syntax to specify documents by their ID if they're in the same index. - /// - /// - public MultiTermVectorsRequestDescriptor Ids(ICollection? ids) - { - IdsValue = ids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocsValue is not null) - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (IdsValue is not null) - { - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get multiple term vectors. -/// -/// -/// You can specify existing documents by index and ID or provide artificial documents in the body of the request. -/// You can specify the index in the request body or request URI. -/// The response contains a docs array with all the fetched termvectors. -/// Each element has the structure provided by the termvectors API. -/// -/// -public sealed partial class MultiTermVectorsRequestDescriptor : RequestDescriptor -{ - internal MultiTermVectorsRequestDescriptor(Action configure) => configure.Invoke(this); - - public MultiTermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) : base(r => r.Optional("index", index)) - { - } - - public MultiTermVectorsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceMtermvectors; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "mtermvectors"; - - public MultiTermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public MultiTermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); - public MultiTermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); - public MultiTermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); - public MultiTermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); - public MultiTermVectorsRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public MultiTermVectorsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public MultiTermVectorsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public MultiTermVectorsRequestDescriptor TermStatistics(bool? termStatistics = true) => Qs("term_statistics", termStatistics); - public MultiTermVectorsRequestDescriptor Version(long? version) => Qs("version", version); - public MultiTermVectorsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public MultiTermVectorsRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - RouteValues.Optional("index", index); - return Self; - } - - private ICollection? DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } - private ICollection? IdsValue { get; set; } - - /// - /// - /// Array of existing or artificial documents. - /// - /// - public MultiTermVectorsRequestDescriptor Docs(ICollection? docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public MultiTermVectorsRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public MultiTermVectorsRequestDescriptor Docs(Action configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public MultiTermVectorsRequestDescriptor Docs(params Action[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Simplified syntax to specify documents by their ID if they're in the same index. - /// - /// - public MultiTermVectorsRequestDescriptor Ids(ICollection? ids) - { - IdsValue = ids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors.MultiTermVectorsOperationDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocsValue is not null) - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (IdsValue is not null) - { - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsResponse.g.cs deleted file mode 100644 index 49360764fd3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/MultiTermVectorsResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MultiTermVectorsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("docs")] - public IReadOnlyCollection Docs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsRequest.g.cs deleted file mode 100644 index a38d38b448c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsRequest.g.cs +++ /dev/null @@ -1,235 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class HotThreadsRequestParameters : RequestParameters -{ - /// - /// - /// If true, known idle threads (e.g. waiting in a socket select, or to get - /// a task from an empty queue) are filtered out. - /// - /// - public bool? IgnoreIdleThreads { get => Q("ignore_idle_threads"); set => Q("ignore_idle_threads", value); } - - /// - /// - /// The interval to do the second sampling of threads. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Interval { get => Q("interval"); set => Q("interval", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response - /// is received before the timeout expires, the request fails and - /// returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Number of samples of thread stacktrace. - /// - /// - public long? Snapshots { get => Q("snapshots"); set => Q("snapshots", value); } - - /// - /// - /// The sort order for 'cpu' type (default: total) - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.ThreadType? Sort { get => Q("sort"); set => Q("sort", value); } - - /// - /// - /// Specifies the number of hot threads to provide information for. - /// - /// - public long? Threads { get => Q("threads"); set => Q("threads", value); } - - /// - /// - /// Period to wait for a response. If no response is received - /// before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The type to sample. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.ThreadType? Type { get => Q("type"); set => Q("type", value); } -} - -/// -/// -/// Get the hot threads for nodes. -/// Get a breakdown of the hot threads on each selected node in the cluster. -/// The output is plain text with a breakdown of the top hot threads for each node. -/// -/// -public sealed partial class HotThreadsRequest : PlainRequest -{ - public HotThreadsRequest() - { - } - - public HotThreadsRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesHotThreads; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.hot_threads"; - - /// - /// - /// If true, known idle threads (e.g. waiting in a socket select, or to get - /// a task from an empty queue) are filtered out. - /// - /// - [JsonIgnore] - public bool? IgnoreIdleThreads { get => Q("ignore_idle_threads"); set => Q("ignore_idle_threads", value); } - - /// - /// - /// The interval to do the second sampling of threads. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Interval { get => Q("interval"); set => Q("interval", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response - /// is received before the timeout expires, the request fails and - /// returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Number of samples of thread stacktrace. - /// - /// - [JsonIgnore] - public long? Snapshots { get => Q("snapshots"); set => Q("snapshots", value); } - - /// - /// - /// The sort order for 'cpu' type (default: total) - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.ThreadType? Sort { get => Q("sort"); set => Q("sort", value); } - - /// - /// - /// Specifies the number of hot threads to provide information for. - /// - /// - [JsonIgnore] - public long? Threads { get => Q("threads"); set => Q("threads", value); } - - /// - /// - /// Period to wait for a response. If no response is received - /// before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The type to sample. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.ThreadType? Type { get => Q("type"); set => Q("type", value); } -} - -/// -/// -/// Get the hot threads for nodes. -/// Get a breakdown of the hot threads on each selected node in the cluster. -/// The output is plain text with a breakdown of the top hot threads for each node. -/// -/// -public sealed partial class HotThreadsRequestDescriptor : RequestDescriptor -{ - internal HotThreadsRequestDescriptor(Action configure) => configure.Invoke(this); - - public HotThreadsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - public HotThreadsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesHotThreads; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.hot_threads"; - - public HotThreadsRequestDescriptor IgnoreIdleThreads(bool? ignoreIdleThreads = true) => Qs("ignore_idle_threads", ignoreIdleThreads); - public HotThreadsRequestDescriptor Interval(Elastic.Clients.Elasticsearch.Serverless.Duration? interval) => Qs("interval", interval); - public HotThreadsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public HotThreadsRequestDescriptor Snapshots(long? snapshots) => Qs("snapshots", snapshots); - public HotThreadsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.ThreadType? sort) => Qs("sort", sort); - public HotThreadsRequestDescriptor Threads(long? threads) => Qs("threads", threads); - public HotThreadsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public HotThreadsRequestDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.ThreadType? type) => Qs("type", type); - - public HotThreadsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsResponse.g.cs deleted file mode 100644 index 12ae0ee843d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/HotThreadsResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class HotThreadsResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoRequest.g.cs deleted file mode 100644 index c5b0faa1e22..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoRequest.g.cs +++ /dev/null @@ -1,159 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodesInfoRequestParameters : RequestParameters -{ - /// - /// - /// If true, returns settings in flat format. - /// - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get node information. -/// By default, the API returns all attributes and core settings for cluster nodes. -/// -/// -public sealed partial class NodesInfoRequest : PlainRequest -{ - public NodesInfoRequest() - { - } - - public NodesInfoRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - public NodesInfoRequest(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("metric", metric)) - { - } - - public NodesInfoRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.info"; - - /// - /// - /// If true, returns settings in flat format. - /// - /// - [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get node information. -/// By default, the API returns all attributes and core settings for cluster nodes. -/// -/// -public sealed partial class NodesInfoRequestDescriptor : RequestDescriptor -{ - internal NodesInfoRequestDescriptor(Action configure) => configure.Invoke(this); - - public NodesInfoRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric)) - { - } - - public NodesInfoRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.info"; - - public NodesInfoRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); - public NodesInfoRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public NodesInfoRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public NodesInfoRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) - { - RouteValues.Optional("metric", metric); - return Self; - } - - public NodesInfoRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoResponse.g.cs deleted file mode 100644 index e4455498428..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesInfoResponse.g.cs +++ /dev/null @@ -1,43 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodesInfoResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - - /// - /// - /// Contains statistics about the number of nodes selected by the request’s node filters. - /// - /// - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics? NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsRequest.g.cs deleted file mode 100644 index 1a4216e41b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsRequest.g.cs +++ /dev/null @@ -1,348 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodesStatsRequestParameters : RequestParameters -{ - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? CompletionFields { get => Q("completion_fields"); set => Q("completion_fields", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata statistics. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? FielddataFields { get => Q("fielddata_fields"); set => Q("fielddata_fields", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// Comma-separated list of search groups to include in the search statistics. - /// - /// - public bool? Groups { get => Q("groups"); set => Q("groups", value); } - - /// - /// - /// If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). - /// - /// - public bool? IncludeSegmentFileSizes { get => Q("include_segment_file_sizes"); set => Q("include_segment_file_sizes", value); } - - /// - /// - /// If true, the response includes information from segments that are not loaded into memory. - /// - /// - public bool? IncludeUnloadedSegments { get => Q("include_unloaded_segments"); set => Q("include_unloaded_segments", value); } - - /// - /// - /// Indicates whether statistics are aggregated at the cluster, index, or shard level. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Level? Level { get => Q("level"); set => Q("level", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// A comma-separated list of document types for the indexing index metric. - /// - /// - public ICollection? Types { get => Q?>("types"); set => Q("types", value); } -} - -/// -/// -/// Get node statistics. -/// Get statistics for nodes in a cluster. -/// By default, all stats are returned. You can limit the returned information by using metrics. -/// -/// -public sealed partial class NodesStatsRequest : PlainRequest -{ - public NodesStatsRequest() - { - } - - public NodesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - public NodesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("metric", metric)) - { - } - - public NodesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric)) - { - } - - public NodesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric) : base(r => r.Optional("metric", metric).Optional("index_metric", indexMetric)) - { - } - - public NodesStatsRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric).Optional("index_metric", indexMetric)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.stats"; - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CompletionFields { get => Q("completion_fields"); set => Q("completion_fields", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in fielddata statistics. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? FielddataFields { get => Q("fielddata_fields"); set => Q("fielddata_fields", value); } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// Comma-separated list of search groups to include in the search statistics. - /// - /// - [JsonIgnore] - public bool? Groups { get => Q("groups"); set => Q("groups", value); } - - /// - /// - /// If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). - /// - /// - [JsonIgnore] - public bool? IncludeSegmentFileSizes { get => Q("include_segment_file_sizes"); set => Q("include_segment_file_sizes", value); } - - /// - /// - /// If true, the response includes information from segments that are not loaded into memory. - /// - /// - [JsonIgnore] - public bool? IncludeUnloadedSegments { get => Q("include_unloaded_segments"); set => Q("include_unloaded_segments", value); } - - /// - /// - /// Indicates whether statistics are aggregated at the cluster, index, or shard level. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Level? Level { get => Q("level"); set => Q("level", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// A comma-separated list of document types for the indexing index metric. - /// - /// - [JsonIgnore] - public ICollection? Types { get => Q?>("types"); set => Q("types", value); } -} - -/// -/// -/// Get node statistics. -/// Get statistics for nodes in a cluster. -/// By default, all stats are returned. You can limit the returned information by using metrics. -/// -/// -public sealed partial class NodesStatsRequestDescriptor : RequestDescriptor, NodesStatsRequestParameters> -{ - internal NodesStatsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public NodesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric).Optional("index_metric", indexMetric)) - { - } - - public NodesStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.stats"; - - public NodesStatsRequestDescriptor CompletionFields(Elastic.Clients.Elasticsearch.Serverless.Fields? completionFields) => Qs("completion_fields", completionFields); - public NodesStatsRequestDescriptor FielddataFields(Elastic.Clients.Elasticsearch.Serverless.Fields? fielddataFields) => Qs("fielddata_fields", fielddataFields); - public NodesStatsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public NodesStatsRequestDescriptor Groups(bool? groups = true) => Qs("groups", groups); - public NodesStatsRequestDescriptor IncludeSegmentFileSizes(bool? includeSegmentFileSizes = true) => Qs("include_segment_file_sizes", includeSegmentFileSizes); - public NodesStatsRequestDescriptor IncludeUnloadedSegments(bool? includeUnloadedSegments = true) => Qs("include_unloaded_segments", includeUnloadedSegments); - public NodesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Serverless.Level? level) => Qs("level", level); - public NodesStatsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public NodesStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public NodesStatsRequestDescriptor Types(ICollection? types) => Qs("types", types); - - public NodesStatsRequestDescriptor IndexMetric(Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric) - { - RouteValues.Optional("index_metric", indexMetric); - return Self; - } - - public NodesStatsRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) - { - RouteValues.Optional("metric", metric); - return Self; - } - - public NodesStatsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get node statistics. -/// Get statistics for nodes in a cluster. -/// By default, all stats are returned. You can limit the returned information by using metrics. -/// -/// -public sealed partial class NodesStatsRequestDescriptor : RequestDescriptor -{ - internal NodesStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public NodesStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric).Optional("index_metric", indexMetric)) - { - } - - public NodesStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.stats"; - - public NodesStatsRequestDescriptor CompletionFields(Elastic.Clients.Elasticsearch.Serverless.Fields? completionFields) => Qs("completion_fields", completionFields); - public NodesStatsRequestDescriptor FielddataFields(Elastic.Clients.Elasticsearch.Serverless.Fields? fielddataFields) => Qs("fielddata_fields", fielddataFields); - public NodesStatsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public NodesStatsRequestDescriptor Groups(bool? groups = true) => Qs("groups", groups); - public NodesStatsRequestDescriptor IncludeSegmentFileSizes(bool? includeSegmentFileSizes = true) => Qs("include_segment_file_sizes", includeSegmentFileSizes); - public NodesStatsRequestDescriptor IncludeUnloadedSegments(bool? includeUnloadedSegments = true) => Qs("include_unloaded_segments", includeUnloadedSegments); - public NodesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Serverless.Level? level) => Qs("level", level); - public NodesStatsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public NodesStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public NodesStatsRequestDescriptor Types(ICollection? types) => Qs("types", types); - - public NodesStatsRequestDescriptor IndexMetric(Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric) - { - RouteValues.Optional("index_metric", indexMetric); - return Self; - } - - public NodesStatsRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) - { - RouteValues.Optional("metric", metric); - return Self; - } - - public NodesStatsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsResponse.g.cs deleted file mode 100644 index c61a304dbc5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesStatsResponse.g.cs +++ /dev/null @@ -1,43 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodesStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string? ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - - /// - /// - /// Contains statistics about the number of nodes selected by the request’s node filters. - /// - /// - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics? NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageRequest.g.cs deleted file mode 100644 index f21f5a16d72..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageRequest.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodesUsageRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get feature usage information. -/// -/// -public sealed partial class NodesUsageRequest : PlainRequest -{ - public NodesUsageRequest() - { - } - - public NodesUsageRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) : base(r => r.Optional("node_id", nodeId)) - { - } - - public NodesUsageRequest(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("metric", metric)) - { - } - - public NodesUsageRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesUsage; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.usage"; - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get feature usage information. -/// -/// -public sealed partial class NodesUsageRequestDescriptor : RequestDescriptor -{ - internal NodesUsageRequestDescriptor(Action configure) => configure.Invoke(this); - - public NodesUsageRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) : base(r => r.Optional("node_id", nodeId).Optional("metric", metric)) - { - } - - public NodesUsageRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NodesUsage; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "nodes.usage"; - - public NodesUsageRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public NodesUsageRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Metrics? metric) - { - RouteValues.Optional("metric", metric); - return Self; - } - - public NodesUsageRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId) - { - RouteValues.Optional("node_id", nodeId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageResponse.g.cs deleted file mode 100644 index 2b034f606ba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Nodes/NodesUsageResponse.g.cs +++ /dev/null @@ -1,43 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodesUsageResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - - /// - /// - /// Contains statistics about the number of nodes selected by the request’s node filters. - /// - /// - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics? NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs deleted file mode 100644 index ebdecca3a0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeRequest.g.cs +++ /dev/null @@ -1,380 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class OpenPointInTimeRequestParameters : RequestParameters -{ - /// - /// - /// If false, creating a point in time request when a shard is missing or unavailable will throw an exception. - /// If true, the point in time will contain all the shards that are available at the time of the request. - /// - /// - public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Extends the time to live of the corresponding point in time. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } -} - -/// -/// -/// Open a point in time. -/// -/// -/// A search request by default runs against the most recent visible data of the target indices, -/// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the -/// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple -/// search requests using the same point in time. For example, if refreshes happen between -/// search_after requests, then the results of those requests might not be consistent as changes happening -/// between searches are only visible to the more recent point in time. -/// -/// -/// A point in time must be opened explicitly before being used in search requests. -/// The keep_alive parameter tells Elasticsearch how long it should persist. -/// -/// -public sealed partial class OpenPointInTimeRequest : PlainRequest -{ - public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceOpenPointInTime; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "open_point_in_time"; - - /// - /// - /// If false, creating a point in time request when a shard is missing or unavailable will throw an exception. - /// If true, the point in time will contain all the shards that are available at the time of the request. - /// - /// - [JsonIgnore] - public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Extends the time to live of the corresponding point in time. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Allows to filter indices if the provided query rewrites to match_none on every shard. - /// - /// - [JsonInclude, JsonPropertyName("index_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilter { get; set; } -} - -/// -/// -/// Open a point in time. -/// -/// -/// A search request by default runs against the most recent visible data of the target indices, -/// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the -/// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple -/// search requests using the same point in time. For example, if refreshes happen between -/// search_after requests, then the results of those requests might not be consistent as changes happening -/// between searches are only visible to the more recent point in time. -/// -/// -/// A point in time must be opened explicitly before being used in search requests. -/// The keep_alive parameter tells Elasticsearch how long it should persist. -/// -/// -public sealed partial class OpenPointInTimeRequestDescriptor : RequestDescriptor, OpenPointInTimeRequestParameters> -{ - internal OpenPointInTimeRequestDescriptor(Action> configure) => configure.Invoke(this); - - public OpenPointInTimeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public OpenPointInTimeRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceOpenPointInTime; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "open_point_in_time"; - - public OpenPointInTimeRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public OpenPointInTimeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public OpenPointInTimeRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public OpenPointInTimeRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration keepAlive) => Qs("keep_alive", keepAlive); - public OpenPointInTimeRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public OpenPointInTimeRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - - public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } - private Action> IndexFilterDescriptorAction { get; set; } - - /// - /// - /// Allows to filter indices if the provided query rewrites to match_none on every shard. - /// - /// - public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public OpenPointInTimeRequestDescriptor IndexFilter(Action> configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexFilterDescriptor is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); - } - else if (IndexFilterDescriptorAction is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); - } - else if (IndexFilterValue is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Open a point in time. -/// -/// -/// A search request by default runs against the most recent visible data of the target indices, -/// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the -/// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple -/// search requests using the same point in time. For example, if refreshes happen between -/// search_after requests, then the results of those requests might not be consistent as changes happening -/// between searches are only visible to the more recent point in time. -/// -/// -/// A point in time must be opened explicitly before being used in search requests. -/// The keep_alive parameter tells Elasticsearch how long it should persist. -/// -/// -public sealed partial class OpenPointInTimeRequestDescriptor : RequestDescriptor -{ - internal OpenPointInTimeRequestDescriptor(Action configure) => configure.Invoke(this); - - public OpenPointInTimeRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceOpenPointInTime; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "open_point_in_time"; - - public OpenPointInTimeRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public OpenPointInTimeRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public OpenPointInTimeRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public OpenPointInTimeRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration keepAlive) => Qs("keep_alive", keepAlive); - public OpenPointInTimeRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public OpenPointInTimeRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - - public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } - private Action IndexFilterDescriptorAction { get; set; } - - /// - /// - /// Allows to filter indices if the provided query rewrites to match_none on every shard. - /// - /// - public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public OpenPointInTimeRequestDescriptor IndexFilter(Action configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexFilterDescriptor is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); - } - else if (IndexFilterDescriptorAction is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); - } - else if (IndexFilterValue is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs deleted file mode 100644 index b31084c2922..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/OpenPointInTimeResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class OpenPointInTimeResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// Shards used to create the PIT - /// - /// - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingRequest.g.cs deleted file mode 100644 index e3ecacfd4db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingRequest.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class PingRequestParameters : RequestParameters -{ -} - -/// -/// -/// Ping the cluster. -/// Get information about whether the cluster is running. -/// -/// -public sealed partial class PingRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespacePing; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ping"; -} - -/// -/// -/// Ping the cluster. -/// Get information about whether the cluster is running. -/// -/// -public sealed partial class PingRequestDescriptor : RequestDescriptor -{ - internal PingRequestDescriptor(Action configure) => configure.Invoke(this); - - public PingRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespacePing; - - protected override HttpMethod StaticHttpMethod => HttpMethod.HEAD; - - internal override bool SupportsBody => false; - - internal override string OperationName => "ping"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingResponse.g.cs deleted file mode 100644 index 7768d59ac25..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PingResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class PingResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptRequest.g.cs deleted file mode 100644 index dcb83136ca9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptRequest.g.cs +++ /dev/null @@ -1,295 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class PutScriptRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update a script or search template. -/// Creates or updates a stored script or search template. -/// -/// -public sealed partial class PutScriptRequest : PlainRequest -{ - public PutScriptRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - public PutScriptRequest(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context) : base(r => r.Required("id", id).Optional("context", context)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespacePutScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "put_script"; - - /// - /// - /// Period to wait for a connection to the master node. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Contains the script or search template, its parameters, and its language. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.StoredScript Script { get; set; } -} - -/// -/// -/// Create or update a script or search template. -/// Creates or updates a stored script or search template. -/// -/// -public sealed partial class PutScriptRequestDescriptor : RequestDescriptor, PutScriptRequestParameters> -{ - internal PutScriptRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context) : base(r => r.Required("id", id).Optional("context", context)) - { - } - - public PutScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespacePutScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "put_script"; - - public PutScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutScriptRequestDescriptor Context(Elastic.Clients.Elasticsearch.Serverless.Name? context) - { - RouteValues.Optional("context", context); - return Self; - } - - public PutScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.StoredScript ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.StoredScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Contains the script or search template, its parameters, and its language. - /// - /// - public PutScriptRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.StoredScript script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PutScriptRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.StoredScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PutScriptRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.StoredScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update a script or search template. -/// Creates or updates a stored script or search template. -/// -/// -public sealed partial class PutScriptRequestDescriptor : RequestDescriptor -{ - internal PutScriptRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context) : base(r => r.Required("id", id).Optional("context", context)) - { - } - - public PutScriptRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespacePutScript; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "put_script"; - - public PutScriptRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutScriptRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutScriptRequestDescriptor Context(Elastic.Clients.Elasticsearch.Serverless.Name? context) - { - RouteValues.Optional("context", context); - return Self; - } - - public PutScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.StoredScript ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.StoredScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Contains the script or search template, its parameters, and its language. - /// - /// - public PutScriptRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.StoredScript script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PutScriptRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.StoredScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PutScriptRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.StoredScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptResponse.g.cs deleted file mode 100644 index bcbe6d1caf9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/PutScriptResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class PutScriptResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs deleted file mode 100644 index 71d2929e026..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class DeleteRuleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a query rule. -/// Delete a query rule within a query ruleset. -/// -/// -public sealed partial class DeleteRuleRequest : PlainRequest -{ - public DeleteRuleRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("ruleset_id", rulesetId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesDeleteRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.delete_rule"; -} - -/// -/// -/// Delete a query rule. -/// Delete a query rule within a query ruleset. -/// -/// -public sealed partial class DeleteRuleRequestDescriptor : RequestDescriptor -{ - internal DeleteRuleRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteRuleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("ruleset_id", rulesetId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesDeleteRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.delete_rule"; - - public DeleteRuleRequestDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RouteValues.Required("rule_id", ruleId); - return Self; - } - - public DeleteRuleRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleResponse.g.cs deleted file mode 100644 index 110941115db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRuleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class DeleteRuleResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs deleted file mode 100644 index 019da9d7104..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class DeleteRulesetRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a query ruleset. -/// -/// -public sealed partial class DeleteRulesetRequest : PlainRequest -{ - public DeleteRulesetRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesDeleteRuleset; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.delete_ruleset"; -} - -/// -/// -/// Delete a query ruleset. -/// -/// -public sealed partial class DeleteRulesetRequestDescriptor : RequestDescriptor -{ - internal DeleteRulesetRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteRulesetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesDeleteRuleset; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.delete_ruleset"; - - public DeleteRulesetRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetResponse.g.cs deleted file mode 100644 index 84c27bf6567..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/DeleteRulesetResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class DeleteRulesetResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleRequest.g.cs deleted file mode 100644 index da7f6ec6cd5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class GetRuleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get a query rule. -/// Get details about a query rule within a query ruleset. -/// -/// -public sealed partial class GetRuleRequest : PlainRequest -{ - public GetRuleRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("ruleset_id", rulesetId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesGetRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.get_rule"; -} - -/// -/// -/// Get a query rule. -/// Get details about a query rule within a query ruleset. -/// -/// -public sealed partial class GetRuleRequestDescriptor : RequestDescriptor -{ - internal GetRuleRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRuleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("ruleset_id", rulesetId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesGetRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.get_rule"; - - public GetRuleRequestDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RouteValues.Required("rule_id", ruleId); - return Self; - } - - public GetRuleRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleResponse.g.cs deleted file mode 100644 index c7a1d487330..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRuleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class GetRuleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("actions")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions Actions { get; init; } - [JsonInclude, JsonPropertyName("criteria")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteria))] - public IReadOnlyCollection Criteria { get; init; } - [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; init; } - [JsonInclude, JsonPropertyName("rule_id")] - public string RuleId { get; init; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetRequest.g.cs deleted file mode 100644 index c93e6a9d245..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetRequest.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class GetRulesetRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get a query ruleset. -/// Get details about a query ruleset. -/// -/// -public sealed partial class GetRulesetRequest : PlainRequest -{ - public GetRulesetRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesGetRuleset; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.get_ruleset"; -} - -/// -/// -/// Get a query ruleset. -/// Get details about a query ruleset. -/// -/// -public sealed partial class GetRulesetRequestDescriptor : RequestDescriptor -{ - internal GetRulesetRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRulesetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesGetRuleset; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.get_ruleset"; - - public GetRulesetRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetResponse.g.cs deleted file mode 100644 index cfe4c74c1dd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/GetRulesetResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class GetRulesetResponse : ElasticsearchResponse -{ - /// - /// - /// Rules associated with the query ruleset - /// - /// - [JsonInclude, JsonPropertyName("rules")] - public IReadOnlyCollection Rules { get; init; } - - /// - /// - /// Query Ruleset unique identifier - /// - /// - [JsonInclude, JsonPropertyName("ruleset_id")] - public string RulesetId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs deleted file mode 100644 index 88e7dd052ba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class ListRulesetsRequestParameters : RequestParameters -{ - /// - /// - /// Starting offset (default: 0) - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// specifies a max number of results to get - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get all query rulesets. -/// Get summarized information about the query rulesets. -/// -/// -public sealed partial class ListRulesetsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesListRulesets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.list_rulesets"; - - /// - /// - /// Starting offset (default: 0) - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// specifies a max number of results to get - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get all query rulesets. -/// Get summarized information about the query rulesets. -/// -/// -public sealed partial class ListRulesetsRequestDescriptor : RequestDescriptor -{ - internal ListRulesetsRequestDescriptor(Action configure) => configure.Invoke(this); - - public ListRulesetsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesListRulesets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "query_rules.list_rulesets"; - - public ListRulesetsRequestDescriptor From(int? from) => Qs("from", from); - public ListRulesetsRequestDescriptor Size(int? size) => Qs("size", size); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsResponse.g.cs deleted file mode 100644 index f318fa1003c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/ListRulesetsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class ListRulesetsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("results")] - public IReadOnlyCollection Results { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleRequest.g.cs deleted file mode 100644 index 3016e2216bc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleRequest.g.cs +++ /dev/null @@ -1,242 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class PutRuleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create or update a query rule. -/// Create or update a query rule within a query ruleset. -/// -/// -public sealed partial class PutRuleRequest : PlainRequest -{ - public PutRuleRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("ruleset_id", rulesetId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesPutRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "query_rules.put_rule"; - - [JsonInclude, JsonPropertyName("actions")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions Actions { get; set; } - [JsonInclude, JsonPropertyName("criteria")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteria))] - public ICollection Criteria { get; set; } - [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType Type { get; set; } -} - -/// -/// -/// Create or update a query rule. -/// Create or update a query rule within a query ruleset. -/// -/// -public sealed partial class PutRuleRequestDescriptor : RequestDescriptor -{ - internal PutRuleRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutRuleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("ruleset_id", rulesetId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesPutRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "query_rules.put_rule"; - - public PutRuleRequestDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RouteValues.Required("rule_id", ruleId); - return Self; - } - - public PutRuleRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions ActionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActionsDescriptor ActionsDescriptor { get; set; } - private Action ActionsDescriptorAction { get; set; } - private ICollection CriteriaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor CriteriaDescriptor { get; set; } - private Action CriteriaDescriptorAction { get; set; } - private Action[] CriteriaDescriptorActions { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType TypeValue { get; set; } - - public PutRuleRequestDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions actions) - { - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsValue = actions; - return Self; - } - - public PutRuleRequestDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActionsDescriptor descriptor) - { - ActionsValue = null; - ActionsDescriptorAction = null; - ActionsDescriptor = descriptor; - return Self; - } - - public PutRuleRequestDescriptor Actions(Action configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorAction = configure; - return Self; - } - - public PutRuleRequestDescriptor Criteria(ICollection criteria) - { - CriteriaDescriptor = null; - CriteriaDescriptorAction = null; - CriteriaDescriptorActions = null; - CriteriaValue = criteria; - return Self; - } - - public PutRuleRequestDescriptor Criteria(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor descriptor) - { - CriteriaValue = null; - CriteriaDescriptorAction = null; - CriteriaDescriptorActions = null; - CriteriaDescriptor = descriptor; - return Self; - } - - public PutRuleRequestDescriptor Criteria(Action configure) - { - CriteriaValue = null; - CriteriaDescriptor = null; - CriteriaDescriptorActions = null; - CriteriaDescriptorAction = configure; - return Self; - } - - public PutRuleRequestDescriptor Criteria(params Action[] configure) - { - CriteriaValue = null; - CriteriaDescriptor = null; - CriteriaDescriptorAction = null; - CriteriaDescriptorActions = configure; - return Self; - } - - public PutRuleRequestDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - public PutRuleRequestDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsDescriptor is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsDescriptor, options); - } - else if (ActionsDescriptorAction is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActionsDescriptor(ActionsDescriptorAction), options); - } - else - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - if (CriteriaDescriptor is not null) - { - writer.WritePropertyName("criteria"); - JsonSerializer.Serialize(writer, CriteriaDescriptor, options); - } - else if (CriteriaDescriptorAction is not null) - { - writer.WritePropertyName("criteria"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor(CriteriaDescriptorAction), options); - } - else if (CriteriaDescriptorActions is not null) - { - writer.WritePropertyName("criteria"); - if (CriteriaDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in CriteriaDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor(action), options); - } - - if (CriteriaDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("criteria"); - SingleOrManySerializationHelper.Serialize(CriteriaValue, writer, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleResponse.g.cs deleted file mode 100644 index aa8c2bc922d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRuleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class PutRuleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetRequest.g.cs deleted file mode 100644 index 11e38f97478..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetRequest.g.cs +++ /dev/null @@ -1,163 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class PutRulesetRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create or update a query ruleset. -/// -/// -public sealed partial class PutRulesetRequest : PlainRequest -{ - public PutRulesetRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesPutRuleset; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "query_rules.put_ruleset"; - - [JsonInclude, JsonPropertyName("rules")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRule))] - public ICollection Rules { get; set; } -} - -/// -/// -/// Create or update a query ruleset. -/// -/// -public sealed partial class PutRulesetRequestDescriptor : RequestDescriptor -{ - internal PutRulesetRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutRulesetRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesPutRuleset; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "query_rules.put_ruleset"; - - public PutRulesetRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - private ICollection RulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleDescriptor RulesDescriptor { get; set; } - private Action RulesDescriptorAction { get; set; } - private Action[] RulesDescriptorActions { get; set; } - - public PutRulesetRequestDescriptor Rules(ICollection rules) - { - RulesDescriptor = null; - RulesDescriptorAction = null; - RulesDescriptorActions = null; - RulesValue = rules; - return Self; - } - - public PutRulesetRequestDescriptor Rules(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleDescriptor descriptor) - { - RulesValue = null; - RulesDescriptorAction = null; - RulesDescriptorActions = null; - RulesDescriptor = descriptor; - return Self; - } - - public PutRulesetRequestDescriptor Rules(Action configure) - { - RulesValue = null; - RulesDescriptor = null; - RulesDescriptorActions = null; - RulesDescriptorAction = configure; - return Self; - } - - public PutRulesetRequestDescriptor Rules(params Action[] configure) - { - RulesValue = null; - RulesDescriptor = null; - RulesDescriptorAction = null; - RulesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (RulesDescriptor is not null) - { - writer.WritePropertyName("rules"); - JsonSerializer.Serialize(writer, RulesDescriptor, options); - } - else if (RulesDescriptorAction is not null) - { - writer.WritePropertyName("rules"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleDescriptor(RulesDescriptorAction), options); - } - else if (RulesDescriptorActions is not null) - { - writer.WritePropertyName("rules"); - if (RulesDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RulesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleDescriptor(action), options); - } - - if (RulesDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("rules"); - SingleOrManySerializationHelper.Serialize(RulesValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetResponse.g.cs deleted file mode 100644 index 3500ffe97f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/PutRulesetResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class PutRulesetResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs deleted file mode 100644 index 5c77b61ebde..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs +++ /dev/null @@ -1,104 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class TestRequestParameters : RequestParameters -{ -} - -/// -/// -/// Test a query ruleset. -/// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. -/// -/// -public sealed partial class TestRequest : PlainRequest -{ - public TestRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesTest; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "query_rules.test"; - - [JsonInclude, JsonPropertyName("match_criteria")] - public IDictionary MatchCriteria { get; set; } -} - -/// -/// -/// Test a query ruleset. -/// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. -/// -/// -public sealed partial class TestRequestDescriptor : RequestDescriptor -{ - internal TestRequestDescriptor(Action configure) => configure.Invoke(this); - - public TestRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesTest; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "query_rules.test"; - - public TestRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) - { - RouteValues.Required("ruleset_id", rulesetId); - return Self; - } - - private IDictionary MatchCriteriaValue { get; set; } - - public TestRequestDescriptor MatchCriteria(Func, FluentDictionary> selector) - { - MatchCriteriaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs deleted file mode 100644 index f2999d2d408..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class TestResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("matched_rules")] - public IReadOnlyCollection MatchedRules { get; init; } - [JsonInclude, JsonPropertyName("total_matched_rules")] - public int TotalMatchedRules { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs deleted file mode 100644 index fea24846862..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalRequest.g.cs +++ /dev/null @@ -1,479 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RankEvalRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Search operation type - /// - /// - public string? SearchType { get => Q("search_type"); set => Q("search_type", value); } -} - -/// -/// -/// Evaluate ranked search results. -/// -/// -/// Evaluate the quality of ranked search results over a set of typical search queries. -/// -/// -public sealed partial class RankEvalRequest : PlainRequest -{ - public RankEvalRequest() - { - } - - public RankEvalRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceRankEval; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "rank_eval"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Whether to expand wildcard expression to concrete indices that are open, closed or both. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Search operation type - /// - /// - [JsonIgnore] - public string? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// Definition of the evaluation metric to calculate. - /// - /// - [JsonInclude, JsonPropertyName("metric")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? Metric { get; set; } - - /// - /// - /// A set of typical search requests, together with their provided ratings. - /// - /// - [JsonInclude, JsonPropertyName("requests")] - public ICollection Requests { get; set; } -} - -/// -/// -/// Evaluate ranked search results. -/// -/// -/// Evaluate the quality of ranked search results over a set of typical search queries. -/// -/// -public sealed partial class RankEvalRequestDescriptor : RequestDescriptor, RankEvalRequestParameters> -{ - internal RankEvalRequestDescriptor(Action> configure) => configure.Invoke(this); - - public RankEvalRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public RankEvalRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceRankEval; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "rank_eval"; - - public RankEvalRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public RankEvalRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public RankEvalRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public RankEvalRequestDescriptor SearchType(string? searchType) => Qs("search_type", searchType); - - public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } - private ICollection RequestsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } - private Action> RequestsDescriptorAction { get; set; } - private Action>[] RequestsDescriptorActions { get; set; } - - /// - /// - /// Definition of the evaluation metric to calculate. - /// - /// - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? metric) - { - MetricDescriptor = null; - MetricDescriptorAction = null; - MetricValue = metric; - return Self; - } - - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDescriptor descriptor) - { - MetricValue = null; - MetricDescriptorAction = null; - MetricDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Metric(Action configure) - { - MetricValue = null; - MetricDescriptor = null; - MetricDescriptorAction = configure; - return Self; - } - - /// - /// - /// A set of typical search requests, together with their provided ratings. - /// - /// - public RankEvalRequestDescriptor Requests(ICollection requests) - { - RequestsDescriptor = null; - RequestsDescriptorAction = null; - RequestsDescriptorActions = null; - RequestsValue = requests; - return Self; - } - - public RankEvalRequestDescriptor Requests(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor descriptor) - { - RequestsValue = null; - RequestsDescriptorAction = null; - RequestsDescriptorActions = null; - RequestsDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Requests(Action> configure) - { - RequestsValue = null; - RequestsDescriptor = null; - RequestsDescriptorActions = null; - RequestsDescriptorAction = configure; - return Self; - } - - public RankEvalRequestDescriptor Requests(params Action>[] configure) - { - RequestsValue = null; - RequestsDescriptor = null; - RequestsDescriptorAction = null; - RequestsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MetricDescriptor is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricDescriptor, options); - } - else if (MetricDescriptorAction is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); - } - else if (MetricValue is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricValue, options); - } - - if (RequestsDescriptor is not null) - { - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RequestsDescriptor, options); - writer.WriteEndArray(); - } - else if (RequestsDescriptorAction is not null) - { - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor(RequestsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RequestsDescriptorActions is not null) - { - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - foreach (var action in RequestsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("requests"); - JsonSerializer.Serialize(writer, RequestsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Evaluate ranked search results. -/// -/// -/// Evaluate the quality of ranked search results over a set of typical search queries. -/// -/// -public sealed partial class RankEvalRequestDescriptor : RequestDescriptor -{ - internal RankEvalRequestDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public RankEvalRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceRankEval; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "rank_eval"; - - public RankEvalRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public RankEvalRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public RankEvalRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public RankEvalRequestDescriptor SearchType(string? searchType) => Qs("search_type", searchType); - - public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } - private ICollection RequestsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } - private Action RequestsDescriptorAction { get; set; } - private Action[] RequestsDescriptorActions { get; set; } - - /// - /// - /// Definition of the evaluation metric to calculate. - /// - /// - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetric? metric) - { - MetricDescriptor = null; - MetricDescriptorAction = null; - MetricValue = metric; - return Self; - } - - public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDescriptor descriptor) - { - MetricValue = null; - MetricDescriptorAction = null; - MetricDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Metric(Action configure) - { - MetricValue = null; - MetricDescriptor = null; - MetricDescriptorAction = configure; - return Self; - } - - /// - /// - /// A set of typical search requests, together with their provided ratings. - /// - /// - public RankEvalRequestDescriptor Requests(ICollection requests) - { - RequestsDescriptor = null; - RequestsDescriptorAction = null; - RequestsDescriptorActions = null; - RequestsValue = requests; - return Self; - } - - public RankEvalRequestDescriptor Requests(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor descriptor) - { - RequestsValue = null; - RequestsDescriptorAction = null; - RequestsDescriptorActions = null; - RequestsDescriptor = descriptor; - return Self; - } - - public RankEvalRequestDescriptor Requests(Action configure) - { - RequestsValue = null; - RequestsDescriptor = null; - RequestsDescriptorActions = null; - RequestsDescriptorAction = configure; - return Self; - } - - public RankEvalRequestDescriptor Requests(params Action[] configure) - { - RequestsValue = null; - RequestsDescriptor = null; - RequestsDescriptorAction = null; - RequestsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MetricDescriptor is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricDescriptor, options); - } - else if (MetricDescriptorAction is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); - } - else if (MetricValue is not null) - { - writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, MetricValue, options); - } - - if (RequestsDescriptor is not null) - { - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RequestsDescriptor, options); - writer.WriteEndArray(); - } - else if (RequestsDescriptorAction is not null) - { - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor(RequestsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RequestsDescriptorActions is not null) - { - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - foreach (var action in RequestsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalRequestItemDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("requests"); - JsonSerializer.Serialize(writer, RequestsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalResponse.g.cs deleted file mode 100644 index 52a07698d2f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RankEvalResponse.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RankEvalResponse : ElasticsearchResponse -{ - /// - /// - /// The details section contains one entry for every query in the original requests section, keyed by the search request id - /// - /// - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyDictionary Details { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyDictionary Failures { get; init; } - - /// - /// - /// The overall evaluation quality calculated by the defined metric - /// - /// - [JsonInclude, JsonPropertyName("metric_score")] - public double MetricScore { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs deleted file mode 100644 index 2bdf65a0f2d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRequest.g.cs +++ /dev/null @@ -1,683 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ReindexRequestParameters : RequestParameters -{ - /// - /// - /// If true, the request refreshes affected shards to make this operation visible to search. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// The throttle for this request in sub-requests per second. - /// Defaults to no throttle. - /// - /// - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } - - /// - /// - /// If true, the destination must be an index alias. - /// - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// Specifies how long a consistent view of the index should be maintained for scrolled search. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// The number of slices this task should be divided into. - /// Defaults to 1 slice, meaning the task isn’t sliced into subtasks. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - - /// - /// - /// Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// If true, the request blocks until the operation is complete. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Reindex documents. -/// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. -/// -/// -public sealed partial class ReindexRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceReindex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "reindex"; - - /// - /// - /// If true, the request refreshes affected shards to make this operation visible to search. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// The throttle for this request in sub-requests per second. - /// Defaults to no throttle. - /// - /// - [JsonIgnore] - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } - - /// - /// - /// If true, the destination must be an index alias. - /// - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// Specifies how long a consistent view of the index should be maintained for scrolled search. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// The number of slices this task should be divided into. - /// Defaults to 1 slice, meaning the task isn’t sliced into subtasks. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - - /// - /// - /// Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// If true, the request blocks until the operation is complete. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// - /// Set to proceed to continue reindexing even if there are conflicts. - /// - /// - [JsonInclude, JsonPropertyName("conflicts")] - public Elastic.Clients.Elasticsearch.Serverless.Conflicts? Conflicts { get; set; } - - /// - /// - /// The destination you are copying to. - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination Dest { get; set; } - - /// - /// - /// The maximum number of documents to reindex. - /// - /// - [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; set; } - - /// - /// - /// The script to run to update the document source or metadata when reindexing. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("size")] - public long? Size { get; set; } - - /// - /// - /// The source you are copying from. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source Source { get; set; } -} - -/// -/// -/// Reindex documents. -/// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. -/// -/// -public sealed partial class ReindexRequestDescriptor : RequestDescriptor, ReindexRequestParameters> -{ - internal ReindexRequestDescriptor(Action> configure) => configure.Invoke(this); - - public ReindexRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceReindex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "reindex"; - - public ReindexRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public ReindexRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - public ReindexRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); - public ReindexRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public ReindexRequestDescriptor Slices(Elastic.Clients.Elasticsearch.Serverless.Slices? slices) => Qs("slices", slices); - public ReindexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private long? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - - /// - /// - /// Set to proceed to continue reindexing even if there are conflicts. - /// - /// - public ReindexRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// - /// The destination you are copying to. - /// - /// - public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum number of documents to reindex. - /// - /// - public ReindexRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// - /// The script to run to update the document source or metadata when reindexing. - /// - /// - public ReindexRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ReindexRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ReindexRequestDescriptor Size(long? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The source you are copying from. - /// - /// - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.DestinationDescriptor(DestDescriptorAction), options); - } - else - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Reindex documents. -/// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. -/// -/// -public sealed partial class ReindexRequestDescriptor : RequestDescriptor -{ - internal ReindexRequestDescriptor(Action configure) => configure.Invoke(this); - - public ReindexRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceReindex; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "reindex"; - - public ReindexRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public ReindexRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - public ReindexRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); - public ReindexRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public ReindexRequestDescriptor Slices(Elastic.Clients.Elasticsearch.Serverless.Slices? slices) => Qs("slices", slices); - public ReindexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private long? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - /// - /// - /// Set to proceed to continue reindexing even if there are conflicts. - /// - /// - public ReindexRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// - /// The destination you are copying to. - /// - /// - public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum number of documents to reindex. - /// - /// - public ReindexRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// - /// The script to run to update the document source or metadata when reindexing. - /// - /// - public ReindexRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ReindexRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ReindexRequestDescriptor Size(long? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The source you are copying from. - /// - /// - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public ReindexRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.DestinationDescriptor(DestDescriptorAction), options); - } - else - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexResponse.g.cs deleted file mode 100644 index b6ff9020f2f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ReindexResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("batches")] - public long? Batches { get; init; } - [JsonInclude, JsonPropertyName("created")] - public long? Created { get; init; } - [JsonInclude, JsonPropertyName("deleted")] - public long? Deleted { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - [JsonInclude, JsonPropertyName("noops")] - public long? Noops { get; init; } - [JsonInclude, JsonPropertyName("requests_per_second")] - public float? RequestsPerSecond { get; init; } - [JsonInclude, JsonPropertyName("retries")] - public Elastic.Clients.Elasticsearch.Serverless.Retries? Retries { get; init; } - [JsonInclude, JsonPropertyName("slice_id")] - public int? SliceId { get; init; } - [JsonInclude, JsonPropertyName("task")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? Task { get; init; } - [JsonInclude, JsonPropertyName("throttled_millis")] - public long? ThrottledMillis { get; init; } - [JsonInclude, JsonPropertyName("throttled_until_millis")] - public long? ThrottledUntilMillis { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool? TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long? Total { get; init; } - [JsonInclude, JsonPropertyName("updated")] - public long? Updated { get; init; } - [JsonInclude, JsonPropertyName("version_conflicts")] - public long? VersionConflicts { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleRequest.g.cs deleted file mode 100644 index 8bcfea0159a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleRequest.g.cs +++ /dev/null @@ -1,109 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ReindexRethrottleRequestParameters : RequestParameters -{ - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } -} - -/// -/// -/// Throttle a reindex operation. -/// -/// -/// Change the number of requests per second for a particular reindex operation. -/// -/// -public sealed partial class ReindexRethrottleRequest : PlainRequest -{ - public ReindexRethrottleRequest(Elastic.Clients.Elasticsearch.Serverless.Id taskId) : base(r => r.Required("task_id", taskId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceReindexRethrottle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "reindex_rethrottle"; - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - [JsonIgnore] - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } -} - -/// -/// -/// Throttle a reindex operation. -/// -/// -/// Change the number of requests per second for a particular reindex operation. -/// -/// -public sealed partial class ReindexRethrottleRequestDescriptor : RequestDescriptor -{ - internal ReindexRethrottleRequestDescriptor(Action configure) => configure.Invoke(this); - - public ReindexRethrottleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id taskId) : base(r => r.Required("task_id", taskId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceReindexRethrottle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "reindex_rethrottle"; - - public ReindexRethrottleRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - - public ReindexRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.Serverless.Id taskId) - { - RouteValues.Required("task_id", taskId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleResponse.g.cs deleted file mode 100644 index 19f4f37fe97..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ReindexRethrottleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ReindexRethrottleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateRequest.g.cs deleted file mode 100644 index 7a9a01ec4d1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateRequest.g.cs +++ /dev/null @@ -1,278 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RenderSearchTemplateRequestParameters : RequestParameters -{ -} - -/// -/// -/// Render a search template. -/// -/// -/// Render a search template as a search request body. -/// -/// -public sealed partial class RenderSearchTemplateRequest : PlainRequest -{ - public RenderSearchTemplateRequest() - { - } - - public RenderSearchTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceRenderSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "render_search_template"; - - [JsonInclude, JsonPropertyName("file")] - public string? File { get; set; } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// An inline search template. - /// Supports the same parameters as the search API's request body. - /// These parameters also support Mustache variables. - /// If no id or <templated-id> is specified, this parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string? Source { get; set; } -} - -/// -/// -/// Render a search template. -/// -/// -/// Render a search template as a search request body. -/// -/// -public sealed partial class RenderSearchTemplateRequestDescriptor : RequestDescriptor, RenderSearchTemplateRequestParameters> -{ - internal RenderSearchTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public RenderSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public RenderSearchTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceRenderSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "render_search_template"; - - public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private string? FileValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? SourceValue { get; set; } - - public RenderSearchTemplateRequestDescriptor File(string? file) - { - FileValue = file; - return Self; - } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - public RenderSearchTemplateRequestDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// An inline search template. - /// Supports the same parameters as the search API's request body. - /// These parameters also support Mustache variables. - /// If no id or <templated-id> is specified, this parameter is required. - /// - /// - public RenderSearchTemplateRequestDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FileValue)) - { - writer.WritePropertyName("file"); - writer.WriteStringValue(FileValue); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Render a search template. -/// -/// -/// Render a search template as a search request body. -/// -/// -public sealed partial class RenderSearchTemplateRequestDescriptor : RequestDescriptor -{ - internal RenderSearchTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public RenderSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id)) - { - } - - public RenderSearchTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceRenderSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "render_search_template"; - - public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - private string? FileValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? SourceValue { get; set; } - - public RenderSearchTemplateRequestDescriptor File(string? file) - { - FileValue = file; - return Self; - } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - public RenderSearchTemplateRequestDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// An inline search template. - /// Supports the same parameters as the search API's request body. - /// These parameters also support Mustache variables. - /// If no id or <templated-id> is specified, this parameter is required. - /// - /// - public RenderSearchTemplateRequestDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FileValue)) - { - writer.WritePropertyName("file"); - writer.WriteStringValue(FileValue); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateResponse.g.cs deleted file mode 100644 index 0ca6fcf6f2f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/RenderSearchTemplateResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RenderSearchTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("template_output")] - public IReadOnlyDictionary TemplateOutput { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollRequest.g.cs deleted file mode 100644 index c86812de36d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollRequest.g.cs +++ /dev/null @@ -1,178 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ScrollRequestParameters : RequestParameters -{ - /// - /// - /// If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. - /// - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } -} - -/// -/// -/// Run a scrolling search. -/// -/// -/// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). -/// -/// -/// The scroll API gets large sets of results from a single scrolling search request. -/// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. -/// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. -/// The search response returns a scroll ID in the _scroll_id response body parameter. -/// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. -/// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. -/// -/// -/// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. -/// -/// -/// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. -/// -/// -public sealed partial class ScrollRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceScroll; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "scroll"; - - /// - /// - /// If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. - /// - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Period to retain the search context for scrolling. - /// - /// - [JsonInclude, JsonPropertyName("scroll")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get; set; } - - /// - /// - /// Scroll ID of the search. - /// - /// - [JsonInclude, JsonPropertyName("scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollId ScrollId { get; set; } -} - -/// -/// -/// Run a scrolling search. -/// -/// -/// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). -/// -/// -/// The scroll API gets large sets of results from a single scrolling search request. -/// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. -/// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. -/// The search response returns a scroll ID in the _scroll_id response body parameter. -/// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. -/// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. -/// -/// -/// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. -/// -/// -/// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. -/// -/// -public sealed partial class ScrollRequestDescriptor : RequestDescriptor -{ - internal ScrollRequestDescriptor(Action configure) => configure.Invoke(this); - - public ScrollRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceScroll; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "scroll"; - - public ScrollRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - - private Elastic.Clients.Elasticsearch.Serverless.Duration? ScrollValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScrollId ScrollIdValue { get; set; } - - /// - /// - /// Period to retain the search context for scrolling. - /// - /// - public ScrollRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) - { - ScrollValue = scroll; - return Self; - } - - /// - /// - /// Scroll ID of the search. - /// - /// - public ScrollRequestDescriptor ScrollId(Elastic.Clients.Elasticsearch.Serverless.ScrollId scrollId) - { - ScrollIdValue = scrollId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScrollValue is not null) - { - writer.WritePropertyName("scroll"); - JsonSerializer.Serialize(writer, ScrollValue, options); - } - - writer.WritePropertyName("scroll_id"); - JsonSerializer.Serialize(writer, ScrollIdValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollResponse.g.cs deleted file mode 100644 index 3a5ffc51772..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ScrollResponse.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ScrollResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregations")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("_clusters")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterStatistics? Clusters { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata HitsMetadata { get; init; } - [JsonInclude, JsonPropertyName("max_score")] - public double? MaxScore { get; init; } - [JsonInclude, JsonPropertyName("num_reduce_phases")] - public long? NumReducePhases { get; init; } - [JsonInclude, JsonPropertyName("pit_id")] - public string? PitId { get; init; } - [JsonInclude, JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Profile? Profile { get; init; } - [JsonInclude, JsonPropertyName("_scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollId? ScrollId { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestDictionary? Suggest { get; init; } - [JsonInclude, JsonPropertyName("terminated_early")] - public bool? TerminatedEarly { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtRequest.g.cs deleted file mode 100644 index f66e7e1f320..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtRequest.g.cs +++ /dev/null @@ -1,1123 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchMvtRequestParameters : RequestParameters -{ -} - -/// -/// -/// Search a vector tile. -/// -/// -/// Search a vector tile for geospatial values. -/// -/// -public sealed partial class SearchMvtRequest : PlainRequest -{ - public SearchMvtRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y) : base(r => r.Required("index", indices).Required("field", field).Required("zoom", zoom).Required("x", x).Required("y", y)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchMvt; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search_mvt"; - - /// - /// - /// Sub-aggregations for the geotile_grid. - /// - /// - /// Supports the following aggregation types: - /// - /// - /// - /// - /// avg - /// - /// - /// - /// - /// cardinality - /// - /// - /// - /// - /// max - /// - /// - /// - /// - /// min - /// - /// - /// - /// - /// sum - /// - /// - /// - /// - [JsonInclude, JsonPropertyName("aggs")] - public IDictionary? Aggs { get; set; } - - /// - /// - /// Size, in pixels, of a clipping buffer outside the tile. This allows renderers - /// to avoid outline artifacts from geometries that extend past the extent of the tile. - /// - /// - [JsonInclude, JsonPropertyName("buffer")] - public int? Buffer { get; set; } - - /// - /// - /// If false, the meta layer’s feature is the bounding box of the tile. - /// If true, the meta layer’s feature is a bounding box resulting from a - /// geo_bounds aggregation. The aggregation runs on <field> values that intersect - /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting - /// bounding box may be larger than the vector tile. - /// - /// - [JsonInclude, JsonPropertyName("exact_bounds")] - public bool? ExactBounds { get; set; } - - /// - /// - /// Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. - /// - /// - [JsonInclude, JsonPropertyName("extent")] - public int? Extent { get; set; } - - /// - /// - /// Fields to return in the hits layer. Supports wildcards (*). - /// This parameter does not support fields with array values. Fields with array - /// values may return inconsistent results. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// Aggregation used to create a grid for the field. - /// - /// - [JsonInclude, JsonPropertyName("grid_agg")] - public Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridAggregationType? GridAgg { get; set; } - - /// - /// - /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 - /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results - /// don’t include the aggs layer. - /// - /// - [JsonInclude, JsonPropertyName("grid_precision")] - public int? GridPrecision { get; set; } - - /// - /// - /// Determines the geometry type for features in the aggs layer. In the aggs layer, - /// each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon - /// of the cells bounding box. If 'point' each feature is a Point that is the centroid - /// of the cell. - /// - /// - [JsonInclude, JsonPropertyName("grid_type")] - public Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridType? GridType { get; set; } - - /// - /// - /// Query DSL used to filter documents for the search. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Maximum number of features to return in the hits layer. Accepts 0-10000. - /// If 0, results don’t include the hits layer. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Sorts features in the hits layer. By default, the API calculates a bounding - /// box for each feature. It sorts features based on this box’s diagonal length, - /// from longest to shortest. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact number - /// of hits is returned at the cost of some performance. If false, the response does - /// not include the total number of hits matching the query. - /// - /// - [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } - - /// - /// - /// If true, the hits and aggs layers will contain additional point features representing - /// suggested label positions for the original features. - /// - /// - [JsonInclude, JsonPropertyName("with_labels")] - public bool? WithLabels { get; set; } -} - -/// -/// -/// Search a vector tile. -/// -/// -/// Search a vector tile for geospatial values. -/// -/// -public sealed partial class SearchMvtRequestDescriptor : RequestDescriptor, SearchMvtRequestParameters> -{ - internal SearchMvtRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SearchMvtRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y) : base(r => r.Required("index", indices).Required("field", field).Required("zoom", zoom).Required("x", x).Required("y", y)) - { - } - - public SearchMvtRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y) : this(typeof(TDocument), field, zoom, x, y) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchMvt; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search_mvt"; - - public SearchMvtRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - RouteValues.Required("field", field); - return Self; - } - - public SearchMvtRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - public SearchMvtRequestDescriptor x(int x) - { - RouteValues.Required("x", x); - return Self; - } - - public SearchMvtRequestDescriptor y(int y) - { - RouteValues.Required("y", y); - return Self; - } - - public SearchMvtRequestDescriptor Zoom(int zoom) - { - RouteValues.Required("zoom", zoom); - return Self; - } - - private IDictionary> AggsValue { get; set; } - private int? BufferValue { get; set; } - private bool? ExactBoundsValue { get; set; } - private int? ExtentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridAggregationType? GridAggValue { get; set; } - private int? GridPrecisionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridType? GridTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? WithLabelsValue { get; set; } - - /// - /// - /// Sub-aggregations for the geotile_grid. - /// - /// - /// Supports the following aggregation types: - /// - /// - /// - /// - /// avg - /// - /// - /// - /// - /// cardinality - /// - /// - /// - /// - /// max - /// - /// - /// - /// - /// min - /// - /// - /// - /// - /// sum - /// - /// - /// - /// - public SearchMvtRequestDescriptor Aggs(Func>, FluentDescriptorDictionary>> selector) - { - AggsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Size, in pixels, of a clipping buffer outside the tile. This allows renderers - /// to avoid outline artifacts from geometries that extend past the extent of the tile. - /// - /// - public SearchMvtRequestDescriptor Buffer(int? buffer) - { - BufferValue = buffer; - return Self; - } - - /// - /// - /// If false, the meta layer’s feature is the bounding box of the tile. - /// If true, the meta layer’s feature is a bounding box resulting from a - /// geo_bounds aggregation. The aggregation runs on <field> values that intersect - /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting - /// bounding box may be larger than the vector tile. - /// - /// - public SearchMvtRequestDescriptor ExactBounds(bool? exactBounds = true) - { - ExactBoundsValue = exactBounds; - return Self; - } - - /// - /// - /// Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. - /// - /// - public SearchMvtRequestDescriptor Extent(int? extent) - { - ExtentValue = extent; - return Self; - } - - /// - /// - /// Fields to return in the hits layer. Supports wildcards (*). - /// This parameter does not support fields with array values. Fields with array - /// values may return inconsistent results. - /// - /// - public SearchMvtRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Aggregation used to create a grid for the field. - /// - /// - public SearchMvtRequestDescriptor GridAgg(Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridAggregationType? gridAgg) - { - GridAggValue = gridAgg; - return Self; - } - - /// - /// - /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 - /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results - /// don’t include the aggs layer. - /// - /// - public SearchMvtRequestDescriptor GridPrecision(int? gridPrecision) - { - GridPrecisionValue = gridPrecision; - return Self; - } - - /// - /// - /// Determines the geometry type for features in the aggs layer. In the aggs layer, - /// each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon - /// of the cells bounding box. If 'point' each feature is a Point that is the centroid - /// of the cell. - /// - /// - public SearchMvtRequestDescriptor GridType(Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridType? gridType) - { - GridTypeValue = gridType; - return Self; - } - - /// - /// - /// Query DSL used to filter documents for the search. - /// - /// - public SearchMvtRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SearchMvtRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SearchMvtRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public SearchMvtRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Maximum number of features to return in the hits layer. Accepts 0-10000. - /// If 0, results don’t include the hits layer. - /// - /// - public SearchMvtRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Sorts features in the hits layer. By default, the API calculates a bounding - /// box for each feature. It sorts features based on this box’s diagonal length, - /// from longest to shortest. - /// - /// - public SearchMvtRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SearchMvtRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SearchMvtRequestDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SearchMvtRequestDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact number - /// of hits is returned at the cost of some performance. If false, the response does - /// not include the total number of hits matching the query. - /// - /// - public SearchMvtRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, the hits and aggs layers will contain additional point features representing - /// suggested label positions for the original features. - /// - /// - public SearchMvtRequestDescriptor WithLabels(bool? withLabels = true) - { - WithLabelsValue = withLabels; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggsValue is not null) - { - writer.WritePropertyName("aggs"); - JsonSerializer.Serialize(writer, AggsValue, options); - } - - if (BufferValue.HasValue) - { - writer.WritePropertyName("buffer"); - writer.WriteNumberValue(BufferValue.Value); - } - - if (ExactBoundsValue.HasValue) - { - writer.WritePropertyName("exact_bounds"); - writer.WriteBooleanValue(ExactBoundsValue.Value); - } - - if (ExtentValue.HasValue) - { - writer.WritePropertyName("extent"); - writer.WriteNumberValue(ExtentValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (GridAggValue is not null) - { - writer.WritePropertyName("grid_agg"); - JsonSerializer.Serialize(writer, GridAggValue, options); - } - - if (GridPrecisionValue.HasValue) - { - writer.WritePropertyName("grid_precision"); - writer.WriteNumberValue(GridPrecisionValue.Value); - } - - if (GridTypeValue is not null) - { - writer.WritePropertyName("grid_type"); - JsonSerializer.Serialize(writer, GridTypeValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (WithLabelsValue.HasValue) - { - writer.WritePropertyName("with_labels"); - writer.WriteBooleanValue(WithLabelsValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Search a vector tile. -/// -/// -/// Search a vector tile for geospatial values. -/// -/// -public sealed partial class SearchMvtRequestDescriptor : RequestDescriptor -{ - internal SearchMvtRequestDescriptor(Action configure) => configure.Invoke(this); - - public SearchMvtRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y) : base(r => r.Required("index", indices).Required("field", field).Required("zoom", zoom).Required("x", x).Required("y", y)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchMvt; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search_mvt"; - - public SearchMvtRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - RouteValues.Required("field", field); - return Self; - } - - public SearchMvtRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - public SearchMvtRequestDescriptor x(int x) - { - RouteValues.Required("x", x); - return Self; - } - - public SearchMvtRequestDescriptor y(int y) - { - RouteValues.Required("y", y); - return Self; - } - - public SearchMvtRequestDescriptor Zoom(int zoom) - { - RouteValues.Required("zoom", zoom); - return Self; - } - - private IDictionary AggsValue { get; set; } - private int? BufferValue { get; set; } - private bool? ExactBoundsValue { get; set; } - private int? ExtentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridAggregationType? GridAggValue { get; set; } - private int? GridPrecisionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridType? GridTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? WithLabelsValue { get; set; } - - /// - /// - /// Sub-aggregations for the geotile_grid. - /// - /// - /// Supports the following aggregation types: - /// - /// - /// - /// - /// avg - /// - /// - /// - /// - /// cardinality - /// - /// - /// - /// - /// max - /// - /// - /// - /// - /// min - /// - /// - /// - /// - /// sum - /// - /// - /// - /// - public SearchMvtRequestDescriptor Aggs(Func, FluentDescriptorDictionary> selector) - { - AggsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Size, in pixels, of a clipping buffer outside the tile. This allows renderers - /// to avoid outline artifacts from geometries that extend past the extent of the tile. - /// - /// - public SearchMvtRequestDescriptor Buffer(int? buffer) - { - BufferValue = buffer; - return Self; - } - - /// - /// - /// If false, the meta layer’s feature is the bounding box of the tile. - /// If true, the meta layer’s feature is a bounding box resulting from a - /// geo_bounds aggregation. The aggregation runs on <field> values that intersect - /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting - /// bounding box may be larger than the vector tile. - /// - /// - public SearchMvtRequestDescriptor ExactBounds(bool? exactBounds = true) - { - ExactBoundsValue = exactBounds; - return Self; - } - - /// - /// - /// Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. - /// - /// - public SearchMvtRequestDescriptor Extent(int? extent) - { - ExtentValue = extent; - return Self; - } - - /// - /// - /// Fields to return in the hits layer. Supports wildcards (*). - /// This parameter does not support fields with array values. Fields with array - /// values may return inconsistent results. - /// - /// - public SearchMvtRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Aggregation used to create a grid for the field. - /// - /// - public SearchMvtRequestDescriptor GridAgg(Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridAggregationType? gridAgg) - { - GridAggValue = gridAgg; - return Self; - } - - /// - /// - /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 - /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results - /// don’t include the aggs layer. - /// - /// - public SearchMvtRequestDescriptor GridPrecision(int? gridPrecision) - { - GridPrecisionValue = gridPrecision; - return Self; - } - - /// - /// - /// Determines the geometry type for features in the aggs layer. In the aggs layer, - /// each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon - /// of the cells bounding box. If 'point' each feature is a Point that is the centroid - /// of the cell. - /// - /// - public SearchMvtRequestDescriptor GridType(Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt.GridType? gridType) - { - GridTypeValue = gridType; - return Self; - } - - /// - /// - /// Query DSL used to filter documents for the search. - /// - /// - public SearchMvtRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SearchMvtRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SearchMvtRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public SearchMvtRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Maximum number of features to return in the hits layer. Accepts 0-10000. - /// If 0, results don’t include the hits layer. - /// - /// - public SearchMvtRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Sorts features in the hits layer. By default, the API calculates a bounding - /// box for each feature. It sorts features based on this box’s diagonal length, - /// from longest to shortest. - /// - /// - public SearchMvtRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SearchMvtRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SearchMvtRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SearchMvtRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact number - /// of hits is returned at the cost of some performance. If false, the response does - /// not include the total number of hits matching the query. - /// - /// - public SearchMvtRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, the hits and aggs layers will contain additional point features representing - /// suggested label positions for the original features. - /// - /// - public SearchMvtRequestDescriptor WithLabels(bool? withLabels = true) - { - WithLabelsValue = withLabels; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggsValue is not null) - { - writer.WritePropertyName("aggs"); - JsonSerializer.Serialize(writer, AggsValue, options); - } - - if (BufferValue.HasValue) - { - writer.WritePropertyName("buffer"); - writer.WriteNumberValue(BufferValue.Value); - } - - if (ExactBoundsValue.HasValue) - { - writer.WritePropertyName("exact_bounds"); - writer.WriteBooleanValue(ExactBoundsValue.Value); - } - - if (ExtentValue.HasValue) - { - writer.WritePropertyName("extent"); - writer.WriteNumberValue(ExtentValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (GridAggValue is not null) - { - writer.WritePropertyName("grid_agg"); - JsonSerializer.Serialize(writer, GridAggValue, options); - } - - if (GridPrecisionValue.HasValue) - { - writer.WritePropertyName("grid_precision"); - writer.WriteNumberValue(GridPrecisionValue.Value); - } - - if (GridTypeValue is not null) - { - writer.WritePropertyName("grid_type"); - JsonSerializer.Serialize(writer, GridTypeValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (WithLabelsValue.HasValue) - { - writer.WritePropertyName("with_labels"); - writer.WriteBooleanValue(WithLabelsValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtResponse.g.cs deleted file mode 100644 index 440b5b72c18..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchMvtResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs deleted file mode 100644 index d7dfb6182ad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs +++ /dev/null @@ -1,3714 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. - /// - /// - public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); } - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The number of shard results that should be reduced at once on the coordinating node. - /// This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. - /// - /// - public long? BatchedReduceSize { get => Q("batched_reduce_size"); set => Q("batched_reduce_size", value); } - - /// - /// - /// If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. - /// - /// - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, concrete, expanded or aliased indices will be ignored when frozen. - /// - /// - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Defines the number of concurrent shard requests per node this search executes concurrently. - /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. - /// - /// - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - - /// - /// - /// Nodes and shards used for the search. - /// By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: - /// _only_local to run the search only on shards on the local node; - /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; - /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; - /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; - /// _shards:<shard>,<shard> to run the search only on the specified shards; - /// <custom-string> (any string that does not start with _) to route searches with the same <custom-string> to the same shards in the same order. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. - /// This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). - /// When unspecified, the pre-filter phase is executed if any of these conditions is met: - /// the request targets more than 128 shards; - /// the request targets one or more read-only index; - /// the primary sort of the query targets an indexed field. - /// - /// - public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } - - /// - /// - /// Query in the Lucene query string syntax using query parameter search. - /// Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, the caching of search results is enabled for requests where size is 0. - /// Defaults to index level settings. - /// - /// - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// Indicates whether hits.total should be rendered as an integer or an object in the rest search response. - /// - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to retain the search context for scrolling. See Scroll search results. - /// By default, this value cannot exceed 1d (24 hours). - /// You can change this limit using the search.max_keep_alive cluster-level setting. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// How distributed term frequencies are calculated for relevance scoring. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter. - /// If the _source parameter is false, this parameter is ignored. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// If this parameter is specified, only these source fields are returned. - /// You can exclude fields from this subset using the _source_excludes query parameter. - /// If the _source parameter is false, this parameter is ignored. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Specifies which field to use for suggestions. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } - - /// - /// - /// Specifies the suggest mode. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } - - /// - /// - /// Number of suggestions to return. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. - /// - /// - public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } - - /// - /// - /// The source text for which the suggestions should be returned. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. - /// - /// - public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } - - /// - /// - /// If true, aggregation and suggester names are be prefixed by their respective types in the response. - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } -} - -internal sealed partial class SearchRequestConverter : JsonConverter -{ - public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new SearchRequest(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "collapse") - { - variant.Collapse = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "explain") - { - variant.Explain = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ext") - { - variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "fields") - { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "from") - { - variant.From = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "highlight") - { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices_boost") - { - variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); - continue; - } - - if (property == "knn") - { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "min_score") - { - variant.MinScore = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "post_filter") - { - variant.PostFilter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "profile") - { - variant.Profile = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rescore") - { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "retriever") - { - variant.Retriever = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "search_after") - { - variant.SearchAfter = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "size") - { - variant.Size = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "slice") - { - variant.Slice = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "sort") - { - variant.Sort = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "_source") - { - variant.Source = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stats") - { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - variant.StoredFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "suggest") - { - variant.Suggest = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "terminate_after") - { - variant.TerminateAfter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "timeout") - { - variant.Timeout = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "track_scores") - { - variant.TrackScores = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "track_total_hits") - { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.Collapse is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, value.Collapse, options); - } - - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - - if (value.Explain.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(value.Explain.Value); - } - - if (value.Ext is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, value.Ext, options); - } - - if (value.Fields is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); - } - - if (value.From.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(value.From.Value); - } - - if (value.Highlight is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, value.Highlight, options); - } - - if (value.IndicesBoost is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, value.IndicesBoost, options); - } - - if (value.Knn is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, value.Knn, options); - } - - if (value.MinScore.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(value.MinScore.Value); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.PostFilter is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, value.PostFilter, options); - } - - if (value.Profile.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(value.Profile.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.Rescore is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, value.Rescore, options); - } - - if (value.Retriever is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, value.Retriever, options); - } - - if (value.RuntimeMappings is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); - } - - if (value.ScriptFields is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, value.ScriptFields, options); - } - - if (value.SearchAfter is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, value.SearchAfter, options); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.Size.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(value.Size.Value); - } - - if (value.Slice is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, value.Slice, options); - } - - if (value.Sort is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, value.Sort, options); - } - - if (value.Source is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, value.Source, options); - } - - if (value.Stats is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - new FieldsConverter().Write(writer, value.StoredFields, options); - } - - if (value.Suggest is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, value.Suggest, options); - } - - if (value.TerminateAfter.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(value.TerminateAfter.Value); - } - - if (!string.IsNullOrEmpty(value.Timeout)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(value.Timeout); - } - - if (value.TrackScores.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(value.TrackScores.Value); - } - - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Run a search. -/// -/// -/// Get search hits that match the query defined in the request. -/// You can provide search queries using the q query string parameter or the request body. -/// If both are specified, only the query parameter is used. -/// -/// -[JsonConverter(typeof(SearchRequestConverter))] -public partial class SearchRequest : PlainRequest -{ - public SearchRequest() - { - } - - public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. - /// - /// - [JsonIgnore] - public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", value); } - - /// - /// - /// Analyzer to use for the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The number of shard results that should be reduced at once on the coordinating node. - /// This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. - /// - /// - [JsonIgnore] - public long? BatchedReduceSize { get => Q("batched_reduce_size"); set => Q("batched_reduce_size", value); } - - /// - /// - /// If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. - /// - /// - [JsonIgnore] - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, concrete, expanded or aliased indices will be ignored when frozen. - /// - /// - [JsonIgnore] - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// This parameter can only be used when the q query string parameter is specified. - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// Defines the number of concurrent shard requests per node this search executes concurrently. - /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. - /// - /// - [JsonIgnore] - public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } - - /// - /// - /// Nodes and shards used for the search. - /// By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: - /// _only_local to run the search only on shards on the local node; - /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; - /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; - /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; - /// _shards:<shard>,<shard> to run the search only on the specified shards; - /// <custom-string> (any string that does not start with _) to route searches with the same <custom-string> to the same shards in the same order. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. - /// This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). - /// When unspecified, the pre-filter phase is executed if any of these conditions is met: - /// the request targets more than 128 shards; - /// the request targets one or more read-only index; - /// the primary sort of the query targets an indexed field. - /// - /// - [JsonIgnore] - public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } - - /// - /// - /// Query in the Lucene query string syntax using query parameter search. - /// Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, the caching of search results is enabled for requests where size is 0. - /// Defaults to index level settings. - /// - /// - [JsonIgnore] - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// Indicates whether hits.total should be rendered as an integer or an object in the rest search response. - /// - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to retain the search context for scrolling. See Scroll search results. - /// By default, this value cannot exceed 1d (24 hours). - /// You can change this limit using the search.max_keep_alive cluster-level setting. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// How distributed term frequencies are calculated for relevance scoring. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// A comma-separated list of source fields to exclude from the response. - /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter. - /// If the _source parameter is false, this parameter is ignored. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// A comma-separated list of source fields to include in the response. - /// If this parameter is specified, only these source fields are returned. - /// You can exclude fields from this subset using the _source_excludes query parameter. - /// If the _source parameter is false, this parameter is ignored. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Specifies which field to use for suggestions. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } - - /// - /// - /// Specifies the suggest mode. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } - - /// - /// - /// Number of suggestions to return. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. - /// - /// - [JsonIgnore] - public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } - - /// - /// - /// The source text for which the suggestions should be returned. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. - /// - /// - [JsonIgnore] - public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } - - /// - /// - /// If true, aggregation and suggester names are be prefixed by their respective types in the response. - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - - /// - /// - /// Collapses search results the values of the specified field. - /// - /// - [JsonInclude, JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. - /// - /// - [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; set; } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - [JsonInclude, JsonPropertyName("ext")] - public IDictionary? Ext { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } - - /// - /// - /// Starting document offset. - /// Needs to be non-negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// - [JsonInclude, JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - [JsonInclude, JsonPropertyName("indices_boost")] - public ICollection>? IndicesBoost { get; set; } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - [JsonInclude, JsonPropertyName("knn")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnSearch))] - public ICollection? Knn { get; set; } - - /// - /// - /// Minimum _score for matching documents. - /// Documents with a lower _score are not included in the search results. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public double? MinScore { get; set; } - - /// - /// - /// Limits the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. - /// - /// - [JsonInclude, JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } - - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// - [JsonInclude, JsonPropertyName("post_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilter { get; set; } - - /// - /// - /// Set to true to return detailed timing information about the execution of individual components in a search request. - /// NOTE: This is a debugging tool and adds significant overhead to search execution. - /// - /// - [JsonInclude, JsonPropertyName("profile")] - public bool? Profile { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// - [JsonInclude, JsonPropertyName("rescore")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))] - public ICollection? Rescore { get; set; } - - /// - /// - /// A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - [JsonInclude, JsonPropertyName("retriever")] - public Elastic.Clients.Elasticsearch.Serverless.Retriever? Retriever { get; set; } - - /// - /// - /// Defines one or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - [JsonInclude, JsonPropertyName("script_fields")] - public IDictionary? ScriptFields { get; set; } - - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// - [JsonInclude, JsonPropertyName("search_after")] - public ICollection? SearchAfter { get; set; } - - /// - /// - /// If true, returns sequence number and primary term of the last modification of each hit. - /// - /// - [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. - /// - /// - [JsonInclude, JsonPropertyName("slice")] - public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - /// - /// - /// Indicates which source fields are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - - /// - /// - /// Stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. - /// - /// - [JsonInclude, JsonPropertyName("stats")] - public ICollection? Stats { get; set; } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. - /// - /// - [JsonInclude, JsonPropertyName("stored_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? Suggest { get; set; } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// If set to 0 (default), the query does not terminate early. - /// - /// - [JsonInclude, JsonPropertyName("terminate_after")] - public long? TerminateAfter { get; set; } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public string? Timeout { get; set; } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - [JsonInclude, JsonPropertyName("track_scores")] - public bool? TrackScores { get; set; } - - /// - /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. - /// - /// - [JsonInclude, JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } -} - -/// -/// -/// Run a search. -/// -/// -/// Get search hits that match the query defined in the request. -/// You can provide search queries using the q query string parameter or the request body. -/// If both are specified, only the query parameter is used. -/// -/// -public sealed partial class SearchRequestDescriptor : RequestDescriptor, SearchRequestParameters> -{ - internal SearchRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SearchRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search"; - - public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public SearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); - public SearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public SearchRequestDescriptor Df(string? df) => Qs("df", df); - public SearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public SearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); - public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); - public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public SearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public SearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public SearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public SearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public SearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public SearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); - public SearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); - public SearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); - public SearchRequestDescriptor SuggestText(string? suggestText) => Qs("suggest_text", suggestText); - public SearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private IDictionary> AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action> DocvalueFieldsDescriptorAction { get; set; } - private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action> FieldsDescriptorAction { get; set; } - private Action>[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } - private Action> PostFilterDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? RescoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action> RescoreDescriptorAction { get; set; } - private Action>[] RescoreDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Retriever? RetrieverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } - private Action> RetrieverDescriptorAction { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action> SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private ICollection? StatsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action> SuggestDescriptorAction { get; set; } - private long? TerminateAfterValue { get; set; } - private string? TimeoutValue { get; set; } - private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? VersionValue { get; set; } - - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// - public SearchRequestDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Collapses search results the values of the specified field. - /// - /// - public SearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public SearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Collapse(Action> configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. - /// - /// - public SearchRequestDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public SearchRequestDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor DocvalueFields(Action> configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor DocvalueFields(params Action>[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public SearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. - /// - /// - public SearchRequestDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public SearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Fields(Action> configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Fields(params Action>[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. - /// Needs to be non-negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public SearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// - public SearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public SearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Highlight(Action> configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public SearchRequestDescriptor Knn(ICollection? knn) - { - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnValue = knn; - return Self; - } - - public SearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) - { - KnnValue = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Knn(Action> configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorActions = null; - KnnDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Knn(params Action>[] configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. - /// Documents with a lower _score are not included in the search results. - /// - /// - public SearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Limits the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. - /// - /// - public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// - public SearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public SearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor PostFilter(Action> configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Set to true to return detailed timing information about the execution of individual components in a search request. - /// NOTE: This is a debugging tool and adds significant overhead to search execution. - /// - /// - public SearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public SearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// - public SearchRequestDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public SearchRequestDescriptor Rescore(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Rescore(Action> configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Rescore(params Action>[] configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; - return Self; - } - - /// - /// - /// A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever? retriever) - { - RetrieverDescriptor = null; - RetrieverDescriptorAction = null; - RetrieverValue = retriever; - return Self; - } - - public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieverValue = null; - RetrieverDescriptorAction = null; - RetrieverDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Retriever(Action> configure) - { - RetrieverValue = null; - RetrieverDescriptor = null; - RetrieverDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. - /// - /// - public SearchRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public SearchRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// - public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification of each hit. - /// - /// - public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public SearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Slice(Action> configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public SearchRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SearchRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Indicates which source fields are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// - /// - public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. - /// - /// - public SearchRequestDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. - /// - /// - public SearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// - public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Suggest(Action> configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// If set to 0 (default), the query does not terminate early. - /// - /// - public SearchRequestDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public SearchRequestDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public SearchRequestDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. - /// - /// - public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public SearchRequestDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (KnnDescriptor is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, KnnDescriptor, options); - } - else if (KnnDescriptorAction is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); - } - else if (KnnDescriptorActions is not null) - { - writer.WritePropertyName("knn"); - if (KnnDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in KnnDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); - } - - if (KnnDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (KnnValue is not null) - { - writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (PostFilterDescriptor is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); - } - else if (PostFilterDescriptorAction is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PostFilterDescriptorAction), options); - } - else if (PostFilterValue is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RescoreDescriptor is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, RescoreDescriptor, options); - } - else if (RescoreDescriptorAction is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); - } - else if (RescoreDescriptorActions is not null) - { - writer.WritePropertyName("rescore"); - if (RescoreDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RescoreDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(action), options); - } - - if (RescoreDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (RescoreValue is not null) - { - writer.WritePropertyName("rescore"); - SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); - } - - if (RetrieverDescriptor is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverDescriptor, options); - } - else if (RetrieverDescriptorAction is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); - } - else if (RetrieverValue is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (SuggestDescriptor is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestDescriptor, options); - } - else if (SuggestDescriptorAction is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); - } - else if (SuggestValue is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestValue, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - if (!string.IsNullOrEmpty(TimeoutValue)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(TimeoutValue); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Run a search. -/// -/// -/// Get search hits that match the query defined in the request. -/// You can provide search queries using the q query string parameter or the request body. -/// If both are specified, only the query parameter is used. -/// -/// -public sealed partial class SearchRequestDescriptor : RequestDescriptor -{ - internal SearchRequestDescriptor(Action configure) => configure.Invoke(this); - - public SearchRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SearchRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearch; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search"; - - public SearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults); - public SearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public SearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public SearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize); - public SearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public SearchRequestDescriptor Df(string? df) => Qs("df", df); - public SearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public SearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); - public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); - public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public SearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public SearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public SearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public SearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public SearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public SearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public SearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public SearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField); - public SearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode); - public SearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize); - public SearchRequestDescriptor SuggestText(string? suggestText) => Qs("suggest_text", suggestText); - public SearchRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private IDictionary AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action DocvalueFieldsDescriptorAction { get; set; } - private Action[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action FieldsDescriptorAction { get; set; } - private Action[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } - private Action PostFilterDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? RescoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action RescoreDescriptorAction { get; set; } - private Action[] RescoreDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Retriever? RetrieverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } - private Action RetrieverDescriptorAction { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private ICollection? StatsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } - private long? TerminateAfterValue { get; set; } - private string? TimeoutValue { get; set; } - private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? VersionValue { get; set; } - - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// - public SearchRequestDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Collapses search results the values of the specified field. - /// - /// - public SearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public SearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Collapse(Action configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. - /// - /// - public SearchRequestDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public SearchRequestDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor DocvalueFields(Action configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor DocvalueFields(params Action[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public SearchRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public SearchRequestDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. - /// - /// - public SearchRequestDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public SearchRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Fields(Action configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Fields(params Action[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. - /// Needs to be non-negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public SearchRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// - public SearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public SearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public SearchRequestDescriptor Knn(ICollection? knn) - { - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnValue = knn; - return Self; - } - - public SearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) - { - KnnValue = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Knn(Action configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorActions = null; - KnnDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Knn(params Action[] configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. - /// Documents with a lower _score are not included in the search results. - /// - /// - public SearchRequestDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Limits the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. - /// - /// - public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// - public SearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public SearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor PostFilter(Action configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Set to true to return detailed timing information about the execution of individual components in a search request. - /// NOTE: This is a debugging tool and adds significant overhead to search execution. - /// - /// - public SearchRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public SearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// - public SearchRequestDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public SearchRequestDescriptor Rescore(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Rescore(Action configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Rescore(params Action[] configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; - return Self; - } - - /// - /// - /// A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever? retriever) - { - RetrieverDescriptor = null; - RetrieverDescriptorAction = null; - RetrieverValue = retriever; - return Self; - } - - public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieverValue = null; - RetrieverDescriptorAction = null; - RetrieverDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Retriever(Action configure) - { - RetrieverValue = null; - RetrieverDescriptor = null; - RetrieverDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. - /// - /// - public SearchRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public SearchRequestDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// - public SearchRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification of each hit. - /// - /// - public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public SearchRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public SearchRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SearchRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SearchRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Indicates which source fields are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// - /// - public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. - /// - /// - public SearchRequestDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// - /// List of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source parameter defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. - /// - /// - public SearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// - public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public SearchRequestDescriptor Suggest(Action configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// If set to 0 (default), the query does not terminate early. - /// - /// - public SearchRequestDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public SearchRequestDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public SearchRequestDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. - /// - /// - public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public SearchRequestDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (KnnDescriptor is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, KnnDescriptor, options); - } - else if (KnnDescriptorAction is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); - } - else if (KnnDescriptorActions is not null) - { - writer.WritePropertyName("knn"); - if (KnnDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in KnnDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); - } - - if (KnnDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (KnnValue is not null) - { - writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (PostFilterDescriptor is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); - } - else if (PostFilterDescriptorAction is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PostFilterDescriptorAction), options); - } - else if (PostFilterValue is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RescoreDescriptor is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, RescoreDescriptor, options); - } - else if (RescoreDescriptorAction is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); - } - else if (RescoreDescriptorActions is not null) - { - writer.WritePropertyName("rescore"); - if (RescoreDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RescoreDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(action), options); - } - - if (RescoreDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (RescoreValue is not null) - { - writer.WritePropertyName("rescore"); - SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); - } - - if (RetrieverDescriptor is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverDescriptor, options); - } - else if (RetrieverDescriptorAction is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); - } - else if (RetrieverValue is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (SuggestDescriptor is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestDescriptor, options); - } - else if (SuggestDescriptorAction is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); - } - else if (SuggestValue is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestValue, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - if (!string.IsNullOrEmpty(TimeoutValue)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(TimeoutValue); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchResponse.g.cs deleted file mode 100644 index 151530f6fec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchResponse.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregations")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("_clusters")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterStatistics? Clusters { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata HitsMetadata { get; init; } - [JsonInclude, JsonPropertyName("max_score")] - public double? MaxScore { get; init; } - [JsonInclude, JsonPropertyName("num_reduce_phases")] - public long? NumReducePhases { get; init; } - [JsonInclude, JsonPropertyName("pit_id")] - public string? PitId { get; init; } - [JsonInclude, JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Profile? Profile { get; init; } - [JsonInclude, JsonPropertyName("_scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollId? ScrollId { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestDictionary? Suggest { get; init; } - [JsonInclude, JsonPropertyName("terminated_early")] - public bool? TerminatedEarly { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs deleted file mode 100644 index 3a37210a636..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateRequest.g.cs +++ /dev/null @@ -1,574 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchTemplateRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, network round-trips are minimized for cross-cluster search requests. - /// - /// - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, specified concrete, expanded, or aliased indices are not included in the response when throttled. - /// - /// - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, hits.total are rendered as an integer in the response. - /// - /// - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Specifies how long a consistent view of the index - /// should be maintained for scrolled search. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// The type of the search operation. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// If true, the response prefixes aggregation and suggester names with their respective types. - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } -} - -/// -/// -/// Run a search with a search template. -/// -/// -public sealed partial class SearchTemplateRequest : PlainRequest -{ - public SearchTemplateRequest() - { - } - - public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search_template"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// If true, network round-trips are minimized for cross-cluster search requests. - /// - /// - [JsonIgnore] - public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// If true, specified concrete, expanded, or aliased indices are not included in the response when throttled. - /// - /// - [JsonIgnore] - public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, hits.total are rendered as an integer in the response. - /// - /// - [JsonIgnore] - public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Specifies how long a consistent view of the index - /// should be maintained for scrolled search. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// The type of the search operation. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// If true, the response prefixes aggregation and suggester names with their respective types. - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// If true, returns detailed information about score calculation as part of each hit. - /// - /// - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; set; } - - /// - /// - /// ID of the search template to use. If no source is specified, - /// this parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// If true, the query execution is profiled. - /// - /// - [JsonInclude, JsonPropertyName("profile")] - public bool? Profile { get; set; } - - /// - /// - /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this - /// parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string? Source { get; set; } -} - -/// -/// -/// Run a search with a search template. -/// -/// -public sealed partial class SearchTemplateRequestDescriptor : RequestDescriptor, SearchTemplateRequestParameters> -{ - internal SearchTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SearchTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search_template"; - - public SearchTemplateRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public SearchTemplateRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SearchTemplateRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public SearchTemplateRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SearchTemplateRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public SearchTemplateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public SearchTemplateRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public SearchTemplateRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public SearchTemplateRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public SearchTemplateRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private bool? ProfileValue { get; set; } - private string? SourceValue { get; set; } - - /// - /// - /// If true, returns detailed information about score calculation as part of each hit. - /// - /// - public SearchTemplateRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// ID of the search template to use. If no source is specified, - /// this parameter is required. - /// - /// - public SearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - public SearchTemplateRequestDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// If true, the query execution is profiled. - /// - /// - public SearchTemplateRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this - /// parameter is required. - /// - /// - public SearchTemplateRequestDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Run a search with a search template. -/// -/// -public sealed partial class SearchTemplateRequestDescriptor : RequestDescriptor -{ - internal SearchTemplateRequestDescriptor(Action configure) => configure.Invoke(this); - - public SearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) : base(r => r.Optional("index", indices)) - { - } - - public SearchTemplateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceSearchTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "search_template"; - - public SearchTemplateRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public SearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); - public SearchTemplateRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SearchTemplateRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); - public SearchTemplateRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SearchTemplateRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public SearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); - public SearchTemplateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public SearchTemplateRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public SearchTemplateRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public SearchTemplateRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - - public SearchTemplateRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - RouteValues.Optional("index", indices); - return Self; - } - - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private bool? ProfileValue { get; set; } - private string? SourceValue { get; set; } - - /// - /// - /// If true, returns detailed information about score calculation as part of each hit. - /// - /// - public SearchTemplateRequestDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// ID of the search template to use. If no source is specified, - /// this parameter is required. - /// - /// - public SearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - public SearchTemplateRequestDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// If true, the query execution is profiled. - /// - /// - public SearchTemplateRequestDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this - /// parameter is required. - /// - /// - public SearchTemplateRequestDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateResponse.g.cs deleted file mode 100644 index 16e9c64ac63..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchTemplateResponse.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchTemplateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregations")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("_clusters")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterStatistics? Clusters { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata Hits { get; init; } - [JsonInclude, JsonPropertyName("max_score")] - public double? MaxScore { get; init; } - [JsonInclude, JsonPropertyName("num_reduce_phases")] - public long? NumReducePhases { get; init; } - [JsonInclude, JsonPropertyName("pit_id")] - public string? PitId { get; init; } - [JsonInclude, JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Profile? Profile { get; init; } - [JsonInclude, JsonPropertyName("_scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollId? ScrollId { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestDictionary? Suggest { get; init; } - [JsonInclude, JsonPropertyName("terminated_early")] - public bool? TerminatedEarly { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs deleted file mode 100644 index fe394e4fec3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs +++ /dev/null @@ -1,143 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ActivateUserProfileRequestParameters : RequestParameters -{ -} - -/// -/// -/// Activate a user profile. -/// -/// -/// Create or update a user profile on behalf of another user. -/// -/// -public sealed partial class ActivateUserProfileRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityActivateUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.activate_user_profile"; - - [JsonInclude, JsonPropertyName("access_token")] - public string? AccessToken { get; set; } - [JsonInclude, JsonPropertyName("grant_type")] - public Elastic.Clients.Elasticsearch.Serverless.Security.GrantType GrantType { get; set; } - [JsonInclude, JsonPropertyName("password")] - public string? Password { get; set; } - [JsonInclude, JsonPropertyName("username")] - public string? Username { get; set; } -} - -/// -/// -/// Activate a user profile. -/// -/// -/// Create or update a user profile on behalf of another user. -/// -/// -public sealed partial class ActivateUserProfileRequestDescriptor : RequestDescriptor -{ - internal ActivateUserProfileRequestDescriptor(Action configure) => configure.Invoke(this); - - public ActivateUserProfileRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityActivateUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.activate_user_profile"; - - private string? AccessTokenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.GrantType GrantTypeValue { get; set; } - private string? PasswordValue { get; set; } - private string? UsernameValue { get; set; } - - public ActivateUserProfileRequestDescriptor AccessToken(string? accessToken) - { - AccessTokenValue = accessToken; - return Self; - } - - public ActivateUserProfileRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.GrantType grantType) - { - GrantTypeValue = grantType; - return Self; - } - - public ActivateUserProfileRequestDescriptor Password(string? password) - { - PasswordValue = password; - return Self; - } - - public ActivateUserProfileRequestDescriptor Username(string? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AccessTokenValue)) - { - writer.WritePropertyName("access_token"); - writer.WriteStringValue(AccessTokenValue); - } - - writer.WritePropertyName("grant_type"); - JsonSerializer.Serialize(writer, GrantTypeValue, options); - if (!string.IsNullOrEmpty(PasswordValue)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(PasswordValue); - } - - if (!string.IsNullOrEmpty(UsernameValue)) - { - writer.WritePropertyName("username"); - writer.WriteStringValue(UsernameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs deleted file mode 100644 index eef852bd9c6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ActivateUserProfileResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("data")] - public IReadOnlyDictionary Data { get; init; } - [JsonInclude, JsonPropertyName("_doc")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileHitMetadata Doc { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; init; } - [JsonInclude, JsonPropertyName("labels")] - public IReadOnlyDictionary Labels { get; init; } - [JsonInclude, JsonPropertyName("last_synchronized")] - public long LastSynchronized { get; init; } - [JsonInclude, JsonPropertyName("uid")] - public string Uid { get; init; } - [JsonInclude, JsonPropertyName("user")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileUser User { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs deleted file mode 100644 index e87105682bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class AuthenticateRequestParameters : RequestParameters -{ -} - -/// -/// -/// Authenticate a user. -/// -/// -/// Authenticates a user and returns information about the authenticated user. -/// Include the user information in a basic auth header. -/// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. -/// If the user cannot be authenticated, this API returns a 401 status code. -/// -/// -public sealed partial class AuthenticateRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityAuthenticate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.authenticate"; -} - -/// -/// -/// Authenticate a user. -/// -/// -/// Authenticates a user and returns information about the authenticated user. -/// Include the user information in a basic auth header. -/// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. -/// If the user cannot be authenticated, this API returns a 401 status code. -/// -/// -public sealed partial class AuthenticateRequestDescriptor : RequestDescriptor -{ - internal AuthenticateRequestDescriptor(Action configure) => configure.Invoke(this); - - public AuthenticateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityAuthenticate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.authenticate"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.cs deleted file mode 100644 index 3da609f9d34..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class AuthenticateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("api_key")] - public Elastic.Clients.Elasticsearch.Serverless.Security.AuthenticateApiKey? ApiKey { get; init; } - [JsonInclude, JsonPropertyName("authentication_realm")] - public Elastic.Clients.Elasticsearch.Serverless.Security.RealmInfo AuthenticationRealm { get; init; } - [JsonInclude, JsonPropertyName("authentication_type")] - public string AuthenticationType { get; init; } - [JsonInclude, JsonPropertyName("email")] - public string? Email { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("full_name")] - public string? FullName { get; init; } - [JsonInclude, JsonPropertyName("lookup_realm")] - public Elastic.Clients.Elasticsearch.Serverless.Security.RealmInfo LookupRealm { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary Metadata { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("token")] - public Elastic.Clients.Elasticsearch.Serverless.Security.AuthenticateToken? Token { get; init; } - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs deleted file mode 100644 index 68ea0ad9b1b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs +++ /dev/null @@ -1,126 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class BulkDeleteRoleRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Bulk delete roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. -/// The bulk delete roles API cannot delete roles that are defined in roles files. -/// -/// -public sealed partial class BulkDeleteRoleRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkDeleteRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.bulk_delete_role"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// An array of role names to delete - /// - /// - [JsonInclude, JsonPropertyName("names")] - public ICollection Names { get; set; } -} - -/// -/// -/// Bulk delete roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. -/// The bulk delete roles API cannot delete roles that are defined in roles files. -/// -/// -public sealed partial class BulkDeleteRoleRequestDescriptor : RequestDescriptor -{ - internal BulkDeleteRoleRequestDescriptor(Action configure) => configure.Invoke(this); - - public BulkDeleteRoleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkDeleteRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.bulk_delete_role"; - - public BulkDeleteRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - private ICollection NamesValue { get; set; } - - /// - /// - /// An array of role names to delete - /// - /// - public BulkDeleteRoleRequestDescriptor Names(ICollection names) - { - NamesValue = names; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("names"); - JsonSerializer.Serialize(writer, NamesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs deleted file mode 100644 index 4334b626ee3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class BulkDeleteRoleResponse : ElasticsearchResponse -{ - /// - /// - /// Array of deleted roles - /// - /// - [JsonInclude, JsonPropertyName("deleted")] - public IReadOnlyCollection? Deleted { get; init; } - - /// - /// - /// Present if any deletes resulted in errors - /// - /// - [JsonInclude, JsonPropertyName("errors")] - public Elastic.Clients.Elasticsearch.Serverless.Security.BulkError? Errors { get; init; } - - /// - /// - /// Array of roles that could not be found - /// - /// - [JsonInclude, JsonPropertyName("not_found")] - public IReadOnlyCollection? NotFound { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs deleted file mode 100644 index 459580f2125..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs +++ /dev/null @@ -1,175 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class BulkPutRoleRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Bulk create or update roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. -/// The bulk create or update roles API cannot update roles that are defined in roles files. -/// -/// -public sealed partial class BulkPutRoleRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkPutRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.bulk_put_role"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// A dictionary of role name to RoleDescriptor objects to add or update - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IDictionary Roles { get; set; } -} - -/// -/// -/// Bulk create or update roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. -/// The bulk create or update roles API cannot update roles that are defined in roles files. -/// -/// -public sealed partial class BulkPutRoleRequestDescriptor : RequestDescriptor, BulkPutRoleRequestParameters> -{ - internal BulkPutRoleRequestDescriptor(Action> configure) => configure.Invoke(this); - - public BulkPutRoleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkPutRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.bulk_put_role"; - - public BulkPutRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - private IDictionary> RolesValue { get; set; } - - /// - /// - /// A dictionary of role name to RoleDescriptor objects to add or update - /// - /// - public BulkPutRoleRequestDescriptor Roles(Func>, FluentDescriptorDictionary>> selector) - { - RolesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("roles"); - JsonSerializer.Serialize(writer, RolesValue, options); - writer.WriteEndObject(); - } -} - -/// -/// -/// Bulk create or update roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. -/// The bulk create or update roles API cannot update roles that are defined in roles files. -/// -/// -public sealed partial class BulkPutRoleRequestDescriptor : RequestDescriptor -{ - internal BulkPutRoleRequestDescriptor(Action configure) => configure.Invoke(this); - - public BulkPutRoleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkPutRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.bulk_put_role"; - - public BulkPutRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - private IDictionary RolesValue { get; set; } - - /// - /// - /// A dictionary of role name to RoleDescriptor objects to add or update - /// - /// - public BulkPutRoleRequestDescriptor Roles(Func, FluentDescriptorDictionary> selector) - { - RolesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("roles"); - JsonSerializer.Serialize(writer, RolesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.cs deleted file mode 100644 index 85ff7db5a44..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class BulkPutRoleResponse : ElasticsearchResponse -{ - /// - /// - /// Array of created roles - /// - /// - [JsonInclude, JsonPropertyName("created")] - public IReadOnlyCollection? Created { get; init; } - - /// - /// - /// Present if any updates resulted in errors - /// - /// - [JsonInclude, JsonPropertyName("errors")] - public Elastic.Clients.Elasticsearch.Serverless.Security.BulkError? Errors { get; init; } - - /// - /// - /// Array of role names without any changes - /// - /// - [JsonInclude, JsonPropertyName("noop")] - public IReadOnlyCollection? Noop { get; init; } - - /// - /// - /// Array of updated roles - /// - /// - [JsonInclude, JsonPropertyName("updated")] - public IReadOnlyCollection? Updated { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs deleted file mode 100644 index d4817ad108d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearApiKeyCacheRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear the API key cache. -/// -/// -/// Evict a subset of all entries from the API key cache. -/// The cache is also automatically cleared on state changes of the security index. -/// -/// -public sealed partial class ClearApiKeyCacheRequest : PlainRequest -{ - public ClearApiKeyCacheRequest(Elastic.Clients.Elasticsearch.Serverless.Ids ids) : base(r => r.Required("ids", ids)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearApiKeyCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_api_key_cache"; -} - -/// -/// -/// Clear the API key cache. -/// -/// -/// Evict a subset of all entries from the API key cache. -/// The cache is also automatically cleared on state changes of the security index. -/// -/// -public sealed partial class ClearApiKeyCacheRequestDescriptor : RequestDescriptor -{ - internal ClearApiKeyCacheRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearApiKeyCacheRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids ids) : base(r => r.Required("ids", ids)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearApiKeyCache; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_api_key_cache"; - - public ClearApiKeyCacheRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.Ids ids) - { - RouteValues.Required("ids", ids); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs deleted file mode 100644 index e7dd4705bee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearApiKeyCacheResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs deleted file mode 100644 index 71ab78556a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedPrivilegesRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear the privileges cache. -/// -/// -/// Evict privileges from the native application privilege cache. -/// The cache is also automatically cleared for applications that have their privileges updated. -/// -/// -public sealed partial class ClearCachedPrivilegesRequest : PlainRequest -{ - public ClearCachedPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name application) : base(r => r.Required("application", application)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_privileges"; -} - -/// -/// -/// Clear the privileges cache. -/// -/// -/// Evict privileges from the native application privilege cache. -/// The cache is also automatically cleared for applications that have their privileges updated. -/// -/// -public sealed partial class ClearCachedPrivilegesRequestDescriptor : RequestDescriptor -{ - internal ClearCachedPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearCachedPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name application) : base(r => r.Required("application", application)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_privileges"; - - public ClearCachedPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name application) - { - RouteValues.Required("application", application); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs deleted file mode 100644 index 80153dbf93b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedPrivilegesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs deleted file mode 100644 index 88ff2437b7e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs +++ /dev/null @@ -1,109 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedRealmsRequestParameters : RequestParameters -{ - /// - /// - /// Comma-separated list of usernames to clear from the cache - /// - /// - public ICollection? Usernames { get => Q?>("usernames"); set => Q("usernames", value); } -} - -/// -/// -/// Clear the user cache. -/// -/// -/// Evict users from the user cache. You can completely clear the cache or evict specific users. -/// -/// -public sealed partial class ClearCachedRealmsRequest : PlainRequest -{ - public ClearCachedRealmsRequest(Elastic.Clients.Elasticsearch.Serverless.Names realms) : base(r => r.Required("realms", realms)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRealms; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_realms"; - - /// - /// - /// Comma-separated list of usernames to clear from the cache - /// - /// - [JsonIgnore] - public ICollection? Usernames { get => Q?>("usernames"); set => Q("usernames", value); } -} - -/// -/// -/// Clear the user cache. -/// -/// -/// Evict users from the user cache. You can completely clear the cache or evict specific users. -/// -/// -public sealed partial class ClearCachedRealmsRequestDescriptor : RequestDescriptor -{ - internal ClearCachedRealmsRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearCachedRealmsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names realms) : base(r => r.Required("realms", realms)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRealms; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_realms"; - - public ClearCachedRealmsRequestDescriptor Usernames(ICollection? usernames) => Qs("usernames", usernames); - - public ClearCachedRealmsRequestDescriptor Realms(Elastic.Clients.Elasticsearch.Serverless.Names realms) - { - RouteValues.Required("realms", realms); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs deleted file mode 100644 index efe1c3411eb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedRealmsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs deleted file mode 100644 index 1b9b3c6c0e3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedRolesRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear the roles cache. -/// -/// -/// Evict roles from the native role cache. -/// -/// -public sealed partial class ClearCachedRolesRequest : PlainRequest -{ - public ClearCachedRolesRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRoles; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_roles"; -} - -/// -/// -/// Clear the roles cache. -/// -/// -/// Evict roles from the native role cache. -/// -/// -public sealed partial class ClearCachedRolesRequestDescriptor : RequestDescriptor -{ - internal ClearCachedRolesRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearCachedRolesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRoles; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_roles"; - - public ClearCachedRolesRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs deleted file mode 100644 index e28b91f8337..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedRolesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs deleted file mode 100644 index 7005cecd4fd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedServiceTokensRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear service account token caches. -/// -/// -/// Evict a subset of all entries from the service account token caches. -/// -/// -public sealed partial class ClearCachedServiceTokensRequest : PlainRequest -{ - public ClearCachedServiceTokensRequest(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedServiceTokens; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_service_tokens"; -} - -/// -/// -/// Clear service account token caches. -/// -/// -/// Evict a subset of all entries from the service account token caches. -/// -/// -public sealed partial class ClearCachedServiceTokensRequestDescriptor : RequestDescriptor -{ - internal ClearCachedServiceTokensRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearCachedServiceTokensRequestDescriptor(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedServiceTokens; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.clear_cached_service_tokens"; - - public ClearCachedServiceTokensRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - public ClearCachedServiceTokensRequestDescriptor Namespace(string ns) - { - RouteValues.Required("namespace", ns); - return Self; - } - - public ClearCachedServiceTokensRequestDescriptor Service(string service) - { - RouteValues.Required("service", service); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs deleted file mode 100644 index a97f7495f65..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClearCachedServiceTokensResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster_name")] - public string ClusterName { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs deleted file mode 100644 index 9568152258e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs +++ /dev/null @@ -1,321 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class CreateApiKeyRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Create an API key. -/// -/// -/// Create an API key for access without requiring basic authentication. -/// A successful request returns a JSON structure that contains the API key, its unique id, and its name. -/// If applicable, it also returns expiration information for the API key in milliseconds. -/// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. -/// -/// -public sealed partial class CreateApiKeyRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.create_api_key"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Expiration time for the API key. By default, API keys never expire. - /// - /// - [JsonInclude, JsonPropertyName("expiration")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Expiration { get; set; } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - - /// - /// - /// Specifies the name for this API key. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } - - /// - /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. - /// - /// - [JsonInclude, JsonPropertyName("role_descriptors")] - public IDictionary? RoleDescriptors { get; set; } -} - -/// -/// -/// Create an API key. -/// -/// -/// Create an API key for access without requiring basic authentication. -/// A successful request returns a JSON structure that contains the API key, its unique id, and its name. -/// If applicable, it also returns expiration information for the API key in milliseconds. -/// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. -/// -/// -public sealed partial class CreateApiKeyRequestDescriptor : RequestDescriptor, CreateApiKeyRequestParameters> -{ - internal CreateApiKeyRequestDescriptor(Action> configure) => configure.Invoke(this); - - public CreateApiKeyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.create_api_key"; - - public CreateApiKeyRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpirationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private IDictionary> RoleDescriptorsValue { get; set; } - - /// - /// - /// Expiration time for the API key. By default, API keys never expire. - /// - /// - public CreateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Serverless.Duration? expiration) - { - ExpirationValue = expiration; - return Self; - } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public CreateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Specifies the name for this API key. - /// - /// - public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. - /// - /// - public CreateApiKeyRequestDescriptor RoleDescriptors(Func>, FluentDescriptorDictionary>> selector) - { - RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExpirationValue is not null) - { - writer.WritePropertyName("expiration"); - JsonSerializer.Serialize(writer, ExpirationValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (RoleDescriptorsValue is not null) - { - writer.WritePropertyName("role_descriptors"); - JsonSerializer.Serialize(writer, RoleDescriptorsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create an API key. -/// -/// -/// Create an API key for access without requiring basic authentication. -/// A successful request returns a JSON structure that contains the API key, its unique id, and its name. -/// If applicable, it also returns expiration information for the API key in milliseconds. -/// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. -/// -/// -public sealed partial class CreateApiKeyRequestDescriptor : RequestDescriptor -{ - internal CreateApiKeyRequestDescriptor(Action configure) => configure.Invoke(this); - - public CreateApiKeyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.create_api_key"; - - public CreateApiKeyRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpirationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private IDictionary RoleDescriptorsValue { get; set; } - - /// - /// - /// Expiration time for the API key. By default, API keys never expire. - /// - /// - public CreateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Serverless.Duration? expiration) - { - ExpirationValue = expiration; - return Self; - } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public CreateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Specifies the name for this API key. - /// - /// - public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. - /// - /// - public CreateApiKeyRequestDescriptor RoleDescriptors(Func, FluentDescriptorDictionary> selector) - { - RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExpirationValue is not null) - { - writer.WritePropertyName("expiration"); - JsonSerializer.Serialize(writer, ExpirationValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (RoleDescriptorsValue is not null) - { - writer.WritePropertyName("role_descriptors"); - JsonSerializer.Serialize(writer, RoleDescriptorsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs deleted file mode 100644 index 841689b990c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class CreateApiKeyResponse : ElasticsearchResponse -{ - /// - /// - /// Generated API key. - /// - /// - [JsonInclude, JsonPropertyName("api_key")] - public string ApiKey { get; init; } - - /// - /// - /// API key credentials which is the base64-encoding of - /// the UTF-8 representation of id and api_key joined - /// by a colon (:). - /// - /// - [JsonInclude, JsonPropertyName("encoded")] - public string Encoded { get; init; } - - /// - /// - /// Expiration in milliseconds for the API key. - /// - /// - [JsonInclude, JsonPropertyName("expiration")] - public long? Expiration { get; init; } - - /// - /// - /// Unique ID for this API key. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// Specifies the name for this API key. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs deleted file mode 100644 index 1b16f173167..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class CreateServiceTokenRequestParameters : RequestParameters -{ - /// - /// - /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Create a service account token. -/// -/// -/// Create a service accounts token for access without requiring basic authentication. -/// -/// -public sealed partial class CreateServiceTokenRequest : PlainRequest -{ - public CreateServiceTokenRequest(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Required("namespace", ns).Required("service", service).Optional("name", name)) - { - } - - public CreateServiceTokenRequest(string ns, string service) : base(r => r.Required("namespace", ns).Required("service", service)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateServiceToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.create_service_token"; - - /// - /// - /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Create a service account token. -/// -/// -/// Create a service accounts token for access without requiring basic authentication. -/// -/// -public sealed partial class CreateServiceTokenRequestDescriptor : RequestDescriptor -{ - internal CreateServiceTokenRequestDescriptor(Action configure) => configure.Invoke(this); - - public CreateServiceTokenRequestDescriptor(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Required("namespace", ns).Required("service", service).Optional("name", name)) - { - } - - public CreateServiceTokenRequestDescriptor(string ns, string service) : base(r => r.Required("namespace", ns).Required("service", service)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateServiceToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.create_service_token"; - - public CreateServiceTokenRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public CreateServiceTokenRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - RouteValues.Optional("name", name); - return Self; - } - - public CreateServiceTokenRequestDescriptor Namespace(string ns) - { - RouteValues.Required("namespace", ns); - return Self; - } - - public CreateServiceTokenRequestDescriptor Service(string service) - { - RouteValues.Required("service", service); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs deleted file mode 100644 index 14ddc24ddc3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class CreateServiceTokenResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("created")] - public bool Created { get; init; } - [JsonInclude, JsonPropertyName("token")] - public Elastic.Clients.Elasticsearch.Serverless.Security.ServiceToken Token { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs deleted file mode 100644 index 53e7878ab3a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs +++ /dev/null @@ -1,109 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeletePrivilegesRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete application privileges. -/// -/// -public sealed partial class DeletePrivilegesRequest : PlainRequest -{ - public DeletePrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name application, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("application", application).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeletePrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_privileges"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete application privileges. -/// -/// -public sealed partial class DeletePrivilegesRequestDescriptor : RequestDescriptor -{ - internal DeletePrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeletePrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name application, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("application", application).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeletePrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_privileges"; - - public DeletePrivilegesRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public DeletePrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name application) - { - RouteValues.Required("application", application); - return Self; - } - - public DeletePrivilegesRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs deleted file mode 100644 index 71fa169150a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeletePrivilegesResponse : DictionaryResponse> -{ - public DeletePrivilegesResponse(IReadOnlyDictionary> dictionary) : base(dictionary) - { - } - - public DeletePrivilegesResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs deleted file mode 100644 index 91b20085b24..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeleteRoleMappingRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete role mappings. -/// -/// -public sealed partial class DeleteRoleMappingRequest : PlainRequest -{ - public DeleteRoleMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRoleMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_role_mapping"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete role mappings. -/// -/// -public sealed partial class DeleteRoleMappingRequestDescriptor : RequestDescriptor -{ - internal DeleteRoleMappingRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRoleMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_role_mapping"; - - public DeleteRoleMappingRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public DeleteRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs deleted file mode 100644 index 69ec38d8224..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeleteRoleMappingResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs deleted file mode 100644 index 511239673ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs +++ /dev/null @@ -1,109 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeleteRoleRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete roles. -/// -/// -/// Delete roles in the native realm. -/// -/// -public sealed partial class DeleteRoleRequest : PlainRequest -{ - public DeleteRoleRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_role"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete roles. -/// -/// -/// Delete roles in the native realm. -/// -/// -public sealed partial class DeleteRoleRequestDescriptor : RequestDescriptor -{ - internal DeleteRoleRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteRoleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_role"; - - public DeleteRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public DeleteRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs deleted file mode 100644 index e7fc61a464e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeleteRoleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs deleted file mode 100644 index ce2465d95d8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeleteServiceTokenRequestParameters : RequestParameters -{ - /// - /// - /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete service account tokens. -/// -/// -/// Delete service account tokens for a service in a specified namespace. -/// -/// -public sealed partial class DeleteServiceTokenRequest : PlainRequest -{ - public DeleteServiceTokenRequest(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteServiceToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_service_token"; - - /// - /// - /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Delete service account tokens. -/// -/// -/// Delete service account tokens for a service in a specified namespace. -/// -/// -public sealed partial class DeleteServiceTokenRequestDescriptor : RequestDescriptor -{ - internal DeleteServiceTokenRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteServiceTokenRequestDescriptor(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteServiceToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.delete_service_token"; - - public DeleteServiceTokenRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public DeleteServiceTokenRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - public DeleteServiceTokenRequestDescriptor Namespace(string ns) - { - RouteValues.Required("namespace", ns); - return Self; - } - - public DeleteServiceTokenRequestDescriptor Service(string service) - { - RouteValues.Required("service", service); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs deleted file mode 100644 index 26b35f9f977..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DeleteServiceTokenResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs deleted file mode 100644 index a3b20051197..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DisableUserProfileRequestParameters : RequestParameters -{ - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Disable a user profile. -/// -/// -/// Disable user profiles so that they are not visible in user profile searches. -/// -/// -public sealed partial class DisableUserProfileRequest : PlainRequest -{ - public DisableUserProfileRequest(string uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDisableUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.disable_user_profile"; - - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Disable a user profile. -/// -/// -/// Disable user profiles so that they are not visible in user profile searches. -/// -/// -public sealed partial class DisableUserProfileRequestDescriptor : RequestDescriptor -{ - internal DisableUserProfileRequestDescriptor(Action configure) => configure.Invoke(this); - - public DisableUserProfileRequestDescriptor(string uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDisableUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.disable_user_profile"; - - public DisableUserProfileRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public DisableUserProfileRequestDescriptor Uid(string uid) - { - RouteValues.Required("uid", uid); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.cs deleted file mode 100644 index 13e6c139b7f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class DisableUserProfileResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs deleted file mode 100644 index 68aba25f44f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class EnableUserProfileRequestParameters : RequestParameters -{ - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Enable a user profile. -/// -/// -/// Enable user profiles to make them visible in user profile searches. -/// -/// -public sealed partial class EnableUserProfileRequest : PlainRequest -{ - public EnableUserProfileRequest(string uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityEnableUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.enable_user_profile"; - - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Enable a user profile. -/// -/// -/// Enable user profiles to make them visible in user profile searches. -/// -/// -public sealed partial class EnableUserProfileRequestDescriptor : RequestDescriptor -{ - internal EnableUserProfileRequestDescriptor(Action configure) => configure.Invoke(this); - - public EnableUserProfileRequestDescriptor(string uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityEnableUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.enable_user_profile"; - - public EnableUserProfileRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public EnableUserProfileRequestDescriptor Uid(string uid) - { - RouteValues.Required("uid", uid); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.cs deleted file mode 100644 index 4296ea9afc1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class EnableUserProfileResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs deleted file mode 100644 index 81ba73b3014..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs +++ /dev/null @@ -1,233 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetApiKeyRequestParameters : RequestParameters -{ - /// - /// - /// A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as owner or name. If active_only is false, the response will include both active and inactive (expired or invalidated) keys. - /// - /// - public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); } - - /// - /// - /// An API key id. - /// This parameter cannot be used with any of name, realm_name or username. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get => Q("id"); set => Q("id", value); } - - /// - /// - /// An API key name. - /// This parameter cannot be used with any of id, realm_name or username. - /// It supports prefix search with wildcard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get => Q("name"); set => Q("name", value); } - - /// - /// - /// A boolean flag that can be used to query API keys owned by the currently authenticated user. - /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones. - /// - /// - public bool? Owner { get => Q("owner"); set => Q("owner", value); } - - /// - /// - /// The name of an authentication realm. - /// This parameter cannot be used with either id or name or when owner flag is set to true. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Name? RealmName { get => Q("realm_name"); set => Q("realm_name", value); } - - /// - /// - /// The username of a user. - /// This parameter cannot be used with either id or name or when owner flag is set to true. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get => Q("username"); set => Q("username", value); } - - /// - /// - /// Return the snapshot of the owner user's role descriptors - /// associated with the API key. An API key's actual - /// permission is the intersection of its assigned role - /// descriptors and the owner user's role descriptors. - /// - /// - public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); } - - /// - /// - /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. - /// - /// - public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } -} - -/// -/// -/// Get API key information. -/// -/// -/// Retrieves information for one or more API keys. -/// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. -/// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. -/// -/// -public sealed partial class GetApiKeyRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_api_key"; - - /// - /// - /// A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as owner or name. If active_only is false, the response will include both active and inactive (expired or invalidated) keys. - /// - /// - [JsonIgnore] - public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); } - - /// - /// - /// An API key id. - /// This parameter cannot be used with any of name, realm_name or username. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get => Q("id"); set => Q("id", value); } - - /// - /// - /// An API key name. - /// This parameter cannot be used with any of id, realm_name or username. - /// It supports prefix search with wildcard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get => Q("name"); set => Q("name", value); } - - /// - /// - /// A boolean flag that can be used to query API keys owned by the currently authenticated user. - /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones. - /// - /// - [JsonIgnore] - public bool? Owner { get => Q("owner"); set => Q("owner", value); } - - /// - /// - /// The name of an authentication realm. - /// This parameter cannot be used with either id or name or when owner flag is set to true. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Name? RealmName { get => Q("realm_name"); set => Q("realm_name", value); } - - /// - /// - /// The username of a user. - /// This parameter cannot be used with either id or name or when owner flag is set to true. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get => Q("username"); set => Q("username", value); } - - /// - /// - /// Return the snapshot of the owner user's role descriptors - /// associated with the API key. An API key's actual - /// permission is the intersection of its assigned role - /// descriptors and the owner user's role descriptors. - /// - /// - [JsonIgnore] - public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); } - - /// - /// - /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. - /// - /// - [JsonIgnore] - public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } -} - -/// -/// -/// Get API key information. -/// -/// -/// Retrieves information for one or more API keys. -/// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. -/// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. -/// -/// -public sealed partial class GetApiKeyRequestDescriptor : RequestDescriptor -{ - internal GetApiKeyRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetApiKeyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_api_key"; - - public GetApiKeyRequestDescriptor ActiveOnly(bool? activeOnly = true) => Qs("active_only", activeOnly); - public GetApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) => Qs("id", id); - public GetApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) => Qs("name", name); - public GetApiKeyRequestDescriptor Owner(bool? owner = true) => Qs("owner", owner); - public GetApiKeyRequestDescriptor RealmName(Elastic.Clients.Elasticsearch.Serverless.Name? realmName) => Qs("realm_name", realmName); - public GetApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) => Qs("username", username); - public GetApiKeyRequestDescriptor WithLimitedBy(bool? withLimitedBy = true) => Qs("with_limited_by", withLimitedBy); - public GetApiKeyRequestDescriptor WithProfileUid(bool? withProfileUid = true) => Qs("with_profile_uid", withProfileUid); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs deleted file mode 100644 index 38a73ca81a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetApiKeyResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("api_keys")] - public IReadOnlyCollection ApiKeys { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.cs deleted file mode 100644 index b8873b769ae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetBuiltinPrivilegesRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get builtin privileges. -/// -/// -/// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. -/// -/// -public sealed partial class GetBuiltinPrivilegesRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetBuiltinPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_builtin_privileges"; -} - -/// -/// -/// Get builtin privileges. -/// -/// -/// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. -/// -/// -public sealed partial class GetBuiltinPrivilegesRequestDescriptor : RequestDescriptor -{ - internal GetBuiltinPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetBuiltinPrivilegesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetBuiltinPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_builtin_privileges"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs deleted file mode 100644 index 289a4f1da56..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetBuiltinPrivilegesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("cluster")] - public IReadOnlyCollection Cluster { get; init; } - [JsonInclude, JsonPropertyName("index")] - public IReadOnlyCollection Index { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs deleted file mode 100644 index a90bea1fddf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetPrivilegesRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get application privileges. -/// -/// -public sealed partial class GetPrivilegesRequest : PlainRequest -{ - public GetPrivilegesRequest() - { - } - - public GetPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name? application) : base(r => r.Optional("application", application)) - { - } - - public GetPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name? application, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("application", application).Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_privileges"; -} - -/// -/// -/// Get application privileges. -/// -/// -public sealed partial class GetPrivilegesRequestDescriptor : RequestDescriptor -{ - internal GetPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? application, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("application", application).Optional("name", name)) - { - } - - public GetPrivilegesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_privileges"; - - public GetPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name? application) - { - RouteValues.Optional("application", application); - return Self; - } - - public GetPrivilegesRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs deleted file mode 100644 index 90136141d25..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetPrivilegesResponse : DictionaryResponse> -{ - public GetPrivilegesResponse(IReadOnlyDictionary> dictionary) : base(dictionary) - { - } - - public GetPrivilegesResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs deleted file mode 100644 index a454c8e7319..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetRoleMappingRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get role mappings. -/// -/// -/// Role mappings define which roles are assigned to each user. -/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. -/// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. -/// -/// -public sealed partial class GetRoleMappingRequest : PlainRequest -{ - public GetRoleMappingRequest() - { - } - - public GetRoleMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRoleMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_role_mapping"; -} - -/// -/// -/// Get role mappings. -/// -/// -/// Role mappings define which roles are assigned to each user. -/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. -/// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. -/// -/// -public sealed partial class GetRoleMappingRequestDescriptor : RequestDescriptor -{ - internal GetRoleMappingRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - public GetRoleMappingRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRoleMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_role_mapping"; - - public GetRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs deleted file mode 100644 index f7780fbe01a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetRoleMappingResponse : DictionaryResponse -{ - public GetRoleMappingResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetRoleMappingResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs deleted file mode 100644 index 38491b40830..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs +++ /dev/null @@ -1,101 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetRoleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get roles. -/// -/// -/// Get roles in the native realm. -/// -/// -public sealed partial class GetRoleRequest : PlainRequest -{ - public GetRoleRequest() - { - } - - public GetRoleRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_role"; -} - -/// -/// -/// Get roles. -/// -/// -/// Get roles in the native realm. -/// -/// -public sealed partial class GetRoleRequestDescriptor : RequestDescriptor -{ - internal GetRoleRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRoleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name)) - { - } - - public GetRoleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_role"; - - public GetRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("name", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs deleted file mode 100644 index 4cca8aab744..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetRoleResponse : DictionaryResponse -{ - public GetRoleResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetRoleResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.cs deleted file mode 100644 index bf6cd184fd8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetServiceAccountsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get service accounts. -/// -/// -/// Get a list of service accounts that match the provided path parameters. -/// -/// -public sealed partial class GetServiceAccountsRequest : PlainRequest -{ - public GetServiceAccountsRequest() - { - } - - public GetServiceAccountsRequest(string? ns, string? service) : base(r => r.Optional("namespace", ns).Optional("service", service)) - { - } - - public GetServiceAccountsRequest(string? ns) : base(r => r.Optional("namespace", ns)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceAccounts; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_service_accounts"; -} - -/// -/// -/// Get service accounts. -/// -/// -/// Get a list of service accounts that match the provided path parameters. -/// -/// -public sealed partial class GetServiceAccountsRequestDescriptor : RequestDescriptor -{ - internal GetServiceAccountsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetServiceAccountsRequestDescriptor(string? ns, string? service) : base(r => r.Optional("namespace", ns).Optional("service", service)) - { - } - - public GetServiceAccountsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceAccounts; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_service_accounts"; - - public GetServiceAccountsRequestDescriptor Namespace(string? ns) - { - RouteValues.Optional("namespace", ns); - return Self; - } - - public GetServiceAccountsRequestDescriptor Service(string? service) - { - RouteValues.Optional("service", service); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs deleted file mode 100644 index 0a2df0874be..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetServiceAccountsResponse : DictionaryResponse -{ - public GetServiceAccountsResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetServiceAccountsResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs deleted file mode 100644 index f343ece9bb0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetServiceCredentialsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get service account credentials. -/// -/// -public sealed partial class GetServiceCredentialsRequest : PlainRequest -{ - public GetServiceCredentialsRequest(string ns, Elastic.Clients.Elasticsearch.Serverless.Name service) : base(r => r.Required("namespace", ns).Required("service", service)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceCredentials; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_service_credentials"; -} - -/// -/// -/// Get service account credentials. -/// -/// -public sealed partial class GetServiceCredentialsRequestDescriptor : RequestDescriptor -{ - internal GetServiceCredentialsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetServiceCredentialsRequestDescriptor(string ns, Elastic.Clients.Elasticsearch.Serverless.Name service) : base(r => r.Required("namespace", ns).Required("service", service)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceCredentials; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_service_credentials"; - - public GetServiceCredentialsRequestDescriptor Namespace(string ns) - { - RouteValues.Required("namespace", ns); - return Self; - } - - public GetServiceCredentialsRequestDescriptor Service(Elastic.Clients.Elasticsearch.Serverless.Name service) - { - RouteValues.Required("service", service); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs deleted file mode 100644 index 02af7395fcc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetServiceCredentialsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Contains service account credentials collected from all nodes of the cluster - /// - /// - [JsonInclude, JsonPropertyName("nodes_credentials")] - public Elastic.Clients.Elasticsearch.Serverless.Security.NodesCredentials NodesCredentials { get; init; } - [JsonInclude, JsonPropertyName("service_account")] - public string ServiceAccount { get; init; } - [JsonInclude, JsonPropertyName("tokens")] - public IReadOnlyDictionary> Tokens { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs deleted file mode 100644 index 52d992c21c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs +++ /dev/null @@ -1,177 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetTokenRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get a token. -/// -/// -/// Create a bearer token for access without requiring basic authentication. -/// -/// -public sealed partial class GetTokenRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.get_token"; - - [JsonInclude, JsonPropertyName("grant_type")] - public Elastic.Clients.Elasticsearch.Serverless.Security.AccessTokenGrantType? GrantType { get; set; } - [JsonInclude, JsonPropertyName("kerberos_ticket")] - public string? KerberosTicket { get; set; } - [JsonInclude, JsonPropertyName("password")] - public string? Password { get; set; } - [JsonInclude, JsonPropertyName("refresh_token")] - public string? RefreshToken { get; set; } - [JsonInclude, JsonPropertyName("scope")] - public string? Scope { get; set; } - [JsonInclude, JsonPropertyName("username")] - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; } -} - -/// -/// -/// Get a token. -/// -/// -/// Create a bearer token for access without requiring basic authentication. -/// -/// -public sealed partial class GetTokenRequestDescriptor : RequestDescriptor -{ - internal GetTokenRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetTokenRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.get_token"; - - private Elastic.Clients.Elasticsearch.Serverless.Security.AccessTokenGrantType? GrantTypeValue { get; set; } - private string? KerberosTicketValue { get; set; } - private string? PasswordValue { get; set; } - private string? RefreshTokenValue { get; set; } - private string? ScopeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; } - - public GetTokenRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.AccessTokenGrantType? grantType) - { - GrantTypeValue = grantType; - return Self; - } - - public GetTokenRequestDescriptor KerberosTicket(string? kerberosTicket) - { - KerberosTicketValue = kerberosTicket; - return Self; - } - - public GetTokenRequestDescriptor Password(string? password) - { - PasswordValue = password; - return Self; - } - - public GetTokenRequestDescriptor RefreshToken(string? refreshToken) - { - RefreshTokenValue = refreshToken; - return Self; - } - - public GetTokenRequestDescriptor Scope(string? scope) - { - ScopeValue = scope; - return Self; - } - - public GetTokenRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (GrantTypeValue is not null) - { - writer.WritePropertyName("grant_type"); - JsonSerializer.Serialize(writer, GrantTypeValue, options); - } - - if (!string.IsNullOrEmpty(KerberosTicketValue)) - { - writer.WritePropertyName("kerberos_ticket"); - writer.WriteStringValue(KerberosTicketValue); - } - - if (!string.IsNullOrEmpty(PasswordValue)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(PasswordValue); - } - - if (!string.IsNullOrEmpty(RefreshTokenValue)) - { - writer.WritePropertyName("refresh_token"); - writer.WriteStringValue(RefreshTokenValue); - } - - if (!string.IsNullOrEmpty(ScopeValue)) - { - writer.WritePropertyName("scope"); - writer.WriteStringValue(ScopeValue); - } - - if (UsernameValue is not null) - { - writer.WritePropertyName("username"); - JsonSerializer.Serialize(writer, UsernameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs deleted file mode 100644 index 36728c4b664..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetTokenResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("access_token")] - public string AccessToken { get; init; } - [JsonInclude, JsonPropertyName("authentication")] - public Elastic.Clients.Elasticsearch.Serverless.Security.AuthenticatedUser Authentication { get; init; } - [JsonInclude, JsonPropertyName("expires_in")] - public long ExpiresIn { get; init; } - [JsonInclude, JsonPropertyName("kerberos_authentication_response_token")] - public string? KerberosAuthenticationResponseToken { get; init; } - [JsonInclude, JsonPropertyName("refresh_token")] - public string? RefreshToken { get; init; } - [JsonInclude, JsonPropertyName("scope")] - public string? Scope { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs deleted file mode 100644 index 6e0183f4d6a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetUserPrivilegesRequestParameters : RequestParameters -{ - /// - /// - /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Name? Application { get => Q("application"); set => Q("application", value); } - - /// - /// - /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Name? Priviledge { get => Q("priviledge"); set => Q("priviledge", value); } - public Elastic.Clients.Elasticsearch.Serverless.Name? Username { get => Q("username"); set => Q("username", value); } -} - -/// -/// -/// Get user privileges. -/// -/// -public sealed partial class GetUserPrivilegesRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_user_privileges"; - - /// - /// - /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Name? Application { get => Q("application"); set => Q("application", value); } - - /// - /// - /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Name? Priviledge { get => Q("priviledge"); set => Q("priviledge", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Name? Username { get => Q("username"); set => Q("username", value); } -} - -/// -/// -/// Get user privileges. -/// -/// -public sealed partial class GetUserPrivilegesRequestDescriptor : RequestDescriptor -{ - internal GetUserPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetUserPrivilegesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_user_privileges"; - - public GetUserPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name? application) => Qs("application", application); - public GetUserPrivilegesRequestDescriptor Priviledge(Elastic.Clients.Elasticsearch.Serverless.Name? priviledge) => Qs("priviledge", priviledge); - public GetUserPrivilegesRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Name? username) => Qs("username", username); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs deleted file mode 100644 index 308ab397b53..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetUserPrivilegesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("applications")] - public IReadOnlyCollection Applications { get; init; } - [JsonInclude, JsonPropertyName("cluster")] - public IReadOnlyCollection Cluster { get; init; } - [JsonInclude, JsonPropertyName("global")] - public IReadOnlyCollection Global { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("run_as")] - public IReadOnlyCollection RunAs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs deleted file mode 100644 index 5f0dd65f114..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs +++ /dev/null @@ -1,115 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetUserProfileRequestParameters : RequestParameters -{ - /// - /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. - /// By default returns no data content. - /// - /// - public ICollection? Data { get => Q?>("data"); set => Q("data", value); } -} - -/// -/// -/// Get a user profile. -/// -/// -/// Get a user's profile using the unique profile ID. -/// -/// -public sealed partial class GetUserProfileRequest : PlainRequest -{ - public GetUserProfileRequest(IReadOnlyCollection uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_user_profile"; - - /// - /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. - /// By default returns no data content. - /// - /// - [JsonIgnore] - public ICollection? Data { get => Q?>("data"); set => Q("data", value); } -} - -/// -/// -/// Get a user profile. -/// -/// -/// Get a user's profile using the unique profile ID. -/// -/// -public sealed partial class GetUserProfileRequestDescriptor : RequestDescriptor -{ - internal GetUserProfileRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetUserProfileRequestDescriptor(IReadOnlyCollection uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.get_user_profile"; - - public GetUserProfileRequestDescriptor Data(ICollection? data) => Qs("data", data); - - public GetUserProfileRequestDescriptor Uid(IReadOnlyCollection uid) - { - RouteValues.Required("uid", uid); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs deleted file mode 100644 index de77684beab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetUserProfileResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("errors")] - public Elastic.Clients.Elasticsearch.Serverless.Security.GetUserProfileErrors? Errors { get; init; } - [JsonInclude, JsonPropertyName("profiles")] - public IReadOnlyCollection Profiles { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs deleted file mode 100644 index 91b196ec00a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs +++ /dev/null @@ -1,494 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GrantApiKeyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Grant an API key. -/// -/// -/// Create an API key on behalf of another user. -/// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. -/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. -/// It is not possible to use this API to create an API key without that user’s credentials. -/// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. -/// In this case, the API key will be created on behalf of the impersonated user. -/// -/// -/// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. -/// -/// -/// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. -/// If applicable, it also returns expiration information for the API key in milliseconds. -/// -/// -/// By default, API keys never expire. You can specify expiration information when you create the API keys. -/// -/// -public sealed partial class GrantApiKeyRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGrantApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.grant_api_key"; - - /// - /// - /// The user’s access token. - /// If you specify the access_token grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - [JsonInclude, JsonPropertyName("access_token")] - public string? AccessToken { get; set; } - - /// - /// - /// Defines the API key. - /// - /// - [JsonInclude, JsonPropertyName("api_key")] - public Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey ApiKey { get; set; } - - /// - /// - /// The type of grant. Supported grant types are: access_token, password. - /// - /// - [JsonInclude, JsonPropertyName("grant_type")] - public Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType GrantType { get; set; } - - /// - /// - /// The user’s password. If you specify the password grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - [JsonInclude, JsonPropertyName("password")] - public string? Password { get; set; } - - /// - /// - /// The name of the user to be impersonated. - /// - /// - [JsonInclude, JsonPropertyName("run_as")] - public Elastic.Clients.Elasticsearch.Serverless.Username? RunAs { get; set; } - - /// - /// - /// The user name that identifies the user. - /// If you specify the password grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - [JsonInclude, JsonPropertyName("username")] - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; } -} - -/// -/// -/// Grant an API key. -/// -/// -/// Create an API key on behalf of another user. -/// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. -/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. -/// It is not possible to use this API to create an API key without that user’s credentials. -/// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. -/// In this case, the API key will be created on behalf of the impersonated user. -/// -/// -/// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. -/// -/// -/// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. -/// If applicable, it also returns expiration information for the API key in milliseconds. -/// -/// -/// By default, API keys never expire. You can specify expiration information when you create the API keys. -/// -/// -public sealed partial class GrantApiKeyRequestDescriptor : RequestDescriptor, GrantApiKeyRequestParameters> -{ - internal GrantApiKeyRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GrantApiKeyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGrantApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.grant_api_key"; - - private string? AccessTokenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey ApiKeyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor ApiKeyDescriptor { get; set; } - private Action> ApiKeyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType GrantTypeValue { get; set; } - private string? PasswordValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? RunAsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; } - - /// - /// - /// The user’s access token. - /// If you specify the access_token grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - public GrantApiKeyRequestDescriptor AccessToken(string? accessToken) - { - AccessTokenValue = accessToken; - return Self; - } - - /// - /// - /// Defines the API key. - /// - /// - public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey apiKey) - { - ApiKeyDescriptor = null; - ApiKeyDescriptorAction = null; - ApiKeyValue = apiKey; - return Self; - } - - public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor descriptor) - { - ApiKeyValue = null; - ApiKeyDescriptorAction = null; - ApiKeyDescriptor = descriptor; - return Self; - } - - public GrantApiKeyRequestDescriptor ApiKey(Action> configure) - { - ApiKeyValue = null; - ApiKeyDescriptor = null; - ApiKeyDescriptorAction = configure; - return Self; - } - - /// - /// - /// The type of grant. Supported grant types are: access_token, password. - /// - /// - public GrantApiKeyRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType grantType) - { - GrantTypeValue = grantType; - return Self; - } - - /// - /// - /// The user’s password. If you specify the password grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - public GrantApiKeyRequestDescriptor Password(string? password) - { - PasswordValue = password; - return Self; - } - - /// - /// - /// The name of the user to be impersonated. - /// - /// - public GrantApiKeyRequestDescriptor RunAs(Elastic.Clients.Elasticsearch.Serverless.Username? runAs) - { - RunAsValue = runAs; - return Self; - } - - /// - /// - /// The user name that identifies the user. - /// If you specify the password grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - public GrantApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AccessTokenValue)) - { - writer.WritePropertyName("access_token"); - writer.WriteStringValue(AccessTokenValue); - } - - if (ApiKeyDescriptor is not null) - { - writer.WritePropertyName("api_key"); - JsonSerializer.Serialize(writer, ApiKeyDescriptor, options); - } - else if (ApiKeyDescriptorAction is not null) - { - writer.WritePropertyName("api_key"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor(ApiKeyDescriptorAction), options); - } - else - { - writer.WritePropertyName("api_key"); - JsonSerializer.Serialize(writer, ApiKeyValue, options); - } - - writer.WritePropertyName("grant_type"); - JsonSerializer.Serialize(writer, GrantTypeValue, options); - if (!string.IsNullOrEmpty(PasswordValue)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(PasswordValue); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - if (UsernameValue is not null) - { - writer.WritePropertyName("username"); - JsonSerializer.Serialize(writer, UsernameValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Grant an API key. -/// -/// -/// Create an API key on behalf of another user. -/// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. -/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. -/// It is not possible to use this API to create an API key without that user’s credentials. -/// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. -/// In this case, the API key will be created on behalf of the impersonated user. -/// -/// -/// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. -/// -/// -/// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. -/// If applicable, it also returns expiration information for the API key in milliseconds. -/// -/// -/// By default, API keys never expire. You can specify expiration information when you create the API keys. -/// -/// -public sealed partial class GrantApiKeyRequestDescriptor : RequestDescriptor -{ - internal GrantApiKeyRequestDescriptor(Action configure) => configure.Invoke(this); - - public GrantApiKeyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGrantApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.grant_api_key"; - - private string? AccessTokenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey ApiKeyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor ApiKeyDescriptor { get; set; } - private Action ApiKeyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType GrantTypeValue { get; set; } - private string? PasswordValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? RunAsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; } - - /// - /// - /// The user’s access token. - /// If you specify the access_token grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - public GrantApiKeyRequestDescriptor AccessToken(string? accessToken) - { - AccessTokenValue = accessToken; - return Self; - } - - /// - /// - /// Defines the API key. - /// - /// - public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey apiKey) - { - ApiKeyDescriptor = null; - ApiKeyDescriptorAction = null; - ApiKeyValue = apiKey; - return Self; - } - - public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor descriptor) - { - ApiKeyValue = null; - ApiKeyDescriptorAction = null; - ApiKeyDescriptor = descriptor; - return Self; - } - - public GrantApiKeyRequestDescriptor ApiKey(Action configure) - { - ApiKeyValue = null; - ApiKeyDescriptor = null; - ApiKeyDescriptorAction = configure; - return Self; - } - - /// - /// - /// The type of grant. Supported grant types are: access_token, password. - /// - /// - public GrantApiKeyRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType grantType) - { - GrantTypeValue = grantType; - return Self; - } - - /// - /// - /// The user’s password. If you specify the password grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - public GrantApiKeyRequestDescriptor Password(string? password) - { - PasswordValue = password; - return Self; - } - - /// - /// - /// The name of the user to be impersonated. - /// - /// - public GrantApiKeyRequestDescriptor RunAs(Elastic.Clients.Elasticsearch.Serverless.Username? runAs) - { - RunAsValue = runAs; - return Self; - } - - /// - /// - /// The user name that identifies the user. - /// If you specify the password grant type, this parameter is required. - /// It is not valid with other grant types. - /// - /// - public GrantApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AccessTokenValue)) - { - writer.WritePropertyName("access_token"); - writer.WriteStringValue(AccessTokenValue); - } - - if (ApiKeyDescriptor is not null) - { - writer.WritePropertyName("api_key"); - JsonSerializer.Serialize(writer, ApiKeyDescriptor, options); - } - else if (ApiKeyDescriptorAction is not null) - { - writer.WritePropertyName("api_key"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor(ApiKeyDescriptorAction), options); - } - else - { - writer.WritePropertyName("api_key"); - JsonSerializer.Serialize(writer, ApiKeyValue, options); - } - - writer.WritePropertyName("grant_type"); - JsonSerializer.Serialize(writer, GrantTypeValue, options); - if (!string.IsNullOrEmpty(PasswordValue)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(PasswordValue); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - if (UsernameValue is not null) - { - writer.WritePropertyName("username"); - JsonSerializer.Serialize(writer, UsernameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs deleted file mode 100644 index 60f9d7f83b5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GrantApiKeyResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("api_key")] - public string ApiKey { get; init; } - [JsonInclude, JsonPropertyName("encoded")] - public string Encoded { get; init; } - [JsonInclude, JsonPropertyName("expiration")] - public long? Expiration { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs deleted file mode 100644 index 103009be8ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs +++ /dev/null @@ -1,277 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class HasPrivilegesRequestParameters : RequestParameters -{ -} - -/// -/// -/// Check user privileges. -/// -/// -/// Determine whether the specified user has a specified list of privileges. -/// -/// -public sealed partial class HasPrivilegesRequest : PlainRequest -{ - public HasPrivilegesRequest() - { - } - - public HasPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name? user) : base(r => r.Optional("user", user)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityHasPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.has_privileges"; - - [JsonInclude, JsonPropertyName("application")] - public ICollection? Application { get; set; } - - /// - /// - /// A list of the cluster privileges that you want to check. - /// - /// - [JsonInclude, JsonPropertyName("cluster")] - public ICollection? Cluster { get; set; } - [JsonInclude, JsonPropertyName("index")] - public ICollection? Index { get; set; } -} - -/// -/// -/// Check user privileges. -/// -/// -/// Determine whether the specified user has a specified list of privileges. -/// -/// -public sealed partial class HasPrivilegesRequestDescriptor : RequestDescriptor -{ - internal HasPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public HasPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? user) : base(r => r.Optional("user", user)) - { - } - - public HasPrivilegesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityHasPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.has_privileges"; - - public HasPrivilegesRequestDescriptor User(Elastic.Clients.Elasticsearch.Serverless.Name? user) - { - RouteValues.Optional("user", user); - return Self; - } - - private ICollection? ApplicationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor ApplicationDescriptor { get; set; } - private Action ApplicationDescriptorAction { get; set; } - private Action[] ApplicationDescriptorActions { get; set; } - private ICollection? ClusterValue { get; set; } - private ICollection? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor IndexDescriptor { get; set; } - private Action IndexDescriptorAction { get; set; } - private Action[] IndexDescriptorActions { get; set; } - - public HasPrivilegesRequestDescriptor Application(ICollection? application) - { - ApplicationDescriptor = null; - ApplicationDescriptorAction = null; - ApplicationDescriptorActions = null; - ApplicationValue = application; - return Self; - } - - public HasPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor descriptor) - { - ApplicationValue = null; - ApplicationDescriptorAction = null; - ApplicationDescriptorActions = null; - ApplicationDescriptor = descriptor; - return Self; - } - - public HasPrivilegesRequestDescriptor Application(Action configure) - { - ApplicationValue = null; - ApplicationDescriptor = null; - ApplicationDescriptorActions = null; - ApplicationDescriptorAction = configure; - return Self; - } - - public HasPrivilegesRequestDescriptor Application(params Action[] configure) - { - ApplicationValue = null; - ApplicationDescriptor = null; - ApplicationDescriptorAction = null; - ApplicationDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of the cluster privileges that you want to check. - /// - /// - public HasPrivilegesRequestDescriptor Cluster(ICollection? cluster) - { - ClusterValue = cluster; - return Self; - } - - public HasPrivilegesRequestDescriptor Index(ICollection? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexDescriptorActions = null; - IndexValue = index; - return Self; - } - - public HasPrivilegesRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptorActions = null; - IndexDescriptor = descriptor; - return Self; - } - - public HasPrivilegesRequestDescriptor Index(Action configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorActions = null; - IndexDescriptorAction = configure; - return Self; - } - - public HasPrivilegesRequestDescriptor Index(params Action[] configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ApplicationDescriptor is not null) - { - writer.WritePropertyName("application"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ApplicationDescriptor, options); - writer.WriteEndArray(); - } - else if (ApplicationDescriptorAction is not null) - { - writer.WritePropertyName("application"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor(ApplicationDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ApplicationDescriptorActions is not null) - { - writer.WritePropertyName("application"); - writer.WriteStartArray(); - foreach (var action in ApplicationDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ApplicationValue is not null) - { - writer.WritePropertyName("application"); - JsonSerializer.Serialize(writer, ApplicationValue, options); - } - - if (ClusterValue is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, ClusterValue, options); - } - - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - writer.WriteEndArray(); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor(IndexDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IndexDescriptorActions is not null) - { - writer.WritePropertyName("index"); - writer.WriteStartArray(); - foreach (var action in IndexDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.cs deleted file mode 100644 index 4411a6e4215..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class HasPrivilegesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("application")] - public IReadOnlyDictionary>> Application { get; init; } - [JsonInclude, JsonPropertyName("cluster")] - public IReadOnlyDictionary Cluster { get; init; } - [JsonInclude, JsonPropertyName("has_all_requested")] - public bool HasAllRequested { get; init; } - [JsonInclude, JsonPropertyName("index")] - [ReadOnlyIndexNameDictionaryConverter(typeof(IReadOnlyDictionary))] - public IReadOnlyDictionary> Index { get; init; } - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs deleted file mode 100644 index 56c7c266a74..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class HasPrivilegesUserProfileRequestParameters : RequestParameters -{ -} - -/// -/// -/// Check user profile privileges. -/// -/// -/// Determine whether the users associated with the specified user profile IDs have all the requested privileges. -/// -/// -public sealed partial class HasPrivilegesUserProfileRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityHasPrivilegesUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.has_privileges_user_profile"; - - [JsonInclude, JsonPropertyName("privileges")] - public Elastic.Clients.Elasticsearch.Serverless.Security.PrivilegesCheck Privileges { get; set; } - - /// - /// - /// A list of profile IDs. The privileges are checked for associated users of the profiles. - /// - /// - [JsonInclude, JsonPropertyName("uids")] - public ICollection Uids { get; set; } -} - -/// -/// -/// Check user profile privileges. -/// -/// -/// Determine whether the users associated with the specified user profile IDs have all the requested privileges. -/// -/// -public sealed partial class HasPrivilegesUserProfileRequestDescriptor : RequestDescriptor -{ - internal HasPrivilegesUserProfileRequestDescriptor(Action configure) => configure.Invoke(this); - - public HasPrivilegesUserProfileRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityHasPrivilegesUserProfile; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.has_privileges_user_profile"; - - private Elastic.Clients.Elasticsearch.Serverless.Security.PrivilegesCheck PrivilegesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.PrivilegesCheckDescriptor PrivilegesDescriptor { get; set; } - private Action PrivilegesDescriptorAction { get; set; } - private ICollection UidsValue { get; set; } - - public HasPrivilegesUserProfileRequestDescriptor Privileges(Elastic.Clients.Elasticsearch.Serverless.Security.PrivilegesCheck privileges) - { - PrivilegesDescriptor = null; - PrivilegesDescriptorAction = null; - PrivilegesValue = privileges; - return Self; - } - - public HasPrivilegesUserProfileRequestDescriptor Privileges(Elastic.Clients.Elasticsearch.Serverless.Security.PrivilegesCheckDescriptor descriptor) - { - PrivilegesValue = null; - PrivilegesDescriptorAction = null; - PrivilegesDescriptor = descriptor; - return Self; - } - - public HasPrivilegesUserProfileRequestDescriptor Privileges(Action configure) - { - PrivilegesValue = null; - PrivilegesDescriptor = null; - PrivilegesDescriptorAction = configure; - return Self; - } - - /// - /// - /// A list of profile IDs. The privileges are checked for associated users of the profiles. - /// - /// - public HasPrivilegesUserProfileRequestDescriptor Uids(ICollection uids) - { - UidsValue = uids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PrivilegesDescriptor is not null) - { - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesDescriptor, options); - } - else if (PrivilegesDescriptorAction is not null) - { - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.PrivilegesCheckDescriptor(PrivilegesDescriptorAction), options); - } - else - { - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesValue, options); - } - - writer.WritePropertyName("uids"); - JsonSerializer.Serialize(writer, UidsValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileResponse.g.cs deleted file mode 100644 index 050f0f7f9b3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesUserProfileResponse.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class HasPrivilegesUserProfileResponse : ElasticsearchResponse -{ - /// - /// - /// The subset of the requested profile IDs for which an error - /// was encountered. It does not include the missing profile IDs - /// or the profile IDs of the users that do not have all the - /// requested privileges. This field is absent if empty. - /// - /// - [JsonInclude, JsonPropertyName("errors")] - public Elastic.Clients.Elasticsearch.Serverless.Security.HasPrivilegesUserProfileErrors? Errors { get; init; } - - /// - /// - /// The subset of the requested profile IDs of the users that - /// have all the requested privileges. - /// - /// - [JsonInclude, JsonPropertyName("has_privilege_uids")] - public IReadOnlyCollection HasPrivilegeUids { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs deleted file mode 100644 index c4d81214b8a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs +++ /dev/null @@ -1,284 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class InvalidateApiKeyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Invalidate API keys. -/// -/// -/// This API invalidates API keys created by the create API key or grant API key APIs. -/// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. -/// The manage_api_key privilege allows deleting any API keys. -/// The manage_own_api_key only allows deleting API keys that are owned by the user. -/// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: -/// -/// -/// -/// -/// Set the parameter owner=true. -/// -/// -/// -/// -/// Or, set both username and realm_name to match the user’s identity. -/// -/// -/// -/// -/// Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the ids field. -/// -/// -/// -/// -public sealed partial class InvalidateApiKeyRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityInvalidateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.invalidate_api_key"; - - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// A list of API key ids. - /// This parameter cannot be used with any of name, realm_name, or username. - /// - /// - [JsonInclude, JsonPropertyName("ids")] - public ICollection? Ids { get; set; } - - /// - /// - /// An API key name. - /// This parameter cannot be used with any of ids, realm_name or username. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } - - /// - /// - /// Can be used to query API keys owned by the currently authenticated user. - /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones. - /// - /// - [JsonInclude, JsonPropertyName("owner")] - public bool? Owner { get; set; } - - /// - /// - /// The name of an authentication realm. - /// This parameter cannot be used with either ids or name, or when owner flag is set to true. - /// - /// - [JsonInclude, JsonPropertyName("realm_name")] - public string? RealmName { get; set; } - - /// - /// - /// The username of a user. - /// This parameter cannot be used with either ids or name, or when owner flag is set to true. - /// - /// - [JsonInclude, JsonPropertyName("username")] - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; } -} - -/// -/// -/// Invalidate API keys. -/// -/// -/// This API invalidates API keys created by the create API key or grant API key APIs. -/// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. -/// The manage_api_key privilege allows deleting any API keys. -/// The manage_own_api_key only allows deleting API keys that are owned by the user. -/// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: -/// -/// -/// -/// -/// Set the parameter owner=true. -/// -/// -/// -/// -/// Or, set both username and realm_name to match the user’s identity. -/// -/// -/// -/// -/// Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the ids field. -/// -/// -/// -/// -public sealed partial class InvalidateApiKeyRequestDescriptor : RequestDescriptor -{ - internal InvalidateApiKeyRequestDescriptor(Action configure) => configure.Invoke(this); - - public InvalidateApiKeyRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityInvalidateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.invalidate_api_key"; - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private ICollection? IdsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private bool? OwnerValue { get; set; } - private string? RealmNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; } - - public InvalidateApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// A list of API key ids. - /// This parameter cannot be used with any of name, realm_name, or username. - /// - /// - public InvalidateApiKeyRequestDescriptor Ids(ICollection? ids) - { - IdsValue = ids; - return Self; - } - - /// - /// - /// An API key name. - /// This parameter cannot be used with any of ids, realm_name or username. - /// - /// - public InvalidateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Can be used to query API keys owned by the currently authenticated user. - /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones. - /// - /// - public InvalidateApiKeyRequestDescriptor Owner(bool? owner = true) - { - OwnerValue = owner; - return Self; - } - - /// - /// - /// The name of an authentication realm. - /// This parameter cannot be used with either ids or name, or when owner flag is set to true. - /// - /// - public InvalidateApiKeyRequestDescriptor RealmName(string? realmName) - { - RealmNameValue = realmName; - return Self; - } - - /// - /// - /// The username of a user. - /// This parameter cannot be used with either ids or name, or when owner flag is set to true. - /// - /// - public InvalidateApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IdsValue is not null) - { - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (OwnerValue.HasValue) - { - writer.WritePropertyName("owner"); - writer.WriteBooleanValue(OwnerValue.Value); - } - - if (!string.IsNullOrEmpty(RealmNameValue)) - { - writer.WritePropertyName("realm_name"); - writer.WriteStringValue(RealmNameValue); - } - - if (UsernameValue is not null) - { - writer.WritePropertyName("username"); - JsonSerializer.Serialize(writer, UsernameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs deleted file mode 100644 index aa223f94def..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class InvalidateApiKeyResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("error_count")] - public int ErrorCount { get; init; } - [JsonInclude, JsonPropertyName("error_details")] - public IReadOnlyCollection? ErrorDetails { get; init; } - [JsonInclude, JsonPropertyName("invalidated_api_keys")] - public IReadOnlyCollection InvalidatedApiKeys { get; init; } - [JsonInclude, JsonPropertyName("previously_invalidated_api_keys")] - public IReadOnlyCollection PreviouslyInvalidatedApiKeys { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenRequest.g.cs deleted file mode 100644 index 91ad1b235ae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenRequest.g.cs +++ /dev/null @@ -1,159 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class InvalidateTokenRequestParameters : RequestParameters -{ -} - -/// -/// -/// Invalidate a token. -/// -/// -/// The access tokens returned by the get token API have a finite period of time for which they are valid. -/// After that time period, they can no longer be used. -/// The time period is defined by the xpack.security.authc.token.timeout setting. -/// -/// -/// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. -/// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. -/// -/// -public sealed partial class InvalidateTokenRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityInvalidateToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.invalidate_token"; - - [JsonInclude, JsonPropertyName("realm_name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? RealmName { get; set; } - [JsonInclude, JsonPropertyName("refresh_token")] - public string? RefreshToken { get; set; } - [JsonInclude, JsonPropertyName("token")] - public string? Token { get; set; } - [JsonInclude, JsonPropertyName("username")] - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; } -} - -/// -/// -/// Invalidate a token. -/// -/// -/// The access tokens returned by the get token API have a finite period of time for which they are valid. -/// After that time period, they can no longer be used. -/// The time period is defined by the xpack.security.authc.token.timeout setting. -/// -/// -/// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. -/// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. -/// -/// -public sealed partial class InvalidateTokenRequestDescriptor : RequestDescriptor -{ - internal InvalidateTokenRequestDescriptor(Action configure) => configure.Invoke(this); - - public InvalidateTokenRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityInvalidateToken; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.invalidate_token"; - - private Elastic.Clients.Elasticsearch.Serverless.Name? RealmNameValue { get; set; } - private string? RefreshTokenValue { get; set; } - private string? TokenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; } - - public InvalidateTokenRequestDescriptor RealmName(Elastic.Clients.Elasticsearch.Serverless.Name? realmName) - { - RealmNameValue = realmName; - return Self; - } - - public InvalidateTokenRequestDescriptor RefreshToken(string? refreshToken) - { - RefreshTokenValue = refreshToken; - return Self; - } - - public InvalidateTokenRequestDescriptor Token(string? token) - { - TokenValue = token; - return Self; - } - - public InvalidateTokenRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (RealmNameValue is not null) - { - writer.WritePropertyName("realm_name"); - JsonSerializer.Serialize(writer, RealmNameValue, options); - } - - if (!string.IsNullOrEmpty(RefreshTokenValue)) - { - writer.WritePropertyName("refresh_token"); - writer.WriteStringValue(RefreshTokenValue); - } - - if (!string.IsNullOrEmpty(TokenValue)) - { - writer.WritePropertyName("token"); - writer.WriteStringValue(TokenValue); - } - - if (UsernameValue is not null) - { - writer.WritePropertyName("username"); - JsonSerializer.Serialize(writer, UsernameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenResponse.g.cs deleted file mode 100644 index 7d3014db840..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/InvalidateTokenResponse.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class InvalidateTokenResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("error_count")] - public long ErrorCount { get; init; } - [JsonInclude, JsonPropertyName("error_details")] - public IReadOnlyCollection? ErrorDetails { get; init; } - [JsonInclude, JsonPropertyName("invalidated_tokens")] - public long InvalidatedTokens { get; init; } - [JsonInclude, JsonPropertyName("previously_invalidated_tokens")] - public long PreviouslyInvalidatedTokens { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesRequest.g.cs deleted file mode 100644 index 2a4b0e681d5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesRequest.g.cs +++ /dev/null @@ -1,110 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PutPrivilegesRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Create or update application privileges. -/// -/// -public sealed partial class PutPrivilegesRequest : PlainRequest, ISelfSerializable -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_privileges"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - public Dictionary> Privileges { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, Privileges, options); - } -} - -/// -/// -/// Create or update application privileges. -/// -/// -public sealed partial class PutPrivilegesRequestDescriptor : RequestDescriptor, ISelfSerializable -{ - internal PutPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutPrivilegesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutPrivileges; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_privileges"; - - public PutPrivilegesRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, _items, options); - } - - Dictionary> _items = new(); - - public PutPrivilegesRequestDescriptor AddPrivileges(string key, Dictionary value) - { - _items.Add(key, value); - return this; - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesResponse.g.cs deleted file mode 100644 index 8e250b9a89d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutPrivilegesResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PutPrivilegesResponse : DictionaryResponse> -{ - public PutPrivilegesResponse(IReadOnlyDictionary> dictionary) : base(dictionary) - { - } - - public PutPrivilegesResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingRequest.g.cs deleted file mode 100644 index 8b012008cd7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingRequest.g.cs +++ /dev/null @@ -1,302 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PutRoleMappingRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Create or update role mappings. -/// -/// -/// Role mappings define which roles are assigned to each user. -/// Each mapping has rules that identify users and a list of roles that are granted to those users. -/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. -/// -/// -/// This API does not create roles. Rather, it maps users to existing roles. -/// Roles can be created by using the create or update roles API or roles files. -/// -/// -public sealed partial class PutRoleMappingRequest : PlainRequest -{ - public PutRoleMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutRoleMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_role_mapping"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - [JsonInclude, JsonPropertyName("roles")] - public ICollection? Roles { get; set; } - [JsonInclude, JsonPropertyName("role_templates")] - public ICollection? RoleTemplates { get; set; } - [JsonInclude, JsonPropertyName("rules")] - public Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule? Rules { get; set; } - [JsonInclude, JsonPropertyName("run_as")] - public ICollection? RunAs { get; set; } -} - -/// -/// -/// Create or update role mappings. -/// -/// -/// Role mappings define which roles are assigned to each user. -/// Each mapping has rules that identify users and a list of roles that are granted to those users. -/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. -/// -/// -/// This API does not create roles. Rather, it maps users to existing roles. -/// Roles can be created by using the create or update roles API or roles files. -/// -/// -public sealed partial class PutRoleMappingRequestDescriptor : RequestDescriptor -{ - internal PutRoleMappingRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutRoleMapping; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_role_mapping"; - - public PutRoleMappingRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public PutRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? EnabledValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private ICollection? RolesValue { get; set; } - private ICollection? RoleTemplatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleTemplateDescriptor RoleTemplatesDescriptor { get; set; } - private Action RoleTemplatesDescriptorAction { get; set; } - private Action[] RoleTemplatesDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule? RulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRuleDescriptor RulesDescriptor { get; set; } - private Action RulesDescriptorAction { get; set; } - private ICollection? RunAsValue { get; set; } - - public PutRoleMappingRequestDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public PutRoleMappingRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PutRoleMappingRequestDescriptor Roles(ICollection? roles) - { - RolesValue = roles; - return Self; - } - - public PutRoleMappingRequestDescriptor RoleTemplates(ICollection? roleTemplates) - { - RoleTemplatesDescriptor = null; - RoleTemplatesDescriptorAction = null; - RoleTemplatesDescriptorActions = null; - RoleTemplatesValue = roleTemplates; - return Self; - } - - public PutRoleMappingRequestDescriptor RoleTemplates(Elastic.Clients.Elasticsearch.Serverless.Security.RoleTemplateDescriptor descriptor) - { - RoleTemplatesValue = null; - RoleTemplatesDescriptorAction = null; - RoleTemplatesDescriptorActions = null; - RoleTemplatesDescriptor = descriptor; - return Self; - } - - public PutRoleMappingRequestDescriptor RoleTemplates(Action configure) - { - RoleTemplatesValue = null; - RoleTemplatesDescriptor = null; - RoleTemplatesDescriptorActions = null; - RoleTemplatesDescriptorAction = configure; - return Self; - } - - public PutRoleMappingRequestDescriptor RoleTemplates(params Action[] configure) - { - RoleTemplatesValue = null; - RoleTemplatesDescriptor = null; - RoleTemplatesDescriptorAction = null; - RoleTemplatesDescriptorActions = configure; - return Self; - } - - public PutRoleMappingRequestDescriptor Rules(Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule? rules) - { - RulesDescriptor = null; - RulesDescriptorAction = null; - RulesValue = rules; - return Self; - } - - public PutRoleMappingRequestDescriptor Rules(Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRuleDescriptor descriptor) - { - RulesValue = null; - RulesDescriptorAction = null; - RulesDescriptor = descriptor; - return Self; - } - - public PutRoleMappingRequestDescriptor Rules(Action configure) - { - RulesValue = null; - RulesDescriptor = null; - RulesDescriptorAction = configure; - return Self; - } - - public PutRoleMappingRequestDescriptor RunAs(ICollection? runAs) - { - RunAsValue = runAs; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RolesValue is not null) - { - writer.WritePropertyName("roles"); - JsonSerializer.Serialize(writer, RolesValue, options); - } - - if (RoleTemplatesDescriptor is not null) - { - writer.WritePropertyName("role_templates"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RoleTemplatesDescriptor, options); - writer.WriteEndArray(); - } - else if (RoleTemplatesDescriptorAction is not null) - { - writer.WritePropertyName("role_templates"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RoleTemplateDescriptor(RoleTemplatesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RoleTemplatesDescriptorActions is not null) - { - writer.WritePropertyName("role_templates"); - writer.WriteStartArray(); - foreach (var action in RoleTemplatesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RoleTemplateDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RoleTemplatesValue is not null) - { - writer.WritePropertyName("role_templates"); - JsonSerializer.Serialize(writer, RoleTemplatesValue, options); - } - - if (RulesDescriptor is not null) - { - writer.WritePropertyName("rules"); - JsonSerializer.Serialize(writer, RulesDescriptor, options); - } - else if (RulesDescriptorAction is not null) - { - writer.WritePropertyName("rules"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRuleDescriptor(RulesDescriptorAction), options); - } - else if (RulesValue is not null) - { - writer.WritePropertyName("rules"); - JsonSerializer.Serialize(writer, RulesValue, options); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingResponse.g.cs deleted file mode 100644 index df37b6dc402..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleMappingResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PutRoleMappingResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("created")] - public bool? Created { get; init; } - [JsonInclude, JsonPropertyName("role_mapping")] - public Elastic.Clients.Elasticsearch.Serverless.Security.CreatedStatus RoleMapping { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleRequest.g.cs deleted file mode 100644 index 7cb42023af5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleRequest.g.cs +++ /dev/null @@ -1,698 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PutRoleRequestParameters : RequestParameters -{ - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Create or update roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. -/// The create or update roles API cannot update roles that are defined in roles files. -/// File-based role management is not available in Elastic Serverless. -/// -/// -public sealed partial class PutRoleRequest : PlainRequest -{ - public PutRoleRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_role"; - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// A list of application privilege entries. - /// - /// - [JsonInclude, JsonPropertyName("applications")] - public ICollection? Applications { get; set; } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster-level actions for users with this role. - /// - /// - [JsonInclude, JsonPropertyName("cluster")] - public ICollection? Cluster { get; set; } - - /// - /// - /// Optional description of the role descriptor - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// A list of indices permissions entries. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public ICollection? Indices { get; set; } - - /// - /// - /// Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - - /// - /// - /// A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - [JsonInclude, JsonPropertyName("run_as")] - public ICollection? RunAs { get; set; } - - /// - /// - /// Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If enabled is false, the role is ignored, but is still listed in the response from the authenticate API. - /// - /// - [JsonInclude, JsonPropertyName("transient_metadata")] - public IDictionary? TransientMetadata { get; set; } -} - -/// -/// -/// Create or update roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. -/// The create or update roles API cannot update roles that are defined in roles files. -/// File-based role management is not available in Elastic Serverless. -/// -/// -public sealed partial class PutRoleRequestDescriptor : RequestDescriptor, PutRoleRequestParameters> -{ - internal PutRoleRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutRoleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_role"; - - public PutRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public PutRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private ICollection? ApplicationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor ApplicationsDescriptor { get; set; } - private Action ApplicationsDescriptorAction { get; set; } - private Action[] ApplicationsDescriptorActions { get; set; } - private ICollection? ClusterValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor IndicesDescriptor { get; set; } - private Action> IndicesDescriptorAction { get; set; } - private Action>[] IndicesDescriptorActions { get; set; } - private IDictionary? MetadataValue { get; set; } - private ICollection? RunAsValue { get; set; } - private IDictionary? TransientMetadataValue { get; set; } - - /// - /// - /// A list of application privilege entries. - /// - /// - public PutRoleRequestDescriptor Applications(ICollection? applications) - { - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsValue = applications; - return Self; - } - - public PutRoleRequestDescriptor Applications(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor descriptor) - { - ApplicationsValue = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptor = descriptor; - return Self; - } - - public PutRoleRequestDescriptor Applications(Action configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptorAction = configure; - return Self; - } - - public PutRoleRequestDescriptor Applications(params Action[] configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster-level actions for users with this role. - /// - /// - public PutRoleRequestDescriptor Cluster(ICollection? cluster) - { - ClusterValue = cluster; - return Self; - } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public PutRoleRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public PutRoleRequestDescriptor Indices(ICollection? indices) - { - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesValue = indices; - return Self; - } - - public PutRoleRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor descriptor) - { - IndicesValue = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesDescriptor = descriptor; - return Self; - } - - public PutRoleRequestDescriptor Indices(Action> configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorActions = null; - IndicesDescriptorAction = configure; - return Self; - } - - public PutRoleRequestDescriptor Indices(params Action>[] configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use. - /// - /// - public PutRoleRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - public PutRoleRequestDescriptor RunAs(ICollection? runAs) - { - RunAsValue = runAs; - return Self; - } - - /// - /// - /// Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If enabled is false, the role is ignored, but is still listed in the response from the authenticate API. - /// - /// - public PutRoleRequestDescriptor TransientMetadata(Func, FluentDictionary> selector) - { - TransientMetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ApplicationsDescriptor is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ApplicationsDescriptor, options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorAction is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(ApplicationsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorActions is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - foreach (var action in ApplicationsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ApplicationsValue is not null) - { - writer.WritePropertyName("applications"); - JsonSerializer.Serialize(writer, ApplicationsValue, options); - } - - if (ClusterValue is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, ClusterValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (IndicesDescriptor is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IndicesDescriptor, options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorAction is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(IndicesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorActions is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - foreach (var action in IndicesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - if (TransientMetadataValue is not null) - { - writer.WritePropertyName("transient_metadata"); - JsonSerializer.Serialize(writer, TransientMetadataValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update roles. -/// -/// -/// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. -/// The create or update roles API cannot update roles that are defined in roles files. -/// File-based role management is not available in Elastic Serverless. -/// -/// -public sealed partial class PutRoleRequestDescriptor : RequestDescriptor -{ - internal PutRoleRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutRoleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityPutRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.put_role"; - - public PutRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public PutRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private ICollection? ApplicationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor ApplicationsDescriptor { get; set; } - private Action ApplicationsDescriptorAction { get; set; } - private Action[] ApplicationsDescriptorActions { get; set; } - private ICollection? ClusterValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor IndicesDescriptor { get; set; } - private Action IndicesDescriptorAction { get; set; } - private Action[] IndicesDescriptorActions { get; set; } - private IDictionary? MetadataValue { get; set; } - private ICollection? RunAsValue { get; set; } - private IDictionary? TransientMetadataValue { get; set; } - - /// - /// - /// A list of application privilege entries. - /// - /// - public PutRoleRequestDescriptor Applications(ICollection? applications) - { - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsValue = applications; - return Self; - } - - public PutRoleRequestDescriptor Applications(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor descriptor) - { - ApplicationsValue = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptor = descriptor; - return Self; - } - - public PutRoleRequestDescriptor Applications(Action configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptorAction = configure; - return Self; - } - - public PutRoleRequestDescriptor Applications(params Action[] configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster-level actions for users with this role. - /// - /// - public PutRoleRequestDescriptor Cluster(ICollection? cluster) - { - ClusterValue = cluster; - return Self; - } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public PutRoleRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public PutRoleRequestDescriptor Indices(ICollection? indices) - { - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesValue = indices; - return Self; - } - - public PutRoleRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor descriptor) - { - IndicesValue = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesDescriptor = descriptor; - return Self; - } - - public PutRoleRequestDescriptor Indices(Action configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorActions = null; - IndicesDescriptorAction = configure; - return Self; - } - - public PutRoleRequestDescriptor Indices(params Action[] configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use. - /// - /// - public PutRoleRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - public PutRoleRequestDescriptor RunAs(ICollection? runAs) - { - RunAsValue = runAs; - return Self; - } - - /// - /// - /// Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If enabled is false, the role is ignored, but is still listed in the response from the authenticate API. - /// - /// - public PutRoleRequestDescriptor TransientMetadata(Func, FluentDictionary> selector) - { - TransientMetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ApplicationsDescriptor is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ApplicationsDescriptor, options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorAction is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(ApplicationsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorActions is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - foreach (var action in ApplicationsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ApplicationsValue is not null) - { - writer.WritePropertyName("applications"); - JsonSerializer.Serialize(writer, ApplicationsValue, options); - } - - if (ClusterValue is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, ClusterValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (IndicesDescriptor is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IndicesDescriptor, options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorAction is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(IndicesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorActions is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - foreach (var action in IndicesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - if (TransientMetadataValue is not null) - { - writer.WritePropertyName("transient_metadata"); - JsonSerializer.Serialize(writer, TransientMetadataValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleResponse.g.cs deleted file mode 100644 index a08aebbae71..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/PutRoleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PutRoleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("role")] - public Elastic.Clients.Elasticsearch.Serverless.Security.CreatedStatus Role { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysRequest.g.cs deleted file mode 100644 index 4da4639b1b7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysRequest.g.cs +++ /dev/null @@ -1,752 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryApiKeysRequestParameters : RequestParameters -{ - /// - /// - /// Determines whether aggregation names are prefixed by their respective types in the response. - /// - /// - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Return the snapshot of the owner user's role descriptors associated with the API key. - /// An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors. - /// - /// - public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); } - - /// - /// - /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. - /// - /// - public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } -} - -internal sealed partial class QueryApiKeysRequestConverter : JsonConverter -{ - public override QueryApiKeysRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new QueryApiKeysRequest(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "from") - { - variant.From = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "search_after") - { - variant.SearchAfter = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "size") - { - variant.Size = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "sort") - { - variant.Sort = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, QueryApiKeysRequest value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.From.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(value.From.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.SearchAfter is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, value.SearchAfter, options); - } - - if (value.Size.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(value.Size.Value); - } - - if (value.Sort is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, value.Sort, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Find API keys with a query. -/// -/// -/// Get a paginated list of API keys and their information. You can optionally filter the results with a query. -/// -/// -[JsonConverter(typeof(QueryApiKeysRequestConverter))] -public sealed partial class QueryApiKeysRequest : PlainRequest -{ - public QueryApiKeysRequest() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryApiKeys; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_api_keys"; - - /// - /// - /// Determines whether aggregation names are prefixed by their respective types in the response. - /// - /// - [JsonIgnore] - public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - - /// - /// - /// Return the snapshot of the owner user's role descriptors associated with the API key. - /// An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors. - /// - /// - [JsonIgnore] - public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); } - - /// - /// - /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. - /// - /// - [JsonIgnore] - public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } - - /// - /// - /// Any aggregations to run over the corpus of returned API keys. - /// Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. - /// This supports only a subset of aggregation types, namely: terms, range, date_range, missing, - /// cardinality, value_count, composite, filter, and filters. - /// Additionally, aggregations only run over the same subset of fields that query works with. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// A query to filter which API keys to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following public information associated with an API key: id, type, name, - /// creation, expiration, invalidated, invalidation, username, realm, and metadata. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery? Query { get; set; } - - /// - /// - /// Search after definition - /// - /// - [JsonInclude, JsonPropertyName("search_after")] - public ICollection? SearchAfter { get; set; } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Other than id, all public fields of an API key are eligible for sorting. - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } -} - -/// -/// -/// Find API keys with a query. -/// -/// -/// Get a paginated list of API keys and their information. You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryApiKeysRequestDescriptor : RequestDescriptor, QueryApiKeysRequestParameters> -{ - internal QueryApiKeysRequestDescriptor(Action> configure) => configure.Invoke(this); - - public QueryApiKeysRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryApiKeys; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_api_keys"; - - public QueryApiKeysRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - public QueryApiKeysRequestDescriptor WithLimitedBy(bool? withLimitedBy = true) => Qs("with_limited_by", withLimitedBy); - public QueryApiKeysRequestDescriptor WithProfileUid(bool? withProfileUid = true) => Qs("with_profile_uid", withProfileUid); - - private IDictionary> AggregationsValue { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - - /// - /// - /// Any aggregations to run over the corpus of returned API keys. - /// Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. - /// This supports only a subset of aggregation types, namely: terms, range, date_range, missing, - /// cardinality, value_count, composite, filter, and filters. - /// Additionally, aggregations only run over the same subset of fields that query works with. - /// - /// - public QueryApiKeysRequestDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryApiKeysRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// A query to filter which API keys to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following public information associated with an API key: id, type, name, - /// creation, expiration, invalidated, invalidation, username, realm, and metadata. - /// - /// - public QueryApiKeysRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public QueryApiKeysRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public QueryApiKeysRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Search after definition - /// - /// - public QueryApiKeysRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryApiKeysRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Other than id, all public fields of an API key are eligible for sorting. - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - public QueryApiKeysRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public QueryApiKeysRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public QueryApiKeysRequestDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public QueryApiKeysRequestDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Find API keys with a query. -/// -/// -/// Get a paginated list of API keys and their information. You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryApiKeysRequestDescriptor : RequestDescriptor -{ - internal QueryApiKeysRequestDescriptor(Action configure) => configure.Invoke(this); - - public QueryApiKeysRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryApiKeys; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_api_keys"; - - public QueryApiKeysRequestDescriptor TypedKeys(bool? typedKeys = true) => Qs("typed_keys", typedKeys); - public QueryApiKeysRequestDescriptor WithLimitedBy(bool? withLimitedBy = true) => Qs("with_limited_by", withLimitedBy); - public QueryApiKeysRequestDescriptor WithProfileUid(bool? withProfileUid = true) => Qs("with_profile_uid", withProfileUid); - - private IDictionary AggregationsValue { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - - /// - /// - /// Any aggregations to run over the corpus of returned API keys. - /// Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. - /// This supports only a subset of aggregation types, namely: terms, range, date_range, missing, - /// cardinality, value_count, composite, filter, and filters. - /// Additionally, aggregations only run over the same subset of fields that query works with. - /// - /// - public QueryApiKeysRequestDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryApiKeysRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// A query to filter which API keys to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following public information associated with an API key: id, type, name, - /// creation, expiration, invalidated, invalidation, username, realm, and metadata. - /// - /// - public QueryApiKeysRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public QueryApiKeysRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public QueryApiKeysRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Search after definition - /// - /// - public QueryApiKeysRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryApiKeysRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Other than id, all public fields of an API key are eligible for sorting. - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - public QueryApiKeysRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public QueryApiKeysRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public QueryApiKeysRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public QueryApiKeysRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysResponse.g.cs deleted file mode 100644 index 2b1dc469d1f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryApiKeysResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryApiKeysResponse : ElasticsearchResponse -{ - /// - /// - /// The aggregations result, if requested. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary? Aggregations { get; init; } - - /// - /// - /// A list of API key information. - /// - /// - [JsonInclude, JsonPropertyName("api_keys")] - public IReadOnlyCollection ApiKeys { get; init; } - - /// - /// - /// The number of API keys returned in the response. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// The total number of API keys found. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleRequest.g.cs deleted file mode 100644 index 7aea332007d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleRequest.g.cs +++ /dev/null @@ -1,541 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryRoleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Find roles with a query. -/// -/// -/// Get roles in a paginated manner. You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryRoleRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_role"; - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// A query to filter which roles to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with roles: name, description, metadata, - /// applications.application, applications.privileges, applications.resources. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery? Query { get; set; } - - /// - /// - /// Search after definition - /// - /// - [JsonInclude, JsonPropertyName("search_after")] - public ICollection? SearchAfter { get; set; } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// All public fields of a role are eligible for sorting. - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } -} - -/// -/// -/// Find roles with a query. -/// -/// -/// Get roles in a paginated manner. You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryRoleRequestDescriptor : RequestDescriptor, QueryRoleRequestParameters> -{ - internal QueryRoleRequestDescriptor(Action> configure) => configure.Invoke(this); - - public QueryRoleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_role"; - - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleQueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryRoleRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// A query to filter which roles to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with roles: name, description, metadata, - /// applications.application, applications.privileges, applications.resources. - /// - /// - public QueryRoleRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public QueryRoleRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.RoleQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public QueryRoleRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Search after definition - /// - /// - public QueryRoleRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryRoleRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// All public fields of a role are eligible for sorting. - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - public QueryRoleRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public QueryRoleRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public QueryRoleRequestDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public QueryRoleRequestDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RoleQueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Find roles with a query. -/// -/// -/// Get roles in a paginated manner. You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryRoleRequestDescriptor : RequestDescriptor -{ - internal QueryRoleRequestDescriptor(Action configure) => configure.Invoke(this); - - public QueryRoleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryRole; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_role"; - - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RoleQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryRoleRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// A query to filter which roles to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with roles: name, description, metadata, - /// applications.application, applications.privileges, applications.resources. - /// - /// - public QueryRoleRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public QueryRoleRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.RoleQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public QueryRoleRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Search after definition - /// - /// - public QueryRoleRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryRoleRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// All public fields of a role are eligible for sorting. - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - public QueryRoleRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public QueryRoleRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public QueryRoleRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public QueryRoleRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RoleQueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleResponse.g.cs deleted file mode 100644 index 9d55064c136..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryRoleResponse.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryRoleResponse : ElasticsearchResponse -{ - /// - /// - /// The number of roles returned in the response. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// The list of roles. - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - - /// - /// - /// The total number of roles found. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserRequest.g.cs deleted file mode 100644 index 3d9242111bb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserRequest.g.cs +++ /dev/null @@ -1,559 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryUserRequestParameters : RequestParameters -{ - /// - /// - /// If true will return the User Profile ID for the users in the query result, if any. - /// - /// - public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } -} - -/// -/// -/// Find users with a query. -/// -/// -/// Get information for users in a paginated manner. -/// You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryUserRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryUser; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_user"; - - /// - /// - /// If true will return the User Profile ID for the users in the query result, if any. - /// - /// - [JsonIgnore] - public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// A query to filter which users to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with user: username, roles, enabled - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery? Query { get; set; } - - /// - /// - /// Search after definition - /// - /// - [JsonInclude, JsonPropertyName("search_after")] - public ICollection? SearchAfter { get; set; } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Fields eligible for sorting are: username, roles, enabled - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } -} - -/// -/// -/// Find users with a query. -/// -/// -/// Get information for users in a paginated manner. -/// You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryUserRequestDescriptor : RequestDescriptor, QueryUserRequestParameters> -{ - internal QueryUserRequestDescriptor(Action> configure) => configure.Invoke(this); - - public QueryUserRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryUser; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_user"; - - public QueryUserRequestDescriptor WithProfileUid(bool? withProfileUid = true) => Qs("with_profile_uid", withProfileUid); - - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.UserQueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryUserRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// A query to filter which users to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with user: username, roles, enabled - /// - /// - public QueryUserRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public QueryUserRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.UserQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public QueryUserRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Search after definition - /// - /// - public QueryUserRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryUserRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Fields eligible for sorting are: username, roles, enabled - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - public QueryUserRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public QueryUserRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public QueryUserRequestDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public QueryUserRequestDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.UserQueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Find users with a query. -/// -/// -/// Get information for users in a paginated manner. -/// You can optionally filter the results with a query. -/// -/// -public sealed partial class QueryUserRequestDescriptor : RequestDescriptor -{ - internal QueryUserRequestDescriptor(Action configure) => configure.Invoke(this); - - public QueryUserRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityQueryUser; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.query_user"; - - public QueryUserRequestDescriptor WithProfileUid(bool? withProfileUid = true) => Qs("with_profile_uid", withProfileUid); - - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.UserQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - - /// - /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryUserRequestDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// A query to filter which users to return. - /// If the query parameter is missing, it is equivalent to a match_all query. - /// The query supports a subset of query types, including match_all, bool, term, terms, match, - /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with user: username, roles, enabled - /// - /// - public QueryUserRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public QueryUserRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Security.UserQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public QueryUserRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Search after definition - /// - /// - public QueryUserRequestDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// The number of hits to return. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. - /// - /// - public QueryUserRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Fields eligible for sorting are: username, roles, enabled - /// In addition, sort can also be applied to the _doc field to sort by index order. - /// - /// - public QueryUserRequestDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public QueryUserRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public QueryUserRequestDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public QueryUserRequestDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.UserQueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserResponse.g.cs deleted file mode 100644 index adf3180f98f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/QueryUserResponse.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryUserResponse : ElasticsearchResponse -{ - /// - /// - /// The number of users returned in the response. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// The total number of users found. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } - - /// - /// - /// A list of user information. - /// - /// - [JsonInclude, JsonPropertyName("users")] - public IReadOnlyCollection Users { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateRequest.g.cs deleted file mode 100644 index 8222f4fdbf2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateRequest.g.cs +++ /dev/null @@ -1,156 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlAuthenticateRequestParameters : RequestParameters -{ -} - -/// -/// -/// Authenticate SAML. -/// -/// -/// Submits a SAML response message to Elasticsearch for consumption. -/// -/// -public sealed partial class SamlAuthenticateRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlAuthenticate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_authenticate"; - - /// - /// - /// The SAML response as it was sent by the user’s browser, usually a Base64 encoded XML document. - /// - /// - [JsonInclude, JsonPropertyName("content")] - public string Content { get; set; } - - /// - /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. - /// - /// - [JsonInclude, JsonPropertyName("ids")] - public Elastic.Clients.Elasticsearch.Serverless.Ids Ids { get; set; } - - /// - /// - /// The name of the realm that should authenticate the SAML response. Useful in cases where many SAML realms are defined. - /// - /// - [JsonInclude, JsonPropertyName("realm")] - public string? Realm { get; set; } -} - -/// -/// -/// Authenticate SAML. -/// -/// -/// Submits a SAML response message to Elasticsearch for consumption. -/// -/// -public sealed partial class SamlAuthenticateRequestDescriptor : RequestDescriptor -{ - internal SamlAuthenticateRequestDescriptor(Action configure) => configure.Invoke(this); - - public SamlAuthenticateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlAuthenticate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_authenticate"; - - private string ContentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ids IdsValue { get; set; } - private string? RealmValue { get; set; } - - /// - /// - /// The SAML response as it was sent by the user’s browser, usually a Base64 encoded XML document. - /// - /// - public SamlAuthenticateRequestDescriptor Content(string content) - { - ContentValue = content; - return Self; - } - - /// - /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. - /// - /// - public SamlAuthenticateRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.Ids ids) - { - IdsValue = ids; - return Self; - } - - /// - /// - /// The name of the realm that should authenticate the SAML response. Useful in cases where many SAML realms are defined. - /// - /// - public SamlAuthenticateRequestDescriptor Realm(string? realm) - { - RealmValue = realm; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("content"); - writer.WriteStringValue(ContentValue); - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - if (!string.IsNullOrEmpty(RealmValue)) - { - writer.WritePropertyName("realm"); - writer.WriteStringValue(RealmValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateResponse.g.cs deleted file mode 100644 index 9ba0d7b25de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlAuthenticateResponse.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlAuthenticateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("access_token")] - public string AccessToken { get; init; } - [JsonInclude, JsonPropertyName("expires_in")] - public int ExpiresIn { get; init; } - [JsonInclude, JsonPropertyName("realm")] - public string Realm { get; init; } - [JsonInclude, JsonPropertyName("refresh_token")] - public string RefreshToken { get; init; } - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs deleted file mode 100644 index 58b98982f3d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs +++ /dev/null @@ -1,182 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlCompleteLogoutRequestParameters : RequestParameters -{ -} - -/// -/// -/// Logout of SAML completely. -/// -/// -/// Verifies the logout response sent from the SAML IdP. -/// -/// -public sealed partial class SamlCompleteLogoutRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlCompleteLogout; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_complete_logout"; - - /// - /// - /// If the SAML IdP sends the logout response with the HTTP-Post binding, this field must be set to the value of the SAMLResponse form parameter from the logout response. - /// - /// - [JsonInclude, JsonPropertyName("content")] - public string? Content { get; set; } - - /// - /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. - /// - /// - [JsonInclude, JsonPropertyName("ids")] - public Elastic.Clients.Elasticsearch.Serverless.Ids Ids { get; set; } - - /// - /// - /// If the SAML IdP sends the logout response with the HTTP-Redirect binding, this field must be set to the query string of the redirect URI. - /// - /// - [JsonInclude, JsonPropertyName("query_string")] - public string? QueryString { get; set; } - - /// - /// - /// The name of the SAML realm in Elasticsearch for which the configuration is used to verify the logout response. - /// - /// - [JsonInclude, JsonPropertyName("realm")] - public string Realm { get; set; } -} - -/// -/// -/// Logout of SAML completely. -/// -/// -/// Verifies the logout response sent from the SAML IdP. -/// -/// -public sealed partial class SamlCompleteLogoutRequestDescriptor : RequestDescriptor -{ - internal SamlCompleteLogoutRequestDescriptor(Action configure) => configure.Invoke(this); - - public SamlCompleteLogoutRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlCompleteLogout; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_complete_logout"; - - private string? ContentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ids IdsValue { get; set; } - private string? QueryStringValue { get; set; } - private string RealmValue { get; set; } - - /// - /// - /// If the SAML IdP sends the logout response with the HTTP-Post binding, this field must be set to the value of the SAMLResponse form parameter from the logout response. - /// - /// - public SamlCompleteLogoutRequestDescriptor Content(string? content) - { - ContentValue = content; - return Self; - } - - /// - /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. - /// - /// - public SamlCompleteLogoutRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.Ids ids) - { - IdsValue = ids; - return Self; - } - - /// - /// - /// If the SAML IdP sends the logout response with the HTTP-Redirect binding, this field must be set to the query string of the redirect URI. - /// - /// - public SamlCompleteLogoutRequestDescriptor QueryString(string? queryString) - { - QueryStringValue = queryString; - return Self; - } - - /// - /// - /// The name of the SAML realm in Elasticsearch for which the configuration is used to verify the logout response. - /// - /// - public SamlCompleteLogoutRequestDescriptor Realm(string realm) - { - RealmValue = realm; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContentValue)) - { - writer.WritePropertyName("content"); - writer.WriteStringValue(ContentValue); - } - - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - if (!string.IsNullOrEmpty(QueryStringValue)) - { - writer.WritePropertyName("query_string"); - writer.WriteStringValue(QueryStringValue); - } - - writer.WritePropertyName("realm"); - writer.WriteStringValue(RealmValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutResponse.g.cs deleted file mode 100644 index 704c8499723..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlCompleteLogoutResponse.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlCompleteLogoutResponse : ElasticsearchResponse -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateRequest.g.cs deleted file mode 100644 index b631761eb4c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateRequest.g.cs +++ /dev/null @@ -1,168 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlInvalidateRequestParameters : RequestParameters -{ -} - -/// -/// -/// Invalidate SAML. -/// -/// -/// Submits a SAML LogoutRequest message to Elasticsearch for consumption. -/// -/// -public sealed partial class SamlInvalidateRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlInvalidate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_invalidate"; - - /// - /// - /// The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. - /// - /// - [JsonInclude, JsonPropertyName("acs")] - public string? Acs { get; set; } - - /// - /// - /// The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout. - /// This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. - /// If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. - /// In order for Elasticsearch to be able to verify the IdP’s signature, the value of the query_string field must be an exact match to the string provided by the browser. - /// The client application must not attempt to parse or process the string in any way. - /// - /// - [JsonInclude, JsonPropertyName("query_string")] - public string QueryString { get; set; } - - /// - /// - /// The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. - /// - /// - [JsonInclude, JsonPropertyName("realm")] - public string? Realm { get; set; } -} - -/// -/// -/// Invalidate SAML. -/// -/// -/// Submits a SAML LogoutRequest message to Elasticsearch for consumption. -/// -/// -public sealed partial class SamlInvalidateRequestDescriptor : RequestDescriptor -{ - internal SamlInvalidateRequestDescriptor(Action configure) => configure.Invoke(this); - - public SamlInvalidateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlInvalidate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_invalidate"; - - private string? AcsValue { get; set; } - private string QueryStringValue { get; set; } - private string? RealmValue { get; set; } - - /// - /// - /// The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. - /// - /// - public SamlInvalidateRequestDescriptor Acs(string? acs) - { - AcsValue = acs; - return Self; - } - - /// - /// - /// The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout. - /// This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. - /// If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. - /// In order for Elasticsearch to be able to verify the IdP’s signature, the value of the query_string field must be an exact match to the string provided by the browser. - /// The client application must not attempt to parse or process the string in any way. - /// - /// - public SamlInvalidateRequestDescriptor QueryString(string queryString) - { - QueryStringValue = queryString; - return Self; - } - - /// - /// - /// The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. - /// - /// - public SamlInvalidateRequestDescriptor Realm(string? realm) - { - RealmValue = realm; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AcsValue)) - { - writer.WritePropertyName("acs"); - writer.WriteStringValue(AcsValue); - } - - writer.WritePropertyName("query_string"); - writer.WriteStringValue(QueryStringValue); - if (!string.IsNullOrEmpty(RealmValue)) - { - writer.WritePropertyName("realm"); - writer.WriteStringValue(RealmValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateResponse.g.cs deleted file mode 100644 index 41fa0eb26b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlInvalidateResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlInvalidateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("invalidated")] - public int Invalidated { get; init; } - [JsonInclude, JsonPropertyName("realm")] - public string Realm { get; init; } - [JsonInclude, JsonPropertyName("redirect")] - public string Redirect { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutRequest.g.cs deleted file mode 100644 index 9b2ffde5d00..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlLogoutRequestParameters : RequestParameters -{ -} - -/// -/// -/// Logout of SAML. -/// -/// -/// Submits a request to invalidate an access token and refresh token. -/// -/// -public sealed partial class SamlLogoutRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlLogout; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_logout"; - - /// - /// - /// The refresh token that was returned as a response to calling the SAML authenticate API. - /// Alternatively, the most recent refresh token that was received after refreshing the original access token. - /// - /// - [JsonInclude, JsonPropertyName("refresh_token")] - public string? RefreshToken { get; set; } - - /// - /// - /// The access token that was returned as a response to calling the SAML authenticate API. - /// Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. - /// - /// - [JsonInclude, JsonPropertyName("token")] - public string Token { get; set; } -} - -/// -/// -/// Logout of SAML. -/// -/// -/// Submits a request to invalidate an access token and refresh token. -/// -/// -public sealed partial class SamlLogoutRequestDescriptor : RequestDescriptor -{ - internal SamlLogoutRequestDescriptor(Action configure) => configure.Invoke(this); - - public SamlLogoutRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlLogout; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_logout"; - - private string? RefreshTokenValue { get; set; } - private string TokenValue { get; set; } - - /// - /// - /// The refresh token that was returned as a response to calling the SAML authenticate API. - /// Alternatively, the most recent refresh token that was received after refreshing the original access token. - /// - /// - public SamlLogoutRequestDescriptor RefreshToken(string? refreshToken) - { - RefreshTokenValue = refreshToken; - return Self; - } - - /// - /// - /// The access token that was returned as a response to calling the SAML authenticate API. - /// Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. - /// - /// - public SamlLogoutRequestDescriptor Token(string token) - { - TokenValue = token; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(RefreshTokenValue)) - { - writer.WritePropertyName("refresh_token"); - writer.WriteStringValue(RefreshTokenValue); - } - - writer.WritePropertyName("token"); - writer.WriteStringValue(TokenValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutResponse.g.cs deleted file mode 100644 index 0d354b5df3a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlLogoutResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlLogoutResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("redirect")] - public string Redirect { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs deleted file mode 100644 index fab192886e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs +++ /dev/null @@ -1,170 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlPrepareAuthenticationRequestParameters : RequestParameters -{ -} - -/// -/// -/// Prepare SAML authentication. -/// -/// -/// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. -/// -/// -public sealed partial class SamlPrepareAuthenticationRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlPrepareAuthentication; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_prepare_authentication"; - - /// - /// - /// The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch. - /// The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. - /// - /// - [JsonInclude, JsonPropertyName("acs")] - public string? Acs { get; set; } - - /// - /// - /// The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request. - /// You must specify either this parameter or the acs parameter. - /// - /// - [JsonInclude, JsonPropertyName("realm")] - public string? Realm { get; set; } - - /// - /// - /// A string that will be included in the redirect URL that this API returns as the RelayState query parameter. - /// If the Authentication Request is signed, this value is used as part of the signature computation. - /// - /// - [JsonInclude, JsonPropertyName("relay_state")] - public string? RelayState { get; set; } -} - -/// -/// -/// Prepare SAML authentication. -/// -/// -/// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. -/// -/// -public sealed partial class SamlPrepareAuthenticationRequestDescriptor : RequestDescriptor -{ - internal SamlPrepareAuthenticationRequestDescriptor(Action configure) => configure.Invoke(this); - - public SamlPrepareAuthenticationRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlPrepareAuthentication; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.saml_prepare_authentication"; - - private string? AcsValue { get; set; } - private string? RealmValue { get; set; } - private string? RelayStateValue { get; set; } - - /// - /// - /// The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch. - /// The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. - /// - /// - public SamlPrepareAuthenticationRequestDescriptor Acs(string? acs) - { - AcsValue = acs; - return Self; - } - - /// - /// - /// The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request. - /// You must specify either this parameter or the acs parameter. - /// - /// - public SamlPrepareAuthenticationRequestDescriptor Realm(string? realm) - { - RealmValue = realm; - return Self; - } - - /// - /// - /// A string that will be included in the redirect URL that this API returns as the RelayState query parameter. - /// If the Authentication Request is signed, this value is used as part of the signature computation. - /// - /// - public SamlPrepareAuthenticationRequestDescriptor RelayState(string? relayState) - { - RelayStateValue = relayState; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AcsValue)) - { - writer.WritePropertyName("acs"); - writer.WriteStringValue(AcsValue); - } - - if (!string.IsNullOrEmpty(RealmValue)) - { - writer.WritePropertyName("realm"); - writer.WriteStringValue(RealmValue); - } - - if (!string.IsNullOrEmpty(RelayStateValue)) - { - writer.WritePropertyName("relay_state"); - writer.WriteStringValue(RelayStateValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs deleted file mode 100644 index 892f9c1435b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlPrepareAuthenticationResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("realm")] - public string Realm { get; init; } - [JsonInclude, JsonPropertyName("redirect")] - public string Redirect { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs deleted file mode 100644 index 601fd669ecb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlServiceProviderMetadataRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create SAML service provider metadata. -/// -/// -/// Generate SAML metadata for a SAML 2.0 Service Provider. -/// -/// -public sealed partial class SamlServiceProviderMetadataRequest : PlainRequest -{ - public SamlServiceProviderMetadataRequest(Elastic.Clients.Elasticsearch.Serverless.Name realmName) : base(r => r.Required("realm_name", realmName)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlServiceProviderMetadata; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.saml_service_provider_metadata"; -} - -/// -/// -/// Create SAML service provider metadata. -/// -/// -/// Generate SAML metadata for a SAML 2.0 Service Provider. -/// -/// -public sealed partial class SamlServiceProviderMetadataRequestDescriptor : RequestDescriptor -{ - internal SamlServiceProviderMetadataRequestDescriptor(Action configure) => configure.Invoke(this); - - public SamlServiceProviderMetadataRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name realmName) : base(r => r.Required("realm_name", realmName)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySamlServiceProviderMetadata; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "security.saml_service_provider_metadata"; - - public SamlServiceProviderMetadataRequestDescriptor RealmName(Elastic.Clients.Elasticsearch.Serverless.Name realmName) - { - RouteValues.Required("realm_name", realmName); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs deleted file mode 100644 index 05aec4d42a5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SamlServiceProviderMetadataResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("metadata")] - public string Metadata { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs deleted file mode 100644 index 8aa590fb3b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs +++ /dev/null @@ -1,235 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SuggestUserProfilesRequestParameters : RequestParameters -{ -} - -/// -/// -/// Suggest a user profile. -/// -/// -/// Get suggestions for user profiles that match specified search criteria. -/// -/// -public sealed partial class SuggestUserProfilesRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySuggestUserProfiles; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.suggest_user_profiles"; - - /// - /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. - /// By default returns no data content. - /// - /// - [JsonInclude, JsonPropertyName("data")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Data { get; set; } - - /// - /// - /// Extra search criteria to improve relevance of the suggestion result. - /// Profiles matching the spcified hint are ranked higher in the response. - /// Profiles not matching the hint don't exclude the profile from the response - /// as long as the profile matches the name field query. - /// - /// - [JsonInclude, JsonPropertyName("hint")] - public Elastic.Clients.Elasticsearch.Serverless.Security.Hint? Hint { get; set; } - - /// - /// - /// Query string used to match name-related fields in user profile documents. - /// Name-related fields are the user's username, full_name, and email. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// Number of profiles to return. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public long? Size { get; set; } -} - -/// -/// -/// Suggest a user profile. -/// -/// -/// Get suggestions for user profiles that match specified search criteria. -/// -/// -public sealed partial class SuggestUserProfilesRequestDescriptor : RequestDescriptor -{ - internal SuggestUserProfilesRequestDescriptor(Action configure) => configure.Invoke(this); - - public SuggestUserProfilesRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecuritySuggestUserProfiles; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.suggest_user_profiles"; - - private ICollection? DataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.Hint? HintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.HintDescriptor HintDescriptor { get; set; } - private Action HintDescriptorAction { get; set; } - private string? NameValue { get; set; } - private long? SizeValue { get; set; } - - /// - /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. - /// By default returns no data content. - /// - /// - public SuggestUserProfilesRequestDescriptor Data(ICollection? data) - { - DataValue = data; - return Self; - } - - /// - /// - /// Extra search criteria to improve relevance of the suggestion result. - /// Profiles matching the spcified hint are ranked higher in the response. - /// Profiles not matching the hint don't exclude the profile from the response - /// as long as the profile matches the name field query. - /// - /// - public SuggestUserProfilesRequestDescriptor Hint(Elastic.Clients.Elasticsearch.Serverless.Security.Hint? hint) - { - HintDescriptor = null; - HintDescriptorAction = null; - HintValue = hint; - return Self; - } - - public SuggestUserProfilesRequestDescriptor Hint(Elastic.Clients.Elasticsearch.Serverless.Security.HintDescriptor descriptor) - { - HintValue = null; - HintDescriptorAction = null; - HintDescriptor = descriptor; - return Self; - } - - public SuggestUserProfilesRequestDescriptor Hint(Action configure) - { - HintValue = null; - HintDescriptor = null; - HintDescriptorAction = configure; - return Self; - } - - /// - /// - /// Query string used to match name-related fields in user profile documents. - /// Name-related fields are the user's username, full_name, and email. - /// - /// - public SuggestUserProfilesRequestDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Number of profiles to return. - /// - /// - public SuggestUserProfilesRequestDescriptor Size(long? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DataValue is not null) - { - writer.WritePropertyName("data"); - SingleOrManySerializationHelper.Serialize(DataValue, writer, options); - } - - if (HintDescriptor is not null) - { - writer.WritePropertyName("hint"); - JsonSerializer.Serialize(writer, HintDescriptor, options); - } - else if (HintDescriptorAction is not null) - { - writer.WritePropertyName("hint"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.HintDescriptor(HintDescriptorAction), options); - } - else if (HintValue is not null) - { - writer.WritePropertyName("hint"); - JsonSerializer.Serialize(writer, HintValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs deleted file mode 100644 index 3ec3181c5a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SuggestUserProfilesResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("profiles")] - public IReadOnlyCollection Profiles { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Security.TotalUserProfiles Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyRequest.g.cs deleted file mode 100644 index aa6dbc91c92..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyRequest.g.cs +++ /dev/null @@ -1,302 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UpdateApiKeyRequestParameters : RequestParameters -{ -} - -/// -/// -/// Update an API key. -/// -/// -/// Updates attributes of an existing API key. -/// Users can only update API keys that they created or that were granted to them. -/// Use this API to update API keys created by the create API Key or grant API Key APIs. -/// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. -/// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. -/// This API supports updates to an API key’s access scope and metadata. -/// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. -/// The snapshot of the owner’s permissions is updated automatically on every call. -/// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. -/// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. -/// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. -/// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. -/// To update an API key, the owner user’s credentials are required. -/// -/// -public sealed partial class UpdateApiKeyRequest : PlainRequest -{ - public UpdateApiKeyRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.update_api_key"; - - /// - /// - /// Expiration time for the API key. - /// - /// - [JsonInclude, JsonPropertyName("expiration")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Expiration { get; set; } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - - /// - /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. - /// - /// - [JsonInclude, JsonPropertyName("role_descriptors")] - public IDictionary? RoleDescriptors { get; set; } -} - -/// -/// -/// Update an API key. -/// -/// -/// Updates attributes of an existing API key. -/// Users can only update API keys that they created or that were granted to them. -/// Use this API to update API keys created by the create API Key or grant API Key APIs. -/// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. -/// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. -/// This API supports updates to an API key’s access scope and metadata. -/// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. -/// The snapshot of the owner’s permissions is updated automatically on every call. -/// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. -/// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. -/// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. -/// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. -/// To update an API key, the owner user’s credentials are required. -/// -/// -public sealed partial class UpdateApiKeyRequestDescriptor : RequestDescriptor, UpdateApiKeyRequestParameters> -{ - internal UpdateApiKeyRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateApiKeyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.update_api_key"; - - public UpdateApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpirationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private IDictionary> RoleDescriptorsValue { get; set; } - - /// - /// - /// Expiration time for the API key. - /// - /// - public UpdateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Serverless.Duration? expiration) - { - ExpirationValue = expiration; - return Self; - } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public UpdateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. - /// - /// - public UpdateApiKeyRequestDescriptor RoleDescriptors(Func>, FluentDescriptorDictionary>> selector) - { - RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExpirationValue is not null) - { - writer.WritePropertyName("expiration"); - JsonSerializer.Serialize(writer, ExpirationValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RoleDescriptorsValue is not null) - { - writer.WritePropertyName("role_descriptors"); - JsonSerializer.Serialize(writer, RoleDescriptorsValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update an API key. -/// -/// -/// Updates attributes of an existing API key. -/// Users can only update API keys that they created or that were granted to them. -/// Use this API to update API keys created by the create API Key or grant API Key APIs. -/// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. -/// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. -/// This API supports updates to an API key’s access scope and metadata. -/// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. -/// The snapshot of the owner’s permissions is updated automatically on every call. -/// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. -/// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. -/// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. -/// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. -/// To update an API key, the owner user’s credentials are required. -/// -/// -public sealed partial class UpdateApiKeyRequestDescriptor : RequestDescriptor -{ - internal UpdateApiKeyRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateApiKeyRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateApiKey; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.update_api_key"; - - public UpdateApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpirationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private IDictionary RoleDescriptorsValue { get; set; } - - /// - /// - /// Expiration time for the API key. - /// - /// - public UpdateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Serverless.Duration? expiration) - { - ExpirationValue = expiration; - return Self; - } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public UpdateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. - /// - /// - public UpdateApiKeyRequestDescriptor RoleDescriptors(Func, FluentDescriptorDictionary> selector) - { - RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExpirationValue is not null) - { - writer.WritePropertyName("expiration"); - JsonSerializer.Serialize(writer, ExpirationValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RoleDescriptorsValue is not null) - { - writer.WritePropertyName("role_descriptors"); - JsonSerializer.Serialize(writer, RoleDescriptorsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyResponse.g.cs deleted file mode 100644 index c9a0279b423..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateApiKeyResponse.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UpdateApiKeyResponse : ElasticsearchResponse -{ - /// - /// - /// If true, the API key was updated. - /// If false, the API key didn’t change because no change was detected. - /// - /// - [JsonInclude, JsonPropertyName("updated")] - public bool Updated { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs deleted file mode 100644 index 3b56008f30a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs +++ /dev/null @@ -1,204 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UpdateUserProfileDataRequestParameters : RequestParameters -{ - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } -} - -/// -/// -/// Update user profile data. -/// -/// -/// Update specific data for the user profile that is associated with a unique ID. -/// -/// -public sealed partial class UpdateUserProfileDataRequest : PlainRequest -{ - public UpdateUserProfileDataRequest(string uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateUserProfileData; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.update_user_profile_data"; - - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - [JsonIgnore] - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - [JsonIgnore] - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// Non-searchable data that you want to associate with the user profile. - /// This field supports a nested data structure. - /// - /// - [JsonInclude, JsonPropertyName("data")] - public IDictionary? Data { get; set; } - - /// - /// - /// Searchable data that you want to associate with the user profile. This - /// field supports a nested data structure. - /// - /// - [JsonInclude, JsonPropertyName("labels")] - public IDictionary? Labels { get; set; } -} - -/// -/// -/// Update user profile data. -/// -/// -/// Update specific data for the user profile that is associated with a unique ID. -/// -/// -public sealed partial class UpdateUserProfileDataRequestDescriptor : RequestDescriptor -{ - internal UpdateUserProfileDataRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateUserProfileDataRequestDescriptor(string uid) : base(r => r.Required("uid", uid)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateUserProfileData; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "security.update_user_profile_data"; - - public UpdateUserProfileDataRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); - public UpdateUserProfileDataRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); - public UpdateUserProfileDataRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - - public UpdateUserProfileDataRequestDescriptor Uid(string uid) - { - RouteValues.Required("uid", uid); - return Self; - } - - private IDictionary? DataValue { get; set; } - private IDictionary? LabelsValue { get; set; } - - /// - /// - /// Non-searchable data that you want to associate with the user profile. - /// This field supports a nested data structure. - /// - /// - public UpdateUserProfileDataRequestDescriptor Data(Func, FluentDictionary> selector) - { - DataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Searchable data that you want to associate with the user profile. This - /// field supports a nested data structure. - /// - /// - public UpdateUserProfileDataRequestDescriptor Labels(Func, FluentDictionary> selector) - { - LabelsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DataValue is not null) - { - writer.WritePropertyName("data"); - JsonSerializer.Serialize(writer, DataValue, options); - } - - if (LabelsValue is not null) - { - writer.WritePropertyName("labels"); - JsonSerializer.Serialize(writer, LabelsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataResponse.g.cs deleted file mode 100644 index 1c0d0221b89..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/UpdateUserProfileDataResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UpdateUserProfileDataResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs deleted file mode 100644 index 59d830881ff..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CleanupRepositoryRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Clean up the snapshot repository. -/// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. -/// -/// -public sealed partial class CleanupRepositoryRequest : PlainRequest -{ - public CleanupRepositoryRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotCleanupRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.cleanup_repository"; - - /// - /// - /// Period to wait for a connection to the master node. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Clean up the snapshot repository. -/// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. -/// -/// -public sealed partial class CleanupRepositoryRequestDescriptor : RequestDescriptor -{ - internal CleanupRepositoryRequestDescriptor(Action configure) => configure.Invoke(this); - - public CleanupRepositoryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotCleanupRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.cleanup_repository"; - - public CleanupRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CleanupRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public CleanupRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("repository", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryResponse.g.cs deleted file mode 100644 index 55ac4578906..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CleanupRepositoryResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CleanupRepositoryResponse : ElasticsearchResponse -{ - /// - /// - /// Statistics for cleanup operations. - /// - /// - [JsonInclude, JsonPropertyName("results")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.CleanupRepositoryResults Results { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs deleted file mode 100644 index 0407321a189..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs +++ /dev/null @@ -1,135 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CloneSnapshotRequestParameters : RequestParameters -{ - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Clone a snapshot. -/// Clone part of all of a snapshot into another snapshot in the same repository. -/// -/// -public sealed partial class CloneSnapshotRequest : PlainRequest -{ - public CloneSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Elastic.Clients.Elasticsearch.Serverless.Name targetSnapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot).Required("target_snapshot", targetSnapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotClone; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.clone"; - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - [JsonInclude, JsonPropertyName("indices")] - public string Indices { get; set; } -} - -/// -/// -/// Clone a snapshot. -/// Clone part of all of a snapshot into another snapshot in the same repository. -/// -/// -public sealed partial class CloneSnapshotRequestDescriptor : RequestDescriptor -{ - internal CloneSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public CloneSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Elastic.Clients.Elasticsearch.Serverless.Name targetSnapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot).Required("target_snapshot", targetSnapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotClone; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.clone"; - - public CloneSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CloneSnapshotRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public CloneSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name repository) - { - RouteValues.Required("repository", repository); - return Self; - } - - public CloneSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Name snapshot) - { - RouteValues.Required("snapshot", snapshot); - return Self; - } - - public CloneSnapshotRequestDescriptor TargetSnapshot(Elastic.Clients.Elasticsearch.Serverless.Name targetSnapshot) - { - RouteValues.Required("target_snapshot", targetSnapshot); - return Self; - } - - private string IndicesValue { get; set; } - - public CloneSnapshotRequestDescriptor Indices(string indices) - { - IndicesValue = indices; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("indices"); - writer.WriteStringValue(IndicesValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotResponse.g.cs deleted file mode 100644 index 270cd3d5615..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CloneSnapshotResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CloneSnapshotResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs deleted file mode 100644 index a7e7ff20cc7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CreateRepositoryRequestParameters : RequestParameters -{ - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit operation timeout - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Whether to verify the repository after creation - /// - /// - public bool? Verify { get => Q("verify"); set => Q("verify", value); } -} - -/// -/// -/// Create or update a snapshot repository. -/// IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. -/// To register a snapshot repository, the cluster's global metadata must be writeable. -/// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. -/// -/// -public sealed partial class CreateRepositoryRequest : PlainRequest, ISelfSerializable -{ - public CreateRepositoryRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotCreateRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.create_repository"; - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit operation timeout - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Whether to verify the repository after creation - /// - /// - [JsonIgnore] - public bool? Verify { get => Q("verify"); set => Q("verify", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.IRepository Repository { get; set; } - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, Repository, options); - } -} - -/// -/// -/// Create or update a snapshot repository. -/// IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. -/// To register a snapshot repository, the cluster's global metadata must be writeable. -/// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. -/// -/// -public sealed partial class CreateRepositoryRequestDescriptor : RequestDescriptor -{ - internal CreateRepositoryRequestDescriptor(Action configure) => configure.Invoke(this); - public CreateRepositoryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Snapshot.IRepository repository, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("repository", name)) => RepositoryValue = repository; - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotCreateRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.create_repository"; - - public CreateRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CreateRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public CreateRepositoryRequestDescriptor Verify(bool? verify = true) => Qs("verify", verify); - - public CreateRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("repository", name); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.IRepository RepositoryValue { get; set; } - - public CreateRepositoryRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Snapshot.IRepository repository) - { - RepositoryValue = repository; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - JsonSerializer.Serialize(writer, RepositoryValue, options); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryResponse.g.cs deleted file mode 100644 index 8ad697984f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateRepositoryResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CreateRepositoryResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs deleted file mode 100644 index 44ff7ec4ed4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs +++ /dev/null @@ -1,286 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CreateSnapshotRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// If true, the request returns a response when the snapshot is complete. If false, the request returns a response when the snapshot initializes. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Create a snapshot. -/// Take a snapshot of a cluster or of data streams and indices. -/// -/// -public sealed partial class CreateSnapshotRequest : PlainRequest -{ - public CreateSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.create"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// If true, the request returns a response when the snapshot is complete. If false, the request returns a response when the snapshot initializes. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// - /// Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If include_global_state is true, all current feature states are included by default. If include_global_state is false, no feature states are included by default. - /// - /// - [JsonInclude, JsonPropertyName("feature_states")] - public ICollection? FeatureStates { get; set; } - - /// - /// - /// If true, the request ignores data streams and indices in indices that are missing or closed. If false, the request returns an error for any data stream or index that is missing or closed. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unavailable")] - public bool? IgnoreUnavailable { get; set; } - - /// - /// - /// If true, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via feature_states). - /// - /// - [JsonInclude, JsonPropertyName("include_global_state")] - public bool? IncludeGlobalState { get; set; } - - /// - /// - /// Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - - /// - /// - /// If true, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - [JsonInclude, JsonPropertyName("partial")] - public bool? Partial { get; set; } -} - -/// -/// -/// Create a snapshot. -/// Take a snapshot of a cluster or of data streams and indices. -/// -/// -public sealed partial class CreateSnapshotRequestDescriptor : RequestDescriptor -{ - internal CreateSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public CreateSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotCreate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.create"; - - public CreateSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public CreateSnapshotRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public CreateSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name repository) - { - RouteValues.Required("repository", repository); - return Self; - } - - public CreateSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Name snapshot) - { - RouteValues.Required("snapshot", snapshot); - return Self; - } - - private ICollection? FeatureStatesValue { get; set; } - private bool? IgnoreUnavailableValue { get; set; } - private bool? IncludeGlobalStateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private bool? PartialValue { get; set; } - - /// - /// - /// Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If include_global_state is true, all current feature states are included by default. If include_global_state is false, no feature states are included by default. - /// - /// - public CreateSnapshotRequestDescriptor FeatureStates(ICollection? featureStates) - { - FeatureStatesValue = featureStates; - return Self; - } - - /// - /// - /// If true, the request ignores data streams and indices in indices that are missing or closed. If false, the request returns an error for any data stream or index that is missing or closed. - /// - /// - public CreateSnapshotRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) - { - IgnoreUnavailableValue = ignoreUnavailable; - return Self; - } - - /// - /// - /// If true, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via feature_states). - /// - /// - public CreateSnapshotRequestDescriptor IncludeGlobalState(bool? includeGlobalState = true) - { - IncludeGlobalStateValue = includeGlobalState; - return Self; - } - - /// - /// - /// Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default. - /// - /// - public CreateSnapshotRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. - /// - /// - public CreateSnapshotRequestDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// If true, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - public CreateSnapshotRequestDescriptor Partial(bool? partial = true) - { - PartialValue = partial; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FeatureStatesValue is not null) - { - writer.WritePropertyName("feature_states"); - JsonSerializer.Serialize(writer, FeatureStatesValue, options); - } - - if (IgnoreUnavailableValue.HasValue) - { - writer.WritePropertyName("ignore_unavailable"); - writer.WriteBooleanValue(IgnoreUnavailableValue.Value); - } - - if (IncludeGlobalStateValue.HasValue) - { - writer.WritePropertyName("include_global_state"); - writer.WriteBooleanValue(IncludeGlobalStateValue.Value); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (PartialValue.HasValue) - { - writer.WritePropertyName("partial"); - writer.WriteBooleanValue(PartialValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs deleted file mode 100644 index 5a29b97af9c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CreateSnapshotResponse : ElasticsearchResponse -{ - /// - /// - /// Equals true if the snapshot was accepted. Present when the request had wait_for_completion set to false - /// - /// - [JsonInclude, JsonPropertyName("accepted")] - public bool? Accepted { get; init; } - - /// - /// - /// Snapshot information. Present when the request had wait_for_completion set to true - /// - /// - [JsonInclude, JsonPropertyName("snapshot")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotInfo? Snapshot { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs deleted file mode 100644 index 8446675ce42..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs +++ /dev/null @@ -1,123 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class DeleteRepositoryRequestParameters : RequestParameters -{ - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit operation timeout - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete snapshot repositories. -/// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. -/// The snapshots themselves are left untouched and in place. -/// -/// -public sealed partial class DeleteRepositoryRequest : PlainRequest -{ - public DeleteRepositoryRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotDeleteRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.delete_repository"; - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit operation timeout - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete snapshot repositories. -/// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. -/// The snapshots themselves are left untouched and in place. -/// -/// -public sealed partial class DeleteRepositoryRequestDescriptor : RequestDescriptor -{ - internal DeleteRepositoryRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteRepositoryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotDeleteRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.delete_repository"; - - public DeleteRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public DeleteRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name) - { - RouteValues.Required("repository", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryResponse.g.cs deleted file mode 100644 index b9feee61eab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteRepositoryResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class DeleteRepositoryResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs deleted file mode 100644 index 42dfe18f7a5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs +++ /dev/null @@ -1,109 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class DeleteSnapshotRequestParameters : RequestParameters -{ - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Delete snapshots. -/// -/// -public sealed partial class DeleteSnapshotRequest : PlainRequest -{ - public DeleteSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.delete"; - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Delete snapshots. -/// -/// -public sealed partial class DeleteSnapshotRequestDescriptor : RequestDescriptor -{ - internal DeleteSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotDelete; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.delete"; - - public DeleteSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public DeleteSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name repository) - { - RouteValues.Required("repository", repository); - return Self; - } - - public DeleteSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Name snapshot) - { - RouteValues.Required("snapshot", snapshot); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotResponse.g.cs deleted file mode 100644 index 1657e82dd35..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/DeleteSnapshotResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class DeleteSnapshotResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs deleted file mode 100644 index 80da7c29d60..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class GetRepositoryRequestParameters : RequestParameters -{ - /// - /// - /// Return local information, do not retrieve the state from master node (default: false) - /// - /// - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get snapshot repository information. -/// -/// -public sealed partial class GetRepositoryRequest : PlainRequest -{ - public GetRepositoryRequest() - { - } - - public GetRepositoryRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotGetRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.get_repository"; - - /// - /// - /// Return local information, do not retrieve the state from master node (default: false) - /// - /// - [JsonIgnore] - public bool? Local { get => Q("local"); set => Q("local", value); } - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get snapshot repository information. -/// -/// -public sealed partial class GetRepositoryRequestDescriptor : RequestDescriptor -{ - internal GetRepositoryRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetRepositoryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("repository", name)) - { - } - - public GetRepositoryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotGetRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.get_repository"; - - public GetRepositoryRequestDescriptor Local(bool? local = true) => Qs("local", local); - public GetRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public GetRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name) - { - RouteValues.Optional("repository", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs deleted file mode 100644 index c1909d68426..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class GetRepositoryResponse : DictionaryResponse -{ - public GetRepositoryResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetRepositoryResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs deleted file mode 100644 index e24aa458406..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs +++ /dev/null @@ -1,301 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class GetSnapshotRequestParameters : RequestParameters -{ - /// - /// - /// Offset identifier to start pagination from as returned by the next field in the response body. - /// - /// - public string? After { get => Q("after"); set => Q("after", value); } - - /// - /// - /// Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. - /// - /// - public string? FromSortValue { get => Q("from_sort_value"); set => Q("from_sort_value", value); } - - /// - /// - /// If false, the request returns an error for any snapshots that are unavailable. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, returns the repository name in each snapshot. - /// - /// - public bool? IncludeRepository { get => Q("include_repository"); set => Q("include_repository", value); } - - /// - /// - /// If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. - /// - /// - public bool? IndexDetails { get => Q("index_details"); set => Q("index_details", value); } - - /// - /// - /// If true, returns the name of each index in each snapshot. - /// - /// - public bool? IndexNames { get => Q("index_names"); set => Q("index_names", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0. - /// - /// - public int? Offset { get => Q("offset"); set => Q("offset", value); } - - /// - /// - /// Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get => Q("order"); set => Q("order", value); } - - /// - /// - /// Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Name? SlmPolicyFilter { get => Q("slm_policy_filter"); set => Q("slm_policy_filter", value); } - - /// - /// - /// Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotSort? Sort { get => Q("sort"); set => Q("sort", value); } - - /// - /// - /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. - /// - /// - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get snapshot information. -/// -/// -public sealed partial class GetSnapshotRequest : PlainRequest -{ - public GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Names snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.get"; - - /// - /// - /// Offset identifier to start pagination from as returned by the next field in the response body. - /// - /// - [JsonIgnore] - public string? After { get => Q("after"); set => Q("after", value); } - - /// - /// - /// Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. - /// - /// - [JsonIgnore] - public string? FromSortValue { get => Q("from_sort_value"); set => Q("from_sort_value", value); } - - /// - /// - /// If false, the request returns an error for any snapshots that are unavailable. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, returns the repository name in each snapshot. - /// - /// - [JsonIgnore] - public bool? IncludeRepository { get => Q("include_repository"); set => Q("include_repository", value); } - - /// - /// - /// If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. - /// - /// - [JsonIgnore] - public bool? IndexDetails { get => Q("index_details"); set => Q("index_details", value); } - - /// - /// - /// If true, returns the name of each index in each snapshot. - /// - /// - [JsonIgnore] - public bool? IndexNames { get => Q("index_names"); set => Q("index_names", value); } - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0. - /// - /// - [JsonIgnore] - public int? Offset { get => Q("offset"); set => Q("offset", value); } - - /// - /// - /// Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get => Q("order"); set => Q("order", value); } - - /// - /// - /// Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Name? SlmPolicyFilter { get => Q("slm_policy_filter"); set => Q("slm_policy_filter", value); } - - /// - /// - /// Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotSort? Sort { get => Q("sort"); set => Q("sort", value); } - - /// - /// - /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. - /// - /// - [JsonIgnore] - public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } -} - -/// -/// -/// Get snapshot information. -/// -/// -public sealed partial class GetSnapshotRequestDescriptor : RequestDescriptor -{ - internal GetSnapshotRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Names snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotGet; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.get"; - - public GetSnapshotRequestDescriptor After(string? after) => Qs("after", after); - public GetSnapshotRequestDescriptor FromSortValue(string? fromSortValue) => Qs("from_sort_value", fromSortValue); - public GetSnapshotRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public GetSnapshotRequestDescriptor IncludeRepository(bool? includeRepository = true) => Qs("include_repository", includeRepository); - public GetSnapshotRequestDescriptor IndexDetails(bool? indexDetails = true) => Qs("index_details", indexDetails); - public GetSnapshotRequestDescriptor IndexNames(bool? indexNames = true) => Qs("index_names", indexNames); - public GetSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public GetSnapshotRequestDescriptor Offset(int? offset) => Qs("offset", offset); - public GetSnapshotRequestDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) => Qs("order", order); - public GetSnapshotRequestDescriptor Size(int? size) => Qs("size", size); - public GetSnapshotRequestDescriptor SlmPolicyFilter(Elastic.Clients.Elasticsearch.Serverless.Name? slmPolicyFilter) => Qs("slm_policy_filter", slmPolicyFilter); - public GetSnapshotRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotSort? sort) => Qs("sort", sort); - public GetSnapshotRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); - - public GetSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name repository) - { - RouteValues.Required("repository", repository); - return Self; - } - - public GetSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Names snapshot) - { - RouteValues.Required("snapshot", snapshot); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs deleted file mode 100644 index cd6c88debb1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class GetSnapshotResponse : ElasticsearchResponse -{ - /// - /// - /// The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the next field value. - /// - /// - [JsonInclude, JsonPropertyName("remaining")] - public int Remaining { get; init; } - [JsonInclude, JsonPropertyName("responses")] - public IReadOnlyCollection? Responses { get; init; } - [JsonInclude, JsonPropertyName("snapshots")] - public IReadOnlyCollection? Snapshots { get; init; } - - /// - /// - /// The total number of snapshots that match the request when ignoring size limit or after query parameter. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreRequest.g.cs deleted file mode 100644 index 0b737738f7b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreRequest.g.cs +++ /dev/null @@ -1,575 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class RestoreRequestParameters : RequestParameters -{ - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Should this request wait until the operation has completed before returning - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Restore a snapshot. -/// Restore a snapshot of a cluster or data streams and indices. -/// -/// -/// You can restore a snapshot only to a running cluster with an elected master node. -/// The snapshot repository must be registered and available to the cluster. -/// The snapshot and cluster versions must be compatible. -/// -/// -/// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. -/// -/// -/// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: -/// -/// -/// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream -/// -/// -/// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. -/// -/// -/// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. -/// -/// -public sealed partial class RestoreRequest : PlainRequest -{ - public RestoreRequest(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotRestore; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.restore"; - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Should this request wait until the operation has completed before returning - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - [JsonInclude, JsonPropertyName("feature_states")] - public ICollection? FeatureStates { get; set; } - [JsonInclude, JsonPropertyName("ignore_index_settings")] - public ICollection? IgnoreIndexSettings { get; set; } - [JsonInclude, JsonPropertyName("ignore_unavailable")] - public bool? IgnoreUnavailable { get; set; } - [JsonInclude, JsonPropertyName("include_aliases")] - public bool? IncludeAliases { get; set; } - [JsonInclude, JsonPropertyName("include_global_state")] - public bool? IncludeGlobalState { get; set; } - [JsonInclude, JsonPropertyName("index_settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexSettings { get; set; } - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - [JsonInclude, JsonPropertyName("partial")] - public bool? Partial { get; set; } - [JsonInclude, JsonPropertyName("rename_pattern")] - public string? RenamePattern { get; set; } - [JsonInclude, JsonPropertyName("rename_replacement")] - public string? RenameReplacement { get; set; } -} - -/// -/// -/// Restore a snapshot. -/// Restore a snapshot of a cluster or data streams and indices. -/// -/// -/// You can restore a snapshot only to a running cluster with an elected master node. -/// The snapshot repository must be registered and available to the cluster. -/// The snapshot and cluster versions must be compatible. -/// -/// -/// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. -/// -/// -/// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: -/// -/// -/// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream -/// -/// -/// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. -/// -/// -/// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. -/// -/// -public sealed partial class RestoreRequestDescriptor : RequestDescriptor, RestoreRequestParameters> -{ - internal RestoreRequestDescriptor(Action> configure) => configure.Invoke(this); - - public RestoreRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotRestore; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.restore"; - - public RestoreRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public RestoreRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public RestoreRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name repository) - { - RouteValues.Required("repository", repository); - return Self; - } - - public RestoreRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Name snapshot) - { - RouteValues.Required("snapshot", snapshot); - return Self; - } - - private ICollection? FeatureStatesValue { get; set; } - private ICollection? IgnoreIndexSettingsValue { get; set; } - private bool? IgnoreUnavailableValue { get; set; } - private bool? IncludeAliasesValue { get; set; } - private bool? IncludeGlobalStateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexSettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor IndexSettingsDescriptor { get; set; } - private Action> IndexSettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private bool? PartialValue { get; set; } - private string? RenamePatternValue { get; set; } - private string? RenameReplacementValue { get; set; } - - public RestoreRequestDescriptor FeatureStates(ICollection? featureStates) - { - FeatureStatesValue = featureStates; - return Self; - } - - public RestoreRequestDescriptor IgnoreIndexSettings(ICollection? ignoreIndexSettings) - { - IgnoreIndexSettingsValue = ignoreIndexSettings; - return Self; - } - - public RestoreRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) - { - IgnoreUnavailableValue = ignoreUnavailable; - return Self; - } - - public RestoreRequestDescriptor IncludeAliases(bool? includeAliases = true) - { - IncludeAliasesValue = includeAliases; - return Self; - } - - public RestoreRequestDescriptor IncludeGlobalState(bool? includeGlobalState = true) - { - IncludeGlobalStateValue = includeGlobalState; - return Self; - } - - public RestoreRequestDescriptor IndexSettings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? indexSettings) - { - IndexSettingsDescriptor = null; - IndexSettingsDescriptorAction = null; - IndexSettingsValue = indexSettings; - return Self; - } - - public RestoreRequestDescriptor IndexSettings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - IndexSettingsValue = null; - IndexSettingsDescriptorAction = null; - IndexSettingsDescriptor = descriptor; - return Self; - } - - public RestoreRequestDescriptor IndexSettings(Action> configure) - { - IndexSettingsValue = null; - IndexSettingsDescriptor = null; - IndexSettingsDescriptorAction = configure; - return Self; - } - - public RestoreRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - public RestoreRequestDescriptor Partial(bool? partial = true) - { - PartialValue = partial; - return Self; - } - - public RestoreRequestDescriptor RenamePattern(string? renamePattern) - { - RenamePatternValue = renamePattern; - return Self; - } - - public RestoreRequestDescriptor RenameReplacement(string? renameReplacement) - { - RenameReplacementValue = renameReplacement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FeatureStatesValue is not null) - { - writer.WritePropertyName("feature_states"); - JsonSerializer.Serialize(writer, FeatureStatesValue, options); - } - - if (IgnoreIndexSettingsValue is not null) - { - writer.WritePropertyName("ignore_index_settings"); - JsonSerializer.Serialize(writer, IgnoreIndexSettingsValue, options); - } - - if (IgnoreUnavailableValue.HasValue) - { - writer.WritePropertyName("ignore_unavailable"); - writer.WriteBooleanValue(IgnoreUnavailableValue.Value); - } - - if (IncludeAliasesValue.HasValue) - { - writer.WritePropertyName("include_aliases"); - writer.WriteBooleanValue(IncludeAliasesValue.Value); - } - - if (IncludeGlobalStateValue.HasValue) - { - writer.WritePropertyName("include_global_state"); - writer.WriteBooleanValue(IncludeGlobalStateValue.Value); - } - - if (IndexSettingsDescriptor is not null) - { - writer.WritePropertyName("index_settings"); - JsonSerializer.Serialize(writer, IndexSettingsDescriptor, options); - } - else if (IndexSettingsDescriptorAction is not null) - { - writer.WritePropertyName("index_settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(IndexSettingsDescriptorAction), options); - } - else if (IndexSettingsValue is not null) - { - writer.WritePropertyName("index_settings"); - JsonSerializer.Serialize(writer, IndexSettingsValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (PartialValue.HasValue) - { - writer.WritePropertyName("partial"); - writer.WriteBooleanValue(PartialValue.Value); - } - - if (!string.IsNullOrEmpty(RenamePatternValue)) - { - writer.WritePropertyName("rename_pattern"); - writer.WriteStringValue(RenamePatternValue); - } - - if (!string.IsNullOrEmpty(RenameReplacementValue)) - { - writer.WritePropertyName("rename_replacement"); - writer.WriteStringValue(RenameReplacementValue); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Restore a snapshot. -/// Restore a snapshot of a cluster or data streams and indices. -/// -/// -/// You can restore a snapshot only to a running cluster with an elected master node. -/// The snapshot repository must be registered and available to the cluster. -/// The snapshot and cluster versions must be compatible. -/// -/// -/// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. -/// -/// -/// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: -/// -/// -/// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream -/// -/// -/// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. -/// -/// -/// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. -/// -/// -public sealed partial class RestoreRequestDescriptor : RequestDescriptor -{ - internal RestoreRequestDescriptor(Action configure) => configure.Invoke(this); - - public RestoreRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotRestore; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "snapshot.restore"; - - public RestoreRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public RestoreRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public RestoreRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name repository) - { - RouteValues.Required("repository", repository); - return Self; - } - - public RestoreRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Name snapshot) - { - RouteValues.Required("snapshot", snapshot); - return Self; - } - - private ICollection? FeatureStatesValue { get; set; } - private ICollection? IgnoreIndexSettingsValue { get; set; } - private bool? IgnoreUnavailableValue { get; set; } - private bool? IncludeAliasesValue { get; set; } - private bool? IncludeGlobalStateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexSettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor IndexSettingsDescriptor { get; set; } - private Action IndexSettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private bool? PartialValue { get; set; } - private string? RenamePatternValue { get; set; } - private string? RenameReplacementValue { get; set; } - - public RestoreRequestDescriptor FeatureStates(ICollection? featureStates) - { - FeatureStatesValue = featureStates; - return Self; - } - - public RestoreRequestDescriptor IgnoreIndexSettings(ICollection? ignoreIndexSettings) - { - IgnoreIndexSettingsValue = ignoreIndexSettings; - return Self; - } - - public RestoreRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) - { - IgnoreUnavailableValue = ignoreUnavailable; - return Self; - } - - public RestoreRequestDescriptor IncludeAliases(bool? includeAliases = true) - { - IncludeAliasesValue = includeAliases; - return Self; - } - - public RestoreRequestDescriptor IncludeGlobalState(bool? includeGlobalState = true) - { - IncludeGlobalStateValue = includeGlobalState; - return Self; - } - - public RestoreRequestDescriptor IndexSettings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? indexSettings) - { - IndexSettingsDescriptor = null; - IndexSettingsDescriptorAction = null; - IndexSettingsValue = indexSettings; - return Self; - } - - public RestoreRequestDescriptor IndexSettings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - IndexSettingsValue = null; - IndexSettingsDescriptorAction = null; - IndexSettingsDescriptor = descriptor; - return Self; - } - - public RestoreRequestDescriptor IndexSettings(Action configure) - { - IndexSettingsValue = null; - IndexSettingsDescriptor = null; - IndexSettingsDescriptorAction = configure; - return Self; - } - - public RestoreRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - public RestoreRequestDescriptor Partial(bool? partial = true) - { - PartialValue = partial; - return Self; - } - - public RestoreRequestDescriptor RenamePattern(string? renamePattern) - { - RenamePatternValue = renamePattern; - return Self; - } - - public RestoreRequestDescriptor RenameReplacement(string? renameReplacement) - { - RenameReplacementValue = renameReplacement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FeatureStatesValue is not null) - { - writer.WritePropertyName("feature_states"); - JsonSerializer.Serialize(writer, FeatureStatesValue, options); - } - - if (IgnoreIndexSettingsValue is not null) - { - writer.WritePropertyName("ignore_index_settings"); - JsonSerializer.Serialize(writer, IgnoreIndexSettingsValue, options); - } - - if (IgnoreUnavailableValue.HasValue) - { - writer.WritePropertyName("ignore_unavailable"); - writer.WriteBooleanValue(IgnoreUnavailableValue.Value); - } - - if (IncludeAliasesValue.HasValue) - { - writer.WritePropertyName("include_aliases"); - writer.WriteBooleanValue(IncludeAliasesValue.Value); - } - - if (IncludeGlobalStateValue.HasValue) - { - writer.WritePropertyName("include_global_state"); - writer.WriteBooleanValue(IncludeGlobalStateValue.Value); - } - - if (IndexSettingsDescriptor is not null) - { - writer.WritePropertyName("index_settings"); - JsonSerializer.Serialize(writer, IndexSettingsDescriptor, options); - } - else if (IndexSettingsDescriptorAction is not null) - { - writer.WritePropertyName("index_settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(IndexSettingsDescriptorAction), options); - } - else if (IndexSettingsValue is not null) - { - writer.WritePropertyName("index_settings"); - JsonSerializer.Serialize(writer, IndexSettingsValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (PartialValue.HasValue) - { - writer.WritePropertyName("partial"); - writer.WriteBooleanValue(PartialValue.Value); - } - - if (!string.IsNullOrEmpty(RenamePatternValue)) - { - writer.WritePropertyName("rename_pattern"); - writer.WriteStringValue(RenamePatternValue); - } - - if (!string.IsNullOrEmpty(RenameReplacementValue)) - { - writer.WritePropertyName("rename_replacement"); - writer.WriteStringValue(RenameReplacementValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs deleted file mode 100644 index 0ee5b1548b6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class RestoreResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("accepted")] - public bool? Accepted { get; init; } - [JsonInclude, JsonPropertyName("snapshot")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotRestore? Snapshot { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs deleted file mode 100644 index f30fbb0d885..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotStatusRequestParameters : RequestParameters -{ - /// - /// - /// Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get the snapshot status. -/// Get a detailed description of the current state for each shard participating in the snapshot. -/// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. -/// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. -/// -/// -/// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. -/// The API requires a read from the repository for each shard in each snapshot. -/// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). -/// -/// -/// Depending on the latency of your storage, such requests can take an extremely long time to return results. -/// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. -/// -/// -public sealed partial class SnapshotStatusRequest : PlainRequest -{ - public SnapshotStatusRequest() - { - } - - public SnapshotStatusRequest(Elastic.Clients.Elasticsearch.Serverless.Name? repository) : base(r => r.Optional("repository", repository)) - { - } - - public SnapshotStatusRequest(Elastic.Clients.Elasticsearch.Serverless.Name? repository, Elastic.Clients.Elasticsearch.Serverless.Names? snapshot) : base(r => r.Optional("repository", repository).Optional("snapshot", snapshot)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.status"; - - /// - /// - /// Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get the snapshot status. -/// Get a detailed description of the current state for each shard participating in the snapshot. -/// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. -/// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. -/// -/// -/// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. -/// The API requires a read from the repository for each shard in each snapshot. -/// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). -/// -/// -/// Depending on the latency of your storage, such requests can take an extremely long time to return results. -/// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. -/// -/// -public sealed partial class SnapshotStatusRequestDescriptor : RequestDescriptor -{ - internal SnapshotStatusRequestDescriptor(Action configure) => configure.Invoke(this); - - public SnapshotStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? repository, Elastic.Clients.Elasticsearch.Serverless.Names? snapshot) : base(r => r.Optional("repository", repository).Optional("snapshot", snapshot)) - { - } - - public SnapshotStatusRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.status"; - - public SnapshotStatusRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public SnapshotStatusRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public SnapshotStatusRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Serverless.Name? repository) - { - RouteValues.Optional("repository", repository); - return Self; - } - - public SnapshotStatusRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Serverless.Names? snapshot) - { - RouteValues.Optional("snapshot", snapshot); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusResponse.g.cs deleted file mode 100644 index ce5388ec913..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/SnapshotStatusResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotStatusResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("snapshots")] - public IReadOnlyCollection Snapshots { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs deleted file mode 100644 index ef9a8848780..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class VerifyRepositoryRequestParameters : RequestParameters -{ - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit operation timeout - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Verify a snapshot repository. -/// Check for common misconfigurations in a snapshot repository. -/// -/// -public sealed partial class VerifyRepositoryRequest : PlainRequest -{ - public VerifyRepositoryRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotVerifyRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.verify_repository"; - - /// - /// - /// Explicit operation timeout for connection to master node - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Explicit operation timeout - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Verify a snapshot repository. -/// Check for common misconfigurations in a snapshot repository. -/// -/// -public sealed partial class VerifyRepositoryRequestDescriptor : RequestDescriptor -{ - internal VerifyRepositoryRequestDescriptor(Action configure) => configure.Invoke(this); - - public VerifyRepositoryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("repository", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotVerifyRepository; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "snapshot.verify_repository"; - - public VerifyRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public VerifyRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public VerifyRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("repository", name); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs deleted file mode 100644 index 8c3de92f9ad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class VerifyRepositoryResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs deleted file mode 100644 index 07d02724d46..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class DeleteLifecycleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a policy. -/// Delete a snapshot lifecycle policy definition. -/// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. -/// -/// -public sealed partial class DeleteLifecycleRequest : PlainRequest -{ - public DeleteLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.Name policyId) : base(r => r.Required("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementDeleteLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.delete_lifecycle"; -} - -/// -/// -/// Delete a policy. -/// Delete a snapshot lifecycle policy definition. -/// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. -/// -/// -public sealed partial class DeleteLifecycleRequestDescriptor : RequestDescriptor -{ - internal DeleteLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name policyId) : base(r => r.Required("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementDeleteLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.delete_lifecycle"; - - public DeleteLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Serverless.Name policyId) - { - RouteValues.Required("policy_id", policyId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleResponse.g.cs deleted file mode 100644 index c55e6564aa6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class DeleteLifecycleResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs deleted file mode 100644 index c593ffdc5fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class ExecuteLifecycleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Run a policy. -/// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. -/// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. -/// -/// -public sealed partial class ExecuteLifecycleRequest : PlainRequest -{ - public ExecuteLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.Name policyId) : base(r => r.Required("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementExecuteLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.execute_lifecycle"; -} - -/// -/// -/// Run a policy. -/// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. -/// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. -/// -/// -public sealed partial class ExecuteLifecycleRequestDescriptor : RequestDescriptor -{ - internal ExecuteLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExecuteLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name policyId) : base(r => r.Required("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementExecuteLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.execute_lifecycle"; - - public ExecuteLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Serverless.Name policyId) - { - RouteValues.Required("policy_id", policyId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleResponse.g.cs deleted file mode 100644 index c3b46581b3c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class ExecuteLifecycleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("snapshot_name")] - public string SnapshotName { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs deleted file mode 100644 index 56476c30003..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class ExecuteRetentionRequestParameters : RequestParameters -{ -} - -/// -/// -/// Run a retention policy. -/// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. -/// The retention policy is normally applied according to its schedule. -/// -/// -public sealed partial class ExecuteRetentionRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementExecuteRetention; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.execute_retention"; -} - -/// -/// -/// Run a retention policy. -/// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. -/// The retention policy is normally applied according to its schedule. -/// -/// -public sealed partial class ExecuteRetentionRequestDescriptor : RequestDescriptor -{ - internal ExecuteRetentionRequestDescriptor(Action configure) => configure.Invoke(this); - - public ExecuteRetentionRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementExecuteRetention; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.execute_retention"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionResponse.g.cs deleted file mode 100644 index df9da9e895a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class ExecuteRetentionResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs deleted file mode 100644 index 1cbee94e18a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs +++ /dev/null @@ -1,97 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class GetLifecycleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get policy information. -/// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. -/// -/// -public sealed partial class GetLifecycleRequest : PlainRequest -{ - public GetLifecycleRequest() - { - } - - public GetLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.Names? policyId) : base(r => r.Optional("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementGetLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.get_lifecycle"; -} - -/// -/// -/// Get policy information. -/// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. -/// -/// -public sealed partial class GetLifecycleRequestDescriptor : RequestDescriptor -{ - internal GetLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? policyId) : base(r => r.Optional("policy_id", policyId)) - { - } - - public GetLifecycleRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementGetLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.get_lifecycle"; - - public GetLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Serverless.Names? policyId) - { - RouteValues.Optional("policy_id", policyId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs deleted file mode 100644 index ec6663c071f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class GetLifecycleResponse : DictionaryResponse -{ - public GetLifecycleResponse(IReadOnlyDictionary dictionary) : base(dictionary) - { - } - - public GetLifecycleResponse() : base() - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs deleted file mode 100644 index f77374b8586..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs +++ /dev/null @@ -1,77 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class GetSlmStatusRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get the snapshot lifecycle management status. -/// -/// -public sealed partial class GetSlmStatusRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementGetStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.get_status"; -} - -/// -/// -/// Get the snapshot lifecycle management status. -/// -/// -public sealed partial class GetSlmStatusRequestDescriptor : RequestDescriptor -{ - internal GetSlmStatusRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetSlmStatusRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementGetStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.get_status"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusResponse.g.cs deleted file mode 100644 index 65874614e4f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class GetSlmStatusResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("operation_mode")] - public Elastic.Clients.Elasticsearch.Serverless.LifecycleOperationMode OperationMode { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs deleted file mode 100644 index ec1b6f7077b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class GetStatsRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get snapshot lifecycle management statistics. -/// Get global and policy-level statistics about actions taken by snapshot lifecycle management. -/// -/// -public sealed partial class GetStatsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementGetStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.get_stats"; -} - -/// -/// -/// Get snapshot lifecycle management statistics. -/// Get global and policy-level statistics about actions taken by snapshot lifecycle management. -/// -/// -public sealed partial class GetStatsRequestDescriptor : RequestDescriptor -{ - internal GetStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetStatsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementGetStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.get_stats"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs deleted file mode 100644 index 3306a7ae841..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs +++ /dev/null @@ -1,51 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class GetStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("policy_stats")] - public IReadOnlyCollection PolicyStats { get; init; } - [JsonInclude, JsonPropertyName("retention_deletion_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration RetentionDeletionTime { get; init; } - [JsonInclude, JsonPropertyName("retention_deletion_time_millis")] - public long RetentionDeletionTimeMillis { get; init; } - [JsonInclude, JsonPropertyName("retention_failed")] - public long RetentionFailed { get; init; } - [JsonInclude, JsonPropertyName("retention_runs")] - public long RetentionRuns { get; init; } - [JsonInclude, JsonPropertyName("retention_timed_out")] - public long RetentionTimedOut { get; init; } - [JsonInclude, JsonPropertyName("total_snapshot_deletion_failures")] - public long TotalSnapshotDeletionFailures { get; init; } - [JsonInclude, JsonPropertyName("total_snapshots_deleted")] - public long TotalSnapshotsDeleted { get; init; } - [JsonInclude, JsonPropertyName("total_snapshots_failed")] - public long TotalSnapshotsFailed { get; init; } - [JsonInclude, JsonPropertyName("total_snapshots_taken")] - public long TotalSnapshotsTaken { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs deleted file mode 100644 index 535ce9f30f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs +++ /dev/null @@ -1,318 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class PutLifecycleRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create or update a policy. -/// Create or update a snapshot lifecycle policy. -/// If the policy already exists, this request increments the policy version. -/// Only the latest version of a policy is stored. -/// -/// -public sealed partial class PutLifecycleRequest : PlainRequest -{ - public PutLifecycleRequest(Elastic.Clients.Elasticsearch.Serverless.Name policyId) : base(r => r.Required("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementPutLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "slm.put_lifecycle"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Configuration for each snapshot created by the policy. - /// - /// - [JsonInclude, JsonPropertyName("config")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfiguration? Config { get; set; } - - /// - /// - /// Name automatically assigned to each snapshot created by the policy. Date math is supported. To prevent conflicting snapshot names, a UUID is automatically appended to each snapshot name. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } - - /// - /// - /// Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API. - /// - /// - [JsonInclude, JsonPropertyName("repository")] - public string? Repository { get; set; } - - /// - /// - /// Retention rules used to retain and delete snapshots created by the policy. - /// - /// - [JsonInclude, JsonPropertyName("retention")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Retention? Retention { get; set; } - - /// - /// - /// Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately. - /// - /// - [JsonInclude, JsonPropertyName("schedule")] - public string? Schedule { get; set; } -} - -/// -/// -/// Create or update a policy. -/// Create or update a snapshot lifecycle policy. -/// If the policy already exists, this request increments the policy version. -/// Only the latest version of a policy is stored. -/// -/// -public sealed partial class PutLifecycleRequestDescriptor : RequestDescriptor -{ - internal PutLifecycleRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name policyId) : base(r => r.Required("policy_id", policyId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementPutLifecycle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "slm.put_lifecycle"; - - public PutLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Serverless.Name policyId) - { - RouteValues.Required("policy_id", policyId); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfiguration? ConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfigurationDescriptor ConfigDescriptor { get; set; } - private Action ConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private string? RepositoryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Retention? RetentionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.RetentionDescriptor RetentionDescriptor { get; set; } - private Action RetentionDescriptorAction { get; set; } - private string? ScheduleValue { get; set; } - - /// - /// - /// Configuration for each snapshot created by the policy. - /// - /// - public PutLifecycleRequestDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfiguration? config) - { - ConfigDescriptor = null; - ConfigDescriptorAction = null; - ConfigValue = config; - return Self; - } - - public PutLifecycleRequestDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfigurationDescriptor descriptor) - { - ConfigValue = null; - ConfigDescriptorAction = null; - ConfigDescriptor = descriptor; - return Self; - } - - public PutLifecycleRequestDescriptor Config(Action configure) - { - ConfigValue = null; - ConfigDescriptor = null; - ConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Name automatically assigned to each snapshot created by the policy. Date math is supported. To prevent conflicting snapshot names, a UUID is automatically appended to each snapshot name. - /// - /// - public PutLifecycleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API. - /// - /// - public PutLifecycleRequestDescriptor Repository(string? repository) - { - RepositoryValue = repository; - return Self; - } - - /// - /// - /// Retention rules used to retain and delete snapshots created by the policy. - /// - /// - public PutLifecycleRequestDescriptor Retention(Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Retention? retention) - { - RetentionDescriptor = null; - RetentionDescriptorAction = null; - RetentionValue = retention; - return Self; - } - - public PutLifecycleRequestDescriptor Retention(Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.RetentionDescriptor descriptor) - { - RetentionValue = null; - RetentionDescriptorAction = null; - RetentionDescriptor = descriptor; - return Self; - } - - public PutLifecycleRequestDescriptor Retention(Action configure) - { - RetentionValue = null; - RetentionDescriptor = null; - RetentionDescriptorAction = configure; - return Self; - } - - /// - /// - /// Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately. - /// - /// - public PutLifecycleRequestDescriptor Schedule(string? schedule) - { - ScheduleValue = schedule; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConfigDescriptor is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigDescriptor, options); - } - else if (ConfigDescriptorAction is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfigurationDescriptor(ConfigDescriptorAction), options); - } - else if (ConfigValue is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigValue, options); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (!string.IsNullOrEmpty(RepositoryValue)) - { - writer.WritePropertyName("repository"); - writer.WriteStringValue(RepositoryValue); - } - - if (RetentionDescriptor is not null) - { - writer.WritePropertyName("retention"); - JsonSerializer.Serialize(writer, RetentionDescriptor, options); - } - else if (RetentionDescriptorAction is not null) - { - writer.WritePropertyName("retention"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.RetentionDescriptor(RetentionDescriptorAction), options); - } - else if (RetentionValue is not null) - { - writer.WritePropertyName("retention"); - JsonSerializer.Serialize(writer, RetentionValue, options); - } - - if (!string.IsNullOrEmpty(ScheduleValue)) - { - writer.WritePropertyName("schedule"); - writer.WriteStringValue(ScheduleValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleResponse.g.cs deleted file mode 100644 index 81e78167d5f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class PutLifecycleResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs deleted file mode 100644 index 5b6039a70e7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class StartSlmRequestParameters : RequestParameters -{ -} - -/// -/// -/// Start snapshot lifecycle management. -/// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. -/// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. -/// -/// -public sealed partial class StartSlmRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementStart; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.start"; -} - -/// -/// -/// Start snapshot lifecycle management. -/// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. -/// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. -/// -/// -public sealed partial class StartSlmRequestDescriptor : RequestDescriptor -{ - internal StartSlmRequestDescriptor(Action configure) => configure.Invoke(this); - - public StartSlmRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementStart; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.start"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmResponse.g.cs deleted file mode 100644 index 3c808d5388b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StartSlmResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class StartSlmResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs deleted file mode 100644 index 5609d3cdb0e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class StopSlmRequestParameters : RequestParameters -{ -} - -/// -/// -/// Stop snapshot lifecycle management. -/// Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. -/// This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. -/// Stopping SLM does not stop any snapshots that are in progress. -/// You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. -/// -/// -/// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. -/// Use the get snapshot lifecycle management status API to see if SLM is running. -/// -/// -public sealed partial class StopSlmRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementStop; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.stop"; -} - -/// -/// -/// Stop snapshot lifecycle management. -/// Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. -/// This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. -/// Stopping SLM does not stop any snapshots that are in progress. -/// You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. -/// -/// -/// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. -/// Use the get snapshot lifecycle management status API to see if SLM is running. -/// -/// -public sealed partial class StopSlmRequestDescriptor : RequestDescriptor -{ - internal StopSlmRequestDescriptor(Action configure) => configure.Invoke(this); - - public StopSlmRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotLifecycleManagementStop; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "slm.stop"; - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmResponse.g.cs deleted file mode 100644 index 158747d810b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SnapshotLifecycleManagement/StopSlmResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class StopSlmResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorRequest.g.cs deleted file mode 100644 index 62374e69b2f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorRequest.g.cs +++ /dev/null @@ -1,102 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class ClearCursorRequestParameters : RequestParameters -{ -} - -/// -/// -/// Clear an SQL search cursor. -/// -/// -public sealed partial class ClearCursorRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlClearCursor; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.clear_cursor"; - - /// - /// - /// Cursor to clear. - /// - /// - [JsonInclude, JsonPropertyName("cursor")] - public string Cursor { get; set; } -} - -/// -/// -/// Clear an SQL search cursor. -/// -/// -public sealed partial class ClearCursorRequestDescriptor : RequestDescriptor -{ - internal ClearCursorRequestDescriptor(Action configure) => configure.Invoke(this); - - public ClearCursorRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlClearCursor; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.clear_cursor"; - - private string CursorValue { get; set; } - - /// - /// - /// Cursor to clear. - /// - /// - public ClearCursorRequestDescriptor Cursor(string cursor) - { - CursorValue = cursor; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("cursor"); - writer.WriteStringValue(CursorValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorResponse.g.cs deleted file mode 100644 index 821827b04e5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/ClearCursorResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class ClearCursorResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("succeeded")] - public bool Succeeded { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncRequest.g.cs deleted file mode 100644 index 28e4492132b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncRequest.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class DeleteAsyncRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete an async SQL search. -/// Delete an async SQL search or a stored synchronous SQL search. -/// If the search is still running, the API cancels it. -/// -/// -public sealed partial class DeleteAsyncRequest : PlainRequest -{ - public DeleteAsyncRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlDeleteAsync; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.delete_async"; -} - -/// -/// -/// Delete an async SQL search. -/// Delete an async SQL search or a stored synchronous SQL search. -/// If the search is still running, the API cancels it. -/// -/// -public sealed partial class DeleteAsyncRequestDescriptor : RequestDescriptor, DeleteAsyncRequestParameters> -{ - internal DeleteAsyncRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteAsyncRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlDeleteAsync; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.delete_async"; - - public DeleteAsyncRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete an async SQL search. -/// Delete an async SQL search or a stored synchronous SQL search. -/// If the search is still running, the API cancels it. -/// -/// -public sealed partial class DeleteAsyncRequestDescriptor : RequestDescriptor -{ - internal DeleteAsyncRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteAsyncRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlDeleteAsync; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.delete_async"; - - public DeleteAsyncRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncResponse.g.cs deleted file mode 100644 index 09cfb3fee42..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/DeleteAsyncResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class DeleteAsyncResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncRequest.g.cs deleted file mode 100644 index 0c705dc0baf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncRequest.g.cs +++ /dev/null @@ -1,197 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class GetAsyncRequestParameters : RequestParameters -{ - /// - /// - /// Separator for CSV results. The API only supports this parameter for CSV responses. - /// - /// - public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } - - /// - /// - /// Format for the response. You must specify a format using this parameter or the - /// Accept HTTP header. If you specify both, the API uses this parameter. - /// - /// - public string? Format { get => Q("format"); set => Q("format", value); } - - /// - /// - /// Retention period for the search and its results. Defaults - /// to the keep_alive period for the original SQL search. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Period to wait for complete results. Defaults to no timeout, - /// meaning the request waits for complete search results. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -/// -/// -/// Get async SQL search results. -/// Get the current status and available results for an async SQL search or stored synchronous SQL search. -/// -/// -public sealed partial class GetAsyncRequest : PlainRequest -{ - public GetAsyncRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlGetAsync; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.get_async"; - - /// - /// - /// Separator for CSV results. The API only supports this parameter for CSV responses. - /// - /// - [JsonIgnore] - public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } - - /// - /// - /// Format for the response. You must specify a format using this parameter or the - /// Accept HTTP header. If you specify both, the API uses this parameter. - /// - /// - [JsonIgnore] - public string? Format { get => Q("format"); set => Q("format", value); } - - /// - /// - /// Retention period for the search and its results. Defaults - /// to the keep_alive period for the original SQL search. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Period to wait for complete results. Defaults to no timeout, - /// meaning the request waits for complete search results. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } -} - -/// -/// -/// Get async SQL search results. -/// Get the current status and available results for an async SQL search or stored synchronous SQL search. -/// -/// -public sealed partial class GetAsyncRequestDescriptor : RequestDescriptor, GetAsyncRequestParameters> -{ - internal GetAsyncRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetAsyncRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlGetAsync; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.get_async"; - - public GetAsyncRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); - public GetAsyncRequestDescriptor Format(string? format) => Qs("format", format); - public GetAsyncRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - public GetAsyncRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public GetAsyncRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get async SQL search results. -/// Get the current status and available results for an async SQL search or stored synchronous SQL search. -/// -/// -public sealed partial class GetAsyncRequestDescriptor : RequestDescriptor -{ - internal GetAsyncRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetAsyncRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlGetAsync; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.get_async"; - - public GetAsyncRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter); - public GetAsyncRequestDescriptor Format(string? format) => Qs("format", format); - public GetAsyncRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) => Qs("keep_alive", keepAlive); - public GetAsyncRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout); - - public GetAsyncRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncResponse.g.cs deleted file mode 100644 index b2f81b3bb98..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncResponse.g.cs +++ /dev/null @@ -1,80 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class GetAsyncResponse : ElasticsearchResponse -{ - /// - /// - /// Column headings for the search results. Each object is a column. - /// - /// - [JsonInclude, JsonPropertyName("columns")] - public IReadOnlyCollection? Columns { get; init; } - - /// - /// - /// Cursor for the next set of paginated results. For CSV, TSV, and - /// TXT responses, this value is returned in the Cursor HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("cursor")] - public string? Cursor { get; init; } - - /// - /// - /// Identifier for the search. This value is only returned for async and saved - /// synchronous searches. For CSV, TSV, and TXT responses, this value is returned - /// in the Async-ID HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// If true, the response does not contain complete search results. If is_partial - /// is true and is_running is true, the search is still running. If is_partial - /// is true but is_running is false, the results are partial due to a failure or - /// timeout. This value is only returned for async and saved synchronous searches. - /// For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool IsPartial { get; init; } - - /// - /// - /// If true, the search is still running. If false, the search has finished. - /// This value is only returned for async and saved synchronous searches. For - /// CSV, TSV, and TXT responses, this value is returned in the Async-partial - /// HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool IsRunning { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs deleted file mode 100644 index c8722fb5eb4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusRequest.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class GetAsyncStatusRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get the async SQL search status. -/// Get the current status of an async SQL search or a stored synchronous SQL search. -/// -/// -public sealed partial class GetAsyncStatusRequest : PlainRequest -{ - public GetAsyncStatusRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlGetAsyncStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.get_async_status"; -} - -/// -/// -/// Get the async SQL search status. -/// Get the current status of an async SQL search or a stored synchronous SQL search. -/// -/// -public sealed partial class GetAsyncStatusRequestDescriptor : RequestDescriptor, GetAsyncStatusRequestParameters> -{ - internal GetAsyncStatusRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetAsyncStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlGetAsyncStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.get_async_status"; - - public GetAsyncStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get the async SQL search status. -/// Get the current status of an async SQL search or a stored synchronous SQL search. -/// -/// -public sealed partial class GetAsyncStatusRequestDescriptor : RequestDescriptor -{ - internal GetAsyncStatusRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetAsyncStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlGetAsyncStatus; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "sql.get_async_status"; - - public GetAsyncStatusRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs deleted file mode 100644 index 7e4c8941777..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/GetAsyncStatusResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse -{ - /// - /// - /// HTTP status code for the search. The API only returns this property for completed searches. - /// - /// - [JsonInclude, JsonPropertyName("completion_status")] - public int? CompletionStatus { get; init; } - - /// - /// - /// Timestamp, in milliseconds since the Unix epoch, when Elasticsearch will delete - /// the search and its results, even if the search is still running. - /// - /// - [JsonInclude, JsonPropertyName("expiration_time_in_millis")] - public long ExpirationTimeInMillis { get; init; } - - /// - /// - /// Identifier for the search. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// If true, the response does not contain complete search results. If is_partial - /// is true and is_running is true, the search is still running. If is_partial - /// is true but is_running is false, the results are partial due to a failure or - /// timeout. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool IsPartial { get; init; } - - /// - /// - /// If true, the search is still running. If false, the search has finished. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool IsRunning { get; init; } - - /// - /// - /// Timestamp, in milliseconds since the Unix epoch, when the search started. - /// The API only returns this property for running searches. - /// - /// - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs deleted file mode 100644 index 89eac05f2c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryRequest.g.cs +++ /dev/null @@ -1,903 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class QueryRequestParameters : RequestParameters -{ - /// - /// - /// Format for the response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } -} - -/// -/// -/// Get SQL search results. -/// Run an SQL request. -/// -/// -public sealed partial class QueryRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.query"; - - /// - /// - /// Format for the response. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } - - /// - /// - /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. - /// - /// - [JsonInclude, JsonPropertyName("catalog")] - public string? Catalog { get; set; } - - /// - /// - /// If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. - /// - /// - [JsonInclude, JsonPropertyName("columnar")] - public bool? Columnar { get; set; } - - /// - /// - /// Cursor used to retrieve a set of paginated results. - /// If you specify a cursor, the API only uses the columnar and time_zone request body parameters. - /// It ignores other request body parameters. - /// - /// - [JsonInclude, JsonPropertyName("cursor")] - public string? Cursor { get; set; } - - /// - /// - /// The maximum number of rows (or entries) to return in one response - /// - /// - [JsonInclude, JsonPropertyName("fetch_size")] - public int? FetchSize { get; set; } - - /// - /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). - /// - /// - [JsonInclude, JsonPropertyName("field_multi_value_leniency")] - public bool? FieldMultiValueLeniency { get; set; } - - /// - /// - /// Elasticsearch query DSL for additional filtering. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - - /// - /// - /// If true, the search can run on frozen indices. Defaults to false. - /// - /// - [JsonInclude, JsonPropertyName("index_using_frozen")] - public bool? IndexUsingFrozen { get; set; } - - /// - /// - /// Retention period for an async or saved synchronous search. - /// - /// - [JsonInclude, JsonPropertyName("keep_alive")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; } - - /// - /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. - /// - /// - [JsonInclude, JsonPropertyName("keep_on_completion")] - public bool? KeepOnCompletion { get; set; } - - /// - /// - /// The timeout before a pagination request fails. - /// - /// - [JsonInclude, JsonPropertyName("page_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? PageTimeout { get; set; } - - /// - /// - /// Values for parameters in the query. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// SQL query to run. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string? Query { get; set; } - - /// - /// - /// The timeout before the request fails. - /// - /// - [JsonInclude, JsonPropertyName("request_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? RequestTimeout { get; set; } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// ISO-8601 time zone ID for the search. - /// - /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } - - /// - /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. - /// - /// - [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; } -} - -/// -/// -/// Get SQL search results. -/// Run an SQL request. -/// -/// -public sealed partial class QueryRequestDescriptor : RequestDescriptor, QueryRequestParameters> -{ - internal QueryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public QueryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.query"; - - public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? format) => Qs("format", format); - - private string? CatalogValue { get; set; } - private bool? ColumnarValue { get; set; } - private string? CursorValue { get; set; } - private int? FetchSizeValue { get; set; } - private bool? FieldMultiValueLeniencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private bool? IndexUsingFrozenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } - private bool? KeepOnCompletionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? PageTimeoutValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? RequestTimeoutValue { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private string? TimeZoneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } - - /// - /// - /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. - /// - /// - public QueryRequestDescriptor Catalog(string? catalog) - { - CatalogValue = catalog; - return Self; - } - - /// - /// - /// If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. - /// - /// - public QueryRequestDescriptor Columnar(bool? columnar = true) - { - ColumnarValue = columnar; - return Self; - } - - /// - /// - /// Cursor used to retrieve a set of paginated results. - /// If you specify a cursor, the API only uses the columnar and time_zone request body parameters. - /// It ignores other request body parameters. - /// - /// - public QueryRequestDescriptor Cursor(string? cursor) - { - CursorValue = cursor; - return Self; - } - - /// - /// - /// The maximum number of rows (or entries) to return in one response - /// - /// - public QueryRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - - /// - /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). - /// - /// - public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLeniency = true) - { - FieldMultiValueLeniencyValue = fieldMultiValueLeniency; - return Self; - } - - /// - /// - /// Elasticsearch query DSL for additional filtering. - /// - /// - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public QueryRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// If true, the search can run on frozen indices. Defaults to false. - /// - /// - public QueryRequestDescriptor IndexUsingFrozen(bool? indexUsingFrozen = true) - { - IndexUsingFrozenValue = indexUsingFrozen; - return Self; - } - - /// - /// - /// Retention period for an async or saved synchronous search. - /// - /// - public QueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) - { - KeepAliveValue = keepAlive; - return Self; - } - - /// - /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. - /// - /// - public QueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) - { - KeepOnCompletionValue = keepOnCompletion; - return Self; - } - - /// - /// - /// The timeout before a pagination request fails. - /// - /// - public QueryRequestDescriptor PageTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? pageTimeout) - { - PageTimeoutValue = pageTimeout; - return Self; - } - - /// - /// - /// Values for parameters in the query. - /// - /// - public QueryRequestDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// SQL query to run. - /// - /// - public QueryRequestDescriptor Query(string? query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// The timeout before the request fails. - /// - /// - public QueryRequestDescriptor RequestTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? requestTimeout) - { - RequestTimeoutValue = requestTimeout; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public QueryRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// ISO-8601 time zone ID for the search. - /// - /// - public QueryRequestDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - /// - /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. - /// - /// - public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) - { - WaitForCompletionTimeoutValue = waitForCompletionTimeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CatalogValue)) - { - writer.WritePropertyName("catalog"); - writer.WriteStringValue(CatalogValue); - } - - if (ColumnarValue.HasValue) - { - writer.WritePropertyName("columnar"); - writer.WriteBooleanValue(ColumnarValue.Value); - } - - if (!string.IsNullOrEmpty(CursorValue)) - { - writer.WritePropertyName("cursor"); - writer.WriteStringValue(CursorValue); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - - if (FieldMultiValueLeniencyValue.HasValue) - { - writer.WritePropertyName("field_multi_value_leniency"); - writer.WriteBooleanValue(FieldMultiValueLeniencyValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexUsingFrozenValue.HasValue) - { - writer.WritePropertyName("index_using_frozen"); - writer.WriteBooleanValue(IndexUsingFrozenValue.Value); - } - - if (KeepAliveValue is not null) - { - writer.WritePropertyName("keep_alive"); - JsonSerializer.Serialize(writer, KeepAliveValue, options); - } - - if (KeepOnCompletionValue.HasValue) - { - writer.WritePropertyName("keep_on_completion"); - writer.WriteBooleanValue(KeepOnCompletionValue.Value); - } - - if (PageTimeoutValue is not null) - { - writer.WritePropertyName("page_timeout"); - JsonSerializer.Serialize(writer, PageTimeoutValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(QueryValue)) - { - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - } - - if (RequestTimeoutValue is not null) - { - writer.WritePropertyName("request_timeout"); - JsonSerializer.Serialize(writer, RequestTimeoutValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - if (WaitForCompletionTimeoutValue is not null) - { - writer.WritePropertyName("wait_for_completion_timeout"); - JsonSerializer.Serialize(writer, WaitForCompletionTimeoutValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get SQL search results. -/// Run an SQL request. -/// -/// -public sealed partial class QueryRequestDescriptor : RequestDescriptor -{ - internal QueryRequestDescriptor(Action configure) => configure.Invoke(this); - - public QueryRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.query"; - - public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Sql.SqlFormat? format) => Qs("format", format); - - private string? CatalogValue { get; set; } - private bool? ColumnarValue { get; set; } - private string? CursorValue { get; set; } - private int? FetchSizeValue { get; set; } - private bool? FieldMultiValueLeniencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private bool? IndexUsingFrozenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } - private bool? KeepOnCompletionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? PageTimeoutValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? RequestTimeoutValue { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private string? TimeZoneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; } - - /// - /// - /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. - /// - /// - public QueryRequestDescriptor Catalog(string? catalog) - { - CatalogValue = catalog; - return Self; - } - - /// - /// - /// If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. - /// - /// - public QueryRequestDescriptor Columnar(bool? columnar = true) - { - ColumnarValue = columnar; - return Self; - } - - /// - /// - /// Cursor used to retrieve a set of paginated results. - /// If you specify a cursor, the API only uses the columnar and time_zone request body parameters. - /// It ignores other request body parameters. - /// - /// - public QueryRequestDescriptor Cursor(string? cursor) - { - CursorValue = cursor; - return Self; - } - - /// - /// - /// The maximum number of rows (or entries) to return in one response - /// - /// - public QueryRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - - /// - /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). - /// - /// - public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLeniency = true) - { - FieldMultiValueLeniencyValue = fieldMultiValueLeniency; - return Self; - } - - /// - /// - /// Elasticsearch query DSL for additional filtering. - /// - /// - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public QueryRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// If true, the search can run on frozen indices. Defaults to false. - /// - /// - public QueryRequestDescriptor IndexUsingFrozen(bool? indexUsingFrozen = true) - { - IndexUsingFrozenValue = indexUsingFrozen; - return Self; - } - - /// - /// - /// Retention period for an async or saved synchronous search. - /// - /// - public QueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) - { - KeepAliveValue = keepAlive; - return Self; - } - - /// - /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. - /// - /// - public QueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) - { - KeepOnCompletionValue = keepOnCompletion; - return Self; - } - - /// - /// - /// The timeout before a pagination request fails. - /// - /// - public QueryRequestDescriptor PageTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? pageTimeout) - { - PageTimeoutValue = pageTimeout; - return Self; - } - - /// - /// - /// Values for parameters in the query. - /// - /// - public QueryRequestDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// SQL query to run. - /// - /// - public QueryRequestDescriptor Query(string? query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// The timeout before the request fails. - /// - /// - public QueryRequestDescriptor RequestTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? requestTimeout) - { - RequestTimeoutValue = requestTimeout; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public QueryRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// ISO-8601 time zone ID for the search. - /// - /// - public QueryRequestDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - /// - /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. - /// - /// - public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? waitForCompletionTimeout) - { - WaitForCompletionTimeoutValue = waitForCompletionTimeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CatalogValue)) - { - writer.WritePropertyName("catalog"); - writer.WriteStringValue(CatalogValue); - } - - if (ColumnarValue.HasValue) - { - writer.WritePropertyName("columnar"); - writer.WriteBooleanValue(ColumnarValue.Value); - } - - if (!string.IsNullOrEmpty(CursorValue)) - { - writer.WritePropertyName("cursor"); - writer.WriteStringValue(CursorValue); - } - - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - - if (FieldMultiValueLeniencyValue.HasValue) - { - writer.WritePropertyName("field_multi_value_leniency"); - writer.WriteBooleanValue(FieldMultiValueLeniencyValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexUsingFrozenValue.HasValue) - { - writer.WritePropertyName("index_using_frozen"); - writer.WriteBooleanValue(IndexUsingFrozenValue.Value); - } - - if (KeepAliveValue is not null) - { - writer.WritePropertyName("keep_alive"); - JsonSerializer.Serialize(writer, KeepAliveValue, options); - } - - if (KeepOnCompletionValue.HasValue) - { - writer.WritePropertyName("keep_on_completion"); - writer.WriteBooleanValue(KeepOnCompletionValue.Value); - } - - if (PageTimeoutValue is not null) - { - writer.WritePropertyName("page_timeout"); - JsonSerializer.Serialize(writer, PageTimeoutValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(QueryValue)) - { - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - } - - if (RequestTimeoutValue is not null) - { - writer.WritePropertyName("request_timeout"); - JsonSerializer.Serialize(writer, RequestTimeoutValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - if (WaitForCompletionTimeoutValue is not null) - { - writer.WritePropertyName("wait_for_completion_timeout"); - JsonSerializer.Serialize(writer, WaitForCompletionTimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryResponse.g.cs deleted file mode 100644 index 3b1a52167ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/QueryResponse.g.cs +++ /dev/null @@ -1,80 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class QueryResponse : ElasticsearchResponse -{ - /// - /// - /// Column headings for the search results. Each object is a column. - /// - /// - [JsonInclude, JsonPropertyName("columns")] - public IReadOnlyCollection? Columns { get; init; } - - /// - /// - /// Cursor for the next set of paginated results. For CSV, TSV, and - /// TXT responses, this value is returned in the Cursor HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("cursor")] - public string? Cursor { get; init; } - - /// - /// - /// Identifier for the search. This value is only returned for async and saved - /// synchronous searches. For CSV, TSV, and TXT responses, this value is returned - /// in the Async-ID HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - - /// - /// - /// If true, the response does not contain complete search results. If is_partial - /// is true and is_running is true, the search is still running. If is_partial - /// is true but is_running is false, the results are partial due to a failure or - /// timeout. This value is only returned for async and saved synchronous searches. - /// For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("is_partial")] - public bool? IsPartial { get; init; } - - /// - /// - /// If true, the search is still running. If false, the search has finished. - /// This value is only returned for async and saved synchronous searches. For - /// CSV, TSV, and TXT responses, this value is returned in the Async-partial - /// HTTP header. - /// - /// - [JsonInclude, JsonPropertyName("is_running")] - public bool? IsRunning { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateRequest.g.cs deleted file mode 100644 index 232449c0e9b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateRequest.g.cs +++ /dev/null @@ -1,340 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class TranslateRequestParameters : RequestParameters -{ -} - -/// -/// -/// Translate SQL into Elasticsearch queries. -/// Translate an SQL search into a search API request containing Query DSL. -/// -/// -public sealed partial class TranslateRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlTranslate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.translate"; - - /// - /// - /// The maximum number of rows (or entries) to return in one response. - /// - /// - [JsonInclude, JsonPropertyName("fetch_size")] - public int? FetchSize { get; set; } - - /// - /// - /// Elasticsearch query DSL for additional filtering. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - - /// - /// - /// SQL query to run. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - - /// - /// - /// ISO-8601 time zone ID for the search. - /// - /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } -} - -/// -/// -/// Translate SQL into Elasticsearch queries. -/// Translate an SQL search into a search API request containing Query DSL. -/// -/// -public sealed partial class TranslateRequestDescriptor : RequestDescriptor, TranslateRequestParameters> -{ - internal TranslateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public TranslateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlTranslate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.translate"; - - private int? FetchSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private string QueryValue { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// The maximum number of rows (or entries) to return in one response. - /// - /// - public TranslateRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - - /// - /// - /// Elasticsearch query DSL for additional filtering. - /// - /// - public TranslateRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TranslateRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TranslateRequestDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// SQL query to run. - /// - /// - public TranslateRequestDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// ISO-8601 time zone ID for the search. - /// - /// - public TranslateRequestDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Translate SQL into Elasticsearch queries. -/// Translate an SQL search into a search API request containing Query DSL. -/// -/// -public sealed partial class TranslateRequestDescriptor : RequestDescriptor -{ - internal TranslateRequestDescriptor(Action configure) => configure.Invoke(this); - - public TranslateRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SqlTranslate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "sql.translate"; - - private int? FetchSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private string QueryValue { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// The maximum number of rows (or entries) to return in one response. - /// - /// - public TranslateRequestDescriptor FetchSize(int? fetchSize) - { - FetchSizeValue = fetchSize; - return Self; - } - - /// - /// - /// Elasticsearch query DSL for additional filtering. - /// - /// - public TranslateRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TranslateRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TranslateRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// SQL query to run. - /// - /// - public TranslateRequestDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// ISO-8601 time zone ID for the search. - /// - /// - public TranslateRequestDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FetchSizeValue.HasValue) - { - writer.WritePropertyName("fetch_size"); - writer.WriteNumberValue(FetchSizeValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateResponse.g.cs deleted file mode 100644 index 99fbe12d829..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Sql/TranslateResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class TranslateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregations")] - public IReadOnlyDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyCollection? Fields { get; init; } - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; init; } - [JsonInclude, JsonPropertyName("size")] - public long? Size { get; init; } - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public IReadOnlyCollection? Sort { get; init; } - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs deleted file mode 100644 index 744034456bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs +++ /dev/null @@ -1,119 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class DeleteSynonymRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a synonym set. -/// -/// -public sealed partial class DeleteSynonymRequest : PlainRequest -{ - public DeleteSynonymRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsDeleteSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.delete_synonym"; -} - -/// -/// -/// Delete a synonym set. -/// -/// -public sealed partial class DeleteSynonymRequestDescriptor : RequestDescriptor, DeleteSynonymRequestParameters> -{ - internal DeleteSynonymRequestDescriptor(Action> configure) => configure.Invoke(this); - - public DeleteSynonymRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsDeleteSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.delete_synonym"; - - public DeleteSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Delete a synonym set. -/// -/// -public sealed partial class DeleteSynonymRequestDescriptor : RequestDescriptor -{ - internal DeleteSynonymRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteSynonymRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsDeleteSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.delete_synonym"; - - public DeleteSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymResponse.g.cs deleted file mode 100644 index 479bdd5aaa4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class DeleteSynonymResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleRequest.g.cs deleted file mode 100644 index 5564af586ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class DeleteSynonymRuleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Delete a synonym rule. -/// Delete a synonym rule from a synonym set. -/// -/// -public sealed partial class DeleteSynonymRuleRequest : PlainRequest -{ - public DeleteSynonymRuleRequest(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("set_id", setId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsDeleteSynonymRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.delete_synonym_rule"; -} - -/// -/// -/// Delete a synonym rule. -/// Delete a synonym rule from a synonym set. -/// -/// -public sealed partial class DeleteSynonymRuleRequestDescriptor : RequestDescriptor -{ - internal DeleteSynonymRuleRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteSynonymRuleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("set_id", setId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsDeleteSynonymRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.delete_synonym_rule"; - - public DeleteSynonymRuleRequestDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RouteValues.Required("rule_id", ruleId); - return Self; - } - - public DeleteSynonymRuleRequestDescriptor SetId(Elastic.Clients.Elasticsearch.Serverless.Id setId) - { - RouteValues.Required("set_id", setId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs deleted file mode 100644 index 73974df9ed9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class DeleteSynonymRuleResponse : ElasticsearchResponse -{ - /// - /// - /// Updating synonyms in a synonym set reloads the associated analyzers. - /// This is the analyzers reloading result - /// - /// - [JsonInclude, JsonPropertyName("reload_analyzers_details")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ReloadResult ReloadAnalyzersDetails { get; init; } - - /// - /// - /// Update operation result - /// - /// - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRequest.g.cs deleted file mode 100644 index e1c50dc206c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRequest.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class GetSynonymRequestParameters : RequestParameters -{ - /// - /// - /// Starting offset for query rules to be retrieved - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// specifies a max number of query rules to retrieve - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get a synonym set. -/// -/// -public sealed partial class GetSynonymRequest : PlainRequest -{ - public GetSynonymRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonym"; - - /// - /// - /// Starting offset for query rules to be retrieved - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// specifies a max number of query rules to retrieve - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get a synonym set. -/// -/// -public sealed partial class GetSynonymRequestDescriptor : RequestDescriptor, GetSynonymRequestParameters> -{ - internal GetSynonymRequestDescriptor(Action> configure) => configure.Invoke(this); - - public GetSynonymRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonym"; - - public GetSynonymRequestDescriptor From(int? from) => Qs("from", from); - public GetSynonymRequestDescriptor Size(int? size) => Qs("size", size); - - public GetSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} - -/// -/// -/// Get a synonym set. -/// -/// -public sealed partial class GetSynonymRequestDescriptor : RequestDescriptor -{ - internal GetSynonymRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetSynonymRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonym"; - - public GetSynonymRequestDescriptor From(int? from) => Qs("from", from); - public GetSynonymRequestDescriptor Size(int? size) => Qs("size", size); - - public GetSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymResponse.g.cs deleted file mode 100644 index b9a0e5a1d26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class GetSynonymResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("synonyms_set")] - public IReadOnlyCollection SynonymsSet { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleRequest.g.cs deleted file mode 100644 index 6568a2355e8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleRequest.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class GetSynonymRuleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get a synonym rule. -/// Get a synonym rule from a synonym set. -/// -/// -public sealed partial class GetSynonymRuleRequest : PlainRequest -{ - public GetSynonymRuleRequest(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("set_id", setId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonymRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonym_rule"; -} - -/// -/// -/// Get a synonym rule. -/// Get a synonym rule from a synonym set. -/// -/// -public sealed partial class GetSynonymRuleRequestDescriptor : RequestDescriptor -{ - internal GetSynonymRuleRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetSynonymRuleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("set_id", setId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonymRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonym_rule"; - - public GetSynonymRuleRequestDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RouteValues.Required("rule_id", ruleId); - return Self; - } - - public GetSynonymRuleRequestDescriptor SetId(Elastic.Clients.Elasticsearch.Serverless.Id setId) - { - RouteValues.Required("set_id", setId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs deleted file mode 100644 index ddf0532449c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class GetSynonymRuleResponse : ElasticsearchResponse -{ - /// - /// - /// Synonym Rule identifier - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 - /// - /// - [JsonInclude, JsonPropertyName("synonyms")] - public string Synonyms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs deleted file mode 100644 index 7ffe234f589..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class GetSynonymsSetsRequestParameters : RequestParameters -{ - /// - /// - /// Starting offset - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// specifies a max number of results to get - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get all synonym sets. -/// Get a summary of all defined synonym sets. -/// -/// -public sealed partial class GetSynonymsSetsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonymsSets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonyms_sets"; - - /// - /// - /// Starting offset - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// specifies a max number of results to get - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get all synonym sets. -/// Get a summary of all defined synonym sets. -/// -/// -public sealed partial class GetSynonymsSetsRequestDescriptor : RequestDescriptor -{ - internal GetSynonymsSetsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetSynonymsSetsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsGetSynonymsSets; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "synonyms.get_synonyms_sets"; - - public GetSynonymsSetsRequestDescriptor From(int? from) => Qs("from", from); - public GetSynonymsSetsRequestDescriptor Size(int? size) => Qs("size", size); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs deleted file mode 100644 index d995d7a68a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class GetSynonymsSetsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("results")] - public IReadOnlyCollection Results { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRequest.g.cs deleted file mode 100644 index 917cc4d52a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRequest.g.cs +++ /dev/null @@ -1,288 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class PutSynonymRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create or update a synonym set. -/// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. -/// If you need to manage more synonym rules, you can create multiple synonym sets. -/// -/// -public sealed partial class PutSynonymRequest : PlainRequest -{ - public PutSynonymRequest(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsPutSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "synonyms.put_synonym"; - - /// - /// - /// The synonym set information to update - /// - /// - [JsonInclude, JsonPropertyName("synonyms_set")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRule))] - public ICollection SynonymsSet { get; set; } -} - -/// -/// -/// Create or update a synonym set. -/// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. -/// If you need to manage more synonym rules, you can create multiple synonym sets. -/// -/// -public sealed partial class PutSynonymRequestDescriptor : RequestDescriptor, PutSynonymRequestParameters> -{ - internal PutSynonymRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutSynonymRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsPutSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "synonyms.put_synonym"; - - public PutSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private ICollection SynonymsSetValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor SynonymsSetDescriptor { get; set; } - private Action SynonymsSetDescriptorAction { get; set; } - private Action[] SynonymsSetDescriptorActions { get; set; } - - /// - /// - /// The synonym set information to update - /// - /// - public PutSynonymRequestDescriptor SynonymsSet(ICollection synonymsSet) - { - SynonymsSetDescriptor = null; - SynonymsSetDescriptorAction = null; - SynonymsSetDescriptorActions = null; - SynonymsSetValue = synonymsSet; - return Self; - } - - public PutSynonymRequestDescriptor SynonymsSet(Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor descriptor) - { - SynonymsSetValue = null; - SynonymsSetDescriptorAction = null; - SynonymsSetDescriptorActions = null; - SynonymsSetDescriptor = descriptor; - return Self; - } - - public PutSynonymRequestDescriptor SynonymsSet(Action configure) - { - SynonymsSetValue = null; - SynonymsSetDescriptor = null; - SynonymsSetDescriptorActions = null; - SynonymsSetDescriptorAction = configure; - return Self; - } - - public PutSynonymRequestDescriptor SynonymsSet(params Action[] configure) - { - SynonymsSetValue = null; - SynonymsSetDescriptor = null; - SynonymsSetDescriptorAction = null; - SynonymsSetDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SynonymsSetDescriptor is not null) - { - writer.WritePropertyName("synonyms_set"); - JsonSerializer.Serialize(writer, SynonymsSetDescriptor, options); - } - else if (SynonymsSetDescriptorAction is not null) - { - writer.WritePropertyName("synonyms_set"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor(SynonymsSetDescriptorAction), options); - } - else if (SynonymsSetDescriptorActions is not null) - { - writer.WritePropertyName("synonyms_set"); - if (SynonymsSetDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SynonymsSetDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor(action), options); - } - - if (SynonymsSetDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("synonyms_set"); - SingleOrManySerializationHelper.Serialize(SynonymsSetValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create or update a synonym set. -/// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. -/// If you need to manage more synonym rules, you can create multiple synonym sets. -/// -/// -public sealed partial class PutSynonymRequestDescriptor : RequestDescriptor -{ - internal PutSynonymRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutSynonymRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsPutSynonym; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "synonyms.put_synonym"; - - public PutSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - private ICollection SynonymsSetValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor SynonymsSetDescriptor { get; set; } - private Action SynonymsSetDescriptorAction { get; set; } - private Action[] SynonymsSetDescriptorActions { get; set; } - - /// - /// - /// The synonym set information to update - /// - /// - public PutSynonymRequestDescriptor SynonymsSet(ICollection synonymsSet) - { - SynonymsSetDescriptor = null; - SynonymsSetDescriptorAction = null; - SynonymsSetDescriptorActions = null; - SynonymsSetValue = synonymsSet; - return Self; - } - - public PutSynonymRequestDescriptor SynonymsSet(Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor descriptor) - { - SynonymsSetValue = null; - SynonymsSetDescriptorAction = null; - SynonymsSetDescriptorActions = null; - SynonymsSetDescriptor = descriptor; - return Self; - } - - public PutSynonymRequestDescriptor SynonymsSet(Action configure) - { - SynonymsSetValue = null; - SynonymsSetDescriptor = null; - SynonymsSetDescriptorActions = null; - SynonymsSetDescriptorAction = configure; - return Self; - } - - public PutSynonymRequestDescriptor SynonymsSet(params Action[] configure) - { - SynonymsSetValue = null; - SynonymsSetDescriptor = null; - SynonymsSetDescriptorAction = null; - SynonymsSetDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SynonymsSetDescriptor is not null) - { - writer.WritePropertyName("synonyms_set"); - JsonSerializer.Serialize(writer, SynonymsSetDescriptor, options); - } - else if (SynonymsSetDescriptorAction is not null) - { - writer.WritePropertyName("synonyms_set"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor(SynonymsSetDescriptorAction), options); - } - else if (SynonymsSetDescriptorActions is not null) - { - writer.WritePropertyName("synonyms_set"); - if (SynonymsSetDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SynonymsSetDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Synonyms.SynonymRuleDescriptor(action), options); - } - - if (SynonymsSetDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("synonyms_set"); - SingleOrManySerializationHelper.Serialize(SynonymsSetValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymResponse.g.cs deleted file mode 100644 index 7d199169ef8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class PutSynonymResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("reload_analyzers_details")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ReloadResult ReloadAnalyzersDetails { get; init; } - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs deleted file mode 100644 index 670ee2ea436..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs +++ /dev/null @@ -1,110 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class PutSynonymRuleRequestParameters : RequestParameters -{ -} - -/// -/// -/// Create or update a synonym rule. -/// Create or update a synonym rule in a synonym set. -/// -/// -public sealed partial class PutSynonymRuleRequest : PlainRequest -{ - public PutSynonymRuleRequest(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("set_id", setId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsPutSynonymRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "synonyms.put_synonym_rule"; - - [JsonInclude, JsonPropertyName("synonyms")] - public string Synonyms { get; set; } -} - -/// -/// -/// Create or update a synonym rule. -/// Create or update a synonym rule in a synonym set. -/// -/// -public sealed partial class PutSynonymRuleRequestDescriptor : RequestDescriptor -{ - internal PutSynonymRuleRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutSynonymRuleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId) : base(r => r.Required("set_id", setId).Required("rule_id", ruleId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.SynonymsPutSynonymRule; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "synonyms.put_synonym_rule"; - - public PutSynonymRuleRequestDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RouteValues.Required("rule_id", ruleId); - return Self; - } - - public PutSynonymRuleRequestDescriptor SetId(Elastic.Clients.Elasticsearch.Serverless.Id setId) - { - RouteValues.Required("set_id", setId); - return Self; - } - - private string SynonymsValue { get; set; } - - public PutSynonymRuleRequestDescriptor Synonyms(string synonyms) - { - SynonymsValue = synonyms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("synonyms"); - writer.WriteStringValue(SynonymsValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs deleted file mode 100644 index 242f0cd0cde..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class PutSynonymRuleResponse : ElasticsearchResponse -{ - /// - /// - /// Updating synonyms in a synonym set reloads the associated analyzers. - /// This is the analyzers reloading result - /// - /// - [JsonInclude, JsonPropertyName("reload_analyzers_details")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ReloadResult ReloadAnalyzersDetails { get; init; } - - /// - /// - /// Update operation result - /// - /// - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs deleted file mode 100644 index 7854f379409..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsRequest.g.cs +++ /dev/null @@ -1,415 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TermVectorsRequestParameters : RequestParameters -{ - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - public bool? FieldStatistics { get => Q("field_statistics"); set => Q("field_statistics", value); } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - public bool? Offsets { get => Q("offsets"); set => Q("offsets", value); } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - public bool? Payloads { get => Q("payloads"); set => Q("payloads", value); } - - /// - /// - /// If true, the response includes term positions. - /// - /// - public bool? Positions { get => Q("positions"); set => Q("positions", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - public bool? TermStatistics { get => Q("term_statistics"); set => Q("term_statistics", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } -} - -/// -/// -/// Get term vector information. -/// -/// -/// Get information and statistics about terms in the fields of a particular document. -/// -/// -public sealed partial class TermVectorsRequest : PlainRequest -{ - public TermVectorsRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Required("index", index).Optional("id", id)) - { - } - - public TermVectorsRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceTermvectors; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "termvectors"; - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get => Q("fields"); set => Q("fields", value); } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - [JsonIgnore] - public bool? FieldStatistics { get => Q("field_statistics"); set => Q("field_statistics", value); } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - [JsonIgnore] - public bool? Offsets { get => Q("offsets"); set => Q("offsets", value); } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - [JsonIgnore] - public bool? Payloads { get => Q("payloads"); set => Q("payloads", value); } - - /// - /// - /// If true, the response includes term positions. - /// - /// - [JsonIgnore] - public bool? Positions { get => Q("positions"); set => Q("positions", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// If true, the request is real-time as opposed to near-real-time. - /// - /// - [JsonIgnore] - public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - [JsonIgnore] - public bool? TermStatistics { get => Q("term_statistics"); set => Q("term_statistics", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - [JsonIgnore] - public long? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Specific version type. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. - /// - /// - [JsonInclude, JsonPropertyName("doc")] - [SourceConverter] - public TDocument? Doc { get; set; } - - /// - /// - /// Filter terms based on their tf-idf scores. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? Filter { get; set; } - - /// - /// - /// Overrides the default per-field analyzer. - /// - /// - [JsonInclude, JsonPropertyName("per_field_analyzer")] - public IDictionary? PerFieldAnalyzer { get; set; } -} - -/// -/// -/// Get term vector information. -/// -/// -/// Get information and statistics about terms in the fields of a particular document. -/// -/// -public sealed partial class TermVectorsRequestDescriptor : RequestDescriptor, TermVectorsRequestParameters> -{ - internal TermVectorsRequestDescriptor(Action> configure) => configure.Invoke(this); - - public TermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Required("index", index).Optional("id", id)) - { - } - - public TermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - public TermVectorsRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public TermVectorsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public TermVectorsRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id) : this(typeof(TDocument), id) - { - } - - public TermVectorsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceTermvectors; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "termvectors"; - - public TermVectorsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) => Qs("fields", fields); - public TermVectorsRequestDescriptor FieldStatistics(bool? fieldStatistics = true) => Qs("field_statistics", fieldStatistics); - public TermVectorsRequestDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); - public TermVectorsRequestDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); - public TermVectorsRequestDescriptor Positions(bool? positions = true) => Qs("positions", positions); - public TermVectorsRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public TermVectorsRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - public TermVectorsRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public TermVectorsRequestDescriptor TermStatistics(bool? termStatistics = true) => Qs("term_statistics", termStatistics); - public TermVectorsRequestDescriptor Version(long? version) => Qs("version", version); - public TermVectorsRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) => Qs("version_type", versionType); - - public TermVectorsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - RouteValues.Optional("id", id); - return Self; - } - - public TermVectorsRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private TDocument? DocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } - - /// - /// - /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. - /// - /// - public TermVectorsRequestDescriptor Doc(TDocument? doc) - { - DocValue = doc; - return Self; - } - - /// - /// - /// Filter terms based on their tf-idf scores. - /// - /// - public TermVectorsRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TermVectorsRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TermVectorsRequestDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Overrides the default per-field analyzer. - /// - /// - public TermVectorsRequestDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocValue is not null) - { - writer.WritePropertyName("doc"); - settings.SourceSerializer.Serialize(DocValue, writer); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsResponse.g.cs deleted file mode 100644 index f2c69d342cf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermVectorsResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TermVectorsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string? Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("term_vectors")] - [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.TermVector))] - public IReadOnlyDictionary? TermVectors { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs deleted file mode 100644 index 5173a597bac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumRequest.g.cs +++ /dev/null @@ -1,550 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TermsEnumRequestParameters : RequestParameters -{ -} - -/// -/// -/// Get terms in an index. -/// -/// -/// Discover terms that match a partial string in an index. -/// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. -/// -/// -/// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. -/// This can occur due to a few reasons, such as a request timeout or a node error. -/// -/// -/// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. -/// -/// -public sealed partial class TermsEnumRequest : PlainRequest -{ - public TermsEnumRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceTermsEnum; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "terms_enum"; - - /// - /// - /// When true the provided search string is matched against index terms without case sensitivity. - /// - /// - [JsonInclude, JsonPropertyName("case_insensitive")] - public bool? CaseInsensitive { get; set; } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Allows to filter an index shard if the provided query rewrites to match_none. - /// - /// - [JsonInclude, JsonPropertyName("index_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilter { get; set; } - [JsonInclude, JsonPropertyName("search_after")] - public string? SearchAfter { get; set; } - - /// - /// - /// How many matching terms to return. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. - /// - /// - [JsonInclude, JsonPropertyName("string")] - public string? String { get; set; } - - /// - /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } -} - -/// -/// -/// Get terms in an index. -/// -/// -/// Discover terms that match a partial string in an index. -/// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. -/// -/// -/// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. -/// This can occur due to a few reasons, such as a request timeout or a node error. -/// -/// -/// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. -/// -/// -public sealed partial class TermsEnumRequestDescriptor : RequestDescriptor, TermsEnumRequestParameters> -{ - internal TermsEnumRequestDescriptor(Action> configure) => configure.Invoke(this); - - public TermsEnumRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - public TermsEnumRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceTermsEnum; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "terms_enum"; - - public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } - private Action> IndexFilterDescriptorAction { get; set; } - private string? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private string? StringValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// When true the provided search string is matched against index terms without case sensitivity. - /// - /// - public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - public TermsEnumRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - public TermsEnumRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Allows to filter an index shard if the provided query rewrites to match_none. - /// - /// - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(Action> configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - - public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// How many matching terms to return. - /// - /// - public TermsEnumRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. - /// - /// - public TermsEnumRequestDescriptor String(string? value) - { - StringValue = value; - return Self; - } - - /// - /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. - /// - /// - public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IndexFilterDescriptor is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); - } - else if (IndexFilterDescriptorAction is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); - } - else if (IndexFilterValue is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterValue, options); - } - - if (!string.IsNullOrEmpty(SearchAfterValue)) - { - writer.WritePropertyName("search_after"); - writer.WriteStringValue(SearchAfterValue); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (!string.IsNullOrEmpty(StringValue)) - { - writer.WritePropertyName("string"); - writer.WriteStringValue(StringValue); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Get terms in an index. -/// -/// -/// Discover terms that match a partial string in an index. -/// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. -/// -/// -/// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. -/// This can occur due to a few reasons, such as a request timeout or a node error. -/// -/// -/// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. -/// -/// -public sealed partial class TermsEnumRequestDescriptor : RequestDescriptor -{ - internal TermsEnumRequestDescriptor(Action configure) => configure.Invoke(this); - - public TermsEnumRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index) : base(r => r.Required("index", index)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceTermsEnum; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "terms_enum"; - - public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? IndexFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor IndexFilterDescriptor { get; set; } - private Action IndexFilterDescriptorAction { get; set; } - private string? SearchAfterValue { get; set; } - private int? SizeValue { get; set; } - private string? StringValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - - /// - /// - /// When true the provided search string is matched against index terms without case sensitivity. - /// - /// - public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - public TermsEnumRequestDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - public TermsEnumRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string to match at the start of indexed terms. If not provided, all terms in the field are considered. - /// - /// - public TermsEnumRequestDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Allows to filter an index shard if the provided query rewrites to match_none. - /// - /// - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? indexFilter) - { - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = null; - IndexFilterValue = indexFilter; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - IndexFilterValue = null; - IndexFilterDescriptorAction = null; - IndexFilterDescriptor = descriptor; - return Self; - } - - public TermsEnumRequestDescriptor IndexFilter(Action configure) - { - IndexFilterValue = null; - IndexFilterDescriptor = null; - IndexFilterDescriptorAction = configure; - return Self; - } - - public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// How many matching terms to return. - /// - /// - public TermsEnumRequestDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. - /// - /// - public TermsEnumRequestDescriptor String(string? value) - { - StringValue = value; - return Self; - } - - /// - /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. - /// - /// - public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IndexFilterDescriptor is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterDescriptor, options); - } - else if (IndexFilterDescriptorAction is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(IndexFilterDescriptorAction), options); - } - else if (IndexFilterValue is not null) - { - writer.WritePropertyName("index_filter"); - JsonSerializer.Serialize(writer, IndexFilterValue, options); - } - - if (!string.IsNullOrEmpty(SearchAfterValue)) - { - writer.WritePropertyName("search_after"); - writer.WriteStringValue(SearchAfterValue); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (!string.IsNullOrEmpty(StringValue)) - { - writer.WritePropertyName("string"); - writer.WriteStringValue(StringValue); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumResponse.g.cs deleted file mode 100644 index 622d36f7f49..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TermsEnumResponse.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TermsEnumResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("complete")] - public bool Complete { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("terms")] - public IReadOnlyCollection Terms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs deleted file mode 100644 index 244b0a6f31d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TextStructure; - -public sealed partial class TestGrokPatternRequestParameters : RequestParameters -{ - /// - /// - /// The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled). - /// - /// - public string? EcsCompatibility { get => Q("ecs_compatibility"); set => Q("ecs_compatibility", value); } -} - -/// -/// -/// Test a Grok pattern. -/// Test a Grok pattern on one or more lines of text. -/// The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. -/// -/// -public sealed partial class TestGrokPatternRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.TextStructureTestGrokPattern; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "text_structure.test_grok_pattern"; - - /// - /// - /// The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled). - /// - /// - [JsonIgnore] - public string? EcsCompatibility { get => Q("ecs_compatibility"); set => Q("ecs_compatibility", value); } - - /// - /// - /// Grok pattern to run on the text. - /// - /// - [JsonInclude, JsonPropertyName("grok_pattern")] - public string GrokPattern { get; set; } - - /// - /// - /// Lines of text to run the Grok pattern on. - /// - /// - [JsonInclude, JsonPropertyName("text")] - public ICollection Text { get; set; } -} - -/// -/// -/// Test a Grok pattern. -/// Test a Grok pattern on one or more lines of text. -/// The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. -/// -/// -public sealed partial class TestGrokPatternRequestDescriptor : RequestDescriptor -{ - internal TestGrokPatternRequestDescriptor(Action configure) => configure.Invoke(this); - - public TestGrokPatternRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TextStructureTestGrokPattern; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "text_structure.test_grok_pattern"; - - public TestGrokPatternRequestDescriptor EcsCompatibility(string? ecsCompatibility) => Qs("ecs_compatibility", ecsCompatibility); - - private string GrokPatternValue { get; set; } - private ICollection TextValue { get; set; } - - /// - /// - /// Grok pattern to run on the text. - /// - /// - public TestGrokPatternRequestDescriptor GrokPattern(string grokPattern) - { - GrokPatternValue = grokPattern; - return Self; - } - - /// - /// - /// Lines of text to run the Grok pattern on. - /// - /// - public TestGrokPatternRequestDescriptor Text(ICollection text) - { - TextValue = text; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("grok_pattern"); - writer.WriteStringValue(GrokPatternValue); - writer.WritePropertyName("text"); - JsonSerializer.Serialize(writer, TextValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternResponse.g.cs deleted file mode 100644 index 6eafe234525..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TextStructure/TestGrokPatternResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TextStructure; - -public sealed partial class TestGrokPatternResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("matches")] - public IReadOnlyCollection Matches { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformRequest.g.cs deleted file mode 100644 index 5a9c2718908..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformRequest.g.cs +++ /dev/null @@ -1,141 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class DeleteTransformRequestParameters : RequestParameters -{ - /// - /// - /// If this value is true, the destination index is deleted together with the transform. If false, the destination - /// index will not be deleted - /// - /// - public bool? DeleteDestIndex { get => Q("delete_dest_index"); set => Q("delete_dest_index", value); } - - /// - /// - /// If this value is false, the transform must be stopped before it can be deleted. If true, the transform is - /// deleted regardless of its current state. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete a transform. -/// Deletes a transform. -/// -/// -public sealed partial class DeleteTransformRequest : PlainRequest -{ - public DeleteTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementDeleteTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.delete_transform"; - - /// - /// - /// If this value is true, the destination index is deleted together with the transform. If false, the destination - /// index will not be deleted - /// - /// - [JsonIgnore] - public bool? DeleteDestIndex { get => Q("delete_dest_index"); set => Q("delete_dest_index", value); } - - /// - /// - /// If this value is false, the transform must be stopped before it can be deleted. If true, the transform is - /// deleted regardless of its current state. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Delete a transform. -/// Deletes a transform. -/// -/// -public sealed partial class DeleteTransformRequestDescriptor : RequestDescriptor -{ - internal DeleteTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public DeleteTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementDeleteTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.delete_transform"; - - public DeleteTransformRequestDescriptor DeleteDestIndex(bool? deleteDestIndex = true) => Qs("delete_dest_index", deleteDestIndex); - public DeleteTransformRequestDescriptor Force(bool? force = true) => Qs("force", force); - public DeleteTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public DeleteTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformResponse.g.cs deleted file mode 100644 index b39ea167e98..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/DeleteTransformResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class DeleteTransformResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformRequest.g.cs deleted file mode 100644 index e11fc2ef49f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformRequest.g.cs +++ /dev/null @@ -1,207 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class GetTransformRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no transforms that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Excludes fields that were automatically added when creating the - /// transform. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } - - /// - /// - /// Skips the specified number of transforms. - /// - /// - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of transforms to obtain. - /// - /// - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get transforms. -/// Retrieves configuration information for transforms. -/// -/// -public sealed partial class GetTransformRequest : PlainRequest -{ - public GetTransformRequest() - { - } - - public GetTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Names? transformId) : base(r => r.Optional("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementGetTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.get_transform"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no transforms that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Excludes fields that were automatically added when creating the - /// transform. This allows the configuration to be in an acceptable format to - /// be retrieved and then added to another cluster. - /// - /// - [JsonIgnore] - public bool? ExcludeGenerated { get => Q("exclude_generated"); set => Q("exclude_generated", value); } - - /// - /// - /// Skips the specified number of transforms. - /// - /// - [JsonIgnore] - public int? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of transforms to obtain. - /// - /// - [JsonIgnore] - public int? Size { get => Q("size"); set => Q("size", value); } -} - -/// -/// -/// Get transforms. -/// Retrieves configuration information for transforms. -/// -/// -public sealed partial class GetTransformRequestDescriptor : RequestDescriptor -{ - internal GetTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? transformId) : base(r => r.Optional("transform_id", transformId)) - { - } - - public GetTransformRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementGetTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.get_transform"; - - public GetTransformRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetTransformRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated); - public GetTransformRequestDescriptor From(int? from) => Qs("from", from); - public GetTransformRequestDescriptor Size(int? size) => Qs("size", size); - - public GetTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Names? transformId) - { - RouteValues.Optional("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformResponse.g.cs deleted file mode 100644 index 44e4b3afaa7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class GetTransformResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("transforms")] - public IReadOnlyCollection Transforms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsRequest.g.cs deleted file mode 100644 index be1b6061e59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsRequest.g.cs +++ /dev/null @@ -1,195 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class GetTransformStatsRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no transforms that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Skips the specified number of transforms. - /// - /// - public long? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of transforms to obtain. - /// - /// - public long? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Controls the time to wait for the stats - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get transform stats. -/// Retrieves usage information for transforms. -/// -/// -public sealed partial class GetTransformStatsRequest : PlainRequest -{ - public GetTransformStatsRequest(Elastic.Clients.Elasticsearch.Serverless.Names transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementGetTransformStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.get_transform_stats"; - - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no transforms that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// If this parameter is false, the request returns a 404 status code when - /// there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Skips the specified number of transforms. - /// - /// - [JsonIgnore] - public long? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Specifies the maximum number of transforms to obtain. - /// - /// - [JsonIgnore] - public long? Size { get => Q("size"); set => Q("size", value); } - - /// - /// - /// Controls the time to wait for the stats - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Get transform stats. -/// Retrieves usage information for transforms. -/// -/// -public sealed partial class GetTransformStatsRequestDescriptor : RequestDescriptor -{ - internal GetTransformStatsRequestDescriptor(Action configure) => configure.Invoke(this); - - public GetTransformStatsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementGetTransformStats; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.get_transform_stats"; - - public GetTransformStatsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public GetTransformStatsRequestDescriptor From(long? from) => Qs("from", from); - public GetTransformStatsRequestDescriptor Size(long? size) => Qs("size", size); - public GetTransformStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public GetTransformStatsRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Names transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsResponse.g.cs deleted file mode 100644 index ad4f91559ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/GetTransformStatsResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class GetTransformStatsResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("transforms")] - public IReadOnlyCollection Transforms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformRequest.g.cs deleted file mode 100644 index 723590953b8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformRequest.g.cs +++ /dev/null @@ -1,1012 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class PreviewTransformRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a response. If no response is received before the - /// timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Preview a transform. -/// Generates a preview of the results that you will get when you create a transform with the same configuration. -/// -/// -/// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also -/// generates a list of mappings and settings for the destination index. These values are determined based on the field -/// types of the source index and the transform aggregations. -/// -/// -public sealed partial class PreviewTransformRequest : PlainRequest -{ - public PreviewTransformRequest() - { - } - - public PreviewTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id? transformId) : base(r => r.Optional("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementPreviewTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.preview_transform"; - - /// - /// - /// Period to wait for a response. If no response is received before the - /// timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Free text description of the transform. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The destination for the transform. - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? Dest { get; set; } - - /// - /// - /// The interval between checks for changes in the source indices when the - /// transform is running continuously. Also determines the retry interval in - /// the event of transient failures while the transform is searching or - /// indexing. The minimum value is 1s and the maximum is 1h. - /// - /// - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; set; } - - /// - /// - /// The latest method transforms the data by finding the latest document for - /// each unique key. - /// - /// - [JsonInclude, JsonPropertyName("latest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? Latest { get; set; } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. - /// These objects define the group by fields and the aggregation to reduce - /// the data. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? Pivot { get; set; } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined - /// criteria is deleted from the destination index. - /// - /// - [JsonInclude, JsonPropertyName("retention_policy")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicy { get; set; } - - /// - /// - /// Defines optional transform settings. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? Settings { get; set; } - - /// - /// - /// The source of the data for the transform. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? Source { get; set; } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - [JsonInclude, JsonPropertyName("sync")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? Sync { get; set; } -} - -/// -/// -/// Preview a transform. -/// Generates a preview of the results that you will get when you create a transform with the same configuration. -/// -/// -/// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also -/// generates a list of mappings and settings for the destination index. These values are determined based on the field -/// types of the source index and the transform aggregations. -/// -/// -public sealed partial class PreviewTransformRequestDescriptor : RequestDescriptor, PreviewTransformRequestParameters> -{ - internal PreviewTransformRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PreviewTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? transformId) : base(r => r.Optional("transform_id", transformId)) - { - } - - public PreviewTransformRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementPreviewTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.preview_transform"; - - public PreviewTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PreviewTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id? transformId) - { - RouteValues.Optional("transform_id", transformId); - return Self; - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? LatestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor LatestDescriptor { get; set; } - private Action> LatestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? PivotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor PivotDescriptor { get; set; } - private Action> PivotDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor RetentionPolicyDescriptor { get; set; } - private Action> RetentionPolicyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? SyncValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor SyncDescriptor { get; set; } - private Action> SyncDescriptorAction { get; set; } - - /// - /// - /// Free text description of the transform. - /// - /// - public PreviewTransformRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination for the transform. - /// - /// - public PreviewTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public PreviewTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval between checks for changes in the source indices when the - /// transform is running continuously. Also determines the retry interval in - /// the event of transient failures while the transform is searching or - /// indexing. The minimum value is 1s and the maximum is 1h. - /// - /// - public PreviewTransformRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// The latest method transforms the data by finding the latest document for - /// each unique key. - /// - /// - public PreviewTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? latest) - { - LatestDescriptor = null; - LatestDescriptorAction = null; - LatestValue = latest; - return Self; - } - - public PreviewTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor descriptor) - { - LatestValue = null; - LatestDescriptorAction = null; - LatestDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Latest(Action> configure) - { - LatestValue = null; - LatestDescriptor = null; - LatestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. - /// These objects define the group by fields and the aggregation to reduce - /// the data. - /// - /// - public PreviewTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? pivot) - { - PivotDescriptor = null; - PivotDescriptorAction = null; - PivotValue = pivot; - return Self; - } - - public PreviewTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor descriptor) - { - PivotValue = null; - PivotDescriptorAction = null; - PivotDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Pivot(Action> configure) - { - PivotValue = null; - PivotDescriptor = null; - PivotDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined - /// criteria is deleted from the destination index. - /// - /// - public PreviewTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? retentionPolicy) - { - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyValue = retentionPolicy; - return Self; - } - - public PreviewTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor descriptor) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor RetentionPolicy(Action> configure) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform settings. - /// - /// - public PreviewTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public PreviewTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The source of the data for the transform. - /// - /// - public PreviewTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PreviewTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - public PreviewTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? sync) - { - SyncDescriptor = null; - SyncDescriptorAction = null; - SyncValue = sync; - return Self; - } - - public PreviewTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor descriptor) - { - SyncValue = null; - SyncDescriptorAction = null; - SyncDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Sync(Action> configure) - { - SyncValue = null; - SyncDescriptor = null; - SyncDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor(DestDescriptorAction), options); - } - else if (DestValue is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (LatestDescriptor is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestDescriptor, options); - } - else if (LatestDescriptorAction is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor(LatestDescriptorAction), options); - } - else if (LatestValue is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestValue, options); - } - - if (PivotDescriptor is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotDescriptor, options); - } - else if (PivotDescriptorAction is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor(PivotDescriptorAction), options); - } - else if (PivotValue is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - } - - if (RetentionPolicyDescriptor is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyDescriptor, options); - } - else if (RetentionPolicyDescriptorAction is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor(RetentionPolicyDescriptorAction), options); - } - else if (RetentionPolicyValue is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SyncDescriptor is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncDescriptor, options); - } - else if (SyncDescriptorAction is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor(SyncDescriptorAction), options); - } - else if (SyncValue is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Preview a transform. -/// Generates a preview of the results that you will get when you create a transform with the same configuration. -/// -/// -/// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also -/// generates a list of mappings and settings for the destination index. These values are determined based on the field -/// types of the source index and the transform aggregations. -/// -/// -public sealed partial class PreviewTransformRequestDescriptor : RequestDescriptor -{ - internal PreviewTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public PreviewTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? transformId) : base(r => r.Optional("transform_id", transformId)) - { - } - - public PreviewTransformRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementPreviewTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.preview_transform"; - - public PreviewTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PreviewTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id? transformId) - { - RouteValues.Optional("transform_id", transformId); - return Self; - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? LatestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor LatestDescriptor { get; set; } - private Action LatestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? PivotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor PivotDescriptor { get; set; } - private Action PivotDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor RetentionPolicyDescriptor { get; set; } - private Action RetentionPolicyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? SyncValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor SyncDescriptor { get; set; } - private Action SyncDescriptorAction { get; set; } - - /// - /// - /// Free text description of the transform. - /// - /// - public PreviewTransformRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination for the transform. - /// - /// - public PreviewTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public PreviewTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval between checks for changes in the source indices when the - /// transform is running continuously. Also determines the retry interval in - /// the event of transient failures while the transform is searching or - /// indexing. The minimum value is 1s and the maximum is 1h. - /// - /// - public PreviewTransformRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// The latest method transforms the data by finding the latest document for - /// each unique key. - /// - /// - public PreviewTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? latest) - { - LatestDescriptor = null; - LatestDescriptorAction = null; - LatestValue = latest; - return Self; - } - - public PreviewTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor descriptor) - { - LatestValue = null; - LatestDescriptorAction = null; - LatestDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Latest(Action configure) - { - LatestValue = null; - LatestDescriptor = null; - LatestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. - /// These objects define the group by fields and the aggregation to reduce - /// the data. - /// - /// - public PreviewTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? pivot) - { - PivotDescriptor = null; - PivotDescriptorAction = null; - PivotValue = pivot; - return Self; - } - - public PreviewTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor descriptor) - { - PivotValue = null; - PivotDescriptorAction = null; - PivotDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Pivot(Action configure) - { - PivotValue = null; - PivotDescriptor = null; - PivotDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined - /// criteria is deleted from the destination index. - /// - /// - public PreviewTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? retentionPolicy) - { - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyValue = retentionPolicy; - return Self; - } - - public PreviewTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor descriptor) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor RetentionPolicy(Action configure) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform settings. - /// - /// - public PreviewTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public PreviewTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The source of the data for the transform. - /// - /// - public PreviewTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PreviewTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - public PreviewTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? sync) - { - SyncDescriptor = null; - SyncDescriptorAction = null; - SyncValue = sync; - return Self; - } - - public PreviewTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor descriptor) - { - SyncValue = null; - SyncDescriptorAction = null; - SyncDescriptor = descriptor; - return Self; - } - - public PreviewTransformRequestDescriptor Sync(Action configure) - { - SyncValue = null; - SyncDescriptor = null; - SyncDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor(DestDescriptorAction), options); - } - else if (DestValue is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (LatestDescriptor is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestDescriptor, options); - } - else if (LatestDescriptorAction is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor(LatestDescriptorAction), options); - } - else if (LatestValue is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestValue, options); - } - - if (PivotDescriptor is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotDescriptor, options); - } - else if (PivotDescriptorAction is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor(PivotDescriptorAction), options); - } - else if (PivotValue is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - } - - if (RetentionPolicyDescriptor is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyDescriptor, options); - } - else if (RetentionPolicyDescriptorAction is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor(RetentionPolicyDescriptorAction), options); - } - else if (RetentionPolicyValue is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SyncDescriptor is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncDescriptor, options); - } - else if (SyncDescriptorAction is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor(SyncDescriptorAction), options); - } - else if (SyncValue is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformResponse.g.cs deleted file mode 100644 index 83b1131f2bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PreviewTransformResponse.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class PreviewTransformResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("generated_dest_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState GeneratedDestIndex { get; init; } - [JsonInclude, JsonPropertyName("preview")] - public IReadOnlyCollection Preview { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformRequest.g.cs deleted file mode 100644 index 7b451cfaa63..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformRequest.g.cs +++ /dev/null @@ -1,1115 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class PutTransformRequestParameters : RequestParameters -{ - /// - /// - /// When the transform is created, a series of validations occur to ensure its success. For example, there is a - /// check for the existence of the source indices and a check that the destination index is not part of the source - /// index pattern. You can use this parameter to skip the checks, for example when the source index does not exist - /// until after the transform is created. The validations are always run when you start the transform, however, with - /// the exception of privilege checks. - /// - /// - public bool? DeferValidation { get => Q("defer_validation"); set => Q("defer_validation", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Create a transform. -/// Creates a transform. -/// -/// -/// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as -/// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a -/// unique row per entity. -/// -/// -/// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If -/// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in -/// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values -/// in the latest object. -/// -/// -/// You must have create_index, index, and read privileges on the destination index and read and -/// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the -/// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If -/// those roles do not have the required privileges on the source and destination indices, the transform fails when it -/// attempts unauthorized operations. -/// -/// -/// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any -/// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do -/// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not -/// give users any privileges on .data-frame-internal* indices. -/// -/// -public sealed partial class PutTransformRequest : PlainRequest -{ - public PutTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementPutTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.put_transform"; - - /// - /// - /// When the transform is created, a series of validations occur to ensure its success. For example, there is a - /// check for the existence of the source indices and a check that the destination index is not part of the source - /// index pattern. You can use this parameter to skip the checks, for example when the source index does not exist - /// until after the transform is created. The validations are always run when you start the transform, however, with - /// the exception of privilege checks. - /// - /// - [JsonIgnore] - public bool? DeferValidation { get => Q("defer_validation"); set => Q("defer_validation", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Free text description of the transform. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The destination for the transform. - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination Dest { get; set; } - - /// - /// - /// The interval between checks for changes in the source indices when the transform is running continuously. Also - /// determines the retry interval in the event of transient failures while the transform is searching or indexing. - /// The minimum value is 1s and the maximum is 1h. - /// - /// - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; set; } - - /// - /// - /// The latest method transforms the data by finding the latest document for each unique key. - /// - /// - [JsonInclude, JsonPropertyName("latest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? Latest { get; set; } - - /// - /// - /// Defines optional transform metadata. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields - /// and the aggregation to reduce the data. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? Pivot { get; set; } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the - /// destination index. - /// - /// - [JsonInclude, JsonPropertyName("retention_policy")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicy { get; set; } - - /// - /// - /// Defines optional transform settings. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? Settings { get; set; } - - /// - /// - /// The source of the data for the transform. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source Source { get; set; } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - [JsonInclude, JsonPropertyName("sync")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? Sync { get; set; } -} - -/// -/// -/// Create a transform. -/// Creates a transform. -/// -/// -/// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as -/// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a -/// unique row per entity. -/// -/// -/// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If -/// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in -/// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values -/// in the latest object. -/// -/// -/// You must have create_index, index, and read privileges on the destination index and read and -/// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the -/// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If -/// those roles do not have the required privileges on the source and destination indices, the transform fails when it -/// attempts unauthorized operations. -/// -/// -/// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any -/// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do -/// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not -/// give users any privileges on .data-frame-internal* indices. -/// -/// -public sealed partial class PutTransformRequestDescriptor : RequestDescriptor, PutTransformRequestParameters> -{ - internal PutTransformRequestDescriptor(Action> configure) => configure.Invoke(this); - - public PutTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementPutTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.put_transform"; - - public PutTransformRequestDescriptor DeferValidation(bool? deferValidation = true) => Qs("defer_validation", deferValidation); - public PutTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? LatestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor LatestDescriptor { get; set; } - private Action> LatestDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? PivotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor PivotDescriptor { get; set; } - private Action> PivotDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor RetentionPolicyDescriptor { get; set; } - private Action> RetentionPolicyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? SyncValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor SyncDescriptor { get; set; } - private Action> SyncDescriptorAction { get; set; } - - /// - /// - /// Free text description of the transform. - /// - /// - public PutTransformRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination for the transform. - /// - /// - public PutTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public PutTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval between checks for changes in the source indices when the transform is running continuously. Also - /// determines the retry interval in the event of transient failures while the transform is searching or indexing. - /// The minimum value is 1s and the maximum is 1h. - /// - /// - public PutTransformRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// The latest method transforms the data by finding the latest document for each unique key. - /// - /// - public PutTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? latest) - { - LatestDescriptor = null; - LatestDescriptorAction = null; - LatestValue = latest; - return Self; - } - - public PutTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor descriptor) - { - LatestValue = null; - LatestDescriptorAction = null; - LatestDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Latest(Action> configure) - { - LatestValue = null; - LatestDescriptor = null; - LatestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform metadata. - /// - /// - public PutTransformRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields - /// and the aggregation to reduce the data. - /// - /// - public PutTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? pivot) - { - PivotDescriptor = null; - PivotDescriptorAction = null; - PivotValue = pivot; - return Self; - } - - public PutTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor descriptor) - { - PivotValue = null; - PivotDescriptorAction = null; - PivotDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Pivot(Action> configure) - { - PivotValue = null; - PivotDescriptor = null; - PivotDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the - /// destination index. - /// - /// - public PutTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? retentionPolicy) - { - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyValue = retentionPolicy; - return Self; - } - - public PutTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor descriptor) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor RetentionPolicy(Action> configure) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform settings. - /// - /// - public PutTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public PutTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The source of the data for the transform. - /// - /// - public PutTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - public PutTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? sync) - { - SyncDescriptor = null; - SyncDescriptorAction = null; - SyncValue = sync; - return Self; - } - - public PutTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor descriptor) - { - SyncValue = null; - SyncDescriptorAction = null; - SyncDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Sync(Action> configure) - { - SyncValue = null; - SyncDescriptor = null; - SyncDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor(DestDescriptorAction), options); - } - else - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (LatestDescriptor is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestDescriptor, options); - } - else if (LatestDescriptorAction is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor(LatestDescriptorAction), options); - } - else if (LatestValue is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PivotDescriptor is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotDescriptor, options); - } - else if (PivotDescriptorAction is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor(PivotDescriptorAction), options); - } - else if (PivotValue is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - } - - if (RetentionPolicyDescriptor is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyDescriptor, options); - } - else if (RetentionPolicyDescriptorAction is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor(RetentionPolicyDescriptorAction), options); - } - else if (RetentionPolicyValue is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SyncDescriptor is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncDescriptor, options); - } - else if (SyncDescriptorAction is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor(SyncDescriptorAction), options); - } - else if (SyncValue is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Create a transform. -/// Creates a transform. -/// -/// -/// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as -/// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a -/// unique row per entity. -/// -/// -/// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If -/// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in -/// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values -/// in the latest object. -/// -/// -/// You must have create_index, index, and read privileges on the destination index and read and -/// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the -/// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If -/// those roles do not have the required privileges on the source and destination indices, the transform fails when it -/// attempts unauthorized operations. -/// -/// -/// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any -/// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do -/// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not -/// give users any privileges on .data-frame-internal* indices. -/// -/// -public sealed partial class PutTransformRequestDescriptor : RequestDescriptor -{ - internal PutTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public PutTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementPutTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.put_transform"; - - public PutTransformRequestDescriptor DeferValidation(bool? deferValidation = true) => Qs("defer_validation", deferValidation); - public PutTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public PutTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? LatestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor LatestDescriptor { get; set; } - private Action LatestDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? PivotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor PivotDescriptor { get; set; } - private Action PivotDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor RetentionPolicyDescriptor { get; set; } - private Action RetentionPolicyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? SyncValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor SyncDescriptor { get; set; } - private Action SyncDescriptorAction { get; set; } - - /// - /// - /// Free text description of the transform. - /// - /// - public PutTransformRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination for the transform. - /// - /// - public PutTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public PutTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval between checks for changes in the source indices when the transform is running continuously. Also - /// determines the retry interval in the event of transient failures while the transform is searching or indexing. - /// The minimum value is 1s and the maximum is 1h. - /// - /// - public PutTransformRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// The latest method transforms the data by finding the latest document for each unique key. - /// - /// - public PutTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? latest) - { - LatestDescriptor = null; - LatestDescriptorAction = null; - LatestValue = latest; - return Self; - } - - public PutTransformRequestDescriptor Latest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor descriptor) - { - LatestValue = null; - LatestDescriptorAction = null; - LatestDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Latest(Action configure) - { - LatestValue = null; - LatestDescriptor = null; - LatestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform metadata. - /// - /// - public PutTransformRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields - /// and the aggregation to reduce the data. - /// - /// - public PutTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? pivot) - { - PivotDescriptor = null; - PivotDescriptorAction = null; - PivotValue = pivot; - return Self; - } - - public PutTransformRequestDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor descriptor) - { - PivotValue = null; - PivotDescriptorAction = null; - PivotDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Pivot(Action configure) - { - PivotValue = null; - PivotDescriptor = null; - PivotDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the - /// destination index. - /// - /// - public PutTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? retentionPolicy) - { - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyValue = retentionPolicy; - return Self; - } - - public PutTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor descriptor) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor RetentionPolicy(Action configure) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform settings. - /// - /// - public PutTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public PutTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The source of the data for the transform. - /// - /// - public PutTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public PutTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - public PutTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? sync) - { - SyncDescriptor = null; - SyncDescriptorAction = null; - SyncValue = sync; - return Self; - } - - public PutTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor descriptor) - { - SyncValue = null; - SyncDescriptorAction = null; - SyncDescriptor = descriptor; - return Self; - } - - public PutTransformRequestDescriptor Sync(Action configure) - { - SyncValue = null; - SyncDescriptor = null; - SyncDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor(DestDescriptorAction), options); - } - else - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (LatestDescriptor is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestDescriptor, options); - } - else if (LatestDescriptorAction is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.LatestDescriptor(LatestDescriptorAction), options); - } - else if (LatestValue is not null) - { - writer.WritePropertyName("latest"); - JsonSerializer.Serialize(writer, LatestValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PivotDescriptor is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotDescriptor, options); - } - else if (PivotDescriptorAction is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotDescriptor(PivotDescriptorAction), options); - } - else if (PivotValue is not null) - { - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - } - - if (RetentionPolicyDescriptor is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyDescriptor, options); - } - else if (RetentionPolicyDescriptorAction is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor(RetentionPolicyDescriptorAction), options); - } - else if (RetentionPolicyValue is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SyncDescriptor is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncDescriptor, options); - } - else if (SyncDescriptorAction is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor(SyncDescriptorAction), options); - } - else if (SyncValue is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformResponse.g.cs deleted file mode 100644 index 37567c05c87..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/PutTransformResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class PutTransformResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformRequest.g.cs deleted file mode 100644 index 332e21511e7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class ResetTransformRequestParameters : RequestParameters -{ - /// - /// - /// If this value is true, the transform is reset regardless of its current state. If it's false, the transform - /// must be stopped before it can be reset. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Reset a transform. -/// Resets a transform. -/// Before you can reset it, you must stop it; alternatively, use the force query parameter. -/// If the destination index was created by the transform, it is deleted. -/// -/// -public sealed partial class ResetTransformRequest : PlainRequest -{ - public ResetTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementResetTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.reset_transform"; - - /// - /// - /// If this value is true, the transform is reset regardless of its current state. If it's false, the transform - /// must be stopped before it can be reset. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } -} - -/// -/// -/// Reset a transform. -/// Resets a transform. -/// Before you can reset it, you must stop it; alternatively, use the force query parameter. -/// If the destination index was created by the transform, it is deleted. -/// -/// -public sealed partial class ResetTransformRequestDescriptor : RequestDescriptor -{ - internal ResetTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public ResetTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementResetTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.reset_transform"; - - public ResetTransformRequestDescriptor Force(bool? force = true) => Qs("force", force); - - public ResetTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformResponse.g.cs deleted file mode 100644 index d97e012a67e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ResetTransformResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class ResetTransformResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformRequest.g.cs deleted file mode 100644 index a24956050eb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformRequest.g.cs +++ /dev/null @@ -1,117 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class ScheduleNowTransformRequestParameters : RequestParameters -{ - /// - /// - /// Controls the time to wait for the scheduling to take place - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Schedule a transform to start now. -/// Instantly runs a transform to process data. -/// -/// -/// If you _schedule_now a transform, it will process the new data instantly, -/// without waiting for the configured frequency interval. After _schedule_now API is called, -/// the transform will be processed again at now + frequency unless _schedule_now API -/// is called again in the meantime. -/// -/// -public sealed partial class ScheduleNowTransformRequest : PlainRequest -{ - public ScheduleNowTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementScheduleNowTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.schedule_now_transform"; - - /// - /// - /// Controls the time to wait for the scheduling to take place - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Schedule a transform to start now. -/// Instantly runs a transform to process data. -/// -/// -/// If you _schedule_now a transform, it will process the new data instantly, -/// without waiting for the configured frequency interval. After _schedule_now API is called, -/// the transform will be processed again at now + frequency unless _schedule_now API -/// is called again in the meantime. -/// -/// -public sealed partial class ScheduleNowTransformRequestDescriptor : RequestDescriptor -{ - internal ScheduleNowTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public ScheduleNowTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementScheduleNowTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.schedule_now_transform"; - - public ScheduleNowTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public ScheduleNowTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformResponse.g.cs deleted file mode 100644 index c9a9273b214..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/ScheduleNowTransformResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class ScheduleNowTransformResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformRequest.g.cs deleted file mode 100644 index 497f8d71a13..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformRequest.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class StartTransformRequestParameters : RequestParameters -{ - /// - /// - /// Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms. - /// - /// - public string? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Start a transform. -/// Starts a transform. -/// -/// -/// When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is -/// set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping -/// definitions for the destination index from the source indices and the transform aggregations. If fields in the -/// destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), -/// the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce -/// mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you -/// start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings -/// in a pivot transform. -/// -/// -/// When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you -/// created the transform, they occur when you start the transform—​with the exception of privilege checks. When -/// Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the -/// time of creation and uses those same roles. If those roles do not have the required privileges on the source and -/// destination indices, the transform fails when it attempts unauthorized operations. -/// -/// -public sealed partial class StartTransformRequest : PlainRequest -{ - public StartTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementStartTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.start_transform"; - - /// - /// - /// Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms. - /// - /// - [JsonIgnore] - public string? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Start a transform. -/// Starts a transform. -/// -/// -/// When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is -/// set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping -/// definitions for the destination index from the source indices and the transform aggregations. If fields in the -/// destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), -/// the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce -/// mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you -/// start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings -/// in a pivot transform. -/// -/// -/// When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you -/// created the transform, they occur when you start the transform—​with the exception of privilege checks. When -/// Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the -/// time of creation and uses those same roles. If those roles do not have the required privileges on the source and -/// destination indices, the transform fails when it attempts unauthorized operations. -/// -/// -public sealed partial class StartTransformRequestDescriptor : RequestDescriptor -{ - internal StartTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public StartTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementStartTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.start_transform"; - - public StartTransformRequestDescriptor From(string? from) => Qs("from", from); - public StartTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public StartTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformResponse.g.cs deleted file mode 100644 index 595a38b4095..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StartTransformResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class StartTransformResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformRequest.g.cs deleted file mode 100644 index 62562870894..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformRequest.g.cs +++ /dev/null @@ -1,195 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class StopTransformRequestParameters : RequestParameters -{ - /// - /// - /// Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; - /// contains the _all string or no identifiers and there are no matches; contains wildcard expressions and there - /// are only partial matches. - /// - /// - /// If it is true, the API returns a successful acknowledgement message when there are no matches. When there are - /// only partial matches, the API stops the appropriate transforms. - /// - /// - /// If it is false, the request returns a 404 status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// If it is true, the API forcefully stops the transforms. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Period to wait for a response when wait_for_completion is true. If no response is received before the - /// timeout expires, the request returns a timeout exception. However, the request continues processing and - /// eventually moves the transform to a STOPPED state. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false, - /// the transform stops as soon as possible. - /// - /// - public bool? WaitForCheckpoint { get => Q("wait_for_checkpoint"); set => Q("wait_for_checkpoint", value); } - - /// - /// - /// If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns - /// immediately and the indexer is stopped asynchronously in the background. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Stop transforms. -/// Stops one or more transforms. -/// -/// -public sealed partial class StopTransformRequest : PlainRequest -{ - public StopTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Name transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementStopTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.stop_transform"; - - /// - /// - /// Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; - /// contains the _all string or no identifiers and there are no matches; contains wildcard expressions and there - /// are only partial matches. - /// - /// - /// If it is true, the API returns a successful acknowledgement message when there are no matches. When there are - /// only partial matches, the API stops the appropriate transforms. - /// - /// - /// If it is false, the request returns a 404 status code when there are no matches or only partial matches. - /// - /// - [JsonIgnore] - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// If it is true, the API forcefully stops the transforms. - /// - /// - [JsonIgnore] - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Period to wait for a response when wait_for_completion is true. If no response is received before the - /// timeout expires, the request returns a timeout exception. However, the request continues processing and - /// eventually moves the transform to a STOPPED state. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false, - /// the transform stops as soon as possible. - /// - /// - [JsonIgnore] - public bool? WaitForCheckpoint { get => Q("wait_for_checkpoint"); set => Q("wait_for_checkpoint", value); } - - /// - /// - /// If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns - /// immediately and the indexer is stopped asynchronously in the background. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Stop transforms. -/// Stops one or more transforms. -/// -/// -public sealed partial class StopTransformRequestDescriptor : RequestDescriptor -{ - internal StopTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public StopTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementStopTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.stop_transform"; - - public StopTransformRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch); - public StopTransformRequestDescriptor Force(bool? force = true) => Qs("force", force); - public StopTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public StopTransformRequestDescriptor WaitForCheckpoint(bool? waitForCheckpoint = true) => Qs("wait_for_checkpoint", waitForCheckpoint); - public StopTransformRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public StopTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Name transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformResponse.g.cs deleted file mode 100644 index 985c2bcd51a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/StopTransformResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class StopTransformResponse : ElasticsearchResponse -{ - /// - /// - /// For a successful response, this value is always true. On failure, an exception is returned instead. - /// - /// - [JsonInclude, JsonPropertyName("acknowledged")] - public bool Acknowledged { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformRequest.g.cs deleted file mode 100644 index b414d107347..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformRequest.g.cs +++ /dev/null @@ -1,854 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class UpdateTransformRequestParameters : RequestParameters -{ - /// - /// - /// When true, deferrable validations are not run. This behavior may be - /// desired if the source index does not exist until after the transform is - /// created. - /// - /// - public bool? DeferValidation { get => Q("defer_validation"); set => Q("defer_validation", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the - /// timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Update a transform. -/// Updates certain properties of a transform. -/// -/// -/// All updated properties except description do not take effect until after the transform starts the next checkpoint, -/// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata -/// privileges for the source indices. You must also have index and read privileges for the destination index. When -/// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the -/// time of update and runs with those privileges. -/// -/// -public sealed partial class UpdateTransformRequest : PlainRequest -{ - public UpdateTransformRequest(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementUpdateTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.update_transform"; - - /// - /// - /// When true, deferrable validations are not run. This behavior may be - /// desired if the source index does not exist until after the transform is - /// created. - /// - /// - [JsonIgnore] - public bool? DeferValidation { get => Q("defer_validation"); set => Q("defer_validation", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the - /// timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// Free text description of the transform. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The destination for the transform. - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? Dest { get; set; } - - /// - /// - /// The interval between checks for changes in the source indices when the - /// transform is running continuously. Also determines the retry interval in - /// the event of transient failures while the transform is searching or - /// indexing. The minimum value is 1s and the maximum is 1h. - /// - /// - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; set; } - - /// - /// - /// Defines optional transform metadata. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined - /// criteria is deleted from the destination index. - /// - /// - [JsonInclude, JsonPropertyName("retention_policy")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicy { get; set; } - - /// - /// - /// Defines optional transform settings. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? Settings { get; set; } - - /// - /// - /// The source of the data for the transform. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? Source { get; set; } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - [JsonInclude, JsonPropertyName("sync")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? Sync { get; set; } -} - -/// -/// -/// Update a transform. -/// Updates certain properties of a transform. -/// -/// -/// All updated properties except description do not take effect until after the transform starts the next checkpoint, -/// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata -/// privileges for the source indices. You must also have index and read privileges for the destination index. When -/// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the -/// time of update and runs with those privileges. -/// -/// -public sealed partial class UpdateTransformRequestDescriptor : RequestDescriptor, UpdateTransformRequestParameters> -{ - internal UpdateTransformRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementUpdateTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.update_transform"; - - public UpdateTransformRequestDescriptor DeferValidation(bool? deferValidation = true) => Qs("defer_validation", deferValidation); - public UpdateTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public UpdateTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor RetentionPolicyDescriptor { get; set; } - private Action> RetentionPolicyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? SyncValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor SyncDescriptor { get; set; } - private Action> SyncDescriptorAction { get; set; } - - /// - /// - /// Free text description of the transform. - /// - /// - public UpdateTransformRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination for the transform. - /// - /// - public UpdateTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public UpdateTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval between checks for changes in the source indices when the - /// transform is running continuously. Also determines the retry interval in - /// the event of transient failures while the transform is searching or - /// indexing. The minimum value is 1s and the maximum is 1h. - /// - /// - public UpdateTransformRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// Defines optional transform metadata. - /// - /// - public UpdateTransformRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined - /// criteria is deleted from the destination index. - /// - /// - public UpdateTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? retentionPolicy) - { - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyValue = retentionPolicy; - return Self; - } - - public UpdateTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor descriptor) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor RetentionPolicy(Action> configure) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform settings. - /// - /// - public UpdateTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public UpdateTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The source of the data for the transform. - /// - /// - public UpdateTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public UpdateTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - public UpdateTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? sync) - { - SyncDescriptor = null; - SyncDescriptorAction = null; - SyncValue = sync; - return Self; - } - - public UpdateTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor descriptor) - { - SyncValue = null; - SyncDescriptorAction = null; - SyncDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Sync(Action> configure) - { - SyncValue = null; - SyncDescriptor = null; - SyncDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor(DestDescriptorAction), options); - } - else if (DestValue is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (RetentionPolicyDescriptor is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyDescriptor, options); - } - else if (RetentionPolicyDescriptorAction is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor(RetentionPolicyDescriptorAction), options); - } - else if (RetentionPolicyValue is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SyncDescriptor is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncDescriptor, options); - } - else if (SyncDescriptorAction is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor(SyncDescriptorAction), options); - } - else if (SyncValue is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update a transform. -/// Updates certain properties of a transform. -/// -/// -/// All updated properties except description do not take effect until after the transform starts the next checkpoint, -/// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata -/// privileges for the source indices. You must also have index and read privileges for the destination index. When -/// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the -/// time of update and runs with those privileges. -/// -/// -public sealed partial class UpdateTransformRequestDescriptor : RequestDescriptor -{ - internal UpdateTransformRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateTransformRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id transformId) : base(r => r.Required("transform_id", transformId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementUpdateTransform; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "transform.update_transform"; - - public UpdateTransformRequestDescriptor DeferValidation(bool? deferValidation = true) => Qs("defer_validation", deferValidation); - public UpdateTransformRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - public UpdateTransformRequestDescriptor TransformId(Elastic.Clients.Elasticsearch.Serverless.Id transformId) - { - RouteValues.Required("transform_id", transformId); - return Self; - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? DestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor RetentionPolicyDescriptor { get; set; } - private Action RetentionPolicyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? SyncValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor SyncDescriptor { get; set; } - private Action SyncDescriptorAction { get; set; } - - /// - /// - /// Free text description of the transform. - /// - /// - public UpdateTransformRequestDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The destination for the transform. - /// - /// - public UpdateTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Destination? dest) - { - DestDescriptor = null; - DestDescriptorAction = null; - DestValue = dest; - return Self; - } - - public UpdateTransformRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor descriptor) - { - DestValue = null; - DestDescriptorAction = null; - DestDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Dest(Action configure) - { - DestValue = null; - DestDescriptor = null; - DestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval between checks for changes in the source indices when the - /// transform is running continuously. Also determines the retry interval in - /// the event of transient failures while the transform is searching or - /// indexing. The minimum value is 1s and the maximum is 1h. - /// - /// - public UpdateTransformRequestDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// Defines optional transform metadata. - /// - /// - public UpdateTransformRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Defines a retention policy for the transform. Data that meets the defined - /// criteria is deleted from the destination index. - /// - /// - public UpdateTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? retentionPolicy) - { - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyValue = retentionPolicy; - return Self; - } - - public UpdateTransformRequestDescriptor RetentionPolicy(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor descriptor) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptorAction = null; - RetentionPolicyDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor RetentionPolicy(Action configure) - { - RetentionPolicyValue = null; - RetentionPolicyDescriptor = null; - RetentionPolicyDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines optional transform settings. - /// - /// - public UpdateTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public UpdateTransformRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The source of the data for the transform. - /// - /// - public UpdateTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public UpdateTransformRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - public UpdateTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? sync) - { - SyncDescriptor = null; - SyncDescriptorAction = null; - SyncValue = sync; - return Self; - } - - public UpdateTransformRequestDescriptor Sync(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor descriptor) - { - SyncValue = null; - SyncDescriptorAction = null; - SyncDescriptor = descriptor; - return Self; - } - - public UpdateTransformRequestDescriptor Sync(Action configure) - { - SyncValue = null; - SyncDescriptor = null; - SyncDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestDescriptor is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestDescriptor, options); - } - else if (DestDescriptorAction is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.DestinationDescriptor(DestDescriptorAction), options); - } - else if (DestValue is not null) - { - writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, DestValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (RetentionPolicyDescriptor is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyDescriptor, options); - } - else if (RetentionPolicyDescriptorAction is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicyDescriptor(RetentionPolicyDescriptorAction), options); - } - else if (RetentionPolicyValue is not null) - { - writer.WritePropertyName("retention_policy"); - JsonSerializer.Serialize(writer, RetentionPolicyValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SourceDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SyncDescriptor is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncDescriptor, options); - } - else if (SyncDescriptorAction is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.TransformManagement.SyncDescriptor(SyncDescriptorAction), options); - } - else if (SyncValue is not null) - { - writer.WritePropertyName("sync"); - JsonSerializer.Serialize(writer, SyncValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformResponse.g.cs deleted file mode 100644 index 3d804e206b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpdateTransformResponse.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class UpdateTransformResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TransformAuthorization? Authorization { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public long CreateTime { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination Dest { get; init; } - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("latest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? Latest { get; init; } - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("pivot")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? Pivot { get; init; } - [JsonInclude, JsonPropertyName("retention_policy")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicy { get; init; } - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings Settings { get; init; } - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Source Source { get; init; } - [JsonInclude, JsonPropertyName("sync")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? Sync { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsRequest.g.cs deleted file mode 100644 index 0f3088cb7ff..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsRequest.g.cs +++ /dev/null @@ -1,141 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class UpgradeTransformsRequestParameters : RequestParameters -{ - /// - /// - /// When true, the request checks for updates but does not run them. - /// - /// - public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and - /// returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Upgrade all transforms. -/// Transforms are compatible across minor versions and between supported major versions. -/// However, over time, the format of transform configuration information may change. -/// This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. -/// It also cleans up the internal data structures that store the transform state and checkpoints. -/// The upgrade does not affect the source and destination indices. -/// The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. -/// -/// -/// If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. -/// Resolve the issue then re-run the process again. -/// A summary is returned when the upgrade is finished. -/// -/// -/// To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. -/// You may want to perform a recent cluster backup prior to the upgrade. -/// -/// -public sealed partial class UpgradeTransformsRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementUpgradeTransforms; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.upgrade_transforms"; - - /// - /// - /// When true, the request checks for updates but does not run them. - /// - /// - [JsonIgnore] - public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and - /// returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } -} - -/// -/// -/// Upgrade all transforms. -/// Transforms are compatible across minor versions and between supported major versions. -/// However, over time, the format of transform configuration information may change. -/// This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. -/// It also cleans up the internal data structures that store the transform state and checkpoints. -/// The upgrade does not affect the source and destination indices. -/// The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. -/// -/// -/// If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. -/// Resolve the issue then re-run the process again. -/// A summary is returned when the upgrade is finished. -/// -/// -/// To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. -/// You may want to perform a recent cluster backup prior to the upgrade. -/// -/// -public sealed partial class UpgradeTransformsRequestDescriptor : RequestDescriptor -{ - internal UpgradeTransformsRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpgradeTransformsRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.TransformManagementUpgradeTransforms; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "transform.upgrade_transforms"; - - public UpgradeTransformsRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); - public UpgradeTransformsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsResponse.g.cs deleted file mode 100644 index 0d286e7ad75..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/TransformManagement/UpgradeTransformsResponse.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class UpgradeTransformsResponse : ElasticsearchResponse -{ - /// - /// - /// The number of transforms that need to be upgraded. - /// - /// - [JsonInclude, JsonPropertyName("needs_update")] - public int NeedsUpdate { get; init; } - - /// - /// - /// The number of transforms that don’t require upgrading. - /// - /// - [JsonInclude, JsonPropertyName("no_action")] - public int NoAction { get; init; } - - /// - /// - /// The number of transforms that have been upgraded. - /// - /// - [JsonInclude, JsonPropertyName("updated")] - public int Updated { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs deleted file mode 100644 index 19c11702a59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRequest.g.cs +++ /dev/null @@ -1,1059 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class UpdateByQueryRequestParameters : RequestParameters -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Analyzer to use for the query string. - /// - /// - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// - /// - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Starting offset (default: 0) - /// - /// - public long? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, Elasticsearch refreshes affected shards to make the operation visible to search. - /// - /// - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the request cache is used for this request. - /// - /// - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to retain the search context for scrolling. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// Size of the scroll request that powers the operation. - /// - /// - public long? ScrollSize { get => Q("scroll_size"); set => Q("scroll_size", value); } - - /// - /// - /// Explicit timeout for each search request. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? SearchTimeout { get => Q("search_timeout"); set => Q("search_timeout", value); } - - /// - /// - /// The type of the search operation. Available options: query_then_fetch, dfs_query_then_fetch. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// The number of slices this task should be divided into. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - public ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); } - - /// - /// - /// Specific tag of the request for logging and statistical purposes. - /// - /// - public ICollection? Stats { get => Q?>("stats"); set => Q("stats", value); } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// - /// - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// - /// Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - public bool? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Should the document increment the version number (internal) on hit or not (reindex) - /// - /// - public bool? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// If true, the request blocks until the operation is complete. - /// - /// - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } -} - -/// -/// -/// Update documents. -/// Updates documents that match the specified query. -/// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. -/// -/// -public sealed partial class UpdateByQueryRequest : PlainRequest -{ - public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdateByQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "update_by_query"; - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. - /// This behavior applies even if the request targets other open indices. - /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonIgnore] - public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } - - /// - /// - /// Analyzer to use for the query string. - /// - /// - [JsonIgnore] - public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); } - - /// - /// - /// If true, wildcard and prefix queries are analyzed. - /// - /// - [JsonIgnore] - public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); } - - /// - /// - /// The default operator for query string query: AND or OR. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); } - - /// - /// - /// Field to use as default where no field prefix is given in the query string. - /// - /// - [JsonIgnore] - public string? Df { get => Q("df"); set => Q("df", value); } - - /// - /// - /// Type of index that wildcard patterns can match. - /// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - /// Supports comma-separated values, such as open,hidden. - /// Valid values are: all, open, closed, hidden, none. - /// - /// - [JsonIgnore] - public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - - /// - /// - /// Starting offset (default: 0) - /// - /// - [JsonIgnore] - public long? From { get => Q("from"); set => Q("from", value); } - - /// - /// - /// If false, the request returns an error if it targets a missing or closed index. - /// - /// - [JsonIgnore] - public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } - - /// - /// - /// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. - /// - /// - [JsonIgnore] - public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); } - - /// - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. - /// If a final pipeline is configured it will always run, regardless of the value of this parameter. - /// - /// - [JsonIgnore] - public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } - - /// - /// - /// Specifies the node or shard the operation should be performed on. - /// Random by default. - /// - /// - [JsonIgnore] - public string? Preference { get => Q("preference"); set => Q("preference", value); } - - /// - /// - /// Query in the Lucene query string syntax. - /// - /// - [JsonIgnore] - public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } - - /// - /// - /// If true, Elasticsearch refreshes affected shards to make the operation visible to search. - /// - /// - [JsonIgnore] - public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the request cache is used for this request. - /// - /// - [JsonIgnore] - public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - [JsonIgnore] - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Period to retain the search context for scrolling. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } - - /// - /// - /// Size of the scroll request that powers the operation. - /// - /// - [JsonIgnore] - public long? ScrollSize { get => Q("scroll_size"); set => Q("scroll_size", value); } - - /// - /// - /// Explicit timeout for each search request. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? SearchTimeout { get => Q("search_timeout"); set => Q("search_timeout", value); } - - /// - /// - /// The type of the search operation. Available options: query_then_fetch, dfs_query_then_fetch. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } - - /// - /// - /// The number of slices this task should be divided into. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Slices? Slices { get => Q("slices"); set => Q("slices", value); } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// - [JsonIgnore] - public ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); } - - /// - /// - /// Specific tag of the request for logging and statistical purposes. - /// - /// - [JsonIgnore] - public ICollection? Stats { get => Q?>("stats"); set => Q("stats", value); } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. - /// - /// - [JsonIgnore] - public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); } - - /// - /// - /// Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - [JsonIgnore] - public bool? Version { get => Q("version"); set => Q("version", value); } - - /// - /// - /// Should the document increment the version number (internal) on hit or not (reindex) - /// - /// - [JsonIgnore] - public bool? VersionType { get => Q("version_type"); set => Q("version_type", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operation. - /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// If true, the request blocks until the operation is complete. - /// - /// - [JsonIgnore] - public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// - /// What to do if update by query hits version conflicts: abort or proceed. - /// - /// - [JsonInclude, JsonPropertyName("conflicts")] - public Elastic.Clients.Elasticsearch.Serverless.Conflicts? Conflicts { get; set; } - - /// - /// - /// The maximum number of documents to update. - /// - /// - [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; set; } - - /// - /// - /// Specifies the documents to update using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// The script to run to update the document source or metadata when updating. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Slice the request manually using the provided slice ID and total number of slices. - /// - /// - [JsonInclude, JsonPropertyName("slice")] - public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } -} - -/// -/// -/// Update documents. -/// Updates documents that match the specified query. -/// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. -/// -/// -public sealed partial class UpdateByQueryRequestDescriptor : RequestDescriptor, UpdateByQueryRequestParameters> -{ - internal UpdateByQueryRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateByQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - public UpdateByQueryRequestDescriptor() : this(typeof(TDocument)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdateByQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "update_by_query"; - - public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public UpdateByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public UpdateByQueryRequestDescriptor Df(string? df) => Qs("df", df); - public UpdateByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public UpdateByQueryRequestDescriptor From(long? from) => Qs("from", from); - public UpdateByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public UpdateByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public UpdateByQueryRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); - public UpdateByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public UpdateByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public UpdateByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public UpdateByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public UpdateByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - public UpdateByQueryRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public UpdateByQueryRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public UpdateByQueryRequestDescriptor ScrollSize(long? scrollSize) => Qs("scroll_size", scrollSize); - public UpdateByQueryRequestDescriptor SearchTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? searchTimeout) => Qs("search_timeout", searchTimeout); - public UpdateByQueryRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public UpdateByQueryRequestDescriptor Slices(Elastic.Clients.Elasticsearch.Serverless.Slices? slices) => Qs("slices", slices); - public UpdateByQueryRequestDescriptor Sort(ICollection? sort) => Qs("sort", sort); - public UpdateByQueryRequestDescriptor Stats(ICollection? stats) => Qs("stats", stats); - public UpdateByQueryRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); - public UpdateByQueryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public UpdateByQueryRequestDescriptor Version(bool? version = true) => Qs("version", version); - public UpdateByQueryRequestDescriptor VersionType(bool? versionType = true) => Qs("version_type", versionType); - public UpdateByQueryRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public UpdateByQueryRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action> SliceDescriptorAction { get; set; } - - /// - /// - /// What to do if update by query hits version conflicts: abort or proceed. - /// - /// - public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// - /// The maximum number of documents to update. - /// - /// - public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// - /// Specifies the documents to update using the Query DSL. - /// - /// - public UpdateByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public UpdateByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public UpdateByQueryRequestDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The script to run to update the document source or metadata when updating. - /// - /// - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public UpdateByQueryRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Slice the request manually using the provided slice ID and total number of slices. - /// - /// - public UpdateByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public UpdateByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public UpdateByQueryRequestDescriptor Slice(Action> configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// Update documents. -/// Updates documents that match the specified query. -/// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. -/// -/// -public sealed partial class UpdateByQueryRequestDescriptor : RequestDescriptor -{ - internal UpdateByQueryRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateByQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Indices indices) : base(r => r.Required("index", indices)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdateByQuery; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "update_by_query"; - - public UpdateByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); - public UpdateByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer); - public UpdateByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); - public UpdateByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); - public UpdateByQueryRequestDescriptor Df(string? df) => Qs("df", df); - public UpdateByQueryRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public UpdateByQueryRequestDescriptor From(long? from) => Qs("from", from); - public UpdateByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); - public UpdateByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - public UpdateByQueryRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); - public UpdateByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference); - public UpdateByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); - public UpdateByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - public UpdateByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache); - public UpdateByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - public UpdateByQueryRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public UpdateByQueryRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll); - public UpdateByQueryRequestDescriptor ScrollSize(long? scrollSize) => Qs("scroll_size", scrollSize); - public UpdateByQueryRequestDescriptor SearchTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? searchTimeout) => Qs("search_timeout", searchTimeout); - public UpdateByQueryRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType); - public UpdateByQueryRequestDescriptor Slices(Elastic.Clients.Elasticsearch.Serverless.Slices? slices) => Qs("slices", slices); - public UpdateByQueryRequestDescriptor Sort(ICollection? sort) => Qs("sort", sort); - public UpdateByQueryRequestDescriptor Stats(ICollection? stats) => Qs("stats", stats); - public UpdateByQueryRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter); - public UpdateByQueryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public UpdateByQueryRequestDescriptor Version(bool? version = true) => Qs("version", version); - public UpdateByQueryRequestDescriptor VersionType(bool? versionType = true) => Qs("version_type", versionType); - public UpdateByQueryRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - public UpdateByQueryRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - - public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - RouteValues.Required("index", indices); - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Conflicts? ConflictsValue { get; set; } - private long? MaxDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action SliceDescriptorAction { get; set; } - - /// - /// - /// What to do if update by query hits version conflicts: abort or proceed. - /// - /// - public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) - { - ConflictsValue = conflicts; - return Self; - } - - /// - /// - /// The maximum number of documents to update. - /// - /// - public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - /// - /// - /// Specifies the documents to update using the Query DSL. - /// - /// - public UpdateByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public UpdateByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public UpdateByQueryRequestDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The script to run to update the document source or metadata when updating. - /// - /// - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public UpdateByQueryRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public UpdateByQueryRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Slice the request manually using the provided slice ID and total number of slices. - /// - /// - public UpdateByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public UpdateByQueryRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public UpdateByQueryRequestDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConflictsValue is not null) - { - writer.WritePropertyName("conflicts"); - JsonSerializer.Serialize(writer, ConflictsValue, options); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryResponse.g.cs deleted file mode 100644 index e5772ccd603..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryResponse.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class UpdateByQueryResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("batches")] - public long? Batches { get; init; } - [JsonInclude, JsonPropertyName("deleted")] - public long? Deleted { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - [JsonInclude, JsonPropertyName("noops")] - public long? Noops { get; init; } - [JsonInclude, JsonPropertyName("requests_per_second")] - public float? RequestsPerSecond { get; init; } - [JsonInclude, JsonPropertyName("retries")] - public Elastic.Clients.Elasticsearch.Serverless.Retries? Retries { get; init; } - [JsonInclude, JsonPropertyName("task")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? Task { get; init; } - [JsonInclude, JsonPropertyName("throttled")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Throttled { get; init; } - [JsonInclude, JsonPropertyName("throttled_millis")] - public long? ThrottledMillis { get; init; } - [JsonInclude, JsonPropertyName("throttled_until")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ThrottledUntil { get; init; } - [JsonInclude, JsonPropertyName("throttled_until_millis")] - public long? ThrottledUntilMillis { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool? TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long? Total { get; init; } - [JsonInclude, JsonPropertyName("updated")] - public long? Updated { get; init; } - [JsonInclude, JsonPropertyName("version_conflicts")] - public long? VersionConflicts { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs deleted file mode 100644 index a5f50b58ef1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleRequest.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class UpdateByQueryRethrottleRequestParameters : RequestParameters -{ - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } -} - -/// -/// -/// Throttle an update by query operation. -/// -/// -/// Change the number of requests per second for a particular update by query operation. -/// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. -/// -/// -public sealed partial class UpdateByQueryRethrottleRequest : PlainRequest -{ - public UpdateByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.Serverless.Id taskId) : base(r => r.Required("task_id", taskId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdateByQueryRethrottle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "update_by_query_rethrottle"; - - /// - /// - /// The throttle for this request in sub-requests per second. - /// - /// - [JsonIgnore] - public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } -} - -/// -/// -/// Throttle an update by query operation. -/// -/// -/// Change the number of requests per second for a particular update by query operation. -/// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. -/// -/// -public sealed partial class UpdateByQueryRethrottleRequestDescriptor : RequestDescriptor -{ - internal UpdateByQueryRethrottleRequestDescriptor(Action configure) => configure.Invoke(this); - - public UpdateByQueryRethrottleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id taskId) : base(r => r.Required("task_id", taskId)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdateByQueryRethrottle; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => false; - - internal override string OperationName => "update_by_query_rethrottle"; - - public UpdateByQueryRethrottleRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond); - - public UpdateByQueryRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.Serverless.Id taskId) - { - RouteValues.Required("task_id", taskId); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs deleted file mode 100644 index 14c964850d0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs +++ /dev/null @@ -1,33 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class UpdateByQueryRethrottleResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs deleted file mode 100644 index b1c84b42bce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateRequest.g.cs +++ /dev/null @@ -1,522 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class UpdateRequestParameters : RequestParameters -{ - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// The script language. - /// - /// - public string? Lang { get => Q("lang"); set => Q("lang", value); } - - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the destination must be an index alias. - /// - /// - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// Specify how many times should the operation be retried when a conflict occurs. - /// - /// - public int? RetryOnConflict { get => Q("retry_on_conflict"); set => Q("retry_on_conflict", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Specify the source fields you want to exclude. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// Specify the source fields you want to retrieve. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Period to wait for dynamic mapping updates and active shards. - /// This guarantees Elasticsearch waits for at least the timeout before failing. - /// The actual wait time could be longer, particularly when multiple waits occur. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operations. - /// Set to 'all' or any positive integer up to the total number of shards in the index - /// (number_of_replicas+1). Defaults to 1 meaning the primary shard. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } -} - -/// -/// -/// Update a document. -/// Updates a document by running a script or passing a partial document. -/// -/// -public sealed partial class UpdateRequest : PlainRequest -{ - public UpdateRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "update"; - - /// - /// - /// Only perform the operation if the document has this primary term. - /// - /// - [JsonIgnore] - public long? IfPrimaryTerm { get => Q("if_primary_term"); set => Q("if_primary_term", value); } - - /// - /// - /// Only perform the operation if the document has this sequence number. - /// - /// - [JsonIgnore] - public long? IfSeqNo { get => Q("if_seq_no"); set => Q("if_seq_no", value); } - - /// - /// - /// The script language. - /// - /// - [JsonIgnore] - public string? Lang { get => Q("lang"); set => Q("lang", value); } - - /// - /// - /// If 'true', Elasticsearch refreshes the affected shards to make this operation - /// visible to search, if 'wait_for' then wait for a refresh to make this operation - /// visible to search, if 'false' do nothing with refreshes. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } - - /// - /// - /// If true, the destination must be an index alias. - /// - /// - [JsonIgnore] - public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } - - /// - /// - /// Specify how many times should the operation be retried when a conflict occurs. - /// - /// - [JsonIgnore] - public int? RetryOnConflict { get => Q("retry_on_conflict"); set => Q("retry_on_conflict", value); } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); } - - /// - /// - /// Specify the source fields you want to exclude. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } - - /// - /// - /// Specify the source fields you want to retrieve. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } - - /// - /// - /// Period to wait for dynamic mapping updates and active shards. - /// This guarantees Elasticsearch waits for at least the timeout before failing. - /// The actual wait time could be longer, particularly when multiple waits occur. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - - /// - /// - /// The number of shard copies that must be active before proceeding with the operations. - /// Set to 'all' or any positive integer up to the total number of shards in the index - /// (number_of_replicas+1). Defaults to 1 meaning the primary shard. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } - - /// - /// - /// Set to false to disable setting 'result' in the response - /// to 'noop' if no change to the document occurred. - /// - /// - [JsonInclude, JsonPropertyName("detect_noop")] - public bool? DetectNoop { get; set; } - - /// - /// - /// A partial update to an existing document. - /// - /// - [JsonInclude, JsonPropertyName("doc")] - [SourceConverter] - public TPartialDocument? Doc { get; set; } - - /// - /// - /// Set to true to use the contents of 'doc' as the value of 'upsert' - /// - /// - [JsonInclude, JsonPropertyName("doc_as_upsert")] - public bool? DocAsUpsert { get; set; } - - /// - /// - /// Script to execute to update the document. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Set to true to execute the script whether or not the document exists. - /// - /// - [JsonInclude, JsonPropertyName("scripted_upsert")] - public bool? ScriptedUpsert { get; set; } - - /// - /// - /// Set to false to disable source retrieval. You can also specify a comma-separated - /// list of the fields you want to retrieve. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - - /// - /// - /// If the document does not already exist, the contents of 'upsert' are inserted as a - /// new document. If the document exists, the 'script' is executed. - /// - /// - [JsonInclude, JsonPropertyName("upsert")] - [SourceConverter] - public TDocument? Upsert { get; set; } -} - -/// -/// -/// Update a document. -/// Updates a document by running a script or passing a partial document. -/// -/// -public sealed partial class UpdateRequestDescriptor : RequestDescriptor, UpdateRequestParameters> -{ - internal UpdateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public UpdateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id) : base(r => r.Required("index", index).Required("id", id)) - { - } - - public UpdateRequestDescriptor(TDocument document) : this(typeof(TDocument), Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public UpdateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index) : this(index, Elastic.Clients.Elasticsearch.Serverless.Id.From(document)) - { - } - - public UpdateRequestDescriptor(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - public UpdateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id id) : this(typeof(TDocument), id) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.NoNamespaceUpdate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "update"; - - public UpdateRequestDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Qs("if_primary_term", ifPrimaryTerm); - public UpdateRequestDescriptor IfSeqNo(long? ifSeqNo) => Qs("if_seq_no", ifSeqNo); - public UpdateRequestDescriptor Lang(string? lang) => Qs("lang", lang); - public UpdateRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh); - public UpdateRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias); - public UpdateRequestDescriptor RetryOnConflict(int? retryOnConflict) => Qs("retry_on_conflict", retryOnConflict); - public UpdateRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing); - public UpdateRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); - public UpdateRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); - public UpdateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); - public UpdateRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); - - public UpdateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - RouteValues.Required("id", id); - return Self; - } - - public UpdateRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - RouteValues.Required("index", index); - return Self; - } - - private bool? DetectNoopValue { get; set; } - private TPartialDocument? DocValue { get; set; } - private bool? DocAsUpsertValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? ScriptedUpsertValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private TDocument? UpsertValue { get; set; } - - /// - /// - /// Set to false to disable setting 'result' in the response - /// to 'noop' if no change to the document occurred. - /// - /// - public UpdateRequestDescriptor DetectNoop(bool? detectNoop = true) - { - DetectNoopValue = detectNoop; - return Self; - } - - /// - /// - /// A partial update to an existing document. - /// - /// - public UpdateRequestDescriptor Doc(TPartialDocument? doc) - { - DocValue = doc; - return Self; - } - - /// - /// - /// Set to true to use the contents of 'doc' as the value of 'upsert' - /// - /// - public UpdateRequestDescriptor DocAsUpsert(bool? docAsUpsert = true) - { - DocAsUpsertValue = docAsUpsert; - return Self; - } - - /// - /// - /// Script to execute to update the document. - /// - /// - public UpdateRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public UpdateRequestDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public UpdateRequestDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Set to true to execute the script whether or not the document exists. - /// - /// - public UpdateRequestDescriptor ScriptedUpsert(bool? scriptedUpsert = true) - { - ScriptedUpsertValue = scriptedUpsert; - return Self; - } - - /// - /// - /// Set to false to disable source retrieval. You can also specify a comma-separated - /// list of the fields you want to retrieve. - /// - /// - public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// If the document does not already exist, the contents of 'upsert' are inserted as a - /// new document. If the document exists, the 'script' is executed. - /// - /// - public UpdateRequestDescriptor Upsert(TDocument? upsert) - { - UpsertValue = upsert; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DetectNoopValue.HasValue) - { - writer.WritePropertyName("detect_noop"); - writer.WriteBooleanValue(DetectNoopValue.Value); - } - - if (DocValue is not null) - { - writer.WritePropertyName("doc"); - settings.SourceSerializer.Serialize(DocValue, writer); - } - - if (DocAsUpsertValue.HasValue) - { - writer.WritePropertyName("doc_as_upsert"); - writer.WriteBooleanValue(DocAsUpsertValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ScriptedUpsertValue.HasValue) - { - writer.WritePropertyName("scripted_upsert"); - writer.WriteBooleanValue(ScriptedUpsertValue.Value); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (UpsertValue is not null) - { - writer.WritePropertyName("upsert"); - settings.SourceSerializer.Serialize(UpsertValue, writer); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs deleted file mode 100644 index d25c3fdaaf5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs +++ /dev/null @@ -1,49 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class UpdateResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("forced_refresh")] - public bool? ForcedRefresh { get; init; } - [JsonInclude, JsonPropertyName("get")] - public Elastic.Clients.Elasticsearch.Serverless.InlineGet? Get { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("result")] - public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs deleted file mode 100644 index 397e22bf78c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoRequest.g.cs +++ /dev/null @@ -1,145 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class XpackInfoRequestParameters : RequestParameters -{ - /// - /// - /// If this param is used it must be set to true - /// - /// - public bool? AcceptEnterprise { get => Q("accept_enterprise"); set => Q("accept_enterprise", value); } - - /// - /// - /// A comma-separated list of the information categories to include in the response. For example, build,license,features. - /// - /// - public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } -} - -/// -/// -/// Get information. -/// The information provided by the API includes: -/// -/// -/// -/// -/// Build information including the build number and timestamp. -/// -/// -/// -/// -/// License information about the currently installed license. -/// -/// -/// -/// -/// Feature information for the features that are currently enabled and available under the current license. -/// -/// -/// -/// -public sealed partial class XpackInfoRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.XpackInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "xpack.info"; - - /// - /// - /// If this param is used it must be set to true - /// - /// - [JsonIgnore] - public bool? AcceptEnterprise { get => Q("accept_enterprise"); set => Q("accept_enterprise", value); } - - /// - /// - /// A comma-separated list of the information categories to include in the response. For example, build,license,features. - /// - /// - [JsonIgnore] - public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } -} - -/// -/// -/// Get information. -/// The information provided by the API includes: -/// -/// -/// -/// -/// Build information including the build number and timestamp. -/// -/// -/// -/// -/// License information about the currently installed license. -/// -/// -/// -/// -/// Feature information for the features that are currently enabled and available under the current license. -/// -/// -/// -/// -public sealed partial class XpackInfoRequestDescriptor : RequestDescriptor -{ - internal XpackInfoRequestDescriptor(Action configure) => configure.Invoke(this); - - public XpackInfoRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.XpackInfo; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "xpack.info"; - - public XpackInfoRequestDescriptor AcceptEnterprise(bool? acceptEnterprise = true) => Qs("accept_enterprise", acceptEnterprise); - public XpackInfoRequestDescriptor Categories(ICollection? categories) => Qs("categories", categories); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoResponse.g.cs deleted file mode 100644 index a189fb4d492..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackInfoResponse.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class XpackInfoResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("build")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.BuildInformation Build { get; init; } - [JsonInclude, JsonPropertyName("features")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Features Features { get; init; } - [JsonInclude, JsonPropertyName("license")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MinimalLicenseInformation License { get; init; } - [JsonInclude, JsonPropertyName("tagline")] - public string Tagline { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageRequest.g.cs deleted file mode 100644 index 5d80470c1ec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageRequest.g.cs +++ /dev/null @@ -1,97 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Requests; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using Elastic.Transport.Extensions; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class XpackUsageRequestParameters : RequestParameters -{ - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get usage information. -/// Get information about the features that are currently enabled and available under the current license. -/// The API also provides some usage statistics. -/// -/// -public sealed partial class XpackUsageRequest : PlainRequest -{ - internal override ApiUrls ApiUrls => ApiUrlLookup.XpackUsage; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "xpack.usage"; - - /// - /// - /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - /// - /// - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } -} - -/// -/// -/// Get usage information. -/// Get information about the features that are currently enabled and available under the current license. -/// The API also provides some usage statistics. -/// -/// -public sealed partial class XpackUsageRequestDescriptor : RequestDescriptor -{ - internal XpackUsageRequestDescriptor(Action configure) => configure.Invoke(this); - - public XpackUsageRequestDescriptor() - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.XpackUsage; - - protected override HttpMethod StaticHttpMethod => HttpMethod.GET; - - internal override bool SupportsBody => false; - - internal override string OperationName => "xpack.usage"; - - public XpackUsageRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageResponse.g.cs deleted file mode 100644 index 37622ed3d43..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Xpack/XpackUsageResponse.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport.Products.Elasticsearch; -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class XpackUsageResponse : ElasticsearchResponse -{ - [JsonInclude, JsonPropertyName("aggregate_metric")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base AggregateMetric { get; init; } - [JsonInclude, JsonPropertyName("analytics")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Analytics Analytics { get; init; } - [JsonInclude, JsonPropertyName("archive")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Archive Archive { get; init; } - [JsonInclude, JsonPropertyName("ccr")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Ccr Ccr { get; init; } - [JsonInclude, JsonPropertyName("data_frame")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base? DataFrame { get; init; } - [JsonInclude, JsonPropertyName("data_science")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base? DataScience { get; init; } - [JsonInclude, JsonPropertyName("data_streams")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataStreams? DataStreams { get; init; } - [JsonInclude, JsonPropertyName("data_tiers")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataTiers DataTiers { get; init; } - [JsonInclude, JsonPropertyName("enrich")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base? Enrich { get; init; } - [JsonInclude, JsonPropertyName("eql")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Eql Eql { get; init; } - [JsonInclude, JsonPropertyName("flattened")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Flattened? Flattened { get; init; } - [JsonInclude, JsonPropertyName("frozen_indices")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FrozenIndices FrozenIndices { get; init; } - [JsonInclude, JsonPropertyName("graph")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base Graph { get; init; } - [JsonInclude, JsonPropertyName("health_api")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.HealthStatistics? HealthApi { get; init; } - [JsonInclude, JsonPropertyName("ilm")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Ilm Ilm { get; init; } - [JsonInclude, JsonPropertyName("logstash")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base Logstash { get; init; } - [JsonInclude, JsonPropertyName("ml")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MachineLearning Ml { get; init; } - [JsonInclude, JsonPropertyName("monitoring")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Monitoring Monitoring { get; init; } - [JsonInclude, JsonPropertyName("rollup")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base Rollup { get; init; } - [JsonInclude, JsonPropertyName("runtime_fields")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.RuntimeFieldTypes? RuntimeFields { get; init; } - [JsonInclude, JsonPropertyName("searchable_snapshots")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.SearchableSnapshots SearchableSnapshots { get; init; } - [JsonInclude, JsonPropertyName("security")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Security Security { get; init; } - [JsonInclude, JsonPropertyName("slm")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Slm Slm { get; init; } - [JsonInclude, JsonPropertyName("spatial")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base Spatial { get; init; } - [JsonInclude, JsonPropertyName("sql")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Sql Sql { get; init; } - [JsonInclude, JsonPropertyName("transform")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base Transform { get; init; } - [JsonInclude, JsonPropertyName("vectors")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Vector? Vectors { get; init; } - [JsonInclude, JsonPropertyName("voting_only")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base VotingOnly { get; init; } - [JsonInclude, JsonPropertyName("watcher")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Watcher Watcher { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs deleted file mode 100644 index 180d5e8e8ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs +++ /dev/null @@ -1,489 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public partial class AsyncSearchNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected AsyncSearchNamespacedClient() : base() - { - } - - internal AsyncSearchNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteAsyncSearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncSearchRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncSearchRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncSearchRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async search. - /// - /// - /// If the asynchronous search is still running, it is cancelled. - /// Otherwise, the saved search results are deleted. - /// If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncSearchRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get async search results. - /// - /// - /// Retrieve the results of a previously submitted asynchronous search request. - /// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(GetAsyncSearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, GetAsyncSearchRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get async search results. - /// - /// - /// Retrieve the results of a previously submitted asynchronous search request. - /// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(GetAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncSearchResponse, GetAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async search results. - /// - /// - /// Retrieve the results of a previously submitted asynchronous search request. - /// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncSearchRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncSearchResponse, GetAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async search results. - /// - /// - /// Retrieve the results of a previously submitted asynchronous search request. - /// If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncSearchRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncSearchResponse, GetAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(AsyncSearchStatusRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new AsyncSearchStatusRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AsyncSearchStatusRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new AsyncSearchStatusRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async search status. - /// - /// - /// Get the status of a previously submitted async search request given its identifier, without retrieving search results. - /// If the Elasticsearch security features are enabled, use of this API is restricted to the monitoring_user role. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AsyncSearchStatusRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run an async search. - /// - /// - /// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. - /// - /// - /// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. - /// - /// - /// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. - /// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SubmitAsync(SubmitAsyncSearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, SubmitAsyncSearchRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Run an async search. - /// - /// - /// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. - /// - /// - /// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. - /// - /// - /// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. - /// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SubmitAsync(SubmitAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SubmitAsyncSearchResponse, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an async search. - /// - /// - /// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. - /// - /// - /// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. - /// - /// - /// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. - /// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SubmitAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SubmitAsyncSearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SubmitAsyncSearchResponse, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an async search. - /// - /// - /// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. - /// - /// - /// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. - /// - /// - /// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. - /// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SubmitAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SubmitAsyncSearchRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SubmitAsyncSearchResponse, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an async search. - /// - /// - /// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. - /// - /// - /// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. - /// - /// - /// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. - /// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SubmitAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SubmitAsyncSearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SubmitAsyncSearchResponse, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an async search. - /// - /// - /// When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. - /// - /// - /// Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. - /// - /// - /// By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. - /// The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SubmitAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SubmitAsyncSearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SubmitAsyncSearchResponse, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs deleted file mode 100644 index 6afbfcf0cf6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Cluster.g.cs +++ /dev/null @@ -1,1063 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public partial class ClusterNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected ClusterNamespacedClient() : base() - { - } - - internal ClusterNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Explain the shard allocations. - /// Get explanations for shard allocations in the cluster. - /// For unassigned shards, it provides an explanation for why the shard is unassigned. - /// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. - /// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AllocationExplainAsync(AllocationExplainRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Explain the shard allocations. - /// Get explanations for shard allocations in the cluster. - /// For unassigned shards, it provides an explanation for why the shard is unassigned. - /// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. - /// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AllocationExplainAsync(AllocationExplainRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain the shard allocations. - /// Get explanations for shard allocations in the cluster. - /// For unassigned shards, it provides an explanation for why the shard is unassigned. - /// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. - /// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AllocationExplainAsync(CancellationToken cancellationToken = default) - { - var descriptor = new AllocationExplainRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain the shard allocations. - /// Get explanations for shard allocations in the cluster. - /// For unassigned shards, it provides an explanation for why the shard is unassigned. - /// For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. - /// This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AllocationExplainAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AllocationExplainRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete component templates. - /// Deletes component templates. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteComponentTemplateAsync(DeleteComponentTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete component templates. - /// Deletes component templates. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteComponentTemplateAsync(DeleteComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete component templates. - /// Deletes component templates. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteComponentTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete component templates. - /// Deletes component templates. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteComponentTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check component templates. - /// Returns information about whether a particular component template exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsComponentTemplateAsync(ExistsComponentTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check component templates. - /// Returns information about whether a particular component template exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsComponentTemplateAsync(ExistsComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check component templates. - /// Returns information about whether a particular component template exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsComponentTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check component templates. - /// Returns information about whether a particular component template exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsComponentTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get component templates. - /// Retrieves information about component templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetComponentTemplateAsync(GetComponentTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get component templates. - /// Retrieves information about component templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetComponentTemplateAsync(GetComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get component templates. - /// Retrieves information about component templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetComponentTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get component templates. - /// Retrieves information about component templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetComponentTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get component templates. - /// Retrieves information about component templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetComponentTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetComponentTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get component templates. - /// Retrieves information about component templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetComponentTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetComponentTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster-wide settings. - /// By default, it returns only settings that have been explicitly defined. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(GetClusterSettingsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get cluster-wide settings. - /// By default, it returns only settings that have been explicitly defined. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(GetClusterSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster-wide settings. - /// By default, it returns only settings that have been explicitly defined. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetClusterSettingsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster-wide settings. - /// By default, it returns only settings that have been explicitly defined. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetClusterSettingsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(HealthRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(HealthRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, HealthResponse, HealthRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, HealthResponse, HealthRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, HealthResponse, HealthRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, HealthResponse, HealthRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, HealthResponse, HealthRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(HealthRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health status. - /// You can also use the API to get the health status of only specified data streams and indices. - /// For data streams, the API retrieves the health status of the stream’s backing indices. - /// - /// - /// The cluster health status is: green, yellow or red. - /// On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. - /// The index level status is controlled by the worst shard status. - /// - /// - /// One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. - /// The cluster status is controlled by the worst index status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HealthRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(ClusterInfoRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(ClusterInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(IReadOnlyCollection target, CancellationToken cancellationToken = default) - { - var descriptor = new ClusterInfoRequestDescriptor(target); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(IReadOnlyCollection target, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClusterInfoRequestDescriptor(target); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the pending cluster tasks. - /// Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. - /// - /// - /// NOTE: This API returns a list of any pending updates to the cluster state. - /// These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. - /// However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PendingTasksAsync(PendingTasksRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the pending cluster tasks. - /// Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. - /// - /// - /// NOTE: This API returns a list of any pending updates to the cluster state. - /// These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. - /// However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PendingTasksAsync(PendingTasksRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the pending cluster tasks. - /// Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. - /// - /// - /// NOTE: This API returns a list of any pending updates to the cluster state. - /// These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. - /// However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PendingTasksAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PendingTasksRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the pending cluster tasks. - /// Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. - /// - /// - /// NOTE: This API returns a list of any pending updates to the cluster state. - /// These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. - /// However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PendingTasksAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PendingTasksRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(PutComponentTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(PutComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutComponentTemplateResponse, PutComponentTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutComponentTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, PutComponentTemplateResponse, PutComponentTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutComponentTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutComponentTemplateResponse, PutComponentTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(PutComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutComponentTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a component template. - /// Creates or updates a component template. - /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. - /// - /// - /// An index template can be composed of multiple component templates. - /// To use a component template, specify it in an index template’s composed_of list. - /// Component templates are only applied to new data streams and indices as part of a matching index template. - /// - /// - /// Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. - /// - /// - /// Component templates are only used during index creation. - /// For data streams, this includes data stream creation and the creation of a stream’s backing indices. - /// Changes to component templates do not affect existing indices, including a stream’s backing indices. - /// - /// - /// You can use C-style /* *\/ block comments in component templates. - /// You can include comments anywhere in the request body except before the opening curly bracket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutComponentTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster statistics. - /// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(ClusterStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get cluster statistics. - /// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(ClusterStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster statistics. - /// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, CancellationToken cancellationToken = default) - { - var descriptor = new ClusterStatsRequestDescriptor(nodeId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster statistics. - /// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClusterStatsRequestDescriptor(nodeId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster statistics. - /// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClusterStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster statistics. - /// Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClusterStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs deleted file mode 100644 index 263f7a4f19d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Enrich.g.cs +++ /dev/null @@ -1,387 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public partial class EnrichNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected EnrichNamespacedClient() : base() - { - } - - internal EnrichNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete an enrich policy. - /// Deletes an existing enrich policy and its enrich index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePolicyAsync(DeletePolicyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an enrich policy. - /// Deletes an existing enrich policy and its enrich index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePolicyAsync(DeletePolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an enrich policy. - /// Deletes an existing enrich policy and its enrich index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePolicyRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an enrich policy. - /// Deletes an existing enrich policy and its enrich index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePolicyRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run an enrich policy. - /// Create the enrich index for an existing enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecutePolicyAsync(ExecutePolicyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Run an enrich policy. - /// Create the enrich index for an existing enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecutePolicyAsync(ExecutePolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run an enrich policy. - /// Create the enrich index for an existing enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecutePolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new ExecutePolicyRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run an enrich policy. - /// Create the enrich index for an existing enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecutePolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExecutePolicyRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an enrich policy. - /// Returns information about an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPolicyAsync(GetPolicyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get an enrich policy. - /// Returns information about an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPolicyAsync(GetPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an enrich policy. - /// Returns information about an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetPolicyRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an enrich policy. - /// Returns information about an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPolicyRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an enrich policy. - /// Returns information about an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPolicyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetPolicyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an enrich policy. - /// Returns information about an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPolicyAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPolicyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(PutPolicyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutPolicyResponse, PutPolicyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutPolicyRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, PutPolicyResponse, PutPolicyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutPolicyRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutPolicyResponse, PutPolicyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(PutPolicyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutPolicyRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an enrich policy. - /// Creates an enrich policy. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPolicyAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutPolicyRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get enrich stats. - /// Returns enrich coordinator statistics and information about enrich policies that are currently executing. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(EnrichStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get enrich stats. - /// Returns enrich coordinator statistics and information about enrich policies that are currently executing. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(EnrichStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get enrich stats. - /// Returns enrich coordinator statistics and information about enrich policies that are currently executing. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EnrichStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get enrich stats. - /// Returns enrich coordinator statistics and information about enrich policies that are currently executing. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EnrichStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs deleted file mode 100644 index 2e526151b69..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Eql.g.cs +++ /dev/null @@ -1,387 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public partial class EqlNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected EqlNamespacedClient() : base() - { - } - - internal EqlNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(EqlDeleteRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(EqlDeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, EqlDeleteResponse, EqlDeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new EqlDeleteRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlDeleteResponse, EqlDeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EqlDeleteRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlDeleteResponse, EqlDeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(EqlDeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new EqlDeleteRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async EQL search. - /// Delete an async EQL search or a stored synchronous EQL search. - /// The API also deletes results for the search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EqlDeleteRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get async EQL search results. - /// Get the current status and available results for an async EQL search or a stored synchronous EQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(EqlGetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, EqlGetRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get async EQL search results. - /// Get the current status and available results for an async EQL search or a stored synchronous EQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(EqlGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, EqlGetResponse, EqlGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async EQL search results. - /// Get the current status and available results for an async EQL search or a stored synchronous EQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new EqlGetRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlGetResponse, EqlGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async EQL search results. - /// Get the current status and available results for an async EQL search or a stored synchronous EQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EqlGetRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlGetResponse, EqlGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(GetEqlStatusRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(GetEqlStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetEqlStatusResponse, GetEqlStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetEqlStatusRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetEqlStatusResponse, GetEqlStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetEqlStatusRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetEqlStatusResponse, GetEqlStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(GetEqlStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetEqlStatusRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async EQL status. - /// Get the current status for an async EQL search or a stored synchronous EQL search without returning results. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetEqlStatusRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get EQL search results. - /// Returns search results for an Event Query Language (EQL) query. - /// EQL assumes each document in a data stream or index corresponds to an event. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(EqlSearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, EqlSearchRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get EQL search results. - /// Returns search results for an Event Query Language (EQL) query. - /// EQL assumes each document in a data stream or index corresponds to an event. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(EqlSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, EqlSearchResponse, EqlSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get EQL search results. - /// Returns search results for an Event Query Language (EQL) query. - /// EQL assumes each document in a data stream or index corresponds to an event. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new EqlSearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlSearchResponse, EqlSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get EQL search results. - /// Returns search results for an Event Query Language (EQL) query. - /// EQL assumes each document in a data stream or index corresponds to an event. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EqlSearchRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlSearchResponse, EqlSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get EQL search results. - /// Returns search results for an Event Query Language (EQL) query. - /// EQL assumes each document in a data stream or index corresponds to an event. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EqlSearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlSearchResponse, EqlSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get EQL search results. - /// Returns search results for an Event Query Language (EQL) query. - /// EQL assumes each document in a data stream or index corresponds to an event. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EqlSearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EqlSearchResponse, EqlSearchRequestParameters>(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Esql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Esql.g.cs deleted file mode 100644 index 54b8f92f245..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Esql.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Esql; - -public partial class EsqlNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected EsqlNamespacedClient() : base() - { - } - - internal EsqlNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(EsqlQueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(EsqlQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EsqlQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EsqlQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EsqlQueryResponse, EsqlQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(EsqlQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EsqlQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run an ES|QL query. - /// Get search results for an ES|QL (Elasticsearch query language) query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EsqlQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs deleted file mode 100644 index d74eed54e18..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Graph.g.cs +++ /dev/null @@ -1,203 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public partial class GraphNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected GraphNamespacedClient() : base() - { - } - - internal GraphNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(ExploreRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(ExploreRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExploreResponse, ExploreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new ExploreRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, ExploreResponse, ExploreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExploreRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExploreResponse, ExploreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ExploreRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ExploreResponse, ExploreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExploreRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExploreResponse, ExploreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(ExploreRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new ExploreRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explore graph analytics. - /// Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. - /// The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. - /// An initial request to the _explore API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. - /// Subsequent requests enable you to spider out from one more vertices of interest. - /// You can exclude vertices that have already been returned. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExploreAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExploreRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs deleted file mode 100644 index d4cd006316c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ /dev/null @@ -1,6081 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public partial class IndicesNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected IndicesNamespacedClient() : base() - { - } - - internal IndicesNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(AnalyzeIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(AnalyzeIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, AnalyzeIndexResponse, AnalyzeIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, AnalyzeIndexResponse, AnalyzeIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, AnalyzeIndexResponse, AnalyzeIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, AnalyzeIndexResponse, AnalyzeIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, AnalyzeIndexResponse, AnalyzeIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(AnalyzeIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get tokens from text analysis. - /// The analyze API performs analysis on a text string and returns the resulting tokens. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AnalyzeAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AnalyzeIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(ClearCacheRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the cache. - /// Clear the cache of one or more indices. - /// For data streams, the API clears the caches of the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCacheAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCacheRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(CloseIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(CloseIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, CloseIndexResponse, CloseIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new CloseIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, CloseIndexResponse, CloseIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CloseIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CloseIndexResponse, CloseIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(CancellationToken cancellationToken = default) - { - var descriptor = new CloseIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, CloseIndexResponse, CloseIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CloseIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CloseIndexResponse, CloseIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(CloseIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new CloseIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close an index. - /// A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. - /// It is not possible to index documents or to search for documents in a closed index. - /// Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. - /// - /// - /// When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. - /// The shards will then go through the normal recovery process. - /// The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. - /// - /// - /// You can open and close multiple indices. - /// An error is thrown if the request explicitly refers to a missing index. - /// This behaviour can be turned off using the ignore_unavailable=true parameter. - /// - /// - /// By default, you must explicitly name the indices you are opening or closing. - /// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false. This setting can also be changed with the cluster update settings API. - /// - /// - /// Closed indices consume a significant amount of disk-space which can cause problems in managed environments. - /// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CloseIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, CreateIndexResponse, CreateIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new CreateIndexRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateIndexResponse, CreateIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateIndexRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateIndexResponse, CreateIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new CreateIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateIndexResponse, CreateIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateIndexResponse, CreateIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new CreateIndexRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an index. - /// Creates a new index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateIndexRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a data stream. - /// Creates a data stream. - /// You must have a matching index template with data stream enabled. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateDataStreamAsync(CreateDataStreamRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a data stream. - /// Creates a data stream. - /// You must have a matching index template with data stream enabled. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateDataStreamAsync(CreateDataStreamRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a data stream. - /// Creates a data stream. - /// You must have a matching index template with data stream enabled. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamName name, CancellationToken cancellationToken = default) - { - var descriptor = new CreateDataStreamRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a data stream. - /// Creates a data stream. - /// You must have a matching index template with data stream enabled. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamName name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateDataStreamRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream stats. - /// Retrieves statistics for one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DataStreamsStatsAsync(DataStreamsStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get data stream stats. - /// Retrieves statistics for one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DataStreamsStatsAsync(DataStreamsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream stats. - /// Retrieves statistics for one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DataStreamsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? name, CancellationToken cancellationToken = default) - { - var descriptor = new DataStreamsStatsRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream stats. - /// Retrieves statistics for one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DataStreamsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DataStreamsStatsRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream stats. - /// Retrieves statistics for one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DataStreamsStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new DataStreamsStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream stats. - /// Retrieves statistics for one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DataStreamsStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DataStreamsStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIndexResponse, DeleteIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIndexResponse, DeleteIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIndexResponse, DeleteIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIndexResponse, DeleteIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIndexResponse, DeleteIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete indices. - /// Deletes one or more indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(DeleteAliasRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(DeleteAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAliasResponse, DeleteAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAliasResponse, DeleteAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAliasResponse, DeleteAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAliasRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAliasResponse, DeleteAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAliasRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAliasResponse, DeleteAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(DeleteAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an alias. - /// Removes a data stream or index from an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete data stream lifecycles. - /// Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataLifecycleAsync(DeleteDataLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete data stream lifecycles. - /// Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataLifecycleAsync(DeleteDataLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete data stream lifecycles. - /// Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataLifecycleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete data stream lifecycles. - /// Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataLifecycleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete data streams. - /// Deletes one or more data streams and their backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataStreamAsync(DeleteDataStreamRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete data streams. - /// Deletes one or more data streams and their backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataStreamAsync(DeleteDataStreamRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete data streams. - /// Deletes one or more data streams and their backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataStreamRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete data streams. - /// Deletes one or more data streams and their backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataStreamRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an index template. - /// The provided <index-template> may contain multiple template names separated by a comma. If multiple template - /// names are specified then there is no wildcard support and the provided names should match completely with - /// existing templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an index template. - /// The provided <index-template> may contain multiple template names separated by a comma. If multiple template - /// names are specified then there is no wildcard support and the provided names should match completely with - /// existing templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an index template. - /// The provided <index-template> may contain multiple template names separated by a comma. If multiple template - /// names are specified then there is no wildcard support and the provided names should match completely with - /// existing templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an index template. - /// The provided <index-template> may contain multiple template names separated by a comma. If multiple template - /// names are specified then there is no wildcard support and the provided names should match completely with - /// existing templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check indices. - /// Checks if one or more indices, index aliases, or data streams exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(ExistsAliasRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(ExistsAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsAliasResponse, ExistsAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsAliasResponse, ExistsAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsAliasResponse, ExistsAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsAliasResponse, ExistsAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsAliasResponse, ExistsAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(ExistsAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check aliases. - /// Checks if one or more data stream or index aliases exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsAliasRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check index templates. - /// Check whether index templates exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsIndexTemplateAsync(ExistsIndexTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check index templates. - /// Check whether index templates exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsIndexTemplateAsync(ExistsIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check index templates. - /// Check whether index templates exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check index templates. - /// Check whether index templates exist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(ExplainDataLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(ExplainDataLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataLifecycleResponse, ExplainDataLifecycleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataLifecycleRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataLifecycleResponse, ExplainDataLifecycleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataLifecycleRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataLifecycleResponse, ExplainDataLifecycleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataLifecycleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataLifecycleResponse, ExplainDataLifecycleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataLifecycleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataLifecycleResponse, ExplainDataLifecycleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(ExplainDataLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataLifecycleRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the status for a data stream lifecycle. - /// Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataLifecycleRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(FlushRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(FlushRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, FlushResponse, FlushRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, FlushResponse, FlushRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, FlushResponse, FlushRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, FlushResponse, FlushRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, FlushResponse, FlushRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(FlushRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Flush data streams or indices. - /// Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. - /// When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. - /// Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. - /// - /// - /// After each operation has been flushed it is permanently stored in the Lucene index. - /// This may mean that there is no need to maintain an additional copy of it in the transaction log. - /// The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. - /// - /// - /// It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. - /// If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FlushRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(ForcemergeRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(ForcemergeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ForcemergeResponse, ForcemergeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, ForcemergeResponse, ForcemergeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ForcemergeResponse, ForcemergeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ForcemergeResponse, ForcemergeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ForcemergeResponse, ForcemergeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(ForcemergeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. - /// - /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. - /// - /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. - /// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForcemergeAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ForcemergeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndexResponse, GetIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndexResponse, GetIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndexResponse, GetIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndexResponse, GetIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndexResponse, GetIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index information. - /// Returns information about one or more indices. For data streams, the API returns information about the - /// stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(GetAliasRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(GetAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetAliasResponse, GetAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAliasResponse, GetAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAliasResponse, GetAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAliasResponse, GetAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAliasResponse, GetAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(GetAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get aliases. - /// Retrieves information for one or more data stream or index aliases. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAliasAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAliasRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream lifecycles. - /// Retrieves the data stream lifecycle configuration of one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataLifecycleAsync(GetDataLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get data stream lifecycles. - /// Retrieves the data stream lifecycle configuration of one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataLifecycleAsync(GetDataLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream lifecycles. - /// Retrieves the data stream lifecycle configuration of one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataLifecycleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data stream lifecycles. - /// Retrieves the data stream lifecycle configuration of one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataLifecycleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data streams. - /// Retrieves information about one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataStreamAsync(GetDataStreamRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get data streams. - /// Retrieves information about one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataStreamAsync(GetDataStreamRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data streams. - /// Retrieves information about one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataStreamRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data streams. - /// Retrieves information about one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.DataStreamNames? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataStreamRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data streams. - /// Retrieves information about one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataStreamAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDataStreamRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data streams. - /// Retrieves information about one or more data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataStreamAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataStreamRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index templates. - /// Returns information about one or more index templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get index templates. - /// Returns information about one or more index templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index templates. - /// Returns information about one or more index templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index templates. - /// Returns information about one or more index templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index templates. - /// Returns information about one or more index templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIndexTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index templates. - /// Returns information about one or more index templates. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIndexTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndexTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(GetMappingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(GetMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetMappingResponse, GetMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, GetMappingResponse, GetMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetMappingResponse, GetMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetMappingResponse, GetMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetMappingResponse, GetMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(GetMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. - /// For data streams, the API retrieves mappings for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMappingAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetMappingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(GetIndicesSettingsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(GetIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndicesSettingsResponse, GetIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndicesSettingsResponse, GetIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndicesSettingsResponse, GetIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndicesSettingsResponse, GetIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIndicesSettingsResponse, GetIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(GetIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index settings. - /// Returns setting information for one or more indices. For data streams, - /// returns setting information for the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIndicesSettingsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Convert an index alias to a data stream. - /// Converts an index alias to a data stream. - /// You must have a matching index template that is data stream enabled. - /// The alias must meet the following criteria: - /// The alias must have a write index; - /// All indices for the alias must have a @timestamp field mapping of a date or date_nanos field type; - /// The alias must not have any filters; - /// The alias must not use custom routing. - /// If successful, the request removes the alias and creates a data stream with the same name. - /// The indices for the alias become hidden backing indices for the stream. - /// The write index for the alias becomes the write index for the stream. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MigrateToDataStreamAsync(MigrateToDataStreamRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Convert an index alias to a data stream. - /// Converts an index alias to a data stream. - /// You must have a matching index template that is data stream enabled. - /// The alias must meet the following criteria: - /// The alias must have a write index; - /// All indices for the alias must have a @timestamp field mapping of a date or date_nanos field type; - /// The alias must not have any filters; - /// The alias must not use custom routing. - /// If successful, the request removes the alias and creates a data stream with the same name. - /// The indices for the alias become hidden backing indices for the stream. - /// The write index for the alias becomes the write index for the stream. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MigrateToDataStreamAsync(MigrateToDataStreamRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Convert an index alias to a data stream. - /// Converts an index alias to a data stream. - /// You must have a matching index template that is data stream enabled. - /// The alias must meet the following criteria: - /// The alias must have a write index; - /// All indices for the alias must have a @timestamp field mapping of a date or date_nanos field type; - /// The alias must not have any filters; - /// The alias must not use custom routing. - /// If successful, the request removes the alias and creates a data stream with the same name. - /// The indices for the alias become hidden backing indices for the stream. - /// The write index for the alias becomes the write index for the stream. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MigrateToDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName name, CancellationToken cancellationToken = default) - { - var descriptor = new MigrateToDataStreamRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Convert an index alias to a data stream. - /// Converts an index alias to a data stream. - /// You must have a matching index template that is data stream enabled. - /// The alias must meet the following criteria: - /// The alias must have a write index; - /// All indices for the alias must have a @timestamp field mapping of a date or date_nanos field type; - /// The alias must not have any filters; - /// The alias must not use custom routing. - /// If successful, the request removes the alias and creates a data stream with the same name. - /// The indices for the alias become hidden backing indices for the stream. - /// The write index for the alias becomes the write index for the stream. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MigrateToDataStreamAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MigrateToDataStreamRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update data streams. - /// Performs one or more data stream modification actions in a single atomic operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ModifyDataStreamAsync(ModifyDataStreamRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update data streams. - /// Performs one or more data stream modification actions in a single atomic operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ModifyDataStreamAsync(ModifyDataStreamRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update data streams. - /// Performs one or more data stream modification actions in a single atomic operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ModifyDataStreamAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ModifyDataStreamRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update data streams. - /// Performs one or more data stream modification actions in a single atomic operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ModifyDataStreamAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ModifyDataStreamRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(OpenIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(OpenIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, OpenIndexResponse, OpenIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new OpenIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenIndexResponse, OpenIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenIndexResponse, OpenIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(CancellationToken cancellationToken = default) - { - var descriptor = new OpenIndexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenIndexResponse, OpenIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenIndexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenIndexResponse, OpenIndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(OpenIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new OpenIndexRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenIndexRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(PutAliasRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(PutAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutAliasResponse, PutAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync, PutAliasResponse, PutAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutAliasResponse, PutAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutAliasRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, PutAliasResponse, PutAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutAliasRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutAliasResponse, PutAliasRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(PutAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutAliasRequestDescriptor(indices, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutAliasRequestDescriptor(indices, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update data stream lifecycles. - /// Update the data stream lifecycle of the specified data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataLifecycleAsync(PutDataLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update data stream lifecycles. - /// Update the data stream lifecycle of the specified data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataLifecycleAsync(PutDataLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update data stream lifecycles. - /// Update the data stream lifecycle of the specified data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, CancellationToken cancellationToken = default) - { - var descriptor = new PutDataLifecycleRequestDescriptor(lifecycle, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update data stream lifecycles. - /// Update the data stream lifecycle of the specified data streams. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.Serverless.DataStreamNames name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutDataLifecycleRequestDescriptor(lifecycle, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndexTemplateResponse, PutIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndexTemplateResponse, PutIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndexTemplateResponse, PutIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(PutMappingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(PutMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutMappingResponse, PutMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new PutMappingRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, PutMappingResponse, PutMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutMappingRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutMappingResponse, PutMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PutMappingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, PutMappingResponse, PutMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutMappingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutMappingResponse, PutMappingRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(PutMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new PutMappingRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update field mappings. - /// Adds new fields to an existing data stream or index. - /// You can also use this API to change the search settings of existing fields. - /// For data streams, these changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutMappingRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(PutIndicesSettingsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(PutIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndicesSettingsResponse, PutIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings, indices); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndicesSettingsResponse, PutIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings, indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndicesSettingsResponse, PutIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndicesSettingsResponse, PutIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIndicesSettingsResponse, PutIndicesSettingsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(PutIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings, indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings, indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update index settings. - /// Changes dynamic index settings in real time. For data streams, index setting - /// changes are applied to all backing indices by default. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings settings, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIndicesSettingsRequestDescriptor(settings); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(RecoveryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(RecoveryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RecoveryResponse, RecoveryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, RecoveryResponse, RecoveryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RecoveryResponse, RecoveryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, RecoveryResponse, RecoveryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RecoveryResponse, RecoveryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(RecoveryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index recovery information. - /// Get information about ongoing and completed shard recoveries for one or more indices. - /// For data streams, the API returns information for the stream's backing indices. - /// - /// - /// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. - /// When a shard recovery completes, the recovered shard is available for search and indexing. - /// - /// - /// Recovery automatically occurs during the following processes: - /// - /// - /// - /// - /// When creating an index for the first time. - /// - /// - /// - /// - /// When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. - /// - /// - /// - /// - /// Creation of new replica shard copies from the primary. - /// - /// - /// - /// - /// Relocation of a shard copy to a different node in the same cluster. - /// - /// - /// - /// - /// A snapshot restore operation. - /// - /// - /// - /// - /// A clone, shrink, or split operation. - /// - /// - /// - /// - /// You can determine the cause of a shard recovery using the recovery or cat recovery APIs. - /// - /// - /// The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. - /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. - /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RecoveryAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RecoveryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(RefreshRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(RefreshRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RefreshResponse, RefreshRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, RefreshResponse, RefreshRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RefreshResponse, RefreshRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, RefreshResponse, RefreshRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RefreshResponse, RefreshRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(RefreshRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Refresh an index. - /// A refresh makes recent operations performed on one or more indices available for search. - /// For data streams, the API runs the refresh operation on the stream’s backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RefreshAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RefreshRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Resolve indices. - /// Resolve the names and/or index patterns for indices, aliases, and data streams. - /// Multiple patterns and remote clusters are supported. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResolveIndexAsync(ResolveIndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Resolve indices. - /// Resolve the names and/or index patterns for indices, aliases, and data streams. - /// Multiple patterns and remote clusters are supported. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResolveIndexAsync(ResolveIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Resolve indices. - /// Resolve the names and/or index patterns for indices, aliases, and data streams. - /// Multiple patterns and remote clusters are supported. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResolveIndexAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ResolveIndexRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Resolve indices. - /// Resolve the names and/or index patterns for indices, aliases, and data streams. - /// Multiple patterns and remote clusters are supported. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResolveIndexAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ResolveIndexRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(RolloverRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(RolloverRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RolloverResponse, RolloverRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias, newIndex); - descriptor.BeforeRequest(); - return DoRequestAsync, RolloverResponse, RolloverRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias, newIndex); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RolloverResponse, RolloverRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias); - descriptor.BeforeRequest(); - return DoRequestAsync, RolloverResponse, RolloverRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RolloverResponse, RolloverRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(RolloverRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias, newIndex); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Elastic.Clients.Elasticsearch.Serverless.IndexName? newIndex, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias, newIndex); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(Elastic.Clients.Elasticsearch.Serverless.IndexAlias alias, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RolloverRequestDescriptor(alias); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(SegmentsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(SegmentsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SegmentsResponse, SegmentsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SegmentsResponse, SegmentsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SegmentsResponse, SegmentsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SegmentsResponse, SegmentsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SegmentsResponse, SegmentsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(SegmentsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index segments. - /// Get low-level information about the Lucene segments in index shards. - /// For data streams, the API returns information about the stream's backing indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SegmentsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SegmentsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index. - /// Returns the index configuration that would be applied to the specified index from an existing index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Simulate an index. - /// Returns the index configuration that would be applied to the specified index from an existing index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index. - /// Returns the index configuration that would be applied to the specified index from an existing index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index. - /// Returns the index configuration that would be applied to the specified index from an existing index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(SimulateTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(SimulateTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateTemplateResponse, SimulateTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateTemplateResponse, SimulateTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateTemplateResponse, SimulateTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateTemplateResponse, SimulateTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateTemplateResponse, SimulateTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(SimulateTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate an index template. - /// Returns the index configuration that would be applied by a particular index template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(IndicesStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(IndicesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, IndicesStatsResponse, IndicesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(indices, metric); - descriptor.BeforeRequest(); - return DoRequestAsync, IndicesStatsResponse, IndicesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(indices, metric); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndicesStatsResponse, IndicesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, IndicesStatsResponse, IndicesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndicesStatsResponse, IndicesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(IndicesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(indices, metric); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(indices, metric); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get index statistics. - /// For data streams, the API retrieves statistics for the stream's backing indices. - /// - /// - /// By default, the returned statistics are index-level with primaries and total aggregations. - /// primaries are the values for only the primary shards. - /// total are the accumulated values for both primary and replica shards. - /// - /// - /// To get shard-level statistics, set the level parameter to shards. - /// - /// - /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. - /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndicesStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(UpdateAliasesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(UpdateAliasesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateAliasesResponse, UpdateAliasesRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new UpdateAliasesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateAliasesResponse, UpdateAliasesRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateAliasesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateAliasesResponse, UpdateAliasesRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(UpdateAliasesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new UpdateAliasesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an alias. - /// Adds a data stream or index to an alias. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateAliasesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateAliasesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(ValidateQueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(ValidateQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateQueryResponse, ValidateQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateQueryResponse, ValidateQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateQueryResponse, ValidateQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateQueryResponse, ValidateQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateQueryResponse, ValidateQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(ValidateQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate a query. - /// Validates a query without running it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateQueryAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs deleted file mode 100644 index 3699a793e74..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs +++ /dev/null @@ -1,413 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -public partial class InferenceNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected InferenceNamespacedClient() : base() - { - } - - internal InferenceNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteInferenceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteInferenceRequestDescriptor(taskType, inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteInferenceRequestDescriptor(taskType, inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteInferenceRequestDescriptor(inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteInferenceRequestDescriptor(inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetInferenceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new GetInferenceRequestDescriptor(taskType, inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetInferenceRequestDescriptor(taskType, inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetInferenceRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get an inference endpoint - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetInferenceRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Perform inference on the service - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferenceAsync(InferenceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Perform inference on the service - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferenceAsync(InferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Perform inference on the service - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new InferenceRequestDescriptor(taskType, inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Perform inference on the service - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InferenceRequestDescriptor(taskType, inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Perform inference on the service - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new InferenceRequestDescriptor(inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Perform inference on the service - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InferenceRequestDescriptor(inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an inference endpoint. - /// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. - /// After creating the endpoint, wait for the model deployment to complete before using it. - /// To verify the deployment status, use the get trained model statistics API. - /// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". - /// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. - /// - /// - /// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. - /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. - /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAsync(PutInferenceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create an inference endpoint. - /// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. - /// After creating the endpoint, wait for the model deployment to complete before using it. - /// To verify the deployment status, use the get trained model statistics API. - /// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". - /// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. - /// - /// - /// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. - /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. - /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAsync(PutInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an inference endpoint. - /// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. - /// After creating the endpoint, wait for the model deployment to complete before using it. - /// To verify the deployment status, use the get trained model statistics API. - /// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". - /// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. - /// - /// - /// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. - /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. - /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an inference endpoint. - /// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. - /// After creating the endpoint, wait for the model deployment to complete before using it. - /// To verify the deployment status, use the get trained model statistics API. - /// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". - /// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. - /// - /// - /// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. - /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. - /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an inference endpoint. - /// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. - /// After creating the endpoint, wait for the model deployment to complete before using it. - /// To verify the deployment status, use the get trained model statistics API. - /// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". - /// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. - /// - /// - /// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. - /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. - /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) - { - var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, inferenceId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an inference endpoint. - /// When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. - /// After creating the endpoint, wait for the model deployment to complete before using it. - /// To verify the deployment status, use the get trained model statistics API. - /// Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". - /// Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. - /// - /// - /// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. - /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. - /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, inferenceId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs deleted file mode 100644 index 31b8355f352..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ingest.g.cs +++ /dev/null @@ -1,1358 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public partial class IngestNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected IngestNamespacedClient() : base() - { - } - - internal IngestNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteGeoipDatabaseResponse, DeleteGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteGeoipDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteGeoipDatabaseResponse, DeleteGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteGeoipDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteGeoipDatabaseResponse, DeleteGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(DeleteGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteGeoipDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete GeoIP database configurations. - /// Delete one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteGeoipDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(DeleteIpLocationDatabaseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(DeleteIpLocationDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIpLocationDatabaseResponse, DeleteIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIpLocationDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIpLocationDatabaseResponse, DeleteIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIpLocationDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteIpLocationDatabaseResponse, DeleteIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(DeleteIpLocationDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIpLocationDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteIpLocationDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(DeletePipelineRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(DeletePipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeletePipelineResponse, DeletePipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePipelineRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeletePipelineResponse, DeletePipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePipelineRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeletePipelineResponse, DeletePipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(DeletePipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePipelineRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete pipelines. - /// Delete one or more ingest pipelines. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePipelineRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP statistics. - /// Get download statistics for GeoIP2 databases that are used with the GeoIP processor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GeoIpStatsAsync(GeoIpStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get GeoIP statistics. - /// Get download statistics for GeoIP2 databases that are used with the GeoIP processor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GeoIpStatsAsync(GeoIpStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP statistics. - /// Get download statistics for GeoIP2 databases that are used with the GeoIP processor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GeoIpStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GeoIpStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP statistics. - /// Get download statistics for GeoIP2 databases that are used with the GeoIP processor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GeoIpStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GeoIpStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetGeoipDatabaseResponse, GetGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetGeoipDatabaseResponse, GetGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetGeoipDatabaseResponse, GetGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetGeoipDatabaseResponse, GetGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetGeoipDatabaseResponse, GetGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(GetGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get GeoIP database configurations. - /// Get information about one or more IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetGeoipDatabaseAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetGeoipDatabaseRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(GetIpLocationDatabaseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(GetIpLocationDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetIpLocationDatabaseResponse, GetIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIpLocationDatabaseResponse, GetIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIpLocationDatabaseResponse, GetIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIpLocationDatabaseResponse, GetIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetIpLocationDatabaseResponse, GetIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(GetIpLocationDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get IP geolocation database configurations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetIpLocationDatabaseAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetIpLocationDatabaseRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(GetPipelineRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(GetPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetPipelineResponse, GetPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetPipelineResponse, GetPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetPipelineResponse, GetPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetPipelineResponse, GetPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetPipelineResponse, GetPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(GetPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get pipelines. - /// Get information about one or more ingest pipelines. - /// This API returns a local reference of the pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPipelineAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPipelineRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a grok processor. - /// Extract structured fields out of a single text field within a document. - /// You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. - /// A grok pattern is like a regular expression that supports aliased expressions that can be reused. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ProcessorGrokAsync(ProcessorGrokRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Run a grok processor. - /// Extract structured fields out of a single text field within a document. - /// You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. - /// A grok pattern is like a regular expression that supports aliased expressions that can be reused. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ProcessorGrokAsync(ProcessorGrokRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a grok processor. - /// Extract structured fields out of a single text field within a document. - /// You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. - /// A grok pattern is like a regular expression that supports aliased expressions that can be reused. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ProcessorGrokAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ProcessorGrokRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a grok processor. - /// Extract structured fields out of a single text field within a document. - /// You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. - /// A grok pattern is like a regular expression that supports aliased expressions that can be reused. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ProcessorGrokAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ProcessorGrokRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutGeoipDatabaseResponse, PutGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutGeoipDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, PutGeoipDatabaseResponse, PutGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutGeoipDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutGeoipDatabaseResponse, PutGeoipDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(PutGeoipDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutGeoipDatabaseRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a GeoIP database configuration. - /// Refer to the create or update IP geolocation database configuration API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutGeoipDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutGeoipDatabaseRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(PutIpLocationDatabaseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(PutIpLocationDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutIpLocationDatabaseResponse, PutIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutIpLocationDatabaseRequestDescriptor(configuration, id); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIpLocationDatabaseResponse, PutIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIpLocationDatabaseRequestDescriptor(configuration, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutIpLocationDatabaseResponse, PutIpLocationDatabaseRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(PutIpLocationDatabaseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutIpLocationDatabaseRequestDescriptor(configuration, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update an IP geolocation database configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutIpLocationDatabaseAsync(Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration configuration, Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutIpLocationDatabaseRequestDescriptor(configuration, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(PutPipelineRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(PutPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutPipelineResponse, PutPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutPipelineRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, PutPipelineResponse, PutPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutPipelineRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutPipelineResponse, PutPipelineRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(PutPipelineRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutPipelineRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a pipeline. - /// Changes made using this API take effect immediately. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPipelineAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutPipelineRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(SimulateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(SimulateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateResponse, SimulateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateResponse, SimulateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateResponse, SimulateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateResponse, SimulateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateResponse, SimulateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(SimulateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Simulate a pipeline. - /// Run an ingest pipeline against a set of provided documents. - /// You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.License.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.License.g.cs deleted file mode 100644 index faf42c4af08..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.License.g.cs +++ /dev/null @@ -1,112 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.LicenseManagement; - -public partial class LicenseManagementNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected LicenseManagementNamespacedClient() : base() - { - } - - internal LicenseManagementNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Get license information. - /// Get information about your Elastic license including its type, its status, when it was issued, and when it expires. - /// - /// - /// NOTE: If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. - /// If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetLicenseRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get license information. - /// Get information about your Elastic license including its type, its status, when it was issued, and when it expires. - /// - /// - /// NOTE: If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. - /// If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetLicenseRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get license information. - /// Get information about your Elastic license including its type, its status, when it was issued, and when it expires. - /// - /// - /// NOTE: If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. - /// If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetLicenseRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get license information. - /// Get information about your Elastic license including its type, its status, when it was issued, and when it expires. - /// - /// - /// NOTE: If the master node is generating a new cluster state, the get license API may return a 404 Not Found response. - /// If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetLicenseRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ml.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ml.g.cs deleted file mode 100644 index f01ac29e9c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Ml.g.cs +++ /dev/null @@ -1,6454 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public partial class MachineLearningNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected MachineLearningNamespacedClient() : base() - { - } - - internal MachineLearningNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Clear trained model deployment cache. - /// Cache will be cleared on all nodes where the trained model is assigned. - /// A trained model deployment may have an inference cache enabled. - /// As requests are handled by each allocated node, their responses may be cached on that individual node. - /// Calling this API clears the caches without restarting the deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearTrainedModelDeploymentCacheAsync(ClearTrainedModelDeploymentCacheRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear trained model deployment cache. - /// Cache will be cleared on all nodes where the trained model is assigned. - /// A trained model deployment may have an inference cache enabled. - /// As requests are handled by each allocated node, their responses may be cached on that individual node. - /// Calling this API clears the caches without restarting the deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearTrainedModelDeploymentCacheAsync(ClearTrainedModelDeploymentCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear trained model deployment cache. - /// Cache will be cleared on all nodes where the trained model is assigned. - /// A trained model deployment may have an inference cache enabled. - /// As requests are handled by each allocated node, their responses may be cached on that individual node. - /// Calling this API clears the caches without restarting the deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearTrainedModelDeploymentCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new ClearTrainedModelDeploymentCacheRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear trained model deployment cache. - /// Cache will be cleared on all nodes where the trained model is assigned. - /// A trained model deployment may have an inference cache enabled. - /// As requests are handled by each allocated node, their responses may be cached on that individual node. - /// Calling this API clears the caches without restarting the deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearTrainedModelDeploymentCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearTrainedModelDeploymentCacheRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close anomaly detection jobs. - /// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. - /// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. - /// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. - /// When a datafeed that has a specified end date stops, it automatically closes its associated job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseJobAsync(CloseJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Close anomaly detection jobs. - /// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. - /// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. - /// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. - /// When a datafeed that has a specified end date stops, it automatically closes its associated job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseJobAsync(CloseJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close anomaly detection jobs. - /// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. - /// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. - /// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. - /// When a datafeed that has a specified end date stops, it automatically closes its associated job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new CloseJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close anomaly detection jobs. - /// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. - /// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. - /// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. - /// When a datafeed that has a specified end date stops, it automatically closes its associated job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloseJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CloseJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a calendar. - /// Removes all scheduled events from a calendar, then deletes it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarAsync(DeleteCalendarRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a calendar. - /// Removes all scheduled events from a calendar, then deletes it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarAsync(DeleteCalendarRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a calendar. - /// Removes all scheduled events from a calendar, then deletes it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteCalendarRequestDescriptor(calendarId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a calendar. - /// Removes all scheduled events from a calendar, then deletes it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteCalendarRequestDescriptor(calendarId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete events from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarEventAsync(DeleteCalendarEventRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete events from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarEventAsync(DeleteCalendarEventRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete events from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarEventAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Id eventId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteCalendarEventRequestDescriptor(calendarId, eventId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete events from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarEventAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Id eventId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteCalendarEventRequestDescriptor(calendarId, eventId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete anomaly jobs from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarJobAsync(DeleteCalendarJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete anomaly jobs from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarJobAsync(DeleteCalendarJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete anomaly jobs from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteCalendarJobRequestDescriptor(calendarId, jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete anomaly jobs from a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteCalendarJobRequestDescriptor(calendarId, jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a datafeed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDatafeedAsync(DeleteDatafeedRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a datafeed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDatafeedAsync(DeleteDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a datafeed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a datafeed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(DeleteDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(DeleteDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(DeleteDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete expired ML data. - /// Deletes all job results, model snapshots and forecast data that have exceeded - /// their retention days period. Machine learning state documents that are not - /// associated with any job are also deleted. - /// You can limit the request to a single or set of anomaly detection jobs by - /// using a job identifier, a group name, a comma-separated list of jobs, or a - /// wildcard expression. You can delete expired data for all anomaly detection - /// jobs by using _all, by specifying * as the <job_id>, or by omitting the - /// <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteExpiredDataAsync(DeleteExpiredDataRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete expired ML data. - /// Deletes all job results, model snapshots and forecast data that have exceeded - /// their retention days period. Machine learning state documents that are not - /// associated with any job are also deleted. - /// You can limit the request to a single or set of anomaly detection jobs by - /// using a job identifier, a group name, a comma-separated list of jobs, or a - /// wildcard expression. You can delete expired data for all anomaly detection - /// jobs by using _all, by specifying * as the <job_id>, or by omitting the - /// <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteExpiredDataAsync(DeleteExpiredDataRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete expired ML data. - /// Deletes all job results, model snapshots and forecast data that have exceeded - /// their retention days period. Machine learning state documents that are not - /// associated with any job are also deleted. - /// You can limit the request to a single or set of anomaly detection jobs by - /// using a job identifier, a group name, a comma-separated list of jobs, or a - /// wildcard expression. You can delete expired data for all anomaly detection - /// jobs by using _all, by specifying * as the <job_id>, or by omitting the - /// <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteExpiredDataAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteExpiredDataRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete expired ML data. - /// Deletes all job results, model snapshots and forecast data that have exceeded - /// their retention days period. Machine learning state documents that are not - /// associated with any job are also deleted. - /// You can limit the request to a single or set of anomaly detection jobs by - /// using a job identifier, a group name, a comma-separated list of jobs, or a - /// wildcard expression. You can delete expired data for all anomaly detection - /// jobs by using _all, by specifying * as the <job_id>, or by omitting the - /// <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteExpiredDataAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteExpiredDataRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete expired ML data. - /// Deletes all job results, model snapshots and forecast data that have exceeded - /// their retention days period. Machine learning state documents that are not - /// associated with any job are also deleted. - /// You can limit the request to a single or set of anomaly detection jobs by - /// using a job identifier, a group name, a comma-separated list of jobs, or a - /// wildcard expression. You can delete expired data for all anomaly detection - /// jobs by using _all, by specifying * as the <job_id>, or by omitting the - /// <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteExpiredDataAsync(CancellationToken cancellationToken = default) - { - var descriptor = new DeleteExpiredDataRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete expired ML data. - /// Deletes all job results, model snapshots and forecast data that have exceeded - /// their retention days period. Machine learning state documents that are not - /// associated with any job are also deleted. - /// You can limit the request to a single or set of anomaly detection jobs by - /// using a job identifier, a group name, a comma-separated list of jobs, or a - /// wildcard expression. You can delete expired data for all anomaly detection - /// jobs by using _all, by specifying * as the <job_id>, or by omitting the - /// <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteExpiredDataAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteExpiredDataRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a filter. - /// If an anomaly detection job references the filter, you cannot delete the - /// filter. You must update or delete the job before you can delete the filter. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteFilterAsync(DeleteFilterRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a filter. - /// If an anomaly detection job references the filter, you cannot delete the - /// filter. You must update or delete the job before you can delete the filter. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteFilterAsync(DeleteFilterRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a filter. - /// If an anomaly detection job references the filter, you cannot delete the - /// filter. You must update or delete the job before you can delete the filter. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteFilterRequestDescriptor(filterId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a filter. - /// If an anomaly detection job references the filter, you cannot delete the - /// filter. You must update or delete the job before you can delete the filter. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteFilterRequestDescriptor(filterId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete forecasts from a job. - /// By default, forecasts are retained for 14 days. You can specify a - /// different retention period with the expires_in parameter in the forecast - /// jobs API. The delete forecast API enables you to delete one or more - /// forecasts before they expire. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteForecastAsync(DeleteForecastRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete forecasts from a job. - /// By default, forecasts are retained for 14 days. You can specify a - /// different retention period with the expires_in parameter in the forecast - /// jobs API. The delete forecast API enables you to delete one or more - /// forecasts before they expire. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteForecastAsync(DeleteForecastRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete forecasts from a job. - /// By default, forecasts are retained for 14 days. You can specify a - /// different retention period with the expires_in parameter in the forecast - /// jobs API. The delete forecast API enables you to delete one or more - /// forecasts before they expire. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? forecastId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteForecastRequestDescriptor(jobId, forecastId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete forecasts from a job. - /// By default, forecasts are retained for 14 days. You can specify a - /// different retention period with the expires_in parameter in the forecast - /// jobs API. The delete forecast API enables you to delete one or more - /// forecasts before they expire. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? forecastId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteForecastRequestDescriptor(jobId, forecastId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete forecasts from a job. - /// By default, forecasts are retained for 14 days. You can specify a - /// different retention period with the expires_in parameter in the forecast - /// jobs API. The delete forecast API enables you to delete one or more - /// forecasts before they expire. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteForecastRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete forecasts from a job. - /// By default, forecasts are retained for 14 days. You can specify a - /// different retention period with the expires_in parameter in the forecast - /// jobs API. The delete forecast API enables you to delete one or more - /// forecasts before they expire. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteForecastRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an anomaly detection job. - /// All job configuration, model state and results are deleted. - /// It is not currently possible to delete multiple jobs using wildcards or a - /// comma separated list. If you delete a job that has a datafeed, the request - /// first tries to delete the datafeed. This behavior is equivalent to calling - /// the delete datafeed API with the same timeout and force parameters as the - /// delete job request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an anomaly detection job. - /// All job configuration, model state and results are deleted. - /// It is not currently possible to delete multiple jobs using wildcards or a - /// comma separated list. If you delete a job that has a datafeed, the request - /// first tries to delete the datafeed. This behavior is equivalent to calling - /// the delete datafeed API with the same timeout and force parameters as the - /// delete job request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteJobAsync(DeleteJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an anomaly detection job. - /// All job configuration, model state and results are deleted. - /// It is not currently possible to delete multiple jobs using wildcards or a - /// comma separated list. If you delete a job that has a datafeed, the request - /// first tries to delete the datafeed. This behavior is equivalent to calling - /// the delete datafeed API with the same timeout and force parameters as the - /// delete job request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an anomaly detection job. - /// All job configuration, model state and results are deleted. - /// It is not currently possible to delete multiple jobs using wildcards or a - /// comma separated list. If you delete a job that has a datafeed, the request - /// first tries to delete the datafeed. This behavior is equivalent to calling - /// the delete datafeed API with the same timeout and force parameters as the - /// delete job request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a model snapshot. - /// You cannot delete the active model snapshot. To delete that snapshot, first - /// revert to a different one. To identify the active model snapshot, refer to - /// the model_snapshot_id in the results from the get jobs API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteModelSnapshotAsync(DeleteModelSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a model snapshot. - /// You cannot delete the active model snapshot. To delete that snapshot, first - /// revert to a different one. To identify the active model snapshot, refer to - /// the model_snapshot_id in the results from the get jobs API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteModelSnapshotAsync(DeleteModelSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a model snapshot. - /// You cannot delete the active model snapshot. To delete that snapshot, first - /// revert to a different one. To identify the active model snapshot, refer to - /// the model_snapshot_id in the results from the get jobs API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteModelSnapshotRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a model snapshot. - /// You cannot delete the active model snapshot. To delete that snapshot, first - /// revert to a different one. To identify the active model snapshot, refer to - /// the model_snapshot_id in the results from the get jobs API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteModelSnapshotRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an unreferenced trained model. - /// The request deletes a trained inference model that is not referenced by an ingest pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAsync(DeleteTrainedModelRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an unreferenced trained model. - /// The request deletes a trained inference model that is not referenced by an ingest pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAsync(DeleteTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an unreferenced trained model. - /// The request deletes a trained inference model that is not referenced by an ingest pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteTrainedModelRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an unreferenced trained model. - /// The request deletes a trained inference model that is not referenced by an ingest pipeline. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteTrainedModelRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a trained model alias. - /// This API deletes an existing model alias that refers to a trained model. If - /// the model alias is missing or refers to a model other than the one identified - /// by the model_id, this API returns an error. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAliasAsync(DeleteTrainedModelAliasRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a trained model alias. - /// This API deletes an existing model alias that refers to a trained model. If - /// the model alias is missing or refers to a model other than the one identified - /// by the model_id, this API returns an error. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAliasAsync(DeleteTrainedModelAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a trained model alias. - /// This API deletes an existing model alias that refers to a trained model. If - /// the model alias is missing or refers to a model other than the one identified - /// by the model_id, this API returns an error. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteTrainedModelAliasRequestDescriptor(modelId, modelAlias); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a trained model alias. - /// This API deletes an existing model alias that refers to a trained model. If - /// the model alias is missing or refers to a model other than the one identified - /// by the model_id, this API returns an error. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteTrainedModelAliasRequestDescriptor(modelId, modelAlias); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(EstimateModelMemoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(EstimateModelMemoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EstimateModelMemoryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EstimateModelMemoryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(EstimateModelMemoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EstimateModelMemoryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Estimate job model memory usage. - /// Makes an estimation of the memory usage for an anomaly detection job model. - /// It is based on analysis configuration details for the job and cardinality - /// estimates for the fields it references. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EstimateModelMemoryAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EstimateModelMemoryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(EvaluateDataFrameRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(EvaluateDataFrameRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EvaluateDataFrameRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EvaluateDataFrameRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(EvaluateDataFrameRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(CancellationToken cancellationToken = default) - { - var descriptor = new EvaluateDataFrameRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate data frame analytics. - /// The API packages together commonly used evaluation metrics for various types - /// of machine learning features. This has been designed for use on indexes - /// created by data frame analytics. Evaluation requires both a ground truth - /// field and an analytics result field to be present. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EvaluateDataFrameAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EvaluateDataFrameRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(ExplainDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(ExplainDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(ExplainDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain data frame analytics config. - /// This API provides explanations for a data frame analytics config that either - /// exists already or one that has not been created yet. The following - /// explanations are provided: - /// - /// - /// - /// - /// which fields are included or not in the analysis and why, - /// - /// - /// - /// - /// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. - /// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExplainDataFrameAnalyticsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force buffered data to be processed. - /// The flush jobs API is only applicable when sending data for analysis using - /// the post data API. Depending on the content of the buffer, then it might - /// additionally calculate new results. Both flush and close operations are - /// similar, however the flush is more efficient if you are expecting to send - /// more data for analysis. When flushing, the job remains open and is available - /// to continue analyzing data. A close operation additionally prunes and - /// persists the model state to disk and the job must be opened again before - /// analyzing further data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushJobAsync(FlushJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Force buffered data to be processed. - /// The flush jobs API is only applicable when sending data for analysis using - /// the post data API. Depending on the content of the buffer, then it might - /// additionally calculate new results. Both flush and close operations are - /// similar, however the flush is more efficient if you are expecting to send - /// more data for analysis. When flushing, the job remains open and is available - /// to continue analyzing data. A close operation additionally prunes and - /// persists the model state to disk and the job must be opened again before - /// analyzing further data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushJobAsync(FlushJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force buffered data to be processed. - /// The flush jobs API is only applicable when sending data for analysis using - /// the post data API. Depending on the content of the buffer, then it might - /// additionally calculate new results. Both flush and close operations are - /// similar, however the flush is more efficient if you are expecting to send - /// more data for analysis. When flushing, the job remains open and is available - /// to continue analyzing data. A close operation additionally prunes and - /// persists the model state to disk and the job must be opened again before - /// analyzing further data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new FlushJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Force buffered data to be processed. - /// The flush jobs API is only applicable when sending data for analysis using - /// the post data API. Depending on the content of the buffer, then it might - /// additionally calculate new results. Both flush and close operations are - /// similar, however the flush is more efficient if you are expecting to send - /// more data for analysis. When flushing, the job remains open and is available - /// to continue analyzing data. A close operation additionally prunes and - /// persists the model state to disk and the job must be opened again before - /// analyzing further data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FlushJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FlushJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Predict future behavior of a time series. - /// - /// - /// Forecasts are not supported for jobs that perform population analysis; an - /// error occurs if you try to create a forecast for a job that has an - /// over_field_name in its configuration. Forcasts predict future behavior - /// based on historical data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForecastAsync(ForecastRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Predict future behavior of a time series. - /// - /// - /// Forecasts are not supported for jobs that perform population analysis; an - /// error occurs if you try to create a forecast for a job that has an - /// over_field_name in its configuration. Forcasts predict future behavior - /// based on historical data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForecastAsync(ForecastRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Predict future behavior of a time series. - /// - /// - /// Forecasts are not supported for jobs that perform population analysis; an - /// error occurs if you try to create a forecast for a job that has an - /// over_field_name in its configuration. Forcasts predict future behavior - /// based on historical data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new ForecastRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Predict future behavior of a time series. - /// - /// - /// Forecasts are not supported for jobs that perform population analysis; an - /// error occurs if you try to create a forecast for a job that has an - /// over_field_name in its configuration. Forcasts predict future behavior - /// based on historical data. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ForecastRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(GetBucketsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(GetBucketsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId, timestamp); - descriptor.BeforeRequest(); - return DoRequestAsync, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId, timestamp); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(GetBucketsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId, timestamp); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId, timestamp); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for buckets. - /// The API presents a chronological view of the records, grouped by bucket. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetBucketsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get info about events in calendars. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarEventsAsync(GetCalendarEventsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get info about events in calendars. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarEventsAsync(GetCalendarEventsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get info about events in calendars. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default) - { - var descriptor = new GetCalendarEventsRequestDescriptor(calendarId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get info about events in calendars. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetCalendarEventsRequestDescriptor(calendarId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get calendar configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarsAsync(GetCalendarsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get calendar configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarsAsync(GetCalendarsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get calendar configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId, CancellationToken cancellationToken = default) - { - var descriptor = new GetCalendarsRequestDescriptor(calendarId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get calendar configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetCalendarsRequestDescriptor(calendarId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get calendar configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetCalendarsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get calendar configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCalendarsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetCalendarsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for categories. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCategoriesAsync(GetCategoriesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for categories. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCategoriesAsync(GetCategoriesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for categories. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, string? categoryId, CancellationToken cancellationToken = default) - { - var descriptor = new GetCategoriesRequestDescriptor(jobId, categoryId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for categories. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, string? categoryId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetCategoriesRequestDescriptor(jobId, categoryId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for categories. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetCategoriesRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for categories. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetCategoriesRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds configuration info. - /// You can get information for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get information for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedsAsync(GetDatafeedsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get datafeeds configuration info. - /// You can get information for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get information for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedsAsync(GetDatafeedsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds configuration info. - /// You can get information for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get information for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedsRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds configuration info. - /// You can get information for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get information for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedsRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds configuration info. - /// You can get information for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get information for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds configuration info. - /// You can get information for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get information for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds usage info. - /// You can get statistics for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get statistics for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the - /// only information you receive is the datafeed_id and the state. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedStatsAsync(GetDatafeedStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get datafeeds usage info. - /// You can get statistics for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get statistics for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the - /// only information you receive is the datafeed_id and the state. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedStatsAsync(GetDatafeedStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds usage info. - /// You can get statistics for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get statistics for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the - /// only information you receive is the datafeed_id and the state. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedStatsRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds usage info. - /// You can get statistics for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get statistics for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the - /// only information you receive is the datafeed_id and the state. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedStatsRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds usage info. - /// You can get statistics for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get statistics for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the - /// only information you receive is the datafeed_id and the state. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get datafeeds usage info. - /// You can get statistics for multiple datafeeds in a single API request by - /// using a comma-separated list of datafeeds or a wildcard expression. You can - /// get statistics for all datafeeds by using _all, by specifying * as the - /// <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the - /// only information you receive is the datafeed_id and the state. - /// This API returns a maximum of 10,000 datafeeds. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDatafeedStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDatafeedStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(GetDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(GetDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(GetDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics job configuration info. - /// You can get information for multiple data frame analytics jobs in a single - /// API request by using a comma-separated list of data frame analytics jobs or a - /// wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(GetDataFrameAnalyticsStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(GetDataFrameAnalyticsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(GetDataFrameAnalyticsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get data frame analytics jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetDataFrameAnalyticsStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get filters. - /// You can get a single filter or all filters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetFiltersAsync(GetFiltersRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get filters. - /// You can get a single filter or all filters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetFiltersAsync(GetFiltersRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get filters. - /// You can get a single filter or all filters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetFiltersAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId, CancellationToken cancellationToken = default) - { - var descriptor = new GetFiltersRequestDescriptor(filterId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get filters. - /// You can get a single filter or all filters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetFiltersAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetFiltersRequestDescriptor(filterId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get filters. - /// You can get a single filter or all filters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetFiltersAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetFiltersRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get filters. - /// You can get a single filter or all filters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetFiltersAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetFiltersRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(GetInfluencersRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(GetInfluencersRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetInfluencersRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetInfluencersRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(GetInfluencersRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetInfluencersRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job results for influencers. - /// Influencers are the entities that have contributed to, or are to blame for, - /// the anomalies. Influencer results are available only if an - /// influencer_field_name is specified in the job configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetInfluencersAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetInfluencersRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs configuration info. - /// You can get information for multiple anomaly detection jobs in a single API - /// request by using a group name, a comma-separated list of jobs, or a wildcard - /// expression. You can get information for all anomaly detection jobs by using - /// _all, by specifying * as the <job_id>, or by omitting the <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobsAsync(GetJobsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs configuration info. - /// You can get information for multiple anomaly detection jobs in a single API - /// request by using a group name, a comma-separated list of jobs, or a wildcard - /// expression. You can get information for all anomaly detection jobs by using - /// _all, by specifying * as the <job_id>, or by omitting the <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobsAsync(GetJobsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs configuration info. - /// You can get information for multiple anomaly detection jobs in a single API - /// request by using a group name, a comma-separated list of jobs, or a wildcard - /// expression. You can get information for all anomaly detection jobs by using - /// _all, by specifying * as the <job_id>, or by omitting the <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetJobsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs configuration info. - /// You can get information for multiple anomaly detection jobs in a single API - /// request by using a group name, a comma-separated list of jobs, or a wildcard - /// expression. You can get information for all anomaly detection jobs by using - /// _all, by specifying * as the <job_id>, or by omitting the <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetJobsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs configuration info. - /// You can get information for multiple anomaly detection jobs in a single API - /// request by using a group name, a comma-separated list of jobs, or a wildcard - /// expression. You can get information for all anomaly detection jobs by using - /// _all, by specifying * as the <job_id>, or by omitting the <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetJobsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs configuration info. - /// You can get information for multiple anomaly detection jobs in a single API - /// request by using a group name, a comma-separated list of jobs, or a wildcard - /// expression. You can get information for all anomaly detection jobs by using - /// _all, by specifying * as the <job_id>, or by omitting the <job_id>. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetJobsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobStatsAsync(GetJobStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobStatsAsync(GetJobStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetJobStatsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetJobStatsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetJobStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection jobs usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetJobStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetJobStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning memory usage info. - /// Get information about how machine learning jobs and trained models are using memory, - /// on each node, both within the JVM heap, and natively, outside of the JVM. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMemoryStatsAsync(GetMemoryStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get machine learning memory usage info. - /// Get information about how machine learning jobs and trained models are using memory, - /// on each node, both within the JVM heap, and natively, outside of the JVM. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMemoryStatsAsync(GetMemoryStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning memory usage info. - /// Get information about how machine learning jobs and trained models are using memory, - /// on each node, both within the JVM heap, and natively, outside of the JVM. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMemoryStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId, CancellationToken cancellationToken = default) - { - var descriptor = new GetMemoryStatsRequestDescriptor(nodeId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning memory usage info. - /// Get information about how machine learning jobs and trained models are using memory, - /// on each node, both within the JVM heap, and natively, outside of the JVM. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMemoryStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetMemoryStatsRequestDescriptor(nodeId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning memory usage info. - /// Get information about how machine learning jobs and trained models are using memory, - /// on each node, both within the JVM heap, and natively, outside of the JVM. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMemoryStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetMemoryStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning memory usage info. - /// Get information about how machine learning jobs and trained models are using memory, - /// on each node, both within the JVM heap, and natively, outside of the JVM. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetMemoryStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetMemoryStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(GetModelSnapshotsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(GetModelSnapshotsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(GetModelSnapshotsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get model snapshots info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job model snapshot upgrade usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotUpgradeStatsAsync(GetModelSnapshotUpgradeStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly detection job model snapshot upgrade usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotUpgradeStatsAsync(GetModelSnapshotUpgradeStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job model snapshot upgrade usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotUpgradeStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotUpgradeStatsRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly detection job model snapshot upgrade usage info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetModelSnapshotUpgradeStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetModelSnapshotUpgradeStatsRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get overall bucket results. - /// - /// - /// Retrievs overall bucket results that summarize the bucket results of - /// multiple anomaly detection jobs. - /// - /// - /// The overall_score is calculated by combining the scores of all the - /// buckets within the overall bucket span. First, the maximum - /// anomaly_score per anomaly detection job in the overall bucket is - /// calculated. Then the top_n of those scores are averaged to result in - /// the overall_score. This means that you can fine-tune the - /// overall_score so that it is more or less sensitive to the number of - /// jobs that detect an anomaly at the same time. For example, if you set - /// top_n to 1, the overall_score is the maximum bucket score in the - /// overall bucket. Alternatively, if you set top_n to the number of jobs, - /// the overall_score is high only when all jobs detect anomalies in that - /// overall bucket. If you set the bucket_span parameter (to a value - /// greater than its default), the overall_score is the maximum - /// overall_score of the overall buckets that have a span equal to the - /// jobs' largest bucket span. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetOverallBucketsAsync(GetOverallBucketsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get overall bucket results. - /// - /// - /// Retrievs overall bucket results that summarize the bucket results of - /// multiple anomaly detection jobs. - /// - /// - /// The overall_score is calculated by combining the scores of all the - /// buckets within the overall bucket span. First, the maximum - /// anomaly_score per anomaly detection job in the overall bucket is - /// calculated. Then the top_n of those scores are averaged to result in - /// the overall_score. This means that you can fine-tune the - /// overall_score so that it is more or less sensitive to the number of - /// jobs that detect an anomaly at the same time. For example, if you set - /// top_n to 1, the overall_score is the maximum bucket score in the - /// overall bucket. Alternatively, if you set top_n to the number of jobs, - /// the overall_score is high only when all jobs detect anomalies in that - /// overall bucket. If you set the bucket_span parameter (to a value - /// greater than its default), the overall_score is the maximum - /// overall_score of the overall buckets that have a span equal to the - /// jobs' largest bucket span. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetOverallBucketsAsync(GetOverallBucketsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get overall bucket results. - /// - /// - /// Retrievs overall bucket results that summarize the bucket results of - /// multiple anomaly detection jobs. - /// - /// - /// The overall_score is calculated by combining the scores of all the - /// buckets within the overall bucket span. First, the maximum - /// anomaly_score per anomaly detection job in the overall bucket is - /// calculated. Then the top_n of those scores are averaged to result in - /// the overall_score. This means that you can fine-tune the - /// overall_score so that it is more or less sensitive to the number of - /// jobs that detect an anomaly at the same time. For example, if you set - /// top_n to 1, the overall_score is the maximum bucket score in the - /// overall bucket. Alternatively, if you set top_n to the number of jobs, - /// the overall_score is high only when all jobs detect anomalies in that - /// overall bucket. If you set the bucket_span parameter (to a value - /// greater than its default), the overall_score is the maximum - /// overall_score of the overall buckets that have a span equal to the - /// jobs' largest bucket span. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetOverallBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetOverallBucketsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get overall bucket results. - /// - /// - /// Retrievs overall bucket results that summarize the bucket results of - /// multiple anomaly detection jobs. - /// - /// - /// The overall_score is calculated by combining the scores of all the - /// buckets within the overall bucket span. First, the maximum - /// anomaly_score per anomaly detection job in the overall bucket is - /// calculated. Then the top_n of those scores are averaged to result in - /// the overall_score. This means that you can fine-tune the - /// overall_score so that it is more or less sensitive to the number of - /// jobs that detect an anomaly at the same time. For example, if you set - /// top_n to 1, the overall_score is the maximum bucket score in the - /// overall bucket. Alternatively, if you set top_n to the number of jobs, - /// the overall_score is high only when all jobs detect anomalies in that - /// overall bucket. If you set the bucket_span parameter (to a value - /// greater than its default), the overall_score is the maximum - /// overall_score of the overall buckets that have a span equal to the - /// jobs' largest bucket span. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetOverallBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetOverallBucketsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(GetRecordsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(GetRecordsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetRecordsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRecordsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(GetRecordsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new GetRecordsRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get anomaly records for an anomaly detection job. - /// Records contain the detailed analytical results. They describe the anomalous - /// activity that has been identified in the input data based on the detector - /// configuration. - /// There can be many anomaly records depending on the characteristics and size - /// of the input data. In practice, there are often too many to be able to - /// manually process them. The machine learning features therefore perform a - /// sophisticated aggregation of the anomaly records into buckets. - /// The number of record results depends on the number of anomalies found in each - /// bucket, which relates to the number of time series being modeled and the - /// number of detectors. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRecordsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRecordsRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained model configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsAsync(GetTrainedModelsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get trained model configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsAsync(GetTrainedModelsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained model configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained model configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained model configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained model configuration info. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained models usage info. - /// You can get usage information for multiple trained - /// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsStatsAsync(GetTrainedModelsStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get trained models usage info. - /// You can get usage information for multiple trained - /// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsStatsAsync(GetTrainedModelsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained models usage info. - /// You can get usage information for multiple trained - /// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsStatsRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained models usage info. - /// You can get usage information for multiple trained - /// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsStatsRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained models usage info. - /// You can get usage information for multiple trained - /// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get trained models usage info. - /// You can get usage information for multiple trained - /// models in a single API request by using a comma-separated list of model IDs or a wildcard expression. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTrainedModelsStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTrainedModelsStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(InferTrainedModelRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(InferTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new InferTrainedModelRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InferTrainedModelRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(InferTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new InferTrainedModelRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate a trained model. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InferTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InferTrainedModelRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning information. - /// Get defaults and limits used by machine learning. - /// This endpoint is designed to be used by a user interface that needs to fully - /// understand machine learning configurations where some options are not - /// specified, meaning that the defaults should be used. This endpoint may be - /// used to find out what those defaults are. It also provides information about - /// the maximum size of machine learning jobs that could run in the current - /// cluster configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(MlInfoRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get machine learning information. - /// Get defaults and limits used by machine learning. - /// This endpoint is designed to be used by a user interface that needs to fully - /// understand machine learning configurations where some options are not - /// specified, meaning that the defaults should be used. This endpoint may be - /// used to find out what those defaults are. It also provides information about - /// the maximum size of machine learning jobs that could run in the current - /// cluster configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(MlInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning information. - /// Get defaults and limits used by machine learning. - /// This endpoint is designed to be used by a user interface that needs to fully - /// understand machine learning configurations where some options are not - /// specified, meaning that the defaults should be used. This endpoint may be - /// used to find out what those defaults are. It also provides information about - /// the maximum size of machine learning jobs that could run in the current - /// cluster configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MlInfoRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get machine learning information. - /// Get defaults and limits used by machine learning. - /// This endpoint is designed to be used by a user interface that needs to fully - /// understand machine learning configurations where some options are not - /// specified, meaning that the defaults should be used. This endpoint may be - /// used to find out what those defaults are. It also provides information about - /// the maximum size of machine learning jobs that could run in the current - /// cluster configuration. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MlInfoRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Open anomaly detection jobs. - /// An anomaly detection job must be opened to be ready to receive and analyze - /// data. It can be opened and closed multiple times throughout its lifecycle. - /// When you open a new job, it starts with an empty model. - /// When you open an existing job, the most recent model state is automatically - /// loaded. The job is ready to resume its analysis from where it left off, once - /// new data is received. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenJobAsync(OpenJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Open anomaly detection jobs. - /// An anomaly detection job must be opened to be ready to receive and analyze - /// data. It can be opened and closed multiple times throughout its lifecycle. - /// When you open a new job, it starts with an empty model. - /// When you open an existing job, the most recent model state is automatically - /// loaded. The job is ready to resume its analysis from where it left off, once - /// new data is received. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenJobAsync(OpenJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Open anomaly detection jobs. - /// An anomaly detection job must be opened to be ready to receive and analyze - /// data. It can be opened and closed multiple times throughout its lifecycle. - /// When you open a new job, it starts with an empty model. - /// When you open an existing job, the most recent model state is automatically - /// loaded. The job is ready to resume its analysis from where it left off, once - /// new data is received. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new OpenJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Open anomaly detection jobs. - /// An anomaly detection job must be opened to be ready to receive and analyze - /// data. It can be opened and closed multiple times throughout its lifecycle. - /// When you open a new job, it starts with an empty model. - /// When you open an existing job, the most recent model state is automatically - /// loaded. The job is ready to resume its analysis from where it left off, once - /// new data is received. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Add scheduled events to the calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PostCalendarEventsAsync(PostCalendarEventsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Add scheduled events to the calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PostCalendarEventsAsync(PostCalendarEventsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Add scheduled events to the calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PostCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default) - { - var descriptor = new PostCalendarEventsRequestDescriptor(calendarId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Add scheduled events to the calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PostCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PostCalendarEventsRequestDescriptor(calendarId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(PreviewDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(PreviewDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(PreviewDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Preview features used by data frame analytics. - /// Previews the extracted features used by a data frame analytics config. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PreviewDataFrameAnalyticsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarAsync(PutCalendarRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarAsync(PutCalendarRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default) - { - var descriptor = new PutCalendarRequestDescriptor(calendarId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutCalendarRequestDescriptor(calendarId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Add anomaly detection job to calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarJobAsync(PutCalendarJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Add anomaly detection job to calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarJobAsync(PutCalendarJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Add anomaly detection job to calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, CancellationToken cancellationToken = default) - { - var descriptor = new PutCalendarJobRequestDescriptor(calendarId, jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Add anomaly detection job to calendar. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutCalendarJobRequestDescriptor(calendarId, jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(PutDatafeedRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(PutDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new PutDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(PutDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new PutDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a datafeed. - /// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. - /// You can associate only one datafeed with each anomaly detection job. - /// The datafeed contains a query that runs at a defined interval (frequency). - /// If you are concerned about delayed data, you can add a delay (query_delay) at each interval. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had - /// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed - /// directly to the .ml-config index. Do not give users write privileges on the .ml-config index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(PutDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(PutDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(PutDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a data frame analytics job. - /// This API creates a data frame analytics job that performs an analysis on the - /// source indices and stores the outcome in a destination index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a filter. - /// A filter contains a list of strings. It can be used by one or more anomaly detection jobs. - /// Specifically, filters are referenced in the custom_rules property of detector configuration objects. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutFilterAsync(PutFilterRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a filter. - /// A filter contains a list of strings. It can be used by one or more anomaly detection jobs. - /// Specifically, filters are referenced in the custom_rules property of detector configuration objects. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutFilterAsync(PutFilterRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a filter. - /// A filter contains a list of strings. It can be used by one or more anomaly detection jobs. - /// Specifically, filters are referenced in the custom_rules property of detector configuration objects. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, CancellationToken cancellationToken = default) - { - var descriptor = new PutFilterRequestDescriptor(filterId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a filter. - /// A filter contains a list of strings. It can be used by one or more anomaly detection jobs. - /// Specifically, filters are referenced in the custom_rules property of detector configuration objects. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutFilterRequestDescriptor(filterId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an anomaly detection job. - /// If you include a datafeed_config, you must have read index privileges on the source index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutJobAsync(PutJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create an anomaly detection job. - /// If you include a datafeed_config, you must have read index privileges on the source index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutJobAsync(PutJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an anomaly detection job. - /// If you include a datafeed_config, you must have read index privileges on the source index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutJobAsync(PutJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(PutTrainedModelRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(PutTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(PutTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model. - /// Enable you to supply a trained model that is not created by data frame analytics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a trained model alias. - /// A trained model alias is a logical name used to reference a single trained - /// model. - /// You can use aliases instead of trained model identifiers to make it easier to - /// reference your models. For example, you can use aliases in inference - /// aggregations and processors. - /// An alias must be unique and refer to only a single trained model. However, - /// you can have multiple aliases for each trained model. - /// If you use this API to update an alias such that it references a different - /// trained model ID and the model uses a different type of data frame analytics, - /// an error occurs. For example, this situation occurs if you have a trained - /// model for regression analysis and a trained model for classification - /// analysis; you cannot reassign an alias from one type of trained model to - /// another. - /// If you use this API to update an alias and there are very few input fields in - /// common between the old and new trained models for the model alias, the API - /// returns a warning. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAliasAsync(PutTrainedModelAliasRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a trained model alias. - /// A trained model alias is a logical name used to reference a single trained - /// model. - /// You can use aliases instead of trained model identifiers to make it easier to - /// reference your models. For example, you can use aliases in inference - /// aggregations and processors. - /// An alias must be unique and refer to only a single trained model. However, - /// you can have multiple aliases for each trained model. - /// If you use this API to update an alias such that it references a different - /// trained model ID and the model uses a different type of data frame analytics, - /// an error occurs. For example, this situation occurs if you have a trained - /// model for regression analysis and a trained model for classification - /// analysis; you cannot reassign an alias from one type of trained model to - /// another. - /// If you use this API to update an alias and there are very few input fields in - /// common between the old and new trained models for the model alias, the API - /// returns a warning. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAliasAsync(PutTrainedModelAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a trained model alias. - /// A trained model alias is a logical name used to reference a single trained - /// model. - /// You can use aliases instead of trained model identifiers to make it easier to - /// reference your models. For example, you can use aliases in inference - /// aggregations and processors. - /// An alias must be unique and refer to only a single trained model. However, - /// you can have multiple aliases for each trained model. - /// If you use this API to update an alias such that it references a different - /// trained model ID and the model uses a different type of data frame analytics, - /// an error occurs. For example, this situation occurs if you have a trained - /// model for regression analysis and a trained model for classification - /// analysis; you cannot reassign an alias from one type of trained model to - /// another. - /// If you use this API to update an alias and there are very few input fields in - /// common between the old and new trained models for the model alias, the API - /// returns a warning. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelAliasRequestDescriptor(modelId, modelAlias); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a trained model alias. - /// A trained model alias is a logical name used to reference a single trained - /// model. - /// You can use aliases instead of trained model identifiers to make it easier to - /// reference your models. For example, you can use aliases in inference - /// aggregations and processors. - /// An alias must be unique and refer to only a single trained model. However, - /// you can have multiple aliases for each trained model. - /// If you use this API to update an alias such that it references a different - /// trained model ID and the model uses a different type of data frame analytics, - /// an error occurs. For example, this situation occurs if you have a trained - /// model for regression analysis and a trained model for classification - /// analysis; you cannot reassign an alias from one type of trained model to - /// another. - /// If you use this API to update an alias and there are very few input fields in - /// common between the old and new trained models for the model alias, the API - /// returns a warning. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelAliasRequestDescriptor(modelId, modelAlias); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create part of a trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelDefinitionPartAsync(PutTrainedModelDefinitionPartRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create part of a trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelDefinitionPartAsync(PutTrainedModelDefinitionPartRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create part of a trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelDefinitionPartAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, int part, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelDefinitionPartRequestDescriptor(modelId, part); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create part of a trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelDefinitionPartAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, int part, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelDefinitionPartRequestDescriptor(modelId, part); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model vocabulary. - /// This API is supported only for natural language processing (NLP) models. - /// The vocabulary is stored in the index as described in inference_config.*.vocabulary of the trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelVocabularyAsync(PutTrainedModelVocabularyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a trained model vocabulary. - /// This API is supported only for natural language processing (NLP) models. - /// The vocabulary is stored in the index as described in inference_config.*.vocabulary of the trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelVocabularyAsync(PutTrainedModelVocabularyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model vocabulary. - /// This API is supported only for natural language processing (NLP) models. - /// The vocabulary is stored in the index as described in inference_config.*.vocabulary of the trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelVocabularyAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelVocabularyRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a trained model vocabulary. - /// This API is supported only for natural language processing (NLP) models. - /// The vocabulary is stored in the index as described in inference_config.*.vocabulary of the trained model definition. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTrainedModelVocabularyAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTrainedModelVocabularyRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reset an anomaly detection job. - /// All model state and results are deleted. The job is ready to start over as if - /// it had just been created. - /// It is not currently possible to reset multiple jobs using wildcards or a - /// comma separated list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetJobAsync(ResetJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Reset an anomaly detection job. - /// All model state and results are deleted. The job is ready to start over as if - /// it had just been created. - /// It is not currently possible to reset multiple jobs using wildcards or a - /// comma separated list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetJobAsync(ResetJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reset an anomaly detection job. - /// All model state and results are deleted. The job is ready to start over as if - /// it had just been created. - /// It is not currently possible to reset multiple jobs using wildcards or a - /// comma separated list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new ResetJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reset an anomaly detection job. - /// All model state and results are deleted. The job is ready to start over as if - /// it had just been created. - /// It is not currently possible to reset multiple jobs using wildcards or a - /// comma separated list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ResetJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Revert to a snapshot. - /// The machine learning features react quickly to anomalous input, learning new - /// behaviors in data. Highly anomalous input increases the variance in the - /// models whilst the system learns whether this is a new step-change in behavior - /// or a one-off event. In the case where this anomalous input is known to be a - /// one-off, then it might be appropriate to reset the model state to a time - /// before this event. For example, you might consider reverting to a saved - /// snapshot after Black Friday or a critical system failure. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RevertModelSnapshotAsync(RevertModelSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Revert to a snapshot. - /// The machine learning features react quickly to anomalous input, learning new - /// behaviors in data. Highly anomalous input increases the variance in the - /// models whilst the system learns whether this is a new step-change in behavior - /// or a one-off event. In the case where this anomalous input is known to be a - /// one-off, then it might be appropriate to reset the model state to a time - /// before this event. For example, you might consider reverting to a saved - /// snapshot after Black Friday or a critical system failure. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RevertModelSnapshotAsync(RevertModelSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Revert to a snapshot. - /// The machine learning features react quickly to anomalous input, learning new - /// behaviors in data. Highly anomalous input increases the variance in the - /// models whilst the system learns whether this is a new step-change in behavior - /// or a one-off event. In the case where this anomalous input is known to be a - /// one-off, then it might be appropriate to reset the model state to a time - /// before this event. For example, you might consider reverting to a saved - /// snapshot after Black Friday or a critical system failure. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RevertModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new RevertModelSnapshotRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Revert to a snapshot. - /// The machine learning features react quickly to anomalous input, learning new - /// behaviors in data. Highly anomalous input increases the variance in the - /// models whilst the system learns whether this is a new step-change in behavior - /// or a one-off event. In the case where this anomalous input is known to be a - /// one-off, then it might be appropriate to reset the model state to a time - /// before this event. For example, you might consider reverting to a saved - /// snapshot after Black Friday or a critical system failure. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RevertModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RevertModelSnapshotRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Set upgrade_mode for ML indices. - /// Sets a cluster wide upgrade_mode setting that prepares machine learning - /// indices for an upgrade. - /// When upgrading your cluster, in some circumstances you must restart your - /// nodes and reindex your machine learning indices. In those circumstances, - /// there must be no machine learning jobs running. You can close the machine - /// learning jobs, do the upgrade, then open all the jobs again. Alternatively, - /// you can use this API to temporarily halt tasks associated with the jobs and - /// datafeeds and prevent new jobs from opening. You can also use this API - /// during upgrades that do not require you to reindex your machine learning - /// indices, though stopping jobs is not a requirement in that case. - /// You can see the current value for the upgrade_mode setting by using the get - /// machine learning info API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SetUpgradeModeAsync(SetUpgradeModeRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Set upgrade_mode for ML indices. - /// Sets a cluster wide upgrade_mode setting that prepares machine learning - /// indices for an upgrade. - /// When upgrading your cluster, in some circumstances you must restart your - /// nodes and reindex your machine learning indices. In those circumstances, - /// there must be no machine learning jobs running. You can close the machine - /// learning jobs, do the upgrade, then open all the jobs again. Alternatively, - /// you can use this API to temporarily halt tasks associated with the jobs and - /// datafeeds and prevent new jobs from opening. You can also use this API - /// during upgrades that do not require you to reindex your machine learning - /// indices, though stopping jobs is not a requirement in that case. - /// You can see the current value for the upgrade_mode setting by using the get - /// machine learning info API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SetUpgradeModeAsync(SetUpgradeModeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Set upgrade_mode for ML indices. - /// Sets a cluster wide upgrade_mode setting that prepares machine learning - /// indices for an upgrade. - /// When upgrading your cluster, in some circumstances you must restart your - /// nodes and reindex your machine learning indices. In those circumstances, - /// there must be no machine learning jobs running. You can close the machine - /// learning jobs, do the upgrade, then open all the jobs again. Alternatively, - /// you can use this API to temporarily halt tasks associated with the jobs and - /// datafeeds and prevent new jobs from opening. You can also use this API - /// during upgrades that do not require you to reindex your machine learning - /// indices, though stopping jobs is not a requirement in that case. - /// You can see the current value for the upgrade_mode setting by using the get - /// machine learning info API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SetUpgradeModeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SetUpgradeModeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Set upgrade_mode for ML indices. - /// Sets a cluster wide upgrade_mode setting that prepares machine learning - /// indices for an upgrade. - /// When upgrading your cluster, in some circumstances you must restart your - /// nodes and reindex your machine learning indices. In those circumstances, - /// there must be no machine learning jobs running. You can close the machine - /// learning jobs, do the upgrade, then open all the jobs again. Alternatively, - /// you can use this API to temporarily halt tasks associated with the jobs and - /// datafeeds and prevent new jobs from opening. You can also use this API - /// during upgrades that do not require you to reindex your machine learning - /// indices, though stopping jobs is not a requirement in that case. - /// You can see the current value for the upgrade_mode setting by using the get - /// machine learning info API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SetUpgradeModeAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SetUpgradeModeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start datafeeds. - /// - /// - /// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// - /// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. - /// - /// - /// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. - /// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. - /// - /// - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or - /// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary - /// authorization headers when you created or updated the datafeed, those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDatafeedAsync(StartDatafeedRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Start datafeeds. - /// - /// - /// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// - /// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. - /// - /// - /// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. - /// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. - /// - /// - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or - /// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary - /// authorization headers when you created or updated the datafeed, those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDatafeedAsync(StartDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start datafeeds. - /// - /// - /// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// - /// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. - /// - /// - /// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. - /// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. - /// - /// - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or - /// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary - /// authorization headers when you created or updated the datafeed, those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new StartDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start datafeeds. - /// - /// - /// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// - /// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. - /// - /// - /// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. - /// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. - /// - /// - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or - /// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary - /// authorization headers when you created or updated the datafeed, those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StartDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(StartDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(StartDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new StartDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StartDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(StartDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new StartDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a data frame analytics job. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// If the destination index does not exist, it is created automatically the - /// first time you start the data frame analytics job. The - /// index.number_of_shards and index.number_of_replicas settings for the - /// destination index are copied from the source index. If there are multiple - /// source indices, the destination index copies the highest setting values. The - /// mappings for the destination index are also copied from the source indices. - /// If there are any mapping conflicts, the job fails to start. - /// If the destination index exists, it is used as is. You can therefore set up - /// the destination index in advance with custom settings and mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StartDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a trained model deployment. - /// It allocates the model to every machine learning node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTrainedModelDeploymentAsync(StartTrainedModelDeploymentRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Start a trained model deployment. - /// It allocates the model to every machine learning node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTrainedModelDeploymentAsync(StartTrainedModelDeploymentRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a trained model deployment. - /// It allocates the model to every machine learning node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new StartTrainedModelDeploymentRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a trained model deployment. - /// It allocates the model to every machine learning node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StartTrainedModelDeploymentRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop datafeeds. - /// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDatafeedAsync(StopDatafeedRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Stop datafeeds. - /// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDatafeedAsync(StopDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop datafeeds. - /// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new StopDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop datafeeds. - /// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped - /// multiple times throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StopDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(StopDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(StopDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new StopDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StopDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(StopDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new StopDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop data frame analytics jobs. - /// A data frame analytics job can be started and stopped multiple times - /// throughout its lifecycle. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StopDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop a trained model deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTrainedModelDeploymentAsync(StopTrainedModelDeploymentRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Stop a trained model deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTrainedModelDeploymentAsync(StopTrainedModelDeploymentRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop a trained model deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default) - { - var descriptor = new StopTrainedModelDeploymentRequestDescriptor(modelId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop a trained model deployment. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StopTrainedModelDeploymentRequestDescriptor(modelId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(UpdateDatafeedRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(UpdateDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(UpdateDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDatafeedRequestDescriptor(datafeedId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a datafeed. - /// You must stop and start the datafeed for the changes to be applied. - /// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at - /// the time of the update and runs the query using those same roles. If you provide secondary authorization headers, - /// those credentials are used instead. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDatafeedRequestDescriptor(datafeedId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(UpdateDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(UpdateDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(UpdateDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a data frame analytics job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a filter. - /// Updates the description of a filter, adds items, or removes items from the list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateFilterAsync(UpdateFilterRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update a filter. - /// Updates the description of a filter, adds items, or removes items from the list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateFilterAsync(UpdateFilterRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a filter. - /// Updates the description of a filter, adds items, or removes items from the list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateFilterRequestDescriptor(filterId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a filter. - /// Updates the description of a filter, adds items, or removes items from the list. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateFilterRequestDescriptor(filterId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(UpdateJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(UpdateJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateJobRequestDescriptor(jobId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update an anomaly detection job. - /// Updates certain properties of an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateJobRequestDescriptor(jobId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a snapshot. - /// Updates certain properties of a snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateModelSnapshotAsync(UpdateModelSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update a snapshot. - /// Updates certain properties of a snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateModelSnapshotAsync(UpdateModelSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a snapshot. - /// Updates certain properties of a snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateModelSnapshotRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a snapshot. - /// Updates certain properties of a snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateModelSnapshotRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Upgrade a snapshot. - /// Upgrades an anomaly detection model snapshot to the latest major version. - /// Over time, older snapshot formats are deprecated and removed. Anomaly - /// detection jobs support only snapshots that are from the current or previous - /// major version. - /// This API provides a means to upgrade a snapshot to the current major version. - /// This aids in preparing the cluster for an upgrade to the next major version. - /// Only one snapshot per anomaly detection job can be upgraded at a time and the - /// upgraded snapshot cannot be the current snapshot of the anomaly detection - /// job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeJobSnapshotAsync(UpgradeJobSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Upgrade a snapshot. - /// Upgrades an anomaly detection model snapshot to the latest major version. - /// Over time, older snapshot formats are deprecated and removed. Anomaly - /// detection jobs support only snapshots that are from the current or previous - /// major version. - /// This API provides a means to upgrade a snapshot to the current major version. - /// This aids in preparing the cluster for an upgrade to the next major version. - /// Only one snapshot per anomaly detection job can be upgraded at a time and the - /// upgraded snapshot cannot be the current snapshot of the anomaly detection - /// job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeJobSnapshotAsync(UpgradeJobSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Upgrade a snapshot. - /// Upgrades an anomaly detection model snapshot to the latest major version. - /// Over time, older snapshot formats are deprecated and removed. Anomaly - /// detection jobs support only snapshots that are from the current or previous - /// major version. - /// This API provides a means to upgrade a snapshot to the current major version. - /// This aids in preparing the cluster for an upgrade to the next major version. - /// Only one snapshot per anomaly detection job can be upgraded at a time and the - /// upgraded snapshot cannot be the current snapshot of the anomaly detection - /// job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeJobSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default) - { - var descriptor = new UpgradeJobSnapshotRequestDescriptor(jobId, snapshotId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Upgrade a snapshot. - /// Upgrades an anomaly detection model snapshot to the latest major version. - /// Over time, older snapshot formats are deprecated and removed. Anomaly - /// detection jobs support only snapshots that are from the current or previous - /// major version. - /// This API provides a means to upgrade a snapshot to the current major version. - /// This aids in preparing the cluster for an upgrade to the next major version. - /// Only one snapshot per anomaly detection job can be upgraded at a time and the - /// upgraded snapshot cannot be the current snapshot of the anomaly detection - /// job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeJobSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpgradeJobSnapshotRequestDescriptor(jobId, snapshotId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(ValidateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(ValidateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ValidateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(ValidateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ValidateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validates an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(ValidateDetectorRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(ValidateDetectorRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateDetectorRequestDescriptor(detector); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateDetectorRequestDescriptor(detector); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(ValidateDetectorRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateDetectorRequestDescriptor(detector); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Validate an anomaly detection job. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ValidateDetectorAsync(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ValidateDetectorRequestDescriptor(detector); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Nodes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Nodes.g.cs deleted file mode 100644 index 3a3cb7d2560..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Nodes.g.cs +++ /dev/null @@ -1,459 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public partial class NodesNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected NodesNamespacedClient() : base() - { - } - - internal NodesNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Get the hot threads for nodes. - /// Get a breakdown of the hot threads on each selected node in the cluster. - /// The output is plain text with a breakdown of the top hot threads for each node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HotThreadsAsync(HotThreadsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the hot threads for nodes. - /// Get a breakdown of the hot threads on each selected node in the cluster. - /// The output is plain text with a breakdown of the top hot threads for each node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HotThreadsAsync(HotThreadsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the hot threads for nodes. - /// Get a breakdown of the hot threads on each selected node in the cluster. - /// The output is plain text with a breakdown of the top hot threads for each node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HotThreadsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, CancellationToken cancellationToken = default) - { - var descriptor = new HotThreadsRequestDescriptor(nodeId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the hot threads for nodes. - /// Get a breakdown of the hot threads on each selected node in the cluster. - /// The output is plain text with a breakdown of the top hot threads for each node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HotThreadsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HotThreadsRequestDescriptor(nodeId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the hot threads for nodes. - /// Get a breakdown of the hot threads on each selected node in the cluster. - /// The output is plain text with a breakdown of the top hot threads for each node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HotThreadsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new HotThreadsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the hot threads for nodes. - /// Get a breakdown of the hot threads on each selected node in the cluster. - /// The output is plain text with a breakdown of the top hot threads for each node. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HotThreadsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HotThreadsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node information. - /// By default, the API returns all attributes and core settings for cluster nodes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(NodesInfoRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get node information. - /// By default, the API returns all attributes and core settings for cluster nodes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(NodesInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node information. - /// By default, the API returns all attributes and core settings for cluster nodes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, CancellationToken cancellationToken = default) - { - var descriptor = new NodesInfoRequestDescriptor(nodeId, metric); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node information. - /// By default, the API returns all attributes and core settings for cluster nodes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesInfoRequestDescriptor(nodeId, metric); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node information. - /// By default, the API returns all attributes and core settings for cluster nodes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(CancellationToken cancellationToken = default) - { - var descriptor = new NodesInfoRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node information. - /// By default, the API returns all attributes and core settings for cluster nodes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesInfoRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(NodesStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(NodesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric, CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric); - descriptor.BeforeRequest(); - return DoRequestAsync, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, NodesStatsResponse, NodesStatsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(NodesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric, CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Elastic.Clients.Elasticsearch.Serverless.Metrics? indexMetric, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(nodeId, metric, indexMetric); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get node statistics. - /// Get statistics for nodes in a cluster. - /// By default, all stats are returned. You can limit the returned information by using metrics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get feature usage information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(NodesUsageRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get feature usage information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(NodesUsageRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get feature usage information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, CancellationToken cancellationToken = default) - { - var descriptor = new NodesUsageRequestDescriptor(nodeId, metric); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get feature usage information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId, Elastic.Clients.Elasticsearch.Serverless.Metrics? metric, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesUsageRequestDescriptor(nodeId, metric); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get feature usage information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(CancellationToken cancellationToken = default) - { - var descriptor = new NodesUsageRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get feature usage information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new NodesUsageRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.QueryRules.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.QueryRules.g.cs deleted file mode 100644 index 4fc75b8a584..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.QueryRules.g.cs +++ /dev/null @@ -1,473 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public partial class QueryRulesNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected QueryRulesNamespacedClient() : base() - { - } - - internal QueryRulesNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete a query rule. - /// Delete a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRuleAsync(DeleteRuleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a query rule. - /// Delete a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRuleAsync(DeleteRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a query rule. - /// Delete a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRuleRequestDescriptor(rulesetId, ruleId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a query rule. - /// Delete a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRuleRequestDescriptor(rulesetId, ruleId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRulesetAsync(DeleteRulesetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRulesetAsync(DeleteRulesetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRulesetAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRulesetRequestDescriptor(rulesetId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRulesetAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRulesetRequestDescriptor(rulesetId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a query rule. - /// Get details about a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRuleAsync(GetRuleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a query rule. - /// Get details about a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRuleAsync(GetRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a query rule. - /// Get details about a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, CancellationToken cancellationToken = default) - { - var descriptor = new GetRuleRequestDescriptor(rulesetId, ruleId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a query rule. - /// Get details about a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRuleRequestDescriptor(rulesetId, ruleId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a query ruleset. - /// Get details about a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRulesetAsync(GetRulesetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a query ruleset. - /// Get details about a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRulesetAsync(GetRulesetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a query ruleset. - /// Get details about a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRulesetAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, CancellationToken cancellationToken = default) - { - var descriptor = new GetRulesetRequestDescriptor(rulesetId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a query ruleset. - /// Get details about a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRulesetAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRulesetRequestDescriptor(rulesetId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get all query rulesets. - /// Get summarized information about the query rulesets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ListRulesetsAsync(ListRulesetsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get all query rulesets. - /// Get summarized information about the query rulesets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ListRulesetsAsync(ListRulesetsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get all query rulesets. - /// Get summarized information about the query rulesets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ListRulesetsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ListRulesetsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get all query rulesets. - /// Get summarized information about the query rulesets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ListRulesetsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ListRulesetsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a query rule. - /// Create or update a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRuleAsync(PutRuleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a query rule. - /// Create or update a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRuleAsync(PutRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a query rule. - /// Create or update a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, CancellationToken cancellationToken = default) - { - var descriptor = new PutRuleRequestDescriptor(rulesetId, ruleId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a query rule. - /// Create or update a query rule within a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutRuleRequestDescriptor(rulesetId, ruleId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRulesetAsync(PutRulesetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRulesetAsync(PutRulesetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRulesetAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, CancellationToken cancellationToken = default) - { - var descriptor = new PutRulesetRequestDescriptor(rulesetId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a query ruleset. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRulesetAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutRulesetRequestDescriptor(rulesetId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Test a query ruleset. - /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestAsync(TestRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Test a query ruleset. - /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestAsync(TestRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Test a query ruleset. - /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, CancellationToken cancellationToken = default) - { - var descriptor = new TestRequestDescriptor(rulesetId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Test a query ruleset. - /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestAsync(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TestRequestDescriptor(rulesetId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Security.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Security.g.cs deleted file mode 100644 index 3b630a6b91e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Security.g.cs +++ /dev/null @@ -1,3920 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public partial class SecurityNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected SecurityNamespacedClient() : base() - { - } - - internal SecurityNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Activate a user profile. - /// - /// - /// Create or update a user profile on behalf of another user. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ActivateUserProfileAsync(ActivateUserProfileRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Activate a user profile. - /// - /// - /// Create or update a user profile on behalf of another user. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ActivateUserProfileAsync(ActivateUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Activate a user profile. - /// - /// - /// Create or update a user profile on behalf of another user. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ActivateUserProfileAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ActivateUserProfileRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Activate a user profile. - /// - /// - /// Create or update a user profile on behalf of another user. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ActivateUserProfileAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ActivateUserProfileRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Authenticate a user. - /// - /// - /// Authenticates a user and returns information about the authenticated user. - /// Include the user information in a basic auth header. - /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. - /// If the user cannot be authenticated, this API returns a 401 status code. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AuthenticateAsync(AuthenticateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Authenticate a user. - /// - /// - /// Authenticates a user and returns information about the authenticated user. - /// Include the user information in a basic auth header. - /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. - /// If the user cannot be authenticated, this API returns a 401 status code. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AuthenticateAsync(AuthenticateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Authenticate a user. - /// - /// - /// Authenticates a user and returns information about the authenticated user. - /// Include the user information in a basic auth header. - /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. - /// If the user cannot be authenticated, this API returns a 401 status code. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AuthenticateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new AuthenticateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Authenticate a user. - /// - /// - /// Authenticates a user and returns information about the authenticated user. - /// Include the user information in a basic auth header. - /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. - /// If the user cannot be authenticated, this API returns a 401 status code. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task AuthenticateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new AuthenticateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk delete roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk delete roles API cannot delete roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkDeleteRoleAsync(BulkDeleteRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Bulk delete roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk delete roles API cannot delete roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkDeleteRoleAsync(BulkDeleteRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk delete roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk delete roles API cannot delete roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkDeleteRoleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new BulkDeleteRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk delete roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk delete roles API cannot delete roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkDeleteRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkDeleteRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(BulkPutRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(BulkPutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, BulkPutRoleResponse, BulkPutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new BulkPutRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, BulkPutRoleResponse, BulkPutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkPutRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, BulkPutRoleResponse, BulkPutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(BulkPutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new BulkPutRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. - /// The bulk create or update roles API cannot update roles that are defined in roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkPutRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkPutRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the API key cache. - /// - /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearApiKeyCacheAsync(ClearApiKeyCacheRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear the API key cache. - /// - /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearApiKeyCacheAsync(ClearApiKeyCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the API key cache. - /// - /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearApiKeyCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Ids ids, CancellationToken cancellationToken = default) - { - var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the API key cache. - /// - /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearApiKeyCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Ids ids, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the privileges cache. - /// - /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedPrivilegesAsync(ClearCachedPrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear the privileges cache. - /// - /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedPrivilegesAsync(ClearCachedPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the privileges cache. - /// - /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedPrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name application, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the privileges cache. - /// - /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedPrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name application, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the user cache. - /// - /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRealmsAsync(ClearCachedRealmsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear the user cache. - /// - /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRealmsAsync(ClearCachedRealmsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the user cache. - /// - /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRealmsAsync(Elastic.Clients.Elasticsearch.Serverless.Names realms, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedRealmsRequestDescriptor(realms); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the user cache. - /// - /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRealmsAsync(Elastic.Clients.Elasticsearch.Serverless.Names realms, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedRealmsRequestDescriptor(realms); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the roles cache. - /// - /// - /// Evict roles from the native role cache. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRolesAsync(ClearCachedRolesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear the roles cache. - /// - /// - /// Evict roles from the native role cache. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRolesAsync(ClearCachedRolesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the roles cache. - /// - /// - /// Evict roles from the native role cache. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRolesAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedRolesRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear the roles cache. - /// - /// - /// Evict roles from the native role cache. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedRolesAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedRolesRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear service account token caches. - /// - /// - /// Evict a subset of all entries from the service account token caches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedServiceTokensAsync(ClearCachedServiceTokensRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear service account token caches. - /// - /// - /// Evict a subset of all entries from the service account token caches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedServiceTokensAsync(ClearCachedServiceTokensRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear service account token caches. - /// - /// - /// Evict a subset of all entries from the service account token caches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedServiceTokensAsync(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear service account token caches. - /// - /// - /// Evict a subset of all entries from the service account token caches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCachedServiceTokensAsync(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(CreateApiKeyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(CreateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new CreateApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(CreateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new CreateApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create an API key. - /// - /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a service account token. - /// - /// - /// Create a service accounts token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateServiceTokenAsync(CreateServiceTokenRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a service account token. - /// - /// - /// Create a service accounts token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateServiceTokenAsync(CreateServiceTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a service account token. - /// - /// - /// Create a service accounts token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name? name, CancellationToken cancellationToken = default) - { - var descriptor = new CreateServiceTokenRequestDescriptor(ns, service, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a service account token. - /// - /// - /// Create a service accounts token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateServiceTokenRequestDescriptor(ns, service, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a service account token. - /// - /// - /// Create a service accounts token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateServiceTokenAsync(string ns, string service, CancellationToken cancellationToken = default) - { - var descriptor = new CreateServiceTokenRequestDescriptor(ns, service); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a service account token. - /// - /// - /// Create a service accounts token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateServiceTokenAsync(string ns, string service, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateServiceTokenRequestDescriptor(ns, service); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePrivilegesAsync(DeletePrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePrivilegesAsync(DeletePrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name application, Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePrivilegesRequestDescriptor(application, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeletePrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name application, Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeletePrivilegesRequestDescriptor(application, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete roles. - /// - /// - /// Delete roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleAsync(DeleteRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete roles. - /// - /// - /// Delete roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleAsync(DeleteRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete roles. - /// - /// - /// Delete roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRoleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete roles. - /// - /// - /// Delete roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRoleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete role mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleMappingAsync(DeleteRoleMappingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete role mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleMappingAsync(DeleteRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete role mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRoleMappingRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete role mappings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRoleMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRoleMappingRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete service account tokens. - /// - /// - /// Delete service account tokens for a service in a specified namespace. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteServiceTokenAsync(DeleteServiceTokenRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete service account tokens. - /// - /// - /// Delete service account tokens for a service in a specified namespace. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteServiceTokenAsync(DeleteServiceTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete service account tokens. - /// - /// - /// Delete service account tokens for a service in a specified namespace. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteServiceTokenRequestDescriptor(ns, service, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete service account tokens. - /// - /// - /// Delete service account tokens for a service in a specified namespace. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteServiceTokenRequestDescriptor(ns, service, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Disable a user profile. - /// - /// - /// Disable user profiles so that they are not visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DisableUserProfileAsync(DisableUserProfileRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Disable a user profile. - /// - /// - /// Disable user profiles so that they are not visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DisableUserProfileAsync(DisableUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Disable a user profile. - /// - /// - /// Disable user profiles so that they are not visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DisableUserProfileAsync(string uid, CancellationToken cancellationToken = default) - { - var descriptor = new DisableUserProfileRequestDescriptor(uid); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Disable a user profile. - /// - /// - /// Disable user profiles so that they are not visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DisableUserProfileAsync(string uid, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DisableUserProfileRequestDescriptor(uid); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Enable a user profile. - /// - /// - /// Enable user profiles to make them visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EnableUserProfileAsync(EnableUserProfileRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Enable a user profile. - /// - /// - /// Enable user profiles to make them visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EnableUserProfileAsync(EnableUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Enable a user profile. - /// - /// - /// Enable user profiles to make them visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EnableUserProfileAsync(string uid, CancellationToken cancellationToken = default) - { - var descriptor = new EnableUserProfileRequestDescriptor(uid); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Enable a user profile. - /// - /// - /// Enable user profiles to make them visible in user profile searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task EnableUserProfileAsync(string uid, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new EnableUserProfileRequestDescriptor(uid); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get API key information. - /// - /// - /// Retrieves information for one or more API keys. - /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. - /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetApiKeyAsync(GetApiKeyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get API key information. - /// - /// - /// Retrieves information for one or more API keys. - /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. - /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetApiKeyAsync(GetApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get API key information. - /// - /// - /// Retrieves information for one or more API keys. - /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. - /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetApiKeyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get API key information. - /// - /// - /// Retrieves information for one or more API keys. - /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. - /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get builtin privileges. - /// - /// - /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBuiltinPrivilegesAsync(GetBuiltinPrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get builtin privileges. - /// - /// - /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBuiltinPrivilegesAsync(GetBuiltinPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get builtin privileges. - /// - /// - /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBuiltinPrivilegesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetBuiltinPrivilegesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get builtin privileges. - /// - /// - /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetBuiltinPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetBuiltinPrivilegesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPrivilegesAsync(GetPrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPrivilegesAsync(GetPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name? application, Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetPrivilegesRequestDescriptor(application, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name? application, Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPrivilegesRequestDescriptor(application, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPrivilegesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetPrivilegesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetPrivilegesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get roles. - /// - /// - /// Get roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleAsync(GetRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get roles. - /// - /// - /// Get roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleAsync(GetRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get roles. - /// - /// - /// Get roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get roles. - /// - /// - /// Get roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get roles. - /// - /// - /// Get roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get roles. - /// - /// - /// Get roles in the native realm. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. - /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleMappingAsync(GetRoleMappingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. - /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleMappingAsync(GetRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. - /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleMappingRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. - /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleMappingRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. - /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleMappingAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleMappingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. - /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRoleMappingAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRoleMappingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service accounts. - /// - /// - /// Get a list of service accounts that match the provided path parameters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceAccountsAsync(GetServiceAccountsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get service accounts. - /// - /// - /// Get a list of service accounts that match the provided path parameters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceAccountsAsync(GetServiceAccountsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service accounts. - /// - /// - /// Get a list of service accounts that match the provided path parameters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceAccountsAsync(string? ns, string? service, CancellationToken cancellationToken = default) - { - var descriptor = new GetServiceAccountsRequestDescriptor(ns, service); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service accounts. - /// - /// - /// Get a list of service accounts that match the provided path parameters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceAccountsAsync(string? ns, string? service, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetServiceAccountsRequestDescriptor(ns, service); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service accounts. - /// - /// - /// Get a list of service accounts that match the provided path parameters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceAccountsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetServiceAccountsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service accounts. - /// - /// - /// Get a list of service accounts that match the provided path parameters. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceAccountsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetServiceAccountsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service account credentials. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceCredentialsAsync(GetServiceCredentialsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get service account credentials. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceCredentialsAsync(GetServiceCredentialsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service account credentials. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceCredentialsAsync(string ns, Elastic.Clients.Elasticsearch.Serverless.Name service, CancellationToken cancellationToken = default) - { - var descriptor = new GetServiceCredentialsRequestDescriptor(ns, service); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get service account credentials. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetServiceCredentialsAsync(string ns, Elastic.Clients.Elasticsearch.Serverless.Name service, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetServiceCredentialsRequestDescriptor(ns, service); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a token. - /// - /// - /// Create a bearer token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTokenAsync(GetTokenRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a token. - /// - /// - /// Create a bearer token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTokenAsync(GetTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a token. - /// - /// - /// Create a bearer token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTokenAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetTokenRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a token. - /// - /// - /// Create a bearer token for access without requiring basic authentication. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTokenAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTokenRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get user privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserPrivilegesAsync(GetUserPrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get user privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserPrivilegesAsync(GetUserPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get user privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserPrivilegesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetUserPrivilegesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get user privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetUserPrivilegesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a user profile. - /// - /// - /// Get a user's profile using the unique profile ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserProfileAsync(GetUserProfileRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a user profile. - /// - /// - /// Get a user's profile using the unique profile ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserProfileAsync(GetUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a user profile. - /// - /// - /// Get a user's profile using the unique profile ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserProfileAsync(IReadOnlyCollection uid, CancellationToken cancellationToken = default) - { - var descriptor = new GetUserProfileRequestDescriptor(uid); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a user profile. - /// - /// - /// Get a user's profile using the unique profile ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetUserProfileAsync(IReadOnlyCollection uid, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetUserProfileRequestDescriptor(uid); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(GrantApiKeyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(GrantApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GrantApiKeyResponse, GrantApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GrantApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, GrantApiKeyResponse, GrantApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GrantApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GrantApiKeyResponse, GrantApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(GrantApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GrantApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Grant an API key. - /// - /// - /// Create an API key on behalf of another user. - /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. - /// - /// - /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. - /// - /// - /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// - /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GrantApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GrantApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user privileges. - /// - /// - /// Determine whether the specified user has a specified list of privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesAsync(HasPrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check user privileges. - /// - /// - /// Determine whether the specified user has a specified list of privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesAsync(HasPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user privileges. - /// - /// - /// Determine whether the specified user has a specified list of privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name? user, CancellationToken cancellationToken = default) - { - var descriptor = new HasPrivilegesRequestDescriptor(user); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user privileges. - /// - /// - /// Determine whether the specified user has a specified list of privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesAsync(Elastic.Clients.Elasticsearch.Serverless.Name? user, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HasPrivilegesRequestDescriptor(user); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user privileges. - /// - /// - /// Determine whether the specified user has a specified list of privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new HasPrivilegesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user privileges. - /// - /// - /// Determine whether the specified user has a specified list of privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HasPrivilegesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user profile privileges. - /// - /// - /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesUserProfileAsync(HasPrivilegesUserProfileRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check user profile privileges. - /// - /// - /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesUserProfileAsync(HasPrivilegesUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user profile privileges. - /// - /// - /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesUserProfileAsync(CancellationToken cancellationToken = default) - { - var descriptor = new HasPrivilegesUserProfileRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check user profile privileges. - /// - /// - /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HasPrivilegesUserProfileAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HasPrivilegesUserProfileRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate API keys. - /// - /// - /// This API invalidates API keys created by the create API key or grant API key APIs. - /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. - /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: - /// - /// - /// - /// - /// Set the parameter owner=true. - /// - /// - /// - /// - /// Or, set both username and realm_name to match the user’s identity. - /// - /// - /// - /// - /// Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the ids field. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateApiKeyAsync(InvalidateApiKeyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Invalidate API keys. - /// - /// - /// This API invalidates API keys created by the create API key or grant API key APIs. - /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. - /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: - /// - /// - /// - /// - /// Set the parameter owner=true. - /// - /// - /// - /// - /// Or, set both username and realm_name to match the user’s identity. - /// - /// - /// - /// - /// Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the ids field. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateApiKeyAsync(InvalidateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate API keys. - /// - /// - /// This API invalidates API keys created by the create API key or grant API key APIs. - /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. - /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: - /// - /// - /// - /// - /// Set the parameter owner=true. - /// - /// - /// - /// - /// Or, set both username and realm_name to match the user’s identity. - /// - /// - /// - /// - /// Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the ids field. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateApiKeyAsync(CancellationToken cancellationToken = default) - { - var descriptor = new InvalidateApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate API keys. - /// - /// - /// This API invalidates API keys created by the create API key or grant API key APIs. - /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. - /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: - /// - /// - /// - /// - /// Set the parameter owner=true. - /// - /// - /// - /// - /// Or, set both username and realm_name to match the user’s identity. - /// - /// - /// - /// - /// Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the ids field. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InvalidateApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate a token. - /// - /// - /// The access tokens returned by the get token API have a finite period of time for which they are valid. - /// After that time period, they can no longer be used. - /// The time period is defined by the xpack.security.authc.token.timeout setting. - /// - /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. - /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateTokenAsync(InvalidateTokenRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Invalidate a token. - /// - /// - /// The access tokens returned by the get token API have a finite period of time for which they are valid. - /// After that time period, they can no longer be used. - /// The time period is defined by the xpack.security.authc.token.timeout setting. - /// - /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. - /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateTokenAsync(InvalidateTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate a token. - /// - /// - /// The access tokens returned by the get token API have a finite period of time for which they are valid. - /// After that time period, they can no longer be used. - /// The time period is defined by the xpack.security.authc.token.timeout setting. - /// - /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. - /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateTokenAsync(CancellationToken cancellationToken = default) - { - var descriptor = new InvalidateTokenRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate a token. - /// - /// - /// The access tokens returned by the get token API have a finite period of time for which they are valid. - /// After that time period, they can no longer be used. - /// The time period is defined by the xpack.security.authc.token.timeout setting. - /// - /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. - /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InvalidateTokenAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InvalidateTokenRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPrivilegesAsync(PutPrivilegesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPrivilegesAsync(PutPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPrivilegesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PutPrivilegesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update application privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutPrivilegesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(PutRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(PutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(PutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update roles. - /// - /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. - /// - /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleMappingAsync(PutRoleMappingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. - /// - /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleMappingAsync(PutRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. - /// - /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleMappingRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update role mappings. - /// - /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. - /// - /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleMappingRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(QueryApiKeysRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(QueryApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(QueryApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find API keys with a query. - /// - /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(QueryRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(QueryRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(QueryRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find roles with a query. - /// - /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(QueryUserRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(QueryUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryUserRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryUserRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(QueryUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryUserRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Find users with a query. - /// - /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryUserRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Authenticate SAML. - /// - /// - /// Submits a SAML response message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlAuthenticateAsync(SamlAuthenticateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Authenticate SAML. - /// - /// - /// Submits a SAML response message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlAuthenticateAsync(SamlAuthenticateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Authenticate SAML. - /// - /// - /// Submits a SAML response message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlAuthenticateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlAuthenticateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Authenticate SAML. - /// - /// - /// Submits a SAML response message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlAuthenticateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SamlAuthenticateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Logout of SAML completely. - /// - /// - /// Verifies the logout response sent from the SAML IdP. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlCompleteLogoutAsync(SamlCompleteLogoutRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Logout of SAML completely. - /// - /// - /// Verifies the logout response sent from the SAML IdP. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlCompleteLogoutAsync(SamlCompleteLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Logout of SAML completely. - /// - /// - /// Verifies the logout response sent from the SAML IdP. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlCompleteLogoutAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlCompleteLogoutRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Logout of SAML completely. - /// - /// - /// Verifies the logout response sent from the SAML IdP. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlCompleteLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SamlCompleteLogoutRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate SAML. - /// - /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlInvalidateAsync(SamlInvalidateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Invalidate SAML. - /// - /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlInvalidateAsync(SamlInvalidateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate SAML. - /// - /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlInvalidateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlInvalidateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Invalidate SAML. - /// - /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlInvalidateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SamlInvalidateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Logout of SAML. - /// - /// - /// Submits a request to invalidate an access token and refresh token. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlLogoutAsync(SamlLogoutRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Logout of SAML. - /// - /// - /// Submits a request to invalidate an access token and refresh token. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlLogoutAsync(SamlLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Logout of SAML. - /// - /// - /// Submits a request to invalidate an access token and refresh token. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlLogoutAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlLogoutRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Logout of SAML. - /// - /// - /// Submits a request to invalidate an access token and refresh token. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SamlLogoutRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Prepare SAML authentication. - /// - /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(SamlPrepareAuthenticationRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Prepare SAML authentication. - /// - /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(SamlPrepareAuthenticationRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Prepare SAML authentication. - /// - /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Prepare SAML authentication. - /// - /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create SAML service provider metadata. - /// - /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(SamlServiceProviderMetadataRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create SAML service provider metadata. - /// - /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(SamlServiceProviderMetadataRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create SAML service provider metadata. - /// - /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(Elastic.Clients.Elasticsearch.Serverless.Name realmName, CancellationToken cancellationToken = default) - { - var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create SAML service provider metadata. - /// - /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(Elastic.Clients.Elasticsearch.Serverless.Name realmName, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Suggest a user profile. - /// - /// - /// Get suggestions for user profiles that match specified search criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(SuggestUserProfilesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Suggest a user profile. - /// - /// - /// Get suggestions for user profiles that match specified search criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(SuggestUserProfilesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Suggest a user profile. - /// - /// - /// Get suggestions for user profiles that match specified search criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SuggestUserProfilesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Suggest a user profile. - /// - /// - /// Get suggestions for user profiles that match specified search criteria. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SuggestUserProfilesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateApiKeyRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateApiKeyRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateApiKeyRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update an API key. - /// - /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateApiKeyRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update user profile data. - /// - /// - /// Update specific data for the user profile that is associated with a unique ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateUserProfileDataAsync(UpdateUserProfileDataRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update user profile data. - /// - /// - /// Update specific data for the user profile that is associated with a unique ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateUserProfileDataAsync(UpdateUserProfileDataRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update user profile data. - /// - /// - /// Update specific data for the user profile that is associated with a unique ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateUserProfileDataAsync(string uid, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateUserProfileDataRequestDescriptor(uid); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update user profile data. - /// - /// - /// Update specific data for the user profile that is associated with a unique ID. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateUserProfileDataAsync(string uid, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateUserProfileDataRequestDescriptor(uid); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Slm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Slm.g.cs deleted file mode 100644 index fd809d45b05..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Slm.g.cs +++ /dev/null @@ -1,613 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public partial class SnapshotLifecycleManagementNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected SnapshotLifecycleManagementNamespacedClient() : base() - { - } - - internal SnapshotLifecycleManagementNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete a policy. - /// Delete a snapshot lifecycle policy definition. - /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteLifecycleAsync(DeleteLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a policy. - /// Delete a snapshot lifecycle policy definition. - /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteLifecycleAsync(DeleteLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a policy. - /// Delete a snapshot lifecycle policy definition. - /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteLifecycleRequestDescriptor(policyId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a policy. - /// Delete a snapshot lifecycle policy definition. - /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteLifecycleRequestDescriptor(policyId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a policy. - /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. - /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteLifecycleAsync(ExecuteLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Run a policy. - /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. - /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteLifecycleAsync(ExecuteLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a policy. - /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. - /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, CancellationToken cancellationToken = default) - { - var descriptor = new ExecuteLifecycleRequestDescriptor(policyId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a policy. - /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. - /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExecuteLifecycleRequestDescriptor(policyId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a retention policy. - /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. - /// The retention policy is normally applied according to its schedule. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteRetentionAsync(ExecuteRetentionRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Run a retention policy. - /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. - /// The retention policy is normally applied according to its schedule. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteRetentionAsync(ExecuteRetentionRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a retention policy. - /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. - /// The retention policy is normally applied according to its schedule. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteRetentionAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ExecuteRetentionRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a retention policy. - /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. - /// The retention policy is normally applied according to its schedule. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExecuteRetentionAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExecuteRetentionRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get policy information. - /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetLifecycleAsync(GetLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get policy information. - /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetLifecycleAsync(GetLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get policy information. - /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Names? policyId, CancellationToken cancellationToken = default) - { - var descriptor = new GetLifecycleRequestDescriptor(policyId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get policy information. - /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Names? policyId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetLifecycleRequestDescriptor(policyId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get policy information. - /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetLifecycleAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetLifecycleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get policy information. - /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetLifecycleAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetLifecycleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot lifecycle management statistics. - /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatsAsync(GetStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get snapshot lifecycle management statistics. - /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatsAsync(GetStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot lifecycle management statistics. - /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetStatsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot lifecycle management statistics. - /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetStatsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot lifecycle management status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(GetSlmStatusRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the snapshot lifecycle management status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(GetSlmStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot lifecycle management status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetSlmStatusRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot lifecycle management status. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetStatusAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSlmStatusRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a policy. - /// Create or update a snapshot lifecycle policy. - /// If the policy already exists, this request increments the policy version. - /// Only the latest version of a policy is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutLifecycleAsync(PutLifecycleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a policy. - /// Create or update a snapshot lifecycle policy. - /// If the policy already exists, this request increments the policy version. - /// Only the latest version of a policy is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutLifecycleAsync(PutLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a policy. - /// Create or update a snapshot lifecycle policy. - /// If the policy already exists, this request increments the policy version. - /// Only the latest version of a policy is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, CancellationToken cancellationToken = default) - { - var descriptor = new PutLifecycleRequestDescriptor(policyId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a policy. - /// Create or update a snapshot lifecycle policy. - /// If the policy already exists, this request increments the policy version. - /// Only the latest version of a policy is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutLifecycleRequestDescriptor(policyId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start snapshot lifecycle management. - /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. - /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartAsync(StartSlmRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Start snapshot lifecycle management. - /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. - /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartAsync(StartSlmRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start snapshot lifecycle management. - /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. - /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartAsync(CancellationToken cancellationToken = default) - { - var descriptor = new StartSlmRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start snapshot lifecycle management. - /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. - /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StartSlmRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop snapshot lifecycle management. - /// Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. - /// This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. - /// Stopping SLM does not stop any snapshots that are in progress. - /// You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. - /// - /// - /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. - /// Use the get snapshot lifecycle management status API to see if SLM is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopAsync(StopSlmRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Stop snapshot lifecycle management. - /// Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. - /// This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. - /// Stopping SLM does not stop any snapshots that are in progress. - /// You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. - /// - /// - /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. - /// Use the get snapshot lifecycle management status API to see if SLM is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopAsync(StopSlmRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop snapshot lifecycle management. - /// Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. - /// This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. - /// Stopping SLM does not stop any snapshots that are in progress. - /// You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. - /// - /// - /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. - /// Use the get snapshot lifecycle management status API to see if SLM is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopAsync(CancellationToken cancellationToken = default) - { - var descriptor = new StopSlmRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop snapshot lifecycle management. - /// Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. - /// This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. - /// Stopping SLM does not stop any snapshots that are in progress. - /// You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. - /// - /// - /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. - /// Use the get snapshot lifecycle management status API to see if SLM is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StopSlmRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Snapshot.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Snapshot.g.cs deleted file mode 100644 index 82dcdb9e99c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Snapshot.g.cs +++ /dev/null @@ -1,950 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public partial class SnapshotNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected SnapshotNamespacedClient() : base() - { - } - - internal SnapshotNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Clean up the snapshot repository. - /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CleanupRepositoryAsync(CleanupRepositoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clean up the snapshot repository. - /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CleanupRepositoryAsync(CleanupRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clean up the snapshot repository. - /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CleanupRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new CleanupRepositoryRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clean up the snapshot repository. - /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CleanupRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CleanupRepositoryRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clone a snapshot. - /// Clone part of all of a snapshot into another snapshot in the same repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloneAsync(CloneSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clone a snapshot. - /// Clone part of all of a snapshot into another snapshot in the same repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloneAsync(CloneSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clone a snapshot. - /// Clone part of all of a snapshot into another snapshot in the same repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Elastic.Clients.Elasticsearch.Serverless.Name targetSnapshot, CancellationToken cancellationToken = default) - { - var descriptor = new CloneSnapshotRequestDescriptor(repository, snapshot, targetSnapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clone a snapshot. - /// Clone part of all of a snapshot into another snapshot in the same repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Elastic.Clients.Elasticsearch.Serverless.Name targetSnapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CloneSnapshotRequestDescriptor(repository, snapshot, targetSnapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a snapshot. - /// Take a snapshot of a cluster or of data streams and indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a snapshot. - /// Take a snapshot of a cluster or of data streams and indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a snapshot. - /// Take a snapshot of a cluster or of data streams and indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new CreateSnapshotRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a snapshot. - /// Take a snapshot of a cluster or of data streams and indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateSnapshotRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a snapshot repository. - /// IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. - /// To register a snapshot repository, the cluster's global metadata must be writeable. - /// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateRepositoryAsync(CreateRepositoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a snapshot repository. - /// IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. - /// To register a snapshot repository, the cluster's global metadata must be writeable. - /// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateRepositoryAsync(CreateRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a snapshot repository. - /// IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. - /// To register a snapshot repository, the cluster's global metadata must be writeable. - /// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Snapshot.IRepository repository, Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRepositoryRequestDescriptor(repository, name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a snapshot repository. - /// IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. - /// To register a snapshot repository, the cluster's global metadata must be writeable. - /// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Snapshot.IRepository repository, Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRepositoryRequestDescriptor(repository, name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSnapshotRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete snapshots. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSnapshotRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete snapshot repositories. - /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. - /// The snapshots themselves are left untouched and in place. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRepositoryAsync(DeleteRepositoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete snapshot repositories. - /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. - /// The snapshots themselves are left untouched and in place. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRepositoryAsync(DeleteRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete snapshot repositories. - /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. - /// The snapshots themselves are left untouched and in place. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRepositoryRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete snapshot repositories. - /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. - /// The snapshots themselves are left untouched and in place. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Names name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRepositoryRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetSnapshotRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get snapshot information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(GetSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Names snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Names snapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot repository information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(GetRepositoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get snapshot repository information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(GetRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot repository information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot repository information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot repository information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get snapshot repository information. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(RestoreRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(RestoreRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RestoreResponse, RestoreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new RestoreRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync, RestoreResponse, RestoreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RestoreRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RestoreResponse, RestoreRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(RestoreRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new RestoreRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Restore a snapshot. - /// Restore a snapshot of a cluster or data streams and indices. - /// - /// - /// You can restore a snapshot only to a running cluster with an elected master node. - /// The snapshot repository must be registered and available to the cluster. - /// The snapshot and cluster versions must be compatible. - /// - /// - /// To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. - /// - /// - /// Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: - /// - /// - /// GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - /// - /// - /// If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. - /// - /// - /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Serverless.Name repository, Elastic.Clients.Elasticsearch.Serverless.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RestoreRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot status. - /// Get a detailed description of the current state for each shard participating in the snapshot. - /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. - /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. - /// - /// - /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. - /// The API requires a read from the repository for each shard in each snapshot. - /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). - /// - /// - /// Depending on the latency of your storage, such requests can take an extremely long time to return results. - /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(SnapshotStatusRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the snapshot status. - /// Get a detailed description of the current state for each shard participating in the snapshot. - /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. - /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. - /// - /// - /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. - /// The API requires a read from the repository for each shard in each snapshot. - /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). - /// - /// - /// Depending on the latency of your storage, such requests can take an extremely long time to return results. - /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(SnapshotStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot status. - /// Get a detailed description of the current state for each shard participating in the snapshot. - /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. - /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. - /// - /// - /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. - /// The API requires a read from the repository for each shard in each snapshot. - /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). - /// - /// - /// Depending on the latency of your storage, such requests can take an extremely long time to return results. - /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Name? repository, Elastic.Clients.Elasticsearch.Serverless.Names? snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new SnapshotStatusRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot status. - /// Get a detailed description of the current state for each shard participating in the snapshot. - /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. - /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. - /// - /// - /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. - /// The API requires a read from the repository for each shard in each snapshot. - /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). - /// - /// - /// Depending on the latency of your storage, such requests can take an extremely long time to return results. - /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Name? repository, Elastic.Clients.Elasticsearch.Serverless.Names? snapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SnapshotStatusRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot status. - /// Get a detailed description of the current state for each shard participating in the snapshot. - /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. - /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. - /// - /// - /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. - /// The API requires a read from the repository for each shard in each snapshot. - /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). - /// - /// - /// Depending on the latency of your storage, such requests can take an extremely long time to return results. - /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SnapshotStatusRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the snapshot status. - /// Get a detailed description of the current state for each shard participating in the snapshot. - /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. - /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. - /// - /// - /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. - /// The API requires a read from the repository for each shard in each snapshot. - /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). - /// - /// - /// Depending on the latency of your storage, such requests can take an extremely long time to return results. - /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StatusAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SnapshotStatusRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Verify a snapshot repository. - /// Check for common misconfigurations in a snapshot repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task VerifyRepositoryAsync(VerifyRepositoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Verify a snapshot repository. - /// Check for common misconfigurations in a snapshot repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task VerifyRepositoryAsync(VerifyRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Verify a snapshot repository. - /// Check for common misconfigurations in a snapshot repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task VerifyRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new VerifyRepositoryRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Verify a snapshot repository. - /// Check for common misconfigurations in a snapshot repository. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task VerifyRepositoryAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new VerifyRepositoryRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Sql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Sql.g.cs deleted file mode 100644 index 89fe8e9894a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Sql.g.cs +++ /dev/null @@ -1,584 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public partial class SqlNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected SqlNamespacedClient() : base() - { - } - - internal SqlNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Clear an SQL search cursor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCursorAsync(ClearCursorRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear an SQL search cursor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCursorAsync(ClearCursorRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear an SQL search cursor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCursorAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClearCursorRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear an SQL search cursor. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearCursorAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearCursorRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(DeleteAsyncRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(DeleteAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAsyncResponse, DeleteAsyncRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAsyncResponse, DeleteAsyncRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteAsyncResponse, DeleteAsyncRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(DeleteAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete an async SQL search. - /// Delete an async SQL search or a stored synchronous SQL search. - /// If the search is still running, the API cancels it. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteAsyncRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(GetAsyncRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(GetAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncResponse, GetAsyncRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncResponse, GetAsyncRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncResponse, GetAsyncRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(GetAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get async SQL search results. - /// Get the current status and available results for an async SQL search or stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(GetAsyncStatusRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(GetAsyncStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncStatusResponse, GetAsyncStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncStatusRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncStatusResponse, GetAsyncStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncStatusRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetAsyncStatusResponse, GetAsyncStatusRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(GetAsyncStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncStatusRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the async SQL search status. - /// Get the current status of an async SQL search or a stored synchronous SQL search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetAsyncStatusRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(QueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(QueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, QueryResponse, QueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryResponse, QueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryResponse, QueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(QueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get SQL search results. - /// Run an SQL request. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(TranslateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(TranslateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, TranslateResponse, TranslateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new TranslateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, TranslateResponse, TranslateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TranslateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TranslateResponse, TranslateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(TranslateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new TranslateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Translate SQL into Elasticsearch queries. - /// Translate an SQL search into a search API request containing Query DSL. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TranslateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TranslateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Synonyms.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Synonyms.g.cs deleted file mode 100644 index 8be64bd2bd9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Synonyms.g.cs +++ /dev/null @@ -1,545 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public partial class SynonymsNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected SynonymsNamespacedClient() : base() - { - } - - internal SynonymsNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(DeleteSynonymRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(DeleteSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteSynonymResponse, DeleteSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSynonymRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteSynonymResponse, DeleteSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSynonymRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteSynonymResponse, DeleteSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(DeleteSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSynonymRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSynonymRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym rule. - /// Delete a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymRuleAsync(DeleteSynonymRuleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a synonym rule. - /// Delete a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymRuleAsync(DeleteSynonymRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym rule. - /// Delete a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSynonymRuleRequestDescriptor(setId, ruleId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a synonym rule. - /// Delete a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteSynonymRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteSynonymRuleRequestDescriptor(setId, ruleId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(GetSynonymRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(GetSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetSynonymResponse, GetSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSynonymResponse, GetSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSynonymResponse, GetSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(GetSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym rule. - /// Get a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymRuleAsync(GetSynonymRuleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a synonym rule. - /// Get a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymRuleAsync(GetSynonymRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym rule. - /// Get a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymRuleRequestDescriptor(setId, ruleId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a synonym rule. - /// Get a synonym rule from a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymRuleRequestDescriptor(setId, ruleId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get all synonym sets. - /// Get a summary of all defined synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymsSetsAsync(GetSynonymsSetsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get all synonym sets. - /// Get a summary of all defined synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymsSetsAsync(GetSynonymsSetsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get all synonym sets. - /// Get a summary of all defined synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymsSetsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymsSetsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get all synonym sets. - /// Get a summary of all defined synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetSynonymsSetsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSynonymsSetsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(PutSynonymRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(PutSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutSynonymResponse, PutSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutSynonymRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, PutSynonymResponse, PutSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutSynonymRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutSynonymResponse, PutSynonymRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(PutSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutSynonymRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym set. - /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - /// If you need to manage more synonym rules, you can create multiple synonym sets. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutSynonymRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym rule. - /// Create or update a synonym rule in a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymRuleAsync(PutSynonymRuleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a synonym rule. - /// Create or update a synonym rule in a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymRuleAsync(PutSynonymRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym rule. - /// Create or update a synonym rule in a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, CancellationToken cancellationToken = default) - { - var descriptor = new PutSynonymRuleRequestDescriptor(setId, ruleId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a synonym rule. - /// Create or update a synonym rule in a synonym set. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutSynonymRuleAsync(Elastic.Clients.Elasticsearch.Serverless.Id setId, Elastic.Clients.Elasticsearch.Serverless.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutSynonymRuleRequestDescriptor(setId, ruleId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.TextStructure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.TextStructure.g.cs deleted file mode 100644 index d7e72514032..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.TextStructure.g.cs +++ /dev/null @@ -1,100 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.TextStructure; - -public partial class TextStructureNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected TextStructureNamespacedClient() : base() - { - } - - internal TextStructureNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Test a Grok pattern. - /// Test a Grok pattern on one or more lines of text. - /// The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestGrokPatternAsync(TestGrokPatternRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Test a Grok pattern. - /// Test a Grok pattern on one or more lines of text. - /// The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestGrokPatternAsync(TestGrokPatternRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Test a Grok pattern. - /// Test a Grok pattern on one or more lines of text. - /// The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestGrokPatternAsync(CancellationToken cancellationToken = default) - { - var descriptor = new TestGrokPatternRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Test a Grok pattern. - /// Test a Grok pattern on one or more lines of text. - /// The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TestGrokPatternAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TestGrokPatternRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Transform.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Transform.g.cs deleted file mode 100644 index ecba0eb5a5a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Transform.g.cs +++ /dev/null @@ -1,1191 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public partial class TransformManagementNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected TransformManagementNamespacedClient() : base() - { - } - - internal TransformManagementNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Delete a transform. - /// Deletes a transform. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTransformAsync(DeleteTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a transform. - /// Deletes a transform. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTransformAsync(DeleteTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a transform. - /// Deletes a transform. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a transform. - /// Deletes a transform. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transforms. - /// Retrieves configuration information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformAsync(GetTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get transforms. - /// Retrieves configuration information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformAsync(GetTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transforms. - /// Retrieves configuration information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Names? transformId, CancellationToken cancellationToken = default) - { - var descriptor = new GetTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transforms. - /// Retrieves configuration information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Names? transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transforms. - /// Retrieves configuration information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetTransformRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transforms. - /// Retrieves configuration information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTransformRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transform stats. - /// Retrieves usage information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformStatsAsync(GetTransformStatsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get transform stats. - /// Retrieves usage information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformStatsAsync(GetTransformStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transform stats. - /// Retrieves usage information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Names transformId, CancellationToken cancellationToken = default) - { - var descriptor = new GetTransformStatsRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get transform stats. - /// Retrieves usage information for transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetTransformStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Names transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetTransformStatsRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Preview a transform. - /// Generates a preview of the results that you will get when you create a transform with the same configuration. - /// - /// - /// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also - /// generates a list of mappings and settings for the destination index. These values are determined based on the field - /// types of the source index and the transform aggregations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> PreviewTransformAsync(PreviewTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, PreviewTransformRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Preview a transform. - /// Generates a preview of the results that you will get when you create a transform with the same configuration. - /// - /// - /// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also - /// generates a list of mappings and settings for the destination index. These values are determined based on the field - /// types of the source index and the transform aggregations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> PreviewTransformAsync(PreviewTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewTransformResponse, PreviewTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview a transform. - /// Generates a preview of the results that you will get when you create a transform with the same configuration. - /// - /// - /// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also - /// generates a list of mappings and settings for the destination index. These values are determined based on the field - /// types of the source index and the transform aggregations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> PreviewTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id? transformId, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewTransformResponse, PreviewTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview a transform. - /// Generates a preview of the results that you will get when you create a transform with the same configuration. - /// - /// - /// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also - /// generates a list of mappings and settings for the destination index. These values are determined based on the field - /// types of the source index and the transform aggregations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> PreviewTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id? transformId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewTransformResponse, PreviewTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview a transform. - /// Generates a preview of the results that you will get when you create a transform with the same configuration. - /// - /// - /// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also - /// generates a list of mappings and settings for the destination index. These values are determined based on the field - /// types of the source index and the transform aggregations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> PreviewTransformAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PreviewTransformRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewTransformResponse, PreviewTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Preview a transform. - /// Generates a preview of the results that you will get when you create a transform with the same configuration. - /// - /// - /// It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also - /// generates a list of mappings and settings for the destination index. These values are determined based on the field - /// types of the source index and the transform aggregations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> PreviewTransformAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PreviewTransformRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PreviewTransformResponse, PreviewTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(PutTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(PutTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutTransformResponse, PutTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new PutTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync, PutTransformResponse, PutTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutTransformResponse, PutTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(PutTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new PutTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create a transform. - /// Creates a transform. - /// - /// - /// A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as - /// a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a - /// unique row per entity. - /// - /// - /// You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If - /// you choose to use the pivot method for your transform, the entities are defined by the set of group_by fields in - /// the pivot object. If you choose to use the latest method, the entities are defined by the unique_key field values - /// in the latest object. - /// - /// - /// You must have create_index, index, and read privileges on the destination index and read and - /// view_index_metadata privileges on the source indices. When Elasticsearch security features are enabled, the - /// transform remembers which roles the user that created it had at the time of creation and uses those same roles. If - /// those roles do not have the required privileges on the source and destination indices, the transform fails when it - /// attempts unauthorized operations. - /// - /// - /// NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any - /// .transform-internal* indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do - /// not give users any privileges on .transform-internal* indices. If you used transforms prior to 7.5, also do not - /// give users any privileges on .data-frame-internal* indices. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reset a transform. - /// Resets a transform. - /// Before you can reset it, you must stop it; alternatively, use the force query parameter. - /// If the destination index was created by the transform, it is deleted. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetTransformAsync(ResetTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Reset a transform. - /// Resets a transform. - /// Before you can reset it, you must stop it; alternatively, use the force query parameter. - /// If the destination index was created by the transform, it is deleted. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetTransformAsync(ResetTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reset a transform. - /// Resets a transform. - /// Before you can reset it, you must stop it; alternatively, use the force query parameter. - /// If the destination index was created by the transform, it is deleted. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new ResetTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reset a transform. - /// Resets a transform. - /// Before you can reset it, you must stop it; alternatively, use the force query parameter. - /// If the destination index was created by the transform, it is deleted. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResetTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ResetTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Schedule a transform to start now. - /// Instantly runs a transform to process data. - /// - /// - /// If you _schedule_now a transform, it will process the new data instantly, - /// without waiting for the configured frequency interval. After _schedule_now API is called, - /// the transform will be processed again at now + frequency unless _schedule_now API - /// is called again in the meantime. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ScheduleNowTransformAsync(ScheduleNowTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Schedule a transform to start now. - /// Instantly runs a transform to process data. - /// - /// - /// If you _schedule_now a transform, it will process the new data instantly, - /// without waiting for the configured frequency interval. After _schedule_now API is called, - /// the transform will be processed again at now + frequency unless _schedule_now API - /// is called again in the meantime. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ScheduleNowTransformAsync(ScheduleNowTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Schedule a transform to start now. - /// Instantly runs a transform to process data. - /// - /// - /// If you _schedule_now a transform, it will process the new data instantly, - /// without waiting for the configured frequency interval. After _schedule_now API is called, - /// the transform will be processed again at now + frequency unless _schedule_now API - /// is called again in the meantime. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ScheduleNowTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new ScheduleNowTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Schedule a transform to start now. - /// Instantly runs a transform to process data. - /// - /// - /// If you _schedule_now a transform, it will process the new data instantly, - /// without waiting for the configured frequency interval. After _schedule_now API is called, - /// the transform will be processed again at now + frequency unless _schedule_now API - /// is called again in the meantime. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ScheduleNowTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ScheduleNowTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a transform. - /// Starts a transform. - /// - /// - /// When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is - /// set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping - /// definitions for the destination index from the source indices and the transform aggregations. If fields in the - /// destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), - /// the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce - /// mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you - /// start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings - /// in a pivot transform. - /// - /// - /// When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you - /// created the transform, they occur when you start the transform—​with the exception of privilege checks. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the - /// time of creation and uses those same roles. If those roles do not have the required privileges on the source and - /// destination indices, the transform fails when it attempts unauthorized operations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTransformAsync(StartTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Start a transform. - /// Starts a transform. - /// - /// - /// When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is - /// set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping - /// definitions for the destination index from the source indices and the transform aggregations. If fields in the - /// destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), - /// the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce - /// mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you - /// start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings - /// in a pivot transform. - /// - /// - /// When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you - /// created the transform, they occur when you start the transform—​with the exception of privilege checks. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the - /// time of creation and uses those same roles. If those roles do not have the required privileges on the source and - /// destination indices, the transform fails when it attempts unauthorized operations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTransformAsync(StartTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a transform. - /// Starts a transform. - /// - /// - /// When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is - /// set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping - /// definitions for the destination index from the source indices and the transform aggregations. If fields in the - /// destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), - /// the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce - /// mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you - /// start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings - /// in a pivot transform. - /// - /// - /// When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you - /// created the transform, they occur when you start the transform—​with the exception of privilege checks. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the - /// time of creation and uses those same roles. If those roles do not have the required privileges on the source and - /// destination indices, the transform fails when it attempts unauthorized operations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new StartTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Start a transform. - /// Starts a transform. - /// - /// - /// When you start a transform, it creates the destination index if it does not already exist. The number_of_shards is - /// set to 1 and the auto_expand_replicas is set to 0-1. If it is a pivot transform, it deduces the mapping - /// definitions for the destination index from the source indices and the transform aggregations. If fields in the - /// destination index are derived from scripts (as in the case of scripted_metric or bucket_script aggregations), - /// the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce - /// mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you - /// start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings - /// in a pivot transform. - /// - /// - /// When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you - /// created the transform, they occur when you start the transform—​with the exception of privilege checks. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the - /// time of creation and uses those same roles. If those roles do not have the required privileges on the source and - /// destination indices, the transform fails when it attempts unauthorized operations. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StartTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StartTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop transforms. - /// Stops one or more transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTransformAsync(StopTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Stop transforms. - /// Stops one or more transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTransformAsync(StopTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop transforms. - /// Stops one or more transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Name transformId, CancellationToken cancellationToken = default) - { - var descriptor = new StopTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Stop transforms. - /// Stops one or more transforms. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task StopTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Name transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new StopTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(UpdateTransformRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(UpdateTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateTransformResponse, UpdateTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateTransformResponse, UpdateTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateTransformResponse, UpdateTransformRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(UpdateTransformRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateTransformRequestDescriptor(transformId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update a transform. - /// Updates certain properties of a transform. - /// - /// - /// All updated properties except description do not take effect until after the transform starts the next checkpoint, - /// thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata - /// privileges for the source indices. You must also have index and read privileges for the destination index. When - /// Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the - /// time of update and runs with those privileges. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateTransformAsync(Elastic.Clients.Elasticsearch.Serverless.Id transformId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateTransformRequestDescriptor(transformId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Upgrade all transforms. - /// Transforms are compatible across minor versions and between supported major versions. - /// However, over time, the format of transform configuration information may change. - /// This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. - /// It also cleans up the internal data structures that store the transform state and checkpoints. - /// The upgrade does not affect the source and destination indices. - /// The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. - /// - /// - /// If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. - /// Resolve the issue then re-run the process again. - /// A summary is returned when the upgrade is finished. - /// - /// - /// To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. - /// You may want to perform a recent cluster backup prior to the upgrade. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeTransformsAsync(UpgradeTransformsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Upgrade all transforms. - /// Transforms are compatible across minor versions and between supported major versions. - /// However, over time, the format of transform configuration information may change. - /// This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. - /// It also cleans up the internal data structures that store the transform state and checkpoints. - /// The upgrade does not affect the source and destination indices. - /// The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. - /// - /// - /// If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. - /// Resolve the issue then re-run the process again. - /// A summary is returned when the upgrade is finished. - /// - /// - /// To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. - /// You may want to perform a recent cluster backup prior to the upgrade. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeTransformsAsync(UpgradeTransformsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Upgrade all transforms. - /// Transforms are compatible across minor versions and between supported major versions. - /// However, over time, the format of transform configuration information may change. - /// This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. - /// It also cleans up the internal data structures that store the transform state and checkpoints. - /// The upgrade does not affect the source and destination indices. - /// The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. - /// - /// - /// If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. - /// Resolve the issue then re-run the process again. - /// A summary is returned when the upgrade is finished. - /// - /// - /// To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. - /// You may want to perform a recent cluster backup prior to the upgrade. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeTransformsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new UpgradeTransformsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Upgrade all transforms. - /// Transforms are compatible across minor versions and between supported major versions. - /// However, over time, the format of transform configuration information may change. - /// This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. - /// It also cleans up the internal data structures that store the transform state and checkpoints. - /// The upgrade does not affect the source and destination indices. - /// The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. - /// - /// - /// If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. - /// Resolve the issue then re-run the process again. - /// A summary is returned when the upgrade is finished. - /// - /// - /// To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. - /// You may want to perform a recent cluster backup prior to the upgrade. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpgradeTransformsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpgradeTransformsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Xpack.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Xpack.g.cs deleted file mode 100644 index 90810eb6645..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Xpack.g.cs +++ /dev/null @@ -1,223 +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. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public partial class XpackNamespacedClient : NamespacedClientProxy -{ - /// - /// - /// Initializes a new instance of the class for mocking. - /// - /// - protected XpackNamespacedClient() : base() - { - } - - internal XpackNamespacedClient(ElasticsearchClient client) : base(client) - { - } - - /// - /// - /// Get information. - /// The information provided by the API includes: - /// - /// - /// - /// - /// Build information including the build number and timestamp. - /// - /// - /// - /// - /// License information about the currently installed license. - /// - /// - /// - /// - /// Feature information for the features that are currently enabled and available under the current license. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(XpackInfoRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get information. - /// The information provided by the API includes: - /// - /// - /// - /// - /// Build information including the build number and timestamp. - /// - /// - /// - /// - /// License information about the currently installed license. - /// - /// - /// - /// - /// Feature information for the features that are currently enabled and available under the current license. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(XpackInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get information. - /// The information provided by the API includes: - /// - /// - /// - /// - /// Build information including the build number and timestamp. - /// - /// - /// - /// - /// License information about the currently installed license. - /// - /// - /// - /// - /// Feature information for the features that are currently enabled and available under the current license. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(CancellationToken cancellationToken = default) - { - var descriptor = new XpackInfoRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get information. - /// The information provided by the API includes: - /// - /// - /// - /// - /// Build information including the build number and timestamp. - /// - /// - /// - /// - /// License information about the currently installed license. - /// - /// - /// - /// - /// Feature information for the features that are currently enabled and available under the current license. - /// - /// - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new XpackInfoRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get usage information. - /// Get information about the features that are currently enabled and available under the current license. - /// The API also provides some usage statistics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(XpackUsageRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get usage information. - /// Get information about the features that are currently enabled and available under the current license. - /// The API also provides some usage statistics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(XpackUsageRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get usage information. - /// Get information about the features that are currently enabled and available under the current license. - /// The API also provides some usage statistics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(CancellationToken cancellationToken = default) - { - var descriptor = new XpackUsageRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get usage information. - /// Get information about the features that are currently enabled and available under the current license. - /// The API also provides some usage statistics. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UsageAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new XpackUsageRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs deleted file mode 100644 index 4e8ef8c6d98..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.g.cs +++ /dev/null @@ -1,5602 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; -using Elastic.Clients.Elasticsearch.Serverless.Cluster; -using Elastic.Clients.Elasticsearch.Serverless.Enrich; -using Elastic.Clients.Elasticsearch.Serverless.Eql; -using Elastic.Clients.Elasticsearch.Serverless.Esql; -using Elastic.Clients.Elasticsearch.Serverless.Graph; -using Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -using Elastic.Clients.Elasticsearch.Serverless.Inference; -using Elastic.Clients.Elasticsearch.Serverless.Ingest; -using Elastic.Clients.Elasticsearch.Serverless.LicenseManagement; -using Elastic.Clients.Elasticsearch.Serverless.MachineLearning; -using Elastic.Clients.Elasticsearch.Serverless.Nodes; -using Elastic.Clients.Elasticsearch.Serverless.QueryRules; -using Elastic.Clients.Elasticsearch.Serverless.Security; -using Elastic.Clients.Elasticsearch.Serverless.Snapshot; -using Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; -using Elastic.Clients.Elasticsearch.Serverless.Sql; -using Elastic.Clients.Elasticsearch.Serverless.Synonyms; -using Elastic.Clients.Elasticsearch.Serverless.TextStructure; -using Elastic.Clients.Elasticsearch.Serverless.TransformManagement; -using Elastic.Clients.Elasticsearch.Serverless.Xpack; -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public partial class ElasticsearchClient -{ - public virtual AsyncSearchNamespacedClient AsyncSearch { get; private set; } - public virtual ClusterNamespacedClient Cluster { get; private set; } - public virtual EnrichNamespacedClient Enrich { get; private set; } - public virtual EqlNamespacedClient Eql { get; private set; } - public virtual EsqlNamespacedClient Esql { get; private set; } - public virtual GraphNamespacedClient Graph { get; private set; } - public virtual IndicesNamespacedClient Indices { get; private set; } - public virtual InferenceNamespacedClient Inference { get; private set; } - public virtual IngestNamespacedClient Ingest { get; private set; } - public virtual LicenseManagementNamespacedClient LicenseManagement { get; private set; } - public virtual MachineLearningNamespacedClient MachineLearning { get; private set; } - public virtual NodesNamespacedClient Nodes { get; private set; } - public virtual QueryRulesNamespacedClient QueryRules { get; private set; } - public virtual SecurityNamespacedClient Security { get; private set; } - public virtual SnapshotNamespacedClient Snapshot { get; private set; } - public virtual SnapshotLifecycleManagementNamespacedClient SnapshotLifecycleManagement { get; private set; } - public virtual SqlNamespacedClient Sql { get; private set; } - public virtual SynonymsNamespacedClient Synonyms { get; private set; } - public virtual TextStructureNamespacedClient TextStructure { get; private set; } - public virtual TransformManagementNamespacedClient TransformManagement { get; private set; } - public virtual XpackNamespacedClient Xpack { get; private set; } - - private partial void SetupNamespaces() - { - AsyncSearch = new AsyncSearchNamespacedClient(this); - Cluster = new ClusterNamespacedClient(this); - Enrich = new EnrichNamespacedClient(this); - Eql = new EqlNamespacedClient(this); - Esql = new EsqlNamespacedClient(this); - Graph = new GraphNamespacedClient(this); - Indices = new IndicesNamespacedClient(this); - Inference = new InferenceNamespacedClient(this); - Ingest = new IngestNamespacedClient(this); - LicenseManagement = new LicenseManagementNamespacedClient(this); - MachineLearning = new MachineLearningNamespacedClient(this); - Nodes = new NodesNamespacedClient(this); - QueryRules = new QueryRulesNamespacedClient(this); - Security = new SecurityNamespacedClient(this); - Snapshot = new SnapshotNamespacedClient(this); - SnapshotLifecycleManagement = new SnapshotLifecycleManagementNamespacedClient(this); - Sql = new SqlNamespacedClient(this); - Synonyms = new SynonymsNamespacedClient(this); - TextStructure = new TextStructureNamespacedClient(this); - TransformManagement = new TransformManagementNamespacedClient(this); - Xpack = new XpackNamespacedClient(this); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(BulkRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, BulkResponse, BulkRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, BulkResponse, BulkRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, BulkResponse, BulkRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, BulkResponse, BulkRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, BulkResponse, BulkRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear a scrolling search. - /// - /// - /// Clear the search context and results for a scrolling search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(ClearScrollRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Clear a scrolling search. - /// - /// - /// Clear the search context and results for a scrolling search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(ClearScrollRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear a scrolling search. - /// - /// - /// Clear the search context and results for a scrolling search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClearScrollRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Clear a scrolling search. - /// - /// - /// Clear the search context and results for a scrolling search. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearScrollRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close a point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// A point in time is automatically closed when the keep_alive period has elapsed. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Close a point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// A point in time is automatically closed when the keep_alive period has elapsed. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close a point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// A point in time is automatically closed when the keep_alive period has elapsed. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClosePointInTimeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Close a point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// A point in time is automatically closed when the keep_alive period has elapsed. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClosePointInTimeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CountRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CountRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CountRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(CreateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document, index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document, index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a document. - /// Removes a JSON document from the specified index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(DeleteByQueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(DeleteByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(DeleteByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete documents. - /// Deletes documents that match the specified query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle a delete by query operation. - /// - /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(DeleteByQueryRethrottleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Throttle a delete by query operation. - /// - /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(DeleteByQueryRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle a delete by query operation. - /// - /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.Serverless.TaskId taskId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle a delete by query operation. - /// - /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.Serverless.TaskId taskId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(DeleteScriptRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(DeleteScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(DeleteScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Delete a script or search template. - /// Deletes a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check a document. - /// Checks if a specified document exists. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(ExistsSourceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(ExistsSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(ExistsSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Check for a document source. - /// Checks if a document's _source is stored. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(ExplainRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, ExplainRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(ExplainRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(FieldCapsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(FieldCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(FieldCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the field capabilities. - /// - /// - /// Get information about the capabilities of fields among multiple indices. - /// - /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(GetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, GetRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(GetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(GetScriptRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(GetScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(GetScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a script or search template. - /// Retrieves a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(GetSourceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, GetSourceRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(GetSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get a document's source. - /// Returns the source of a document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. - /// - /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. - /// - /// - /// The cluster’s status is controlled by the worst indicator status. - /// - /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. - /// - /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. - /// - /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthReportAsync(HealthReportRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. - /// - /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. - /// - /// - /// The cluster’s status is controlled by the worst indicator status. - /// - /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. - /// - /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. - /// - /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthReportAsync(HealthReportRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. - /// - /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. - /// - /// - /// The cluster’s status is controlled by the worst indicator status. - /// - /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. - /// - /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. - /// - /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthReportAsync(IReadOnlyCollection? feature, CancellationToken cancellationToken = default) - { - var descriptor = new HealthReportRequestDescriptor(feature); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. - /// - /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. - /// - /// - /// The cluster’s status is controlled by the worst indicator status. - /// - /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. - /// - /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. - /// - /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthReportAsync(IReadOnlyCollection? feature, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HealthReportRequestDescriptor(feature); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. - /// - /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. - /// - /// - /// The cluster’s status is controlled by the worst indicator status. - /// - /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. - /// - /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. - /// - /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthReportAsync(CancellationToken cancellationToken = default) - { - var descriptor = new HealthReportRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. - /// - /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. - /// - /// - /// The cluster’s status is controlled by the worst indicator status. - /// - /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. - /// - /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. - /// - /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task HealthReportAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new HealthReportRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(IndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(IndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document, index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document, index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Index a document. - /// Adds a JSON document to the specified data stream or index and makes it searchable. - /// If the target is an index and the document already exists, the request updates the document and increments its version. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new IndexRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(InfoRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(InfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(CancellationToken cancellationToken = default) - { - var descriptor = new InfoRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get cluster info. - /// Returns basic information about the cluster. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new InfoRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(MultiTermVectorsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(MultiTermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(MultiTermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple term vectors. - /// - /// - /// You can specify existing documents by index and ID or provide artificial documents in the body of the request. - /// You can specify the index in the request body or request URI. - /// The response contains a docs array with all the fetched termvectors. - /// Each element has the structure provided by the termvectors API. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple documents. - /// - /// - /// Get multiple JSON documents by ID from one or more indices. - /// If you specify an index in the request URI, you only need to specify the document IDs in the request body. - /// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(MultiGetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, MultiGetRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get multiple documents. - /// - /// - /// Get multiple JSON documents by ID from one or more indices. - /// If you specify an index in the request URI, you only need to specify the document IDs in the request body. - /// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(MultiGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple documents. - /// - /// - /// Get multiple JSON documents by ID from one or more indices. - /// If you specify an index in the request URI, you only need to specify the document IDs in the request body. - /// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple documents. - /// - /// - /// Get multiple JSON documents by ID from one or more indices. - /// If you specify an index in the request URI, you only need to specify the document IDs in the request body. - /// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple documents. - /// - /// - /// Get multiple JSON documents by ID from one or more indices. - /// If you specify an index in the request URI, you only need to specify the document IDs in the request body. - /// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get multiple documents. - /// - /// - /// Get multiple JSON documents by ID from one or more indices. - /// If you specify an index in the request URI, you only need to specify the document IDs in the request body. - /// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple searches. - /// - /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: - /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// - /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. - /// - /// - /// IMPORTANT: The final line of data must end with a newline character \n. - /// Each newline character may be preceded by a carriage return \r. - /// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(MultiSearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, MultiSearchRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Run multiple searches. - /// - /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: - /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// - /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. - /// - /// - /// IMPORTANT: The final line of data must end with a newline character \n. - /// Each newline character may be preceded by a carriage return \r. - /// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(MultiSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple searches. - /// - /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: - /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// - /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. - /// - /// - /// IMPORTANT: The final line of data must end with a newline character \n. - /// Each newline character may be preceded by a carriage return \r. - /// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple searches. - /// - /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: - /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// - /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. - /// - /// - /// IMPORTANT: The final line of data must end with a newline character \n. - /// Each newline character may be preceded by a carriage return \r. - /// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple searches. - /// - /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: - /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// - /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. - /// - /// - /// IMPORTANT: The final line of data must end with a newline character \n. - /// Each newline character may be preceded by a carriage return \r. - /// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple searches. - /// - /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: - /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// - /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. - /// - /// - /// IMPORTANT: The final line of data must end with a newline character \n. - /// Each newline character may be preceded by a carriage return \r. - /// When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple templated searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(MultiSearchTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Run multiple templated searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(MultiSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple templated searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple templated searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple templated searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run multiple templated searches. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Open a point in time. - /// - /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. - /// - /// - /// A point in time must be opened explicitly before being used in search requests. - /// The keep_alive parameter tells Elasticsearch how long it should persist. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Ping the cluster. - /// Get information about whether the cluster is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(PingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Ping the cluster. - /// Get information about whether the cluster is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(PingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Ping the cluster. - /// Get information about whether the cluster is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Ping the cluster. - /// Get information about whether the cluster is running. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(PutScriptRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(PutScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(PutScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Elastic.Clients.Elasticsearch.Serverless.Name? context, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(RankEvalRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(RankEvalRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(RankEvalRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Evaluate ranked search results. - /// - /// - /// Evaluate the quality of ranked search results over a set of typical search queries. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(ReindexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(ReindexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(ReindexRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Reindex documents. - /// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle a reindex operation. - /// - /// - /// Change the number of requests per second for a particular reindex operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(ReindexRethrottleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Throttle a reindex operation. - /// - /// - /// Change the number of requests per second for a particular reindex operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(ReindexRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle a reindex operation. - /// - /// - /// Change the number of requests per second for a particular reindex operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(Elastic.Clients.Elasticsearch.Serverless.Id taskId, CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle a reindex operation. - /// - /// - /// Change the number of requests per second for a particular reindex operation. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(Elastic.Clients.Elasticsearch.Serverless.Id taskId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Render a search template. - /// - /// - /// Render a search template as a search request body. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a scrolling search. - /// - /// - /// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). - /// - /// - /// The scroll API gets large sets of results from a single scrolling search request. - /// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. - /// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. - /// The search response returns a scroll ID in the _scroll_id response body parameter. - /// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. - /// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. - /// - /// - /// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. - /// - /// - /// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ScrollAsync(ScrollRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, ScrollRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Run a search. - /// - /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(SearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, SearchRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Run a search. - /// - /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(SearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search. - /// - /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search. - /// - /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search. - /// - /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search. - /// - /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(SearchMvtRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(SearchMvtRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(SearchMvtRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Search a vector tile. - /// - /// - /// Search a vector tile for geospatial values. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Elastic.Clients.Elasticsearch.Serverless.Field field, int zoom, int x, int y, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Run a search with a search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(SearchTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, SearchTemplateRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Run a search with a search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(SearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search with a search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search with a search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search with a search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Run a search with a search template. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(TermsEnumRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(TermsEnumRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(TermsEnumRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get terms in an index. - /// - /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. - /// - /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. - /// - /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TermVectorsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Get term vector information. - /// - /// - /// Get information and statistics about terms in the fields of a particular document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(UpdateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(request, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(UpdateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Serverless.IndexName index, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(UpdateByQueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(UpdateByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(UpdateByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Serverless.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle an update by query operation. - /// - /// - /// Change the number of requests per second for a particular update by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryRethrottleAsync(UpdateByQueryRethrottleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Throttle an update by query operation. - /// - /// - /// Change the number of requests per second for a particular update by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryRethrottleAsync(UpdateByQueryRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle an update by query operation. - /// - /// - /// Change the number of requests per second for a particular update by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.Serverless.Id taskId, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// - /// - /// Throttle an update by query operation. - /// - /// - /// Change the number of requests per second for a particular update by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.Serverless.Id taskId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs deleted file mode 100644 index ca977c75a2c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AdjacencyMatrixAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs deleted file mode 100644 index 86e616fbddc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs +++ /dev/null @@ -1,156 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AdjacencyMatrixAggregation -{ - /// - /// - /// Filters used to create buckets. - /// At least one filter is required. - /// - /// - [JsonInclude, JsonPropertyName("filters")] - public IDictionary? Filters { get; set; } - - /// - /// - /// Separator used to concatenate filter names. Defaults to &. - /// - /// - [JsonInclude, JsonPropertyName("separator")] - public string? Separator { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(AdjacencyMatrixAggregation adjacencyMatrixAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.AdjacencyMatrix(adjacencyMatrixAggregation); -} - -public sealed partial class AdjacencyMatrixAggregationDescriptor : SerializableDescriptor> -{ - internal AdjacencyMatrixAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public AdjacencyMatrixAggregationDescriptor() : base() - { - } - - private IDictionary> FiltersValue { get; set; } - private string? SeparatorValue { get; set; } - - /// - /// - /// Filters used to create buckets. - /// At least one filter is required. - /// - /// - public AdjacencyMatrixAggregationDescriptor Filters(Func>, FluentDescriptorDictionary>> selector) - { - FiltersValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Separator used to concatenate filter names. Defaults to &. - /// - /// - public AdjacencyMatrixAggregationDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FiltersValue is not null) - { - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AdjacencyMatrixAggregationDescriptor : SerializableDescriptor -{ - internal AdjacencyMatrixAggregationDescriptor(Action configure) => configure.Invoke(this); - - public AdjacencyMatrixAggregationDescriptor() : base() - { - } - - private IDictionary FiltersValue { get; set; } - private string? SeparatorValue { get; set; } - - /// - /// - /// Filters used to create buckets. - /// At least one filter is required. - /// - /// - public AdjacencyMatrixAggregationDescriptor Filters(Func, FluentDescriptorDictionary> selector) - { - FiltersValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Separator used to concatenate filter names. Defaults to &. - /// - /// - public AdjacencyMatrixAggregationDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FiltersValue is not null) - { - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixBucket.g.cs deleted file mode 100644 index 21d617735bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class AdjacencyMatrixBucketConverter : JsonConverter -{ - public override AdjacencyMatrixBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - string key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new AdjacencyMatrixBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, AdjacencyMatrixBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'AdjacencyMatrixBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(AdjacencyMatrixBucketConverter))] -public sealed partial class AdjacencyMatrixBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public string Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs deleted file mode 100644 index 7f1f89d7900..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ /dev/null @@ -1,644 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public partial interface IAggregate -{ -} - -[JsonConverter(typeof(AggregateDictionaryConverter))] -public partial class AggregateDictionary : IsAReadOnlyDictionary -{ - public AggregateDictionary(IReadOnlyDictionary backingDictionary) : base(backingDictionary) - { - } - - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AdjacencyMatrixAggregate? GetAdjacencyMatrix(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AutoDateHistogramAggregate? GetAutoDateHistogram(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageAggregate? GetAverage(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BoxplotAggregate? GetBoxplot(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketMetricValueAggregate? GetBucketMetricValue(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregate? GetCardinality(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChildrenAggregate? GetChildren(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregate? GetComposite(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeCardinalityAggregate? GetCumulativeCardinality(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregate? GetDateHistogram(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregate? GetDateRange(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.DerivativeAggregate? GetDerivative(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.DoubleTermsAggregate? GetDoubleTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsAggregate? GetExtendedStats(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsBucketAggregate? GetExtendedStatsBucket(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FilterAggregate? GetFilter(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FiltersAggregate? GetFilters(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsAggregate? GetFrequentItemSets(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoBoundsAggregate? GetGeoBounds(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoCentroidAggregate? GetGeoCentroid(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoDistanceAggregate? GetGeoDistance(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohashGridAggregate? GetGeohashGrid(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohexGridAggregate? GetGeohexGrid(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregate? GetGeoLine(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregate? GetGeotileGrid(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GlobalAggregate? GetGlobal(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrPercentileRanksAggregate? GetHdrPercentileRanks(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrPercentilesAggregate? GetHdrPercentiles(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregate? GetHistogram(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceAggregate? GetInference(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpPrefixAggregate? GetIpPrefix(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregate? GetIpRange(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.LongRareTermsAggregate? GetLongRareTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.LongTermsAggregate? GetLongTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MatrixStatsAggregate? GetMatrixStats(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxAggregate? GetMax(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MedianAbsoluteDeviationAggregate? GetMedianAbsoluteDeviation(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinAggregate? GetMin(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregate? GetMissing(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermsAggregate? GetMultiTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.NestedAggregate? GetNested(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ParentAggregate? GetParent(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesBucketAggregate? GetPercentilesBucket(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregate? GetRange(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateAggregate? GetRate(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ReverseNestedAggregate? GetReverseNested(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregate? GetSampler(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedMetricAggregate? GetScriptedMetric(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantLongTermsAggregate? GetSignificantLongTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantStringTermsAggregate? GetSignificantStringTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SimpleValueAggregate? GetSimpleValue(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsAggregate? GetStats(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsBucketAggregate? GetStatsBucket(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringRareTermsAggregate? GetStringRareTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringStatsAggregate? GetStringStats(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringTermsAggregate? GetStringTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumAggregate? GetSum(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestPercentileRanksAggregate? GetTDigestPercentileRanks(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestPercentilesAggregate? GetTDigestPercentiles(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TimeSeriesAggregate? GetTimeSeries(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopHitsAggregate? GetTopHits(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsAggregate? GetTopMetrics(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestAggregate? GetTTest(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.UnmappedRareTermsAggregate? GetUnmappedRareTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.UnmappedSamplerAggregate? GetUnmappedSampler(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.UnmappedSignificantTermsAggregate? GetUnmappedSignificantTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.UnmappedTermsAggregate? GetUnmappedTerms(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregate? GetValueCount(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.VariableWidthHistogramAggregate? GetVariableWidthHistogram(string key) => TryGet(key); - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageAggregate? GetWeightedAverage(string key) => TryGet(key); - private T? TryGet(string key) where T : class, IAggregate => BackingDictionary.TryGetValue(key, out var value) ? value as T : null; -} - -internal sealed partial class AggregateDictionaryConverter : JsonConverter -{ - public override AggregateDictionary Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var dictionary = new Dictionary(); - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException($"Expected {JsonTokenType.PropertyName} but read {reader.TokenType}."); - var name = reader.GetString(); - reader.Read(); - ReadItem(ref reader, options, dictionary, name); - } - - return new AggregateDictionary(dictionary); - } - - public override void Write(Utf8JsonWriter writer, AggregateDictionary value, JsonSerializerOptions options) - { - throw new NotImplementedException("'AggregateDictionary' is a readonly type, used only on responses and does not support being written to JSON."); - } - - public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions options, Dictionary dictionary, string name) - { - var nameParts = name.Split('#'); - if (nameParts.Length != 2) - throw new JsonException($"Unable to parse typed-key '{name}'."); - var type = nameParts[0]; - switch (type) - { - case "adjacency_matrix": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "auto_date_histogram": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "avg": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "boxplot": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "bucket_metric_value": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "cardinality": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "children": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "composite": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "simple_long_value": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "date_histogram": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "date_range": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "derivative": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "dterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "extended_stats": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "extended_stats_bucket": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "filter": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "filters": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "frequent_item_sets": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geo_bounds": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geo_centroid": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geo_distance": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geohash_grid": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geohex_grid": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geo_line": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "geotile_grid": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "global": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "hdr_percentile_ranks": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "hdr_percentiles": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "histogram": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "inference": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "ip_prefix": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "ip_range": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "lrareterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "lterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "matrix_stats": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "max": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "median_absolute_deviation": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "min": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "missing": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "multi_terms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "nested": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "parent": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "percentiles_bucket": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "range": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "rate": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "reverse_nested": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "sampler": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "scripted_metric": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "siglterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "sigsterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "simple_value": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "stats": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "stats_bucket": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "srareterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "string_stats": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "sterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "sum": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "tdigest_percentile_ranks": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "tdigest_percentiles": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "time_series": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "top_hits": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "top_metrics": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "t_test": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "umrareterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "unmapped_sampler": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "umsigterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "umterms": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "value_count": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "variable_width_histogram": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "weighted_avg": - { - var item = JsonSerializer.Deserialize(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - default: - throw new NotSupportedException($"The tagged variant '{type}' is currently not supported."); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs deleted file mode 100644 index 9e2e2f1a0fb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Aggregation.g.cs +++ /dev/null @@ -1,1397 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -[JsonConverter(typeof(AggregationConverter))] -public sealed partial class Aggregation -{ - internal Aggregation(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 Aggregation AdjacencyMatrix(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AdjacencyMatrixAggregation adjacencyMatrixAggregation) => new Aggregation("adjacency_matrix", adjacencyMatrixAggregation); - public static Aggregation AutoDateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AutoDateHistogramAggregation autoDateHistogramAggregation) => new Aggregation("auto_date_histogram", autoDateHistogramAggregation); - public static Aggregation Avg(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageAggregation averageAggregation) => new Aggregation("avg", averageAggregation); - public static Aggregation AvgBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageBucketAggregation averageBucketAggregation) => new Aggregation("avg_bucket", averageBucketAggregation); - public static Aggregation Boxplot(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BoxplotAggregation boxplotAggregation) => new Aggregation("boxplot", boxplotAggregation); - public static Aggregation BucketScript(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketScriptAggregation bucketScriptAggregation) => new Aggregation("bucket_script", bucketScriptAggregation); - public static Aggregation BucketSelector(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSelectorAggregation bucketSelectorAggregation) => new Aggregation("bucket_selector", bucketSelectorAggregation); - public static Aggregation BucketSort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSortAggregation bucketSortAggregation) => new Aggregation("bucket_sort", bucketSortAggregation); - public static Aggregation Cardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation cardinalityAggregation) => new Aggregation("cardinality", cardinalityAggregation); - public static Aggregation Children(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChildrenAggregation childrenAggregation) => new Aggregation("children", childrenAggregation); - public static Aggregation Composite(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation compositeAggregation) => new Aggregation("composite", compositeAggregation); - public static Aggregation CumulativeCardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeCardinalityAggregation cumulativeCardinalityAggregation) => new Aggregation("cumulative_cardinality", cumulativeCardinalityAggregation); - public static Aggregation CumulativeSum(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeSumAggregation cumulativeSumAggregation) => new Aggregation("cumulative_sum", cumulativeSumAggregation); - public static Aggregation DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation dateHistogramAggregation) => new Aggregation("date_histogram", dateHistogramAggregation); - public static Aggregation DateRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation dateRangeAggregation) => new Aggregation("date_range", dateRangeAggregation); - public static Aggregation Derivative(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DerivativeAggregation derivativeAggregation) => new Aggregation("derivative", derivativeAggregation); - public static Aggregation DiversifiedSampler(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DiversifiedSamplerAggregation diversifiedSamplerAggregation) => new Aggregation("diversified_sampler", diversifiedSamplerAggregation); - public static Aggregation ExtendedStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsAggregation extendedStatsAggregation) => new Aggregation("extended_stats", extendedStatsAggregation); - public static Aggregation ExtendedStatsBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsBucketAggregation extendedStatsBucketAggregation) => new Aggregation("extended_stats_bucket", extendedStatsBucketAggregation); - public static Aggregation Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query queryContainer) => new Aggregation("filter", queryContainer); - public static Aggregation Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FiltersAggregation filtersAggregation) => new Aggregation("filters", filtersAggregation); - public static Aggregation FrequentItemSets(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsAggregation frequentItemSetsAggregation) => new Aggregation("frequent_item_sets", frequentItemSetsAggregation); - public static Aggregation GeoBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoBoundsAggregation geoBoundsAggregation) => new Aggregation("geo_bounds", geoBoundsAggregation); - public static Aggregation GeoCentroid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoCentroidAggregation geoCentroidAggregation) => new Aggregation("geo_centroid", geoCentroidAggregation); - public static Aggregation GeoDistance(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoDistanceAggregation geoDistanceAggregation) => new Aggregation("geo_distance", geoDistanceAggregation); - public static Aggregation GeohashGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohashGridAggregation geohashGridAggregation) => new Aggregation("geohash_grid", geohashGridAggregation); - public static Aggregation GeohexGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohexGridAggregation geohexGridAggregation) => new Aggregation("geohex_grid", geohexGridAggregation); - public static Aggregation GeoLine(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation geoLineAggregation) => new Aggregation("geo_line", geoLineAggregation); - public static Aggregation GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation geotileGridAggregation) => new Aggregation("geotile_grid", geotileGridAggregation); - public static Aggregation Global(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GlobalAggregation globalAggregation) => new Aggregation("global", globalAggregation); - public static Aggregation Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation histogramAggregation) => new Aggregation("histogram", histogramAggregation); - public static Aggregation Inference(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceAggregation inferenceAggregation) => new Aggregation("inference", inferenceAggregation); - public static Aggregation IpPrefix(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpPrefixAggregation ipPrefixAggregation) => new Aggregation("ip_prefix", ipPrefixAggregation); - public static Aggregation IpRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregation ipRangeAggregation) => new Aggregation("ip_range", ipRangeAggregation); - public static Aggregation Line(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation geoLineAggregation) => new Aggregation("line", geoLineAggregation); - public static Aggregation MatrixStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MatrixStatsAggregation matrixStatsAggregation) => new Aggregation("matrix_stats", matrixStatsAggregation); - public static Aggregation Max(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxAggregation maxAggregation) => new Aggregation("max", maxAggregation); - public static Aggregation MaxBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxBucketAggregation maxBucketAggregation) => new Aggregation("max_bucket", maxBucketAggregation); - public static Aggregation MedianAbsoluteDeviation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MedianAbsoluteDeviationAggregation medianAbsoluteDeviationAggregation) => new Aggregation("median_absolute_deviation", medianAbsoluteDeviationAggregation); - public static Aggregation Min(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinAggregation minAggregation) => new Aggregation("min", minAggregation); - public static Aggregation MinBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinBucketAggregation minBucketAggregation) => new Aggregation("min_bucket", minBucketAggregation); - public static Aggregation Missing(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation missingAggregation) => new Aggregation("missing", missingAggregation); - public static Aggregation MovingFn(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingFunctionAggregation movingFunctionAggregation) => new Aggregation("moving_fn", movingFunctionAggregation); - public static Aggregation MovingPercentiles(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingPercentilesAggregation movingPercentilesAggregation) => new Aggregation("moving_percentiles", movingPercentilesAggregation); - public static Aggregation MultiTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermsAggregation multiTermsAggregation) => new Aggregation("multi_terms", multiTermsAggregation); - public static Aggregation Nested(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NestedAggregation nestedAggregation) => new Aggregation("nested", nestedAggregation); - public static Aggregation Normalize(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeAggregation normalizeAggregation) => new Aggregation("normalize", normalizeAggregation); - public static Aggregation Parent(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ParentAggregation parentAggregation) => new Aggregation("parent", parentAggregation); - public static Aggregation PercentileRanks(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentileRanksAggregation percentileRanksAggregation) => new Aggregation("percentile_ranks", percentileRanksAggregation); - public static Aggregation Percentiles(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesAggregation percentilesAggregation) => new Aggregation("percentiles", percentilesAggregation); - public static Aggregation PercentilesBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesBucketAggregation percentilesBucketAggregation) => new Aggregation("percentiles_bucket", percentilesBucketAggregation); - public static Aggregation Range(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation rangeAggregation) => new Aggregation("range", rangeAggregation); - public static Aggregation RareTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RareTermsAggregation rareTermsAggregation) => new Aggregation("rare_terms", rareTermsAggregation); - public static Aggregation Rate(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateAggregation rateAggregation) => new Aggregation("rate", rateAggregation); - public static Aggregation ReverseNested(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ReverseNestedAggregation reverseNestedAggregation) => new Aggregation("reverse_nested", reverseNestedAggregation); - public static Aggregation Sampler(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregation samplerAggregation) => new Aggregation("sampler", samplerAggregation); - public static Aggregation ScriptedMetric(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedMetricAggregation scriptedMetricAggregation) => new Aggregation("scripted_metric", scriptedMetricAggregation); - public static Aggregation SerialDiff(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SerialDifferencingAggregation serialDifferencingAggregation) => new Aggregation("serial_diff", serialDifferencingAggregation); - public static Aggregation SignificantTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTermsAggregation significantTermsAggregation) => new Aggregation("significant_terms", significantTermsAggregation); - public static Aggregation SignificantText(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTextAggregation significantTextAggregation) => new Aggregation("significant_text", significantTextAggregation); - public static Aggregation Stats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsAggregation statsAggregation) => new Aggregation("stats", statsAggregation); - public static Aggregation StatsBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsBucketAggregation statsBucketAggregation) => new Aggregation("stats_bucket", statsBucketAggregation); - public static Aggregation StringStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringStatsAggregation stringStatsAggregation) => new Aggregation("string_stats", stringStatsAggregation); - public static Aggregation Sum(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumAggregation sumAggregation) => new Aggregation("sum", sumAggregation); - public static Aggregation SumBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumBucketAggregation sumBucketAggregation) => new Aggregation("sum_bucket", sumBucketAggregation); - public static Aggregation Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => new Aggregation("terms", termsAggregation); - public static Aggregation TopHits(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopHitsAggregation topHitsAggregation) => new Aggregation("top_hits", topHitsAggregation); - public static Aggregation TopMetrics(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsAggregation topMetricsAggregation) => new Aggregation("top_metrics", topMetricsAggregation); - public static Aggregation TTest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestAggregation tTestAggregation) => new Aggregation("t_test", tTestAggregation); - public static Aggregation ValueCount(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation valueCountAggregation) => new Aggregation("value_count", valueCountAggregation); - public static Aggregation VariableWidthHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.VariableWidthHistogramAggregation variableWidthHistogramAggregation) => new Aggregation("variable_width_histogram", variableWidthHistogramAggregation); - public static Aggregation WeightedAvg(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageAggregation weightedAverageAggregation) => new Aggregation("weighted_avg", weightedAverageAggregation); - - /// - /// - /// Sub-aggregations for this aggregation. - /// Only applies to bucket aggregations. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class AggregationConverter : JsonConverter -{ - public override Aggregation 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; - IDictionary? aggregationsValue = default; - IDictionary? metaValue = 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 == "aggregations") - { - aggregationsValue = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (propertyName == "meta") - { - metaValue = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (propertyName == "adjacency_matrix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "auto_date_histogram") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "avg") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "avg_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "boxplot") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "bucket_script") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "bucket_selector") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "bucket_sort") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "cardinality") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "children") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "composite") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "cumulative_cardinality") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "cumulative_sum") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "date_histogram") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "date_range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "derivative") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "diversified_sampler") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "extended_stats") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "extended_stats_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "filter") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "filters") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "frequent_item_sets") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_bounds") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_centroid") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_distance") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geohash_grid") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geohex_grid") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_line") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geotile_grid") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "global") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "histogram") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "inference") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ip_prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ip_range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "line") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "matrix_stats") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "max") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "max_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "median_absolute_deviation") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "min") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "min_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "missing") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "moving_fn") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "moving_percentiles") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "multi_terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "nested") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "normalize") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "parent") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "percentile_ranks") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "percentiles") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "percentiles_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rare_terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rate") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "reverse_nested") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "sampler") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "scripted_metric") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "serial_diff") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "significant_terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "significant_text") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "stats") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "stats_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "string_stats") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "sum") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "sum_bucket") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "top_hits") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "top_metrics") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "t_test") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "value_count") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "variable_width_histogram") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "weighted_avg") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Aggregation' from the response."); - } - - var result = new Aggregation(variantNameValue, variantValue); - result.Aggregations = aggregationsValue; - result.Meta = metaValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, Aggregation value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.Meta is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, value.Meta, options); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "adjacency_matrix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.AdjacencyMatrixAggregation)value.Variant, options); - break; - case "auto_date_histogram": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.AutoDateHistogramAggregation)value.Variant, options); - break; - case "avg": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageAggregation)value.Variant, options); - break; - case "avg_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageBucketAggregation)value.Variant, options); - break; - case "boxplot": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.BoxplotAggregation)value.Variant, options); - break; - case "bucket_script": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketScriptAggregation)value.Variant, options); - break; - case "bucket_selector": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSelectorAggregation)value.Variant, options); - break; - case "bucket_sort": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSortAggregation)value.Variant, options); - break; - case "cardinality": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation)value.Variant, options); - break; - case "children": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChildrenAggregation)value.Variant, options); - break; - case "composite": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation)value.Variant, options); - break; - case "cumulative_cardinality": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeCardinalityAggregation)value.Variant, options); - break; - case "cumulative_sum": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeSumAggregation)value.Variant, options); - break; - case "date_histogram": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation)value.Variant, options); - break; - case "date_range": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation)value.Variant, options); - break; - case "derivative": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.DerivativeAggregation)value.Variant, options); - break; - case "diversified_sampler": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.DiversifiedSamplerAggregation)value.Variant, options); - break; - case "extended_stats": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsAggregation)value.Variant, options); - break; - case "extended_stats_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsBucketAggregation)value.Variant, options); - break; - case "filter": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query)value.Variant, options); - break; - case "filters": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.FiltersAggregation)value.Variant, options); - break; - case "frequent_item_sets": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsAggregation)value.Variant, options); - break; - case "geo_bounds": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoBoundsAggregation)value.Variant, options); - break; - case "geo_centroid": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoCentroidAggregation)value.Variant, options); - break; - case "geo_distance": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoDistanceAggregation)value.Variant, options); - break; - case "geohash_grid": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohashGridAggregation)value.Variant, options); - break; - case "geohex_grid": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohexGridAggregation)value.Variant, options); - break; - case "geo_line": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation)value.Variant, options); - break; - case "geotile_grid": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation)value.Variant, options); - break; - case "global": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GlobalAggregation)value.Variant, options); - break; - case "histogram": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation)value.Variant, options); - break; - case "inference": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceAggregation)value.Variant, options); - break; - case "ip_prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpPrefixAggregation)value.Variant, options); - break; - case "ip_range": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregation)value.Variant, options); - break; - case "line": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation)value.Variant, options); - break; - case "matrix_stats": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MatrixStatsAggregation)value.Variant, options); - break; - case "max": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxAggregation)value.Variant, options); - break; - case "max_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxBucketAggregation)value.Variant, options); - break; - case "median_absolute_deviation": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MedianAbsoluteDeviationAggregation)value.Variant, options); - break; - case "min": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinAggregation)value.Variant, options); - break; - case "min_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinBucketAggregation)value.Variant, options); - break; - case "missing": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation)value.Variant, options); - break; - case "moving_fn": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingFunctionAggregation)value.Variant, options); - break; - case "moving_percentiles": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingPercentilesAggregation)value.Variant, options); - break; - case "multi_terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermsAggregation)value.Variant, options); - break; - case "nested": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.NestedAggregation)value.Variant, options); - break; - case "normalize": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeAggregation)value.Variant, options); - break; - case "parent": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ParentAggregation)value.Variant, options); - break; - case "percentile_ranks": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentileRanksAggregation)value.Variant, options); - break; - case "percentiles": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesAggregation)value.Variant, options); - break; - case "percentiles_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesBucketAggregation)value.Variant, options); - break; - case "range": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation)value.Variant, options); - break; - case "rare_terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.RareTermsAggregation)value.Variant, options); - break; - case "rate": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateAggregation)value.Variant, options); - break; - case "reverse_nested": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ReverseNestedAggregation)value.Variant, options); - break; - case "sampler": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregation)value.Variant, options); - break; - case "scripted_metric": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedMetricAggregation)value.Variant, options); - break; - case "serial_diff": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.SerialDifferencingAggregation)value.Variant, options); - break; - case "significant_terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTermsAggregation)value.Variant, options); - break; - case "significant_text": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTextAggregation)value.Variant, options); - break; - case "stats": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsAggregation)value.Variant, options); - break; - case "stats_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsBucketAggregation)value.Variant, options); - break; - case "string_stats": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringStatsAggregation)value.Variant, options); - break; - case "sum": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumAggregation)value.Variant, options); - break; - case "sum_bucket": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumBucketAggregation)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation)value.Variant, options); - break; - case "top_hits": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopHitsAggregation)value.Variant, options); - break; - case "top_metrics": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsAggregation)value.Variant, options); - break; - case "t_test": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestAggregation)value.Variant, options); - break; - case "value_count": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation)value.Variant, options); - break; - case "variable_width_histogram": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.VariableWidthHistogramAggregation)value.Variant, options); - break; - case "weighted_avg": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageAggregation)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AggregationDescriptor : SerializableDescriptor> -{ - internal AggregationDescriptor(Action> configure) => configure.Invoke(this); - - public AggregationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private AggregationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private AggregationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private IDictionary> AggregationsValue { get; set; } - private IDictionary? MetaValue { get; set; } - - /// - /// - /// Sub-aggregations for this aggregation. - /// Only applies to bucket aggregations. - /// - /// - public AggregationDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public AggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AggregationDescriptor AdjacencyMatrix(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AdjacencyMatrixAggregation adjacencyMatrixAggregation) => Set(adjacencyMatrixAggregation, "adjacency_matrix"); - public AggregationDescriptor AdjacencyMatrix(Action> configure) => Set(configure, "adjacency_matrix"); - public AggregationDescriptor AutoDateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AutoDateHistogramAggregation autoDateHistogramAggregation) => Set(autoDateHistogramAggregation, "auto_date_histogram"); - public AggregationDescriptor AutoDateHistogram(Action> configure) => Set(configure, "auto_date_histogram"); - public AggregationDescriptor Avg(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageAggregation averageAggregation) => Set(averageAggregation, "avg"); - public AggregationDescriptor Avg(Action> configure) => Set(configure, "avg"); - public AggregationDescriptor AvgBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageBucketAggregation averageBucketAggregation) => Set(averageBucketAggregation, "avg_bucket"); - public AggregationDescriptor AvgBucket(Action configure) => Set(configure, "avg_bucket"); - public AggregationDescriptor Boxplot(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BoxplotAggregation boxplotAggregation) => Set(boxplotAggregation, "boxplot"); - public AggregationDescriptor Boxplot(Action> configure) => Set(configure, "boxplot"); - public AggregationDescriptor BucketScript(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketScriptAggregation bucketScriptAggregation) => Set(bucketScriptAggregation, "bucket_script"); - public AggregationDescriptor BucketScript(Action configure) => Set(configure, "bucket_script"); - public AggregationDescriptor BucketSelector(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSelectorAggregation bucketSelectorAggregation) => Set(bucketSelectorAggregation, "bucket_selector"); - public AggregationDescriptor BucketSelector(Action configure) => Set(configure, "bucket_selector"); - public AggregationDescriptor BucketSort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSortAggregation bucketSortAggregation) => Set(bucketSortAggregation, "bucket_sort"); - public AggregationDescriptor BucketSort(Action> configure) => Set(configure, "bucket_sort"); - public AggregationDescriptor Cardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation cardinalityAggregation) => Set(cardinalityAggregation, "cardinality"); - public AggregationDescriptor Cardinality(Action> configure) => Set(configure, "cardinality"); - public AggregationDescriptor Children(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChildrenAggregation childrenAggregation) => Set(childrenAggregation, "children"); - public AggregationDescriptor Children(Action configure) => Set(configure, "children"); - public AggregationDescriptor Composite(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation compositeAggregation) => Set(compositeAggregation, "composite"); - public AggregationDescriptor Composite(Action> configure) => Set(configure, "composite"); - public AggregationDescriptor CumulativeCardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeCardinalityAggregation cumulativeCardinalityAggregation) => Set(cumulativeCardinalityAggregation, "cumulative_cardinality"); - public AggregationDescriptor CumulativeCardinality(Action configure) => Set(configure, "cumulative_cardinality"); - public AggregationDescriptor CumulativeSum(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeSumAggregation cumulativeSumAggregation) => Set(cumulativeSumAggregation, "cumulative_sum"); - public AggregationDescriptor CumulativeSum(Action configure) => Set(configure, "cumulative_sum"); - public AggregationDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation dateHistogramAggregation) => Set(dateHistogramAggregation, "date_histogram"); - public AggregationDescriptor DateHistogram(Action> configure) => Set(configure, "date_histogram"); - public AggregationDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation dateRangeAggregation) => Set(dateRangeAggregation, "date_range"); - public AggregationDescriptor DateRange(Action> configure) => Set(configure, "date_range"); - public AggregationDescriptor Derivative(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DerivativeAggregation derivativeAggregation) => Set(derivativeAggregation, "derivative"); - public AggregationDescriptor Derivative(Action configure) => Set(configure, "derivative"); - public AggregationDescriptor DiversifiedSampler(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DiversifiedSamplerAggregation diversifiedSamplerAggregation) => Set(diversifiedSamplerAggregation, "diversified_sampler"); - public AggregationDescriptor DiversifiedSampler(Action> configure) => Set(configure, "diversified_sampler"); - public AggregationDescriptor ExtendedStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsAggregation extendedStatsAggregation) => Set(extendedStatsAggregation, "extended_stats"); - public AggregationDescriptor ExtendedStats(Action> configure) => Set(configure, "extended_stats"); - public AggregationDescriptor ExtendedStatsBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsBucketAggregation extendedStatsBucketAggregation) => Set(extendedStatsBucketAggregation, "extended_stats_bucket"); - public AggregationDescriptor ExtendedStatsBucket(Action configure) => Set(configure, "extended_stats_bucket"); - public AggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query queryContainer) => Set(queryContainer, "filter"); - public AggregationDescriptor Filter(Action> configure) => Set(configure, "filter"); - public AggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FiltersAggregation filtersAggregation) => Set(filtersAggregation, "filters"); - public AggregationDescriptor Filters(Action> configure) => Set(configure, "filters"); - public AggregationDescriptor FrequentItemSets(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsAggregation frequentItemSetsAggregation) => Set(frequentItemSetsAggregation, "frequent_item_sets"); - public AggregationDescriptor FrequentItemSets(Action> configure) => Set(configure, "frequent_item_sets"); - public AggregationDescriptor GeoBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoBoundsAggregation geoBoundsAggregation) => Set(geoBoundsAggregation, "geo_bounds"); - public AggregationDescriptor GeoBounds(Action> configure) => Set(configure, "geo_bounds"); - public AggregationDescriptor GeoCentroid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoCentroidAggregation geoCentroidAggregation) => Set(geoCentroidAggregation, "geo_centroid"); - public AggregationDescriptor GeoCentroid(Action> configure) => Set(configure, "geo_centroid"); - public AggregationDescriptor GeoDistance(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoDistanceAggregation geoDistanceAggregation) => Set(geoDistanceAggregation, "geo_distance"); - public AggregationDescriptor GeoDistance(Action> configure) => Set(configure, "geo_distance"); - public AggregationDescriptor GeohashGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohashGridAggregation geohashGridAggregation) => Set(geohashGridAggregation, "geohash_grid"); - public AggregationDescriptor GeohashGrid(Action> configure) => Set(configure, "geohash_grid"); - public AggregationDescriptor GeohexGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohexGridAggregation geohexGridAggregation) => Set(geohexGridAggregation, "geohex_grid"); - public AggregationDescriptor GeohexGrid(Action> configure) => Set(configure, "geohex_grid"); - public AggregationDescriptor GeoLine(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation geoLineAggregation) => Set(geoLineAggregation, "geo_line"); - public AggregationDescriptor GeoLine(Action> configure) => Set(configure, "geo_line"); - public AggregationDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation geotileGridAggregation) => Set(geotileGridAggregation, "geotile_grid"); - public AggregationDescriptor GeotileGrid(Action> configure) => Set(configure, "geotile_grid"); - public AggregationDescriptor Global(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GlobalAggregation globalAggregation) => Set(globalAggregation, "global"); - public AggregationDescriptor Global(Action configure) => Set(configure, "global"); - public AggregationDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation histogramAggregation) => Set(histogramAggregation, "histogram"); - public AggregationDescriptor Histogram(Action> configure) => Set(configure, "histogram"); - public AggregationDescriptor Inference(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceAggregation inferenceAggregation) => Set(inferenceAggregation, "inference"); - public AggregationDescriptor Inference(Action> configure) => Set(configure, "inference"); - public AggregationDescriptor IpPrefix(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpPrefixAggregation ipPrefixAggregation) => Set(ipPrefixAggregation, "ip_prefix"); - public AggregationDescriptor IpPrefix(Action> configure) => Set(configure, "ip_prefix"); - public AggregationDescriptor IpRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregation ipRangeAggregation) => Set(ipRangeAggregation, "ip_range"); - public AggregationDescriptor IpRange(Action> configure) => Set(configure, "ip_range"); - public AggregationDescriptor Line(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation geoLineAggregation) => Set(geoLineAggregation, "line"); - public AggregationDescriptor Line(Action> configure) => Set(configure, "line"); - public AggregationDescriptor MatrixStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MatrixStatsAggregation matrixStatsAggregation) => Set(matrixStatsAggregation, "matrix_stats"); - public AggregationDescriptor MatrixStats(Action> configure) => Set(configure, "matrix_stats"); - public AggregationDescriptor Max(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxAggregation maxAggregation) => Set(maxAggregation, "max"); - public AggregationDescriptor Max(Action> configure) => Set(configure, "max"); - public AggregationDescriptor MaxBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxBucketAggregation maxBucketAggregation) => Set(maxBucketAggregation, "max_bucket"); - public AggregationDescriptor MaxBucket(Action configure) => Set(configure, "max_bucket"); - public AggregationDescriptor MedianAbsoluteDeviation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MedianAbsoluteDeviationAggregation medianAbsoluteDeviationAggregation) => Set(medianAbsoluteDeviationAggregation, "median_absolute_deviation"); - public AggregationDescriptor MedianAbsoluteDeviation(Action> configure) => Set(configure, "median_absolute_deviation"); - public AggregationDescriptor Min(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinAggregation minAggregation) => Set(minAggregation, "min"); - public AggregationDescriptor Min(Action> configure) => Set(configure, "min"); - public AggregationDescriptor MinBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinBucketAggregation minBucketAggregation) => Set(minBucketAggregation, "min_bucket"); - public AggregationDescriptor MinBucket(Action configure) => Set(configure, "min_bucket"); - public AggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation missingAggregation) => Set(missingAggregation, "missing"); - public AggregationDescriptor Missing(Action> configure) => Set(configure, "missing"); - public AggregationDescriptor MovingFn(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingFunctionAggregation movingFunctionAggregation) => Set(movingFunctionAggregation, "moving_fn"); - public AggregationDescriptor MovingFn(Action configure) => Set(configure, "moving_fn"); - public AggregationDescriptor MovingPercentiles(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingPercentilesAggregation movingPercentilesAggregation) => Set(movingPercentilesAggregation, "moving_percentiles"); - public AggregationDescriptor MovingPercentiles(Action configure) => Set(configure, "moving_percentiles"); - public AggregationDescriptor MultiTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermsAggregation multiTermsAggregation) => Set(multiTermsAggregation, "multi_terms"); - public AggregationDescriptor MultiTerms(Action> configure) => Set(configure, "multi_terms"); - public AggregationDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NestedAggregation nestedAggregation) => Set(nestedAggregation, "nested"); - public AggregationDescriptor Nested(Action> configure) => Set(configure, "nested"); - public AggregationDescriptor Normalize(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeAggregation normalizeAggregation) => Set(normalizeAggregation, "normalize"); - public AggregationDescriptor Normalize(Action configure) => Set(configure, "normalize"); - public AggregationDescriptor Parent(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ParentAggregation parentAggregation) => Set(parentAggregation, "parent"); - public AggregationDescriptor Parent(Action configure) => Set(configure, "parent"); - public AggregationDescriptor PercentileRanks(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentileRanksAggregation percentileRanksAggregation) => Set(percentileRanksAggregation, "percentile_ranks"); - public AggregationDescriptor PercentileRanks(Action> configure) => Set(configure, "percentile_ranks"); - public AggregationDescriptor Percentiles(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesAggregation percentilesAggregation) => Set(percentilesAggregation, "percentiles"); - public AggregationDescriptor Percentiles(Action> configure) => Set(configure, "percentiles"); - public AggregationDescriptor PercentilesBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesBucketAggregation percentilesBucketAggregation) => Set(percentilesBucketAggregation, "percentiles_bucket"); - public AggregationDescriptor PercentilesBucket(Action configure) => Set(configure, "percentiles_bucket"); - public AggregationDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation rangeAggregation) => Set(rangeAggregation, "range"); - public AggregationDescriptor Range(Action> configure) => Set(configure, "range"); - public AggregationDescriptor RareTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RareTermsAggregation rareTermsAggregation) => Set(rareTermsAggregation, "rare_terms"); - public AggregationDescriptor RareTerms(Action> configure) => Set(configure, "rare_terms"); - public AggregationDescriptor Rate(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateAggregation rateAggregation) => Set(rateAggregation, "rate"); - public AggregationDescriptor Rate(Action> configure) => Set(configure, "rate"); - public AggregationDescriptor ReverseNested(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ReverseNestedAggregation reverseNestedAggregation) => Set(reverseNestedAggregation, "reverse_nested"); - public AggregationDescriptor ReverseNested(Action> configure) => Set(configure, "reverse_nested"); - public AggregationDescriptor Sampler(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregation samplerAggregation) => Set(samplerAggregation, "sampler"); - public AggregationDescriptor Sampler(Action configure) => Set(configure, "sampler"); - public AggregationDescriptor ScriptedMetric(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedMetricAggregation scriptedMetricAggregation) => Set(scriptedMetricAggregation, "scripted_metric"); - public AggregationDescriptor ScriptedMetric(Action> configure) => Set(configure, "scripted_metric"); - public AggregationDescriptor SerialDiff(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SerialDifferencingAggregation serialDifferencingAggregation) => Set(serialDifferencingAggregation, "serial_diff"); - public AggregationDescriptor SerialDiff(Action configure) => Set(configure, "serial_diff"); - public AggregationDescriptor SignificantTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTermsAggregation significantTermsAggregation) => Set(significantTermsAggregation, "significant_terms"); - public AggregationDescriptor SignificantTerms(Action> configure) => Set(configure, "significant_terms"); - public AggregationDescriptor SignificantText(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTextAggregation significantTextAggregation) => Set(significantTextAggregation, "significant_text"); - public AggregationDescriptor SignificantText(Action> configure) => Set(configure, "significant_text"); - public AggregationDescriptor Stats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsAggregation statsAggregation) => Set(statsAggregation, "stats"); - public AggregationDescriptor Stats(Action> configure) => Set(configure, "stats"); - public AggregationDescriptor StatsBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsBucketAggregation statsBucketAggregation) => Set(statsBucketAggregation, "stats_bucket"); - public AggregationDescriptor StatsBucket(Action configure) => Set(configure, "stats_bucket"); - public AggregationDescriptor StringStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringStatsAggregation stringStatsAggregation) => Set(stringStatsAggregation, "string_stats"); - public AggregationDescriptor StringStats(Action> configure) => Set(configure, "string_stats"); - public AggregationDescriptor Sum(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumAggregation sumAggregation) => Set(sumAggregation, "sum"); - public AggregationDescriptor Sum(Action> configure) => Set(configure, "sum"); - public AggregationDescriptor SumBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumBucketAggregation sumBucketAggregation) => Set(sumBucketAggregation, "sum_bucket"); - public AggregationDescriptor SumBucket(Action configure) => Set(configure, "sum_bucket"); - public AggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); - public AggregationDescriptor Terms(Action> configure) => Set(configure, "terms"); - public AggregationDescriptor TopHits(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopHitsAggregation topHitsAggregation) => Set(topHitsAggregation, "top_hits"); - public AggregationDescriptor TopHits(Action> configure) => Set(configure, "top_hits"); - public AggregationDescriptor TopMetrics(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsAggregation topMetricsAggregation) => Set(topMetricsAggregation, "top_metrics"); - public AggregationDescriptor TopMetrics(Action> configure) => Set(configure, "top_metrics"); - public AggregationDescriptor TTest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestAggregation tTestAggregation) => Set(tTestAggregation, "t_test"); - public AggregationDescriptor TTest(Action> configure) => Set(configure, "t_test"); - public AggregationDescriptor ValueCount(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation valueCountAggregation) => Set(valueCountAggregation, "value_count"); - public AggregationDescriptor ValueCount(Action> configure) => Set(configure, "value_count"); - public AggregationDescriptor VariableWidthHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.VariableWidthHistogramAggregation variableWidthHistogramAggregation) => Set(variableWidthHistogramAggregation, "variable_width_histogram"); - public AggregationDescriptor VariableWidthHistogram(Action> configure) => Set(configure, "variable_width_histogram"); - public AggregationDescriptor WeightedAvg(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageAggregation weightedAverageAggregation) => Set(weightedAverageAggregation, "weighted_avg"); - public AggregationDescriptor WeightedAvg(Action> configure) => Set(configure, "weighted_avg"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AggregationDescriptor : SerializableDescriptor -{ - internal AggregationDescriptor(Action configure) => configure.Invoke(this); - - public AggregationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private AggregationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private AggregationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private IDictionary AggregationsValue { get; set; } - private IDictionary? MetaValue { get; set; } - - /// - /// - /// Sub-aggregations for this aggregation. - /// Only applies to bucket aggregations. - /// - /// - public AggregationDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public AggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AggregationDescriptor AdjacencyMatrix(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AdjacencyMatrixAggregation adjacencyMatrixAggregation) => Set(adjacencyMatrixAggregation, "adjacency_matrix"); - public AggregationDescriptor AdjacencyMatrix(Action configure) => Set(configure, "adjacency_matrix"); - public AggregationDescriptor AutoDateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AutoDateHistogramAggregation autoDateHistogramAggregation) => Set(autoDateHistogramAggregation, "auto_date_histogram"); - public AggregationDescriptor AutoDateHistogram(Action configure) => Set(configure, "auto_date_histogram"); - public AggregationDescriptor Avg(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageAggregation averageAggregation) => Set(averageAggregation, "avg"); - public AggregationDescriptor Avg(Action configure) => Set(configure, "avg"); - public AggregationDescriptor AvgBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AverageBucketAggregation averageBucketAggregation) => Set(averageBucketAggregation, "avg_bucket"); - public AggregationDescriptor AvgBucket(Action configure) => Set(configure, "avg_bucket"); - public AggregationDescriptor Boxplot(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BoxplotAggregation boxplotAggregation) => Set(boxplotAggregation, "boxplot"); - public AggregationDescriptor Boxplot(Action configure) => Set(configure, "boxplot"); - public AggregationDescriptor BucketScript(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketScriptAggregation bucketScriptAggregation) => Set(bucketScriptAggregation, "bucket_script"); - public AggregationDescriptor BucketScript(Action configure) => Set(configure, "bucket_script"); - public AggregationDescriptor BucketSelector(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSelectorAggregation bucketSelectorAggregation) => Set(bucketSelectorAggregation, "bucket_selector"); - public AggregationDescriptor BucketSelector(Action configure) => Set(configure, "bucket_selector"); - public AggregationDescriptor BucketSort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketSortAggregation bucketSortAggregation) => Set(bucketSortAggregation, "bucket_sort"); - public AggregationDescriptor BucketSort(Action configure) => Set(configure, "bucket_sort"); - public AggregationDescriptor Cardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation cardinalityAggregation) => Set(cardinalityAggregation, "cardinality"); - public AggregationDescriptor Cardinality(Action configure) => Set(configure, "cardinality"); - public AggregationDescriptor Children(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChildrenAggregation childrenAggregation) => Set(childrenAggregation, "children"); - public AggregationDescriptor Children(Action configure) => Set(configure, "children"); - public AggregationDescriptor Composite(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation compositeAggregation) => Set(compositeAggregation, "composite"); - public AggregationDescriptor Composite(Action configure) => Set(configure, "composite"); - public AggregationDescriptor CumulativeCardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeCardinalityAggregation cumulativeCardinalityAggregation) => Set(cumulativeCardinalityAggregation, "cumulative_cardinality"); - public AggregationDescriptor CumulativeCardinality(Action configure) => Set(configure, "cumulative_cardinality"); - public AggregationDescriptor CumulativeSum(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CumulativeSumAggregation cumulativeSumAggregation) => Set(cumulativeSumAggregation, "cumulative_sum"); - public AggregationDescriptor CumulativeSum(Action configure) => Set(configure, "cumulative_sum"); - public AggregationDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation dateHistogramAggregation) => Set(dateHistogramAggregation, "date_histogram"); - public AggregationDescriptor DateHistogram(Action configure) => Set(configure, "date_histogram"); - public AggregationDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation dateRangeAggregation) => Set(dateRangeAggregation, "date_range"); - public AggregationDescriptor DateRange(Action configure) => Set(configure, "date_range"); - public AggregationDescriptor Derivative(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DerivativeAggregation derivativeAggregation) => Set(derivativeAggregation, "derivative"); - public AggregationDescriptor Derivative(Action configure) => Set(configure, "derivative"); - public AggregationDescriptor DiversifiedSampler(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DiversifiedSamplerAggregation diversifiedSamplerAggregation) => Set(diversifiedSamplerAggregation, "diversified_sampler"); - public AggregationDescriptor DiversifiedSampler(Action configure) => Set(configure, "diversified_sampler"); - public AggregationDescriptor ExtendedStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsAggregation extendedStatsAggregation) => Set(extendedStatsAggregation, "extended_stats"); - public AggregationDescriptor ExtendedStats(Action configure) => Set(configure, "extended_stats"); - public AggregationDescriptor ExtendedStatsBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedStatsBucketAggregation extendedStatsBucketAggregation) => Set(extendedStatsBucketAggregation, "extended_stats_bucket"); - public AggregationDescriptor ExtendedStatsBucket(Action configure) => Set(configure, "extended_stats_bucket"); - public AggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query queryContainer) => Set(queryContainer, "filter"); - public AggregationDescriptor Filter(Action configure) => Set(configure, "filter"); - public AggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FiltersAggregation filtersAggregation) => Set(filtersAggregation, "filters"); - public AggregationDescriptor Filters(Action configure) => Set(configure, "filters"); - public AggregationDescriptor FrequentItemSets(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsAggregation frequentItemSetsAggregation) => Set(frequentItemSetsAggregation, "frequent_item_sets"); - public AggregationDescriptor FrequentItemSets(Action configure) => Set(configure, "frequent_item_sets"); - public AggregationDescriptor GeoBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoBoundsAggregation geoBoundsAggregation) => Set(geoBoundsAggregation, "geo_bounds"); - public AggregationDescriptor GeoBounds(Action configure) => Set(configure, "geo_bounds"); - public AggregationDescriptor GeoCentroid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoCentroidAggregation geoCentroidAggregation) => Set(geoCentroidAggregation, "geo_centroid"); - public AggregationDescriptor GeoCentroid(Action configure) => Set(configure, "geo_centroid"); - public AggregationDescriptor GeoDistance(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoDistanceAggregation geoDistanceAggregation) => Set(geoDistanceAggregation, "geo_distance"); - public AggregationDescriptor GeoDistance(Action configure) => Set(configure, "geo_distance"); - public AggregationDescriptor GeohashGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohashGridAggregation geohashGridAggregation) => Set(geohashGridAggregation, "geohash_grid"); - public AggregationDescriptor GeohashGrid(Action configure) => Set(configure, "geohash_grid"); - public AggregationDescriptor GeohexGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeohexGridAggregation geohexGridAggregation) => Set(geohexGridAggregation, "geohex_grid"); - public AggregationDescriptor GeohexGrid(Action configure) => Set(configure, "geohex_grid"); - public AggregationDescriptor GeoLine(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation geoLineAggregation) => Set(geoLineAggregation, "geo_line"); - public AggregationDescriptor GeoLine(Action configure) => Set(configure, "geo_line"); - public AggregationDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation geotileGridAggregation) => Set(geotileGridAggregation, "geotile_grid"); - public AggregationDescriptor GeotileGrid(Action configure) => Set(configure, "geotile_grid"); - public AggregationDescriptor Global(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GlobalAggregation globalAggregation) => Set(globalAggregation, "global"); - public AggregationDescriptor Global(Action configure) => Set(configure, "global"); - public AggregationDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation histogramAggregation) => Set(histogramAggregation, "histogram"); - public AggregationDescriptor Histogram(Action configure) => Set(configure, "histogram"); - public AggregationDescriptor Inference(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceAggregation inferenceAggregation) => Set(inferenceAggregation, "inference"); - public AggregationDescriptor Inference(Action configure) => Set(configure, "inference"); - public AggregationDescriptor IpPrefix(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpPrefixAggregation ipPrefixAggregation) => Set(ipPrefixAggregation, "ip_prefix"); - public AggregationDescriptor IpPrefix(Action configure) => Set(configure, "ip_prefix"); - public AggregationDescriptor IpRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregation ipRangeAggregation) => Set(ipRangeAggregation, "ip_range"); - public AggregationDescriptor IpRange(Action configure) => Set(configure, "ip_range"); - public AggregationDescriptor Line(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineAggregation geoLineAggregation) => Set(geoLineAggregation, "line"); - public AggregationDescriptor Line(Action configure) => Set(configure, "line"); - public AggregationDescriptor MatrixStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MatrixStatsAggregation matrixStatsAggregation) => Set(matrixStatsAggregation, "matrix_stats"); - public AggregationDescriptor MatrixStats(Action configure) => Set(configure, "matrix_stats"); - public AggregationDescriptor Max(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxAggregation maxAggregation) => Set(maxAggregation, "max"); - public AggregationDescriptor Max(Action configure) => Set(configure, "max"); - public AggregationDescriptor MaxBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MaxBucketAggregation maxBucketAggregation) => Set(maxBucketAggregation, "max_bucket"); - public AggregationDescriptor MaxBucket(Action configure) => Set(configure, "max_bucket"); - public AggregationDescriptor MedianAbsoluteDeviation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MedianAbsoluteDeviationAggregation medianAbsoluteDeviationAggregation) => Set(medianAbsoluteDeviationAggregation, "median_absolute_deviation"); - public AggregationDescriptor MedianAbsoluteDeviation(Action configure) => Set(configure, "median_absolute_deviation"); - public AggregationDescriptor Min(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinAggregation minAggregation) => Set(minAggregation, "min"); - public AggregationDescriptor Min(Action configure) => Set(configure, "min"); - public AggregationDescriptor MinBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinBucketAggregation minBucketAggregation) => Set(minBucketAggregation, "min_bucket"); - public AggregationDescriptor MinBucket(Action configure) => Set(configure, "min_bucket"); - public AggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation missingAggregation) => Set(missingAggregation, "missing"); - public AggregationDescriptor Missing(Action configure) => Set(configure, "missing"); - public AggregationDescriptor MovingFn(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingFunctionAggregation movingFunctionAggregation) => Set(movingFunctionAggregation, "moving_fn"); - public AggregationDescriptor MovingFn(Action configure) => Set(configure, "moving_fn"); - public AggregationDescriptor MovingPercentiles(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MovingPercentilesAggregation movingPercentilesAggregation) => Set(movingPercentilesAggregation, "moving_percentiles"); - public AggregationDescriptor MovingPercentiles(Action configure) => Set(configure, "moving_percentiles"); - public AggregationDescriptor MultiTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermsAggregation multiTermsAggregation) => Set(multiTermsAggregation, "multi_terms"); - public AggregationDescriptor MultiTerms(Action configure) => Set(configure, "multi_terms"); - public AggregationDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NestedAggregation nestedAggregation) => Set(nestedAggregation, "nested"); - public AggregationDescriptor Nested(Action configure) => Set(configure, "nested"); - public AggregationDescriptor Normalize(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeAggregation normalizeAggregation) => Set(normalizeAggregation, "normalize"); - public AggregationDescriptor Normalize(Action configure) => Set(configure, "normalize"); - public AggregationDescriptor Parent(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ParentAggregation parentAggregation) => Set(parentAggregation, "parent"); - public AggregationDescriptor Parent(Action configure) => Set(configure, "parent"); - public AggregationDescriptor PercentileRanks(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentileRanksAggregation percentileRanksAggregation) => Set(percentileRanksAggregation, "percentile_ranks"); - public AggregationDescriptor PercentileRanks(Action configure) => Set(configure, "percentile_ranks"); - public AggregationDescriptor Percentiles(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesAggregation percentilesAggregation) => Set(percentilesAggregation, "percentiles"); - public AggregationDescriptor Percentiles(Action configure) => Set(configure, "percentiles"); - public AggregationDescriptor PercentilesBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentilesBucketAggregation percentilesBucketAggregation) => Set(percentilesBucketAggregation, "percentiles_bucket"); - public AggregationDescriptor PercentilesBucket(Action configure) => Set(configure, "percentiles_bucket"); - public AggregationDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation rangeAggregation) => Set(rangeAggregation, "range"); - public AggregationDescriptor Range(Action configure) => Set(configure, "range"); - public AggregationDescriptor RareTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RareTermsAggregation rareTermsAggregation) => Set(rareTermsAggregation, "rare_terms"); - public AggregationDescriptor RareTerms(Action configure) => Set(configure, "rare_terms"); - public AggregationDescriptor Rate(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateAggregation rateAggregation) => Set(rateAggregation, "rate"); - public AggregationDescriptor Rate(Action configure) => Set(configure, "rate"); - public AggregationDescriptor ReverseNested(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ReverseNestedAggregation reverseNestedAggregation) => Set(reverseNestedAggregation, "reverse_nested"); - public AggregationDescriptor ReverseNested(Action configure) => Set(configure, "reverse_nested"); - public AggregationDescriptor Sampler(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregation samplerAggregation) => Set(samplerAggregation, "sampler"); - public AggregationDescriptor Sampler(Action configure) => Set(configure, "sampler"); - public AggregationDescriptor ScriptedMetric(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedMetricAggregation scriptedMetricAggregation) => Set(scriptedMetricAggregation, "scripted_metric"); - public AggregationDescriptor ScriptedMetric(Action configure) => Set(configure, "scripted_metric"); - public AggregationDescriptor SerialDiff(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SerialDifferencingAggregation serialDifferencingAggregation) => Set(serialDifferencingAggregation, "serial_diff"); - public AggregationDescriptor SerialDiff(Action configure) => Set(configure, "serial_diff"); - public AggregationDescriptor SignificantTerms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTermsAggregation significantTermsAggregation) => Set(significantTermsAggregation, "significant_terms"); - public AggregationDescriptor SignificantTerms(Action configure) => Set(configure, "significant_terms"); - public AggregationDescriptor SignificantText(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SignificantTextAggregation significantTextAggregation) => Set(significantTextAggregation, "significant_text"); - public AggregationDescriptor SignificantText(Action configure) => Set(configure, "significant_text"); - public AggregationDescriptor Stats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsAggregation statsAggregation) => Set(statsAggregation, "stats"); - public AggregationDescriptor Stats(Action configure) => Set(configure, "stats"); - public AggregationDescriptor StatsBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StatsBucketAggregation statsBucketAggregation) => Set(statsBucketAggregation, "stats_bucket"); - public AggregationDescriptor StatsBucket(Action configure) => Set(configure, "stats_bucket"); - public AggregationDescriptor StringStats(Elastic.Clients.Elasticsearch.Serverless.Aggregations.StringStatsAggregation stringStatsAggregation) => Set(stringStatsAggregation, "string_stats"); - public AggregationDescriptor StringStats(Action configure) => Set(configure, "string_stats"); - public AggregationDescriptor Sum(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumAggregation sumAggregation) => Set(sumAggregation, "sum"); - public AggregationDescriptor Sum(Action configure) => Set(configure, "sum"); - public AggregationDescriptor SumBucket(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SumBucketAggregation sumBucketAggregation) => Set(sumBucketAggregation, "sum_bucket"); - public AggregationDescriptor SumBucket(Action configure) => Set(configure, "sum_bucket"); - public AggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); - public AggregationDescriptor Terms(Action configure) => Set(configure, "terms"); - public AggregationDescriptor TopHits(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopHitsAggregation topHitsAggregation) => Set(topHitsAggregation, "top_hits"); - public AggregationDescriptor TopHits(Action configure) => Set(configure, "top_hits"); - public AggregationDescriptor TopMetrics(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsAggregation topMetricsAggregation) => Set(topMetricsAggregation, "top_metrics"); - public AggregationDescriptor TopMetrics(Action configure) => Set(configure, "top_metrics"); - public AggregationDescriptor TTest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestAggregation tTestAggregation) => Set(tTestAggregation, "t_test"); - public AggregationDescriptor TTest(Action configure) => Set(configure, "t_test"); - public AggregationDescriptor ValueCount(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation valueCountAggregation) => Set(valueCountAggregation, "value_count"); - public AggregationDescriptor ValueCount(Action configure) => Set(configure, "value_count"); - public AggregationDescriptor VariableWidthHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.VariableWidthHistogramAggregation variableWidthHistogramAggregation) => Set(variableWidthHistogramAggregation, "variable_width_histogram"); - public AggregationDescriptor VariableWidthHistogram(Action configure) => Set(configure, "variable_width_histogram"); - public AggregationDescriptor WeightedAvg(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageAggregation weightedAverageAggregation) => Set(weightedAverageAggregation, "weighted_avg"); - public AggregationDescriptor WeightedAvg(Action configure) => Set(configure, "weighted_avg"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregationRange.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregationRange.g.cs deleted file mode 100644 index 34c3c4015eb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AggregationRange.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AggregationRange -{ - /// - /// - /// Start of the range (inclusive). - /// - /// - [JsonInclude, JsonPropertyName("from")] - public double? From { get; set; } - - /// - /// - /// Custom key to return the range with. - /// - /// - [JsonInclude, JsonPropertyName("key")] - public string? Key { get; set; } - - /// - /// - /// End of the range (exclusive). - /// - /// - [JsonInclude, JsonPropertyName("to")] - public double? To { get; set; } -} - -public sealed partial class AggregationRangeDescriptor : SerializableDescriptor -{ - internal AggregationRangeDescriptor(Action configure) => configure.Invoke(this); - - public AggregationRangeDescriptor() : base() - { - } - - private double? FromValue { get; set; } - private string? KeyValue { get; set; } - private double? ToValue { get; set; } - - /// - /// - /// Start of the range (inclusive). - /// - /// - public AggregationRangeDescriptor From(double? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Custom key to return the range with. - /// - /// - public AggregationRangeDescriptor Key(string? key) - { - KeyValue = key; - return Self; - } - - /// - /// - /// End of the range (exclusive). - /// - /// - public AggregationRangeDescriptor To(double? to) - { - ToValue = to; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (!string.IsNullOrEmpty(KeyValue)) - { - writer.WritePropertyName("key"); - writer.WriteStringValue(KeyValue); - } - - if (ToValue.HasValue) - { - writer.WritePropertyName("to"); - writer.WriteNumberValue(ToValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs deleted file mode 100644 index b6a82927a11..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ArrayPercentilesItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ArrayPercentilesItem -{ - [JsonInclude, JsonPropertyName("key")] - public string Key { get; init; } - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.cs deleted file mode 100644 index 7e74900acda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AutoDateHistogramAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("interval")] - public string Interval { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs deleted file mode 100644 index a2f98a53ca0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs +++ /dev/null @@ -1,542 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AutoDateHistogramAggregation -{ - /// - /// - /// The target number of buckets. - /// - /// - [JsonInclude, JsonPropertyName("buckets")] - public int? Buckets { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The date format used to format key_as_string in the response. - /// If no format is specified, the first date format specified in the field mapping is used. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The minimum rounding interval. - /// This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than minimum_interval. - /// - /// - [JsonInclude, JsonPropertyName("minimum_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? MinimumInterval { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public DateTimeOffset? Missing { get; set; } - - /// - /// - /// Time zone specified as a ISO 8601 UTC offset. - /// - /// - [JsonInclude, JsonPropertyName("offset")] - public string? Offset { get; set; } - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Time zone ID. - /// - /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(AutoDateHistogramAggregation autoDateHistogramAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.AutoDateHistogram(autoDateHistogramAggregation); -} - -public sealed partial class AutoDateHistogramAggregationDescriptor : SerializableDescriptor> -{ - internal AutoDateHistogramAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public AutoDateHistogramAggregationDescriptor() : base() - { - } - - private int? BucketsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } - private DateTimeOffset? MissingValue { get; set; } - private string? OffsetValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// The target number of buckets. - /// - /// - public AutoDateHistogramAggregationDescriptor Buckets(int? buckets) - { - BucketsValue = buckets; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AutoDateHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AutoDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AutoDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date format used to format key_as_string in the response. - /// If no format is specified, the first date format specified in the field mapping is used. - /// - /// - public AutoDateHistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The minimum rounding interval. - /// This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than minimum_interval. - /// - /// - public AutoDateHistogramAggregationDescriptor MinimumInterval(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? minimumInterval) - { - MinimumIntervalValue = minimumInterval; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public AutoDateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Time zone specified as a ISO 8601 UTC offset. - /// - /// - public AutoDateHistogramAggregationDescriptor Offset(string? offset) - { - OffsetValue = offset; - return Self; - } - - public AutoDateHistogramAggregationDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AutoDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public AutoDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public AutoDateHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Time zone ID. - /// - /// - public AutoDateHistogramAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsValue.HasValue) - { - writer.WritePropertyName("buckets"); - writer.WriteNumberValue(BucketsValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MinimumIntervalValue is not null) - { - writer.WritePropertyName("minimum_interval"); - JsonSerializer.Serialize(writer, MinimumIntervalValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (!string.IsNullOrEmpty(OffsetValue)) - { - writer.WritePropertyName("offset"); - writer.WriteStringValue(OffsetValue); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AutoDateHistogramAggregationDescriptor : SerializableDescriptor -{ - internal AutoDateHistogramAggregationDescriptor(Action configure) => configure.Invoke(this); - - public AutoDateHistogramAggregationDescriptor() : base() - { - } - - private int? BucketsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } - private DateTimeOffset? MissingValue { get; set; } - private string? OffsetValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// The target number of buckets. - /// - /// - public AutoDateHistogramAggregationDescriptor Buckets(int? buckets) - { - BucketsValue = buckets; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AutoDateHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AutoDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AutoDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date format used to format key_as_string in the response. - /// If no format is specified, the first date format specified in the field mapping is used. - /// - /// - public AutoDateHistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The minimum rounding interval. - /// This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than minimum_interval. - /// - /// - public AutoDateHistogramAggregationDescriptor MinimumInterval(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? minimumInterval) - { - MinimumIntervalValue = minimumInterval; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public AutoDateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Time zone specified as a ISO 8601 UTC offset. - /// - /// - public AutoDateHistogramAggregationDescriptor Offset(string? offset) - { - OffsetValue = offset; - return Self; - } - - public AutoDateHistogramAggregationDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AutoDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public AutoDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public AutoDateHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Time zone ID. - /// - /// - public AutoDateHistogramAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsValue.HasValue) - { - writer.WritePropertyName("buckets"); - writer.WriteNumberValue(BucketsValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MinimumIntervalValue is not null) - { - writer.WritePropertyName("minimum_interval"); - JsonSerializer.Serialize(writer, MinimumIntervalValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (!string.IsNullOrEmpty(OffsetValue)) - { - writer.WritePropertyName("offset"); - writer.WriteStringValue(OffsetValue); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregate.g.cs deleted file mode 100644 index c583ff496b8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AverageAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregation.g.cs deleted file mode 100644 index 8bb99fed5ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageAggregation.g.cs +++ /dev/null @@ -1,316 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AverageAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(AverageAggregation averageAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Avg(averageAggregation); -} - -public sealed partial class AverageAggregationDescriptor : SerializableDescriptor> -{ - internal AverageAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public AverageAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AverageAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AverageAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AverageAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public AverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public AverageAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public AverageAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public AverageAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public AverageAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AverageAggregationDescriptor : SerializableDescriptor -{ - internal AverageAggregationDescriptor(Action configure) => configure.Invoke(this); - - public AverageAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AverageAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AverageAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public AverageAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public AverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public AverageAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public AverageAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public AverageAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public AverageAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs deleted file mode 100644 index 09fce4611a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class AverageBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(AverageBucketAggregation averageBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.AvgBucket(averageBucketAggregation); -} - -public sealed partial class AverageBucketAggregationDescriptor : SerializableDescriptor -{ - internal AverageBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public AverageBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public AverageBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public AverageBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public AverageBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregate.g.cs deleted file mode 100644 index 2be67ea4c19..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class BoxplotAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("lower")] - public double Lower { get; init; } - [JsonInclude, JsonPropertyName("lower_as_string")] - public string? LowerAsString { get; init; } - [JsonInclude, JsonPropertyName("max")] - public double Max { get; init; } - [JsonInclude, JsonPropertyName("max_as_string")] - public string? MaxAsString { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("min")] - public double Min { get; init; } - [JsonInclude, JsonPropertyName("min_as_string")] - public string? MinAsString { get; init; } - [JsonInclude, JsonPropertyName("q1")] - public double Q1 { get; init; } - [JsonInclude, JsonPropertyName("q1_as_string")] - public string? Q1AsString { get; init; } - [JsonInclude, JsonPropertyName("q2")] - public double Q2 { get; init; } - [JsonInclude, JsonPropertyName("q2_as_string")] - public string? Q2AsString { get; init; } - [JsonInclude, JsonPropertyName("q3")] - public double Q3 { get; init; } - [JsonInclude, JsonPropertyName("q3_as_string")] - public string? Q3AsString { get; init; } - [JsonInclude, JsonPropertyName("upper")] - public double Upper { get; init; } - [JsonInclude, JsonPropertyName("upper_as_string")] - public string? UpperAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregation.g.cs deleted file mode 100644 index 3b6483459f7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BoxplotAggregation.g.cs +++ /dev/null @@ -1,332 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class BoxplotAggregation -{ - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - [JsonInclude, JsonPropertyName("compression")] - public double? Compression { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(BoxplotAggregation boxplotAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Boxplot(boxplotAggregation); -} - -public sealed partial class BoxplotAggregationDescriptor : SerializableDescriptor> -{ - internal BoxplotAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public BoxplotAggregationDescriptor() : base() - { - } - - private double? CompressionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - public BoxplotAggregationDescriptor Compression(double? compression) - { - CompressionValue = compression; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public BoxplotAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public BoxplotAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public BoxplotAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public BoxplotAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public BoxplotAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public BoxplotAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public BoxplotAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CompressionValue.HasValue) - { - writer.WritePropertyName("compression"); - writer.WriteNumberValue(CompressionValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class BoxplotAggregationDescriptor : SerializableDescriptor -{ - internal BoxplotAggregationDescriptor(Action configure) => configure.Invoke(this); - - public BoxplotAggregationDescriptor() : base() - { - } - - private double? CompressionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - public BoxplotAggregationDescriptor Compression(double? compression) - { - CompressionValue = compression; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public BoxplotAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public BoxplotAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public BoxplotAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public BoxplotAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public BoxplotAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public BoxplotAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public BoxplotAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CompressionValue.HasValue) - { - writer.WritePropertyName("compression"); - writer.WriteNumberValue(CompressionValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs deleted file mode 100644 index 4929e00d636..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class BucketMetricValueAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("keys")] - public IReadOnlyCollection Keys { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs deleted file mode 100644 index 46a0e964fef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs +++ /dev/null @@ -1,185 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class BucketScriptAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The script to run for this aggregation. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(BucketScriptAggregation bucketScriptAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.BucketScript(bucketScriptAggregation); -} - -public sealed partial class BucketScriptAggregationDescriptor : SerializableDescriptor -{ - internal BucketScriptAggregationDescriptor(Action configure) => configure.Invoke(this); - - public BucketScriptAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public BucketScriptAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public BucketScriptAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public BucketScriptAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The script to run for this aggregation. - /// - /// - public BucketScriptAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public BucketScriptAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public BucketScriptAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs deleted file mode 100644 index debc2ea2a74..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs +++ /dev/null @@ -1,185 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class BucketSelectorAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The script to run for this aggregation. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(BucketSelectorAggregation bucketSelectorAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.BucketSelector(bucketSelectorAggregation); -} - -public sealed partial class BucketSelectorAggregationDescriptor : SerializableDescriptor -{ - internal BucketSelectorAggregationDescriptor(Action configure) => configure.Invoke(this); - - public BucketSelectorAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public BucketSelectorAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public BucketSelectorAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public BucketSelectorAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The script to run for this aggregation. - /// - /// - public BucketSelectorAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public BucketSelectorAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public BucketSelectorAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs deleted file mode 100644 index 93e5a1a5b67..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ /dev/null @@ -1,357 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class BucketSortAggregation -{ - /// - /// - /// Buckets in positions prior to from will be truncated. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// The policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The number of buckets to return. - /// Defaults to all buckets of the parent aggregation. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The list of fields to sort on. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(BucketSortAggregation bucketSortAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.BucketSort(bucketSortAggregation); -} - -public sealed partial class BucketSortAggregationDescriptor : SerializableDescriptor> -{ - internal BucketSortAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public BucketSortAggregationDescriptor() : base() - { - } - - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - - /// - /// - /// Buckets in positions prior to from will be truncated. - /// - /// - public BucketSortAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// The policy to apply when gaps are found in the data. - /// - /// - public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The number of buckets to return. - /// Defaults to all buckets of the parent aggregation. - /// - /// - public BucketSortAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The list of fields to sort on. - /// - /// - public BucketSortAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public BucketSortAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public BucketSortAggregationDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public BucketSortAggregationDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class BucketSortAggregationDescriptor : SerializableDescriptor -{ - internal BucketSortAggregationDescriptor(Action configure) => configure.Invoke(this); - - public BucketSortAggregationDescriptor() : base() - { - } - - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - - /// - /// - /// Buckets in positions prior to from will be truncated. - /// - /// - public BucketSortAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// The policy to apply when gaps are found in the data. - /// - /// - public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The number of buckets to return. - /// Defaults to all buckets of the parent aggregation. - /// - /// - public BucketSortAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The list of fields to sort on. - /// - /// - public BucketSortAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public BucketSortAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public BucketSortAggregationDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public BucketSortAggregationDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Buckets.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Buckets.g.cs deleted file mode 100644 index 8bc046aac83..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Buckets.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for -/// the different buckets, the result is a dictionary. -/// -/// -public sealed partial class Buckets : Union, IReadOnlyCollection> -{ - public Buckets(IReadOnlyDictionary Keyed) : base(Keyed) - { - } - - public Buckets(IReadOnlyCollection Array) : base(Array) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregate.g.cs deleted file mode 100644 index f6c9cc9a95a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CardinalityAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("value")] - public long Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregation.g.cs deleted file mode 100644 index 4197e991736..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CardinalityAggregation.g.cs +++ /dev/null @@ -1,408 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CardinalityAggregation -{ - /// - /// - /// Mechanism by which cardinality aggregations is run. - /// - /// - [JsonInclude, JsonPropertyName("execution_hint")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityExecutionMode? ExecutionHint { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - /// - /// - /// A unique count below which counts are expected to be close to accurate. - /// This allows to trade memory for accuracy. - /// - /// - [JsonInclude, JsonPropertyName("precision_threshold")] - public int? PrecisionThreshold { get; set; } - [JsonInclude, JsonPropertyName("rehash")] - public bool? Rehash { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(CardinalityAggregation cardinalityAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Cardinality(cardinalityAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(CardinalityAggregation cardinalityAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.Cardinality(cardinalityAggregation); -} - -public sealed partial class CardinalityAggregationDescriptor : SerializableDescriptor> -{ - internal CardinalityAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public CardinalityAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityExecutionMode? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private int? PrecisionThresholdValue { get; set; } - private bool? RehashValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Mechanism by which cardinality aggregations is run. - /// - /// - public CardinalityAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityExecutionMode? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public CardinalityAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public CardinalityAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public CardinalityAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public CardinalityAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// A unique count below which counts are expected to be close to accurate. - /// This allows to trade memory for accuracy. - /// - /// - public CardinalityAggregationDescriptor PrecisionThreshold(int? precisionThreshold) - { - PrecisionThresholdValue = precisionThreshold; - return Self; - } - - public CardinalityAggregationDescriptor Rehash(bool? rehash = true) - { - RehashValue = rehash; - return Self; - } - - public CardinalityAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CardinalityAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CardinalityAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (PrecisionThresholdValue.HasValue) - { - writer.WritePropertyName("precision_threshold"); - writer.WriteNumberValue(PrecisionThresholdValue.Value); - } - - if (RehashValue.HasValue) - { - writer.WritePropertyName("rehash"); - writer.WriteBooleanValue(RehashValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CardinalityAggregationDescriptor : SerializableDescriptor -{ - internal CardinalityAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CardinalityAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityExecutionMode? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private int? PrecisionThresholdValue { get; set; } - private bool? RehashValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Mechanism by which cardinality aggregations is run. - /// - /// - public CardinalityAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityExecutionMode? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public CardinalityAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public CardinalityAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public CardinalityAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public CardinalityAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// A unique count below which counts are expected to be close to accurate. - /// This allows to trade memory for accuracy. - /// - /// - public CardinalityAggregationDescriptor PrecisionThreshold(int? precisionThreshold) - { - PrecisionThresholdValue = precisionThreshold; - return Self; - } - - public CardinalityAggregationDescriptor Rehash(bool? rehash = true) - { - RehashValue = rehash; - return Self; - } - - public CardinalityAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CardinalityAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CardinalityAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (PrecisionThresholdValue.HasValue) - { - writer.WritePropertyName("precision_threshold"); - writer.WriteNumberValue(PrecisionThresholdValue.Value); - } - - if (RehashValue.HasValue) - { - writer.WritePropertyName("rehash"); - writer.WriteBooleanValue(RehashValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs deleted file mode 100644 index c1a258dbf75..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ChiSquareHeuristic -{ - /// - /// - /// Set to false if you defined a custom background filter that represents a different set of documents that you want to compare to. - /// - /// - [JsonInclude, JsonPropertyName("background_is_superset")] - public bool BackgroundIsSuperset { get; set; } - - /// - /// - /// Set to false to filter out the terms that appear less often in the subset than in documents outside the subset. - /// - /// - [JsonInclude, JsonPropertyName("include_negatives")] - public bool IncludeNegatives { get; set; } -} - -public sealed partial class ChiSquareHeuristicDescriptor : SerializableDescriptor -{ - internal ChiSquareHeuristicDescriptor(Action configure) => configure.Invoke(this); - - public ChiSquareHeuristicDescriptor() : base() - { - } - - private bool BackgroundIsSupersetValue { get; set; } - private bool IncludeNegativesValue { get; set; } - - /// - /// - /// Set to false if you defined a custom background filter that represents a different set of documents that you want to compare to. - /// - /// - public ChiSquareHeuristicDescriptor BackgroundIsSuperset(bool backgroundIsSuperset = true) - { - BackgroundIsSupersetValue = backgroundIsSuperset; - return Self; - } - - /// - /// - /// Set to false to filter out the terms that appear less often in the subset than in documents outside the subset. - /// - /// - public ChiSquareHeuristicDescriptor IncludeNegatives(bool includeNegatives = true) - { - IncludeNegativesValue = includeNegatives; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("background_is_superset"); - writer.WriteBooleanValue(BackgroundIsSupersetValue); - writer.WritePropertyName("include_negatives"); - writer.WriteBooleanValue(IncludeNegativesValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregate.g.cs deleted file mode 100644 index cb007f3ba2d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class ChildrenAggregateConverter : JsonConverter -{ - public override ChildrenAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new ChildrenAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, ChildrenAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'ChildrenAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(ChildrenAggregateConverter))] -public sealed partial class ChildrenAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs deleted file mode 100644 index 22c79891b3c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ChildrenAggregation -{ - /// - /// - /// The child type that should be selected. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string? Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ChildrenAggregation childrenAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Children(childrenAggregation); -} - -public sealed partial class ChildrenAggregationDescriptor : SerializableDescriptor -{ - internal ChildrenAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ChildrenAggregationDescriptor() : base() - { - } - - private string? TypeValue { get; set; } - - /// - /// - /// The child type that should be selected. - /// - /// - public ChildrenAggregationDescriptor Type(string? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(TypeValue)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregate.g.cs deleted file mode 100644 index 29704ff5e9b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("after_key")] - public IReadOnlyDictionary? AfterKey { get; init; } - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs deleted file mode 100644 index 17a3421ab98..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ /dev/null @@ -1,201 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeAggregation -{ - /// - /// - /// When paginating, use the after_key value returned in the previous response to retrieve the next page. - /// - /// - [JsonInclude, JsonPropertyName("after")] - public IDictionary? After { get; set; } - - /// - /// - /// The number of composite buckets that should be returned. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The value sources used to build composite buckets. - /// Keys are returned in the order of the sources definition. - /// - /// - [JsonInclude, JsonPropertyName("sources")] - public ICollection>? Sources { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(CompositeAggregation compositeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Composite(compositeAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(CompositeAggregation compositeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.Composite(compositeAggregation); -} - -public sealed partial class CompositeAggregationDescriptor : SerializableDescriptor> -{ - internal CompositeAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public CompositeAggregationDescriptor() : base() - { - } - - private IDictionary? AfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection>? SourcesValue { get; set; } - - /// - /// - /// When paginating, use the after_key value returned in the previous response to retrieve the next page. - /// - /// - public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - AfterValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The number of composite buckets that should be returned. - /// - /// - public CompositeAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The value sources used to build composite buckets. - /// Keys are returned in the order of the sources definition. - /// - /// - public CompositeAggregationDescriptor Sources(ICollection>? sources) - { - SourcesValue = sources; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AfterValue is not null) - { - writer.WritePropertyName("after"); - JsonSerializer.Serialize(writer, AfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SourcesValue is not null) - { - writer.WritePropertyName("sources"); - JsonSerializer.Serialize(writer, SourcesValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompositeAggregationDescriptor : SerializableDescriptor -{ - internal CompositeAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CompositeAggregationDescriptor() : base() - { - } - - private IDictionary? AfterValue { get; set; } - private int? SizeValue { get; set; } - private ICollection>? SourcesValue { get; set; } - - /// - /// - /// When paginating, use the after_key value returned in the previous response to retrieve the next page. - /// - /// - public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - AfterValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The number of composite buckets that should be returned. - /// - /// - public CompositeAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The value sources used to build composite buckets. - /// Keys are returned in the order of the sources definition. - /// - /// - public CompositeAggregationDescriptor Sources(ICollection>? sources) - { - SourcesValue = sources; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AfterValue is not null) - { - writer.WritePropertyName("after"); - JsonSerializer.Serialize(writer, AfterValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SourcesValue is not null) - { - writer.WritePropertyName("sources"); - JsonSerializer.Serialize(writer, SourcesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs deleted file mode 100644 index 8bc2fb2c8be..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs +++ /dev/null @@ -1,479 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeAggregationSource -{ - /// - /// - /// A date histogram aggregation. - /// - /// - [JsonInclude, JsonPropertyName("date_histogram")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregation? DateHistogram { get; set; } - - /// - /// - /// A geotile grid aggregation. - /// - /// - [JsonInclude, JsonPropertyName("geotile_grid")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregation? GeotileGrid { get; set; } - - /// - /// - /// A histogram aggregation. - /// - /// - [JsonInclude, JsonPropertyName("histogram")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregation? Histogram { get; set; } - - /// - /// - /// A terms aggregation. - /// - /// - [JsonInclude, JsonPropertyName("terms")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregation? Terms { get; set; } -} - -public sealed partial class CompositeAggregationSourceDescriptor : SerializableDescriptor> -{ - internal CompositeAggregationSourceDescriptor(Action> configure) => configure.Invoke(this); - - public CompositeAggregationSourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregation? DateHistogramValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregationDescriptor DateHistogramDescriptor { get; set; } - private Action> DateHistogramDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregation? GeotileGridValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregationDescriptor GeotileGridDescriptor { get; set; } - private Action> GeotileGridDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregation? HistogramValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregationDescriptor HistogramDescriptor { get; set; } - private Action> HistogramDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregation? TermsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregationDescriptor TermsDescriptor { get; set; } - private Action> TermsDescriptorAction { get; set; } - - /// - /// - /// A date histogram aggregation. - /// - /// - public CompositeAggregationSourceDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregation? dateHistogram) - { - DateHistogramDescriptor = null; - DateHistogramDescriptorAction = null; - DateHistogramValue = dateHistogram; - return Self; - } - - public CompositeAggregationSourceDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregationDescriptor descriptor) - { - DateHistogramValue = null; - DateHistogramDescriptorAction = null; - DateHistogramDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor DateHistogram(Action> configure) - { - DateHistogramValue = null; - DateHistogramDescriptor = null; - DateHistogramDescriptorAction = configure; - return Self; - } - - /// - /// - /// A geotile grid aggregation. - /// - /// - public CompositeAggregationSourceDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregation? geotileGrid) - { - GeotileGridDescriptor = null; - GeotileGridDescriptorAction = null; - GeotileGridValue = geotileGrid; - return Self; - } - - public CompositeAggregationSourceDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregationDescriptor descriptor) - { - GeotileGridValue = null; - GeotileGridDescriptorAction = null; - GeotileGridDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor GeotileGrid(Action> configure) - { - GeotileGridValue = null; - GeotileGridDescriptor = null; - GeotileGridDescriptorAction = configure; - return Self; - } - - /// - /// - /// A histogram aggregation. - /// - /// - public CompositeAggregationSourceDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregation? histogram) - { - HistogramDescriptor = null; - HistogramDescriptorAction = null; - HistogramValue = histogram; - return Self; - } - - public CompositeAggregationSourceDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregationDescriptor descriptor) - { - HistogramValue = null; - HistogramDescriptorAction = null; - HistogramDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor Histogram(Action> configure) - { - HistogramValue = null; - HistogramDescriptor = null; - HistogramDescriptorAction = configure; - return Self; - } - - /// - /// - /// A terms aggregation. - /// - /// - public CompositeAggregationSourceDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregation? terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsValue = terms; - return Self; - } - - public CompositeAggregationSourceDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregationDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor Terms(Action> configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DateHistogramDescriptor is not null) - { - writer.WritePropertyName("date_histogram"); - JsonSerializer.Serialize(writer, DateHistogramDescriptor, options); - } - else if (DateHistogramDescriptorAction is not null) - { - writer.WritePropertyName("date_histogram"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregationDescriptor(DateHistogramDescriptorAction), options); - } - else if (DateHistogramValue is not null) - { - writer.WritePropertyName("date_histogram"); - JsonSerializer.Serialize(writer, DateHistogramValue, options); - } - - if (GeotileGridDescriptor is not null) - { - writer.WritePropertyName("geotile_grid"); - JsonSerializer.Serialize(writer, GeotileGridDescriptor, options); - } - else if (GeotileGridDescriptorAction is not null) - { - writer.WritePropertyName("geotile_grid"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregationDescriptor(GeotileGridDescriptorAction), options); - } - else if (GeotileGridValue is not null) - { - writer.WritePropertyName("geotile_grid"); - JsonSerializer.Serialize(writer, GeotileGridValue, options); - } - - if (HistogramDescriptor is not null) - { - writer.WritePropertyName("histogram"); - JsonSerializer.Serialize(writer, HistogramDescriptor, options); - } - else if (HistogramDescriptorAction is not null) - { - writer.WritePropertyName("histogram"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregationDescriptor(HistogramDescriptorAction), options); - } - else if (HistogramValue is not null) - { - writer.WritePropertyName("histogram"); - JsonSerializer.Serialize(writer, HistogramValue, options); - } - - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregationDescriptor(TermsDescriptorAction), options); - } - else if (TermsValue is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompositeAggregationSourceDescriptor : SerializableDescriptor -{ - internal CompositeAggregationSourceDescriptor(Action configure) => configure.Invoke(this); - - public CompositeAggregationSourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregation? DateHistogramValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregationDescriptor DateHistogramDescriptor { get; set; } - private Action DateHistogramDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregation? GeotileGridValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregationDescriptor GeotileGridDescriptor { get; set; } - private Action GeotileGridDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregation? HistogramValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregationDescriptor HistogramDescriptor { get; set; } - private Action HistogramDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregation? TermsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregationDescriptor TermsDescriptor { get; set; } - private Action TermsDescriptorAction { get; set; } - - /// - /// - /// A date histogram aggregation. - /// - /// - public CompositeAggregationSourceDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregation? dateHistogram) - { - DateHistogramDescriptor = null; - DateHistogramDescriptorAction = null; - DateHistogramValue = dateHistogram; - return Self; - } - - public CompositeAggregationSourceDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregationDescriptor descriptor) - { - DateHistogramValue = null; - DateHistogramDescriptorAction = null; - DateHistogramDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor DateHistogram(Action configure) - { - DateHistogramValue = null; - DateHistogramDescriptor = null; - DateHistogramDescriptorAction = configure; - return Self; - } - - /// - /// - /// A geotile grid aggregation. - /// - /// - public CompositeAggregationSourceDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregation? geotileGrid) - { - GeotileGridDescriptor = null; - GeotileGridDescriptorAction = null; - GeotileGridValue = geotileGrid; - return Self; - } - - public CompositeAggregationSourceDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregationDescriptor descriptor) - { - GeotileGridValue = null; - GeotileGridDescriptorAction = null; - GeotileGridDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor GeotileGrid(Action configure) - { - GeotileGridValue = null; - GeotileGridDescriptor = null; - GeotileGridDescriptorAction = configure; - return Self; - } - - /// - /// - /// A histogram aggregation. - /// - /// - public CompositeAggregationSourceDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregation? histogram) - { - HistogramDescriptor = null; - HistogramDescriptorAction = null; - HistogramValue = histogram; - return Self; - } - - public CompositeAggregationSourceDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregationDescriptor descriptor) - { - HistogramValue = null; - HistogramDescriptorAction = null; - HistogramDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor Histogram(Action configure) - { - HistogramValue = null; - HistogramDescriptor = null; - HistogramDescriptorAction = configure; - return Self; - } - - /// - /// - /// A terms aggregation. - /// - /// - public CompositeAggregationSourceDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregation? terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsValue = terms; - return Self; - } - - public CompositeAggregationSourceDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregationDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptor = descriptor; - return Self; - } - - public CompositeAggregationSourceDescriptor Terms(Action configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DateHistogramDescriptor is not null) - { - writer.WritePropertyName("date_histogram"); - JsonSerializer.Serialize(writer, DateHistogramDescriptor, options); - } - else if (DateHistogramDescriptorAction is not null) - { - writer.WritePropertyName("date_histogram"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeDateHistogramAggregationDescriptor(DateHistogramDescriptorAction), options); - } - else if (DateHistogramValue is not null) - { - writer.WritePropertyName("date_histogram"); - JsonSerializer.Serialize(writer, DateHistogramValue, options); - } - - if (GeotileGridDescriptor is not null) - { - writer.WritePropertyName("geotile_grid"); - JsonSerializer.Serialize(writer, GeotileGridDescriptor, options); - } - else if (GeotileGridDescriptorAction is not null) - { - writer.WritePropertyName("geotile_grid"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeGeoTileGridAggregationDescriptor(GeotileGridDescriptorAction), options); - } - else if (GeotileGridValue is not null) - { - writer.WritePropertyName("geotile_grid"); - JsonSerializer.Serialize(writer, GeotileGridValue, options); - } - - if (HistogramDescriptor is not null) - { - writer.WritePropertyName("histogram"); - JsonSerializer.Serialize(writer, HistogramDescriptor, options); - } - else if (HistogramDescriptorAction is not null) - { - writer.WritePropertyName("histogram"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeHistogramAggregationDescriptor(HistogramDescriptorAction), options); - } - else if (HistogramValue is not null) - { - writer.WritePropertyName("histogram"); - JsonSerializer.Serialize(writer, HistogramValue, options); - } - - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeTermsAggregationDescriptor(TermsDescriptorAction), options); - } - else if (TermsValue is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeBucket.g.cs deleted file mode 100644 index 22f264dd557..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class CompositeBucketConverter : JsonConverter -{ - public override CompositeBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new CompositeBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, CompositeBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'CompositeBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(CompositeBucketConverter))] -public sealed partial class CompositeBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs deleted file mode 100644 index acc1d465d72..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs +++ /dev/null @@ -1,539 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeDateHistogramAggregation -{ - /// - /// - /// Either calendar_interval or fixed_interval must be present - /// - /// - [JsonInclude, JsonPropertyName("calendar_interval")] - public string? CalendarInterval { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Either calendar_interval or fixed_interval must be present - /// - /// - [JsonInclude, JsonPropertyName("fixed_interval")] - public string? FixedInterval { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("missing_bucket")] - public bool? MissingBucket { get; set; } - [JsonInclude, JsonPropertyName("missing_order")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrder { get; set; } - [JsonInclude, JsonPropertyName("offset")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Offset { get; set; } - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } - [JsonInclude, JsonPropertyName("value_type")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueType { get; set; } -} - -public sealed partial class CompositeDateHistogramAggregationDescriptor : SerializableDescriptor> -{ - internal CompositeDateHistogramAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public CompositeDateHistogramAggregationDescriptor() : base() - { - } - - private string? CalendarIntervalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FixedIntervalValue { get; set; } - private string? FormatValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? OffsetValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? TimeZoneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - /// - /// - /// Either calendar_interval or fixed_interval must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor CalendarInterval(string? calendarInterval) - { - CalendarIntervalValue = calendarInterval; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either calendar_interval or fixed_interval must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor FixedInterval(string? fixedInterval) - { - FixedIntervalValue = fixedInterval; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Offset(Elastic.Clients.Elasticsearch.Serverless.Duration? offset) - { - OffsetValue = offset; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CalendarIntervalValue)) - { - writer.WritePropertyName("calendar_interval"); - writer.WriteStringValue(CalendarIntervalValue); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FixedIntervalValue)) - { - writer.WritePropertyName("fixed_interval"); - writer.WriteStringValue(FixedIntervalValue); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OffsetValue is not null) - { - writer.WritePropertyName("offset"); - JsonSerializer.Serialize(writer, OffsetValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompositeDateHistogramAggregationDescriptor : SerializableDescriptor -{ - internal CompositeDateHistogramAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CompositeDateHistogramAggregationDescriptor() : base() - { - } - - private string? CalendarIntervalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FixedIntervalValue { get; set; } - private string? FormatValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? OffsetValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? TimeZoneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - /// - /// - /// Either calendar_interval or fixed_interval must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor CalendarInterval(string? calendarInterval) - { - CalendarIntervalValue = calendarInterval; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either calendar_interval or fixed_interval must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor FixedInterval(string? fixedInterval) - { - FixedIntervalValue = fixedInterval; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Offset(Elastic.Clients.Elasticsearch.Serverless.Duration? offset) - { - OffsetValue = offset; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - public CompositeDateHistogramAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CalendarIntervalValue)) - { - writer.WritePropertyName("calendar_interval"); - writer.WriteStringValue(CalendarIntervalValue); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FixedIntervalValue)) - { - writer.WritePropertyName("fixed_interval"); - writer.WriteStringValue(FixedIntervalValue); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OffsetValue is not null) - { - writer.WritePropertyName("offset"); - JsonSerializer.Serialize(writer, OffsetValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs deleted file mode 100644 index db157c512db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs +++ /dev/null @@ -1,424 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeGeoTileGridAggregation -{ - [JsonInclude, JsonPropertyName("bounds")] - public Elastic.Clients.Elasticsearch.Serverless.GeoBounds? Bounds { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("missing_bucket")] - public bool? MissingBucket { get; set; } - [JsonInclude, JsonPropertyName("missing_order")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrder { get; set; } - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - [JsonInclude, JsonPropertyName("precision")] - public int? Precision { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("value_type")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueType { get; set; } -} - -public sealed partial class CompositeGeoTileGridAggregationDescriptor : SerializableDescriptor> -{ - internal CompositeGeoTileGridAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public CompositeGeoTileGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private int? PrecisionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - public CompositeGeoTileGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Precision(int? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompositeGeoTileGridAggregationDescriptor : SerializableDescriptor -{ - internal CompositeGeoTileGridAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CompositeGeoTileGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private int? PrecisionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - public CompositeGeoTileGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Precision(int? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeGeoTileGridAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeGeoTileGridAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs deleted file mode 100644 index 0c450d42260..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs +++ /dev/null @@ -1,387 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeHistogramAggregation -{ - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("interval")] - public double Interval { get; set; } - [JsonInclude, JsonPropertyName("missing_bucket")] - public bool? MissingBucket { get; set; } - [JsonInclude, JsonPropertyName("missing_order")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrder { get; set; } - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("value_type")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueType { get; set; } -} - -public sealed partial class CompositeHistogramAggregationDescriptor : SerializableDescriptor> -{ - internal CompositeHistogramAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public CompositeHistogramAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private double IntervalValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public CompositeHistogramAggregationDescriptor Interval(double interval) - { - IntervalValue = interval; - return Self; - } - - public CompositeHistogramAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeHistogramAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeHistogramAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeHistogramAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - writer.WritePropertyName("interval"); - writer.WriteNumberValue(IntervalValue); - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompositeHistogramAggregationDescriptor : SerializableDescriptor -{ - internal CompositeHistogramAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CompositeHistogramAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private double IntervalValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public CompositeHistogramAggregationDescriptor Interval(double interval) - { - IntervalValue = interval; - return Self; - } - - public CompositeHistogramAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeHistogramAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeHistogramAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeHistogramAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - writer.WritePropertyName("interval"); - writer.WriteNumberValue(IntervalValue); - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs deleted file mode 100644 index 2b6256edd6b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs +++ /dev/null @@ -1,367 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CompositeTermsAggregation -{ - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("missing_bucket")] - public bool? MissingBucket { get; set; } - [JsonInclude, JsonPropertyName("missing_order")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrder { get; set; } - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("value_type")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueType { get; set; } -} - -public sealed partial class CompositeTermsAggregationDescriptor : SerializableDescriptor> -{ - internal CompositeTermsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public CompositeTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public CompositeTermsAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeTermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeTermsAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeTermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeTermsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeTermsAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompositeTermsAggregationDescriptor : SerializableDescriptor -{ - internal CompositeTermsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CompositeTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public CompositeTermsAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public CompositeTermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - public CompositeTermsAggregationDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Either field or script must be present - /// - /// - public CompositeTermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public CompositeTermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public CompositeTermsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public CompositeTermsAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs deleted file mode 100644 index c0a86ffc1cd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregate.g.cs +++ /dev/null @@ -1,43 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of the cumulative_cardinality aggregation -/// -/// -public sealed partial class CumulativeCardinalityAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("value")] - public long Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs deleted file mode 100644 index ca1648c65c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CumulativeCardinalityAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(CumulativeCardinalityAggregation cumulativeCardinalityAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.CumulativeCardinality(cumulativeCardinalityAggregation); -} - -public sealed partial class CumulativeCardinalityAggregationDescriptor : SerializableDescriptor -{ - internal CumulativeCardinalityAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CumulativeCardinalityAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public CumulativeCardinalityAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public CumulativeCardinalityAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public CumulativeCardinalityAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs deleted file mode 100644 index 28ea29890ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class CumulativeSumAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(CumulativeSumAggregation cumulativeSumAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.CumulativeSum(cumulativeSumAggregation); -} - -public sealed partial class CumulativeSumAggregationDescriptor : SerializableDescriptor -{ - internal CumulativeSumAggregationDescriptor(Action configure) => configure.Invoke(this); - - public CumulativeSumAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public CumulativeSumAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public CumulativeSumAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public CumulativeSumAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs deleted file mode 100644 index 6a9e78363d8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DateHistogramAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs deleted file mode 100644 index 5abfd93f60d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs +++ /dev/null @@ -1,846 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DateHistogramAggregation -{ - /// - /// - /// Calendar-aware interval. - /// Can be specified using the unit name, such as month, or as a single unit quantity, such as 1M. - /// - /// - [JsonInclude, JsonPropertyName("calendar_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? CalendarInterval { get; set; } - - /// - /// - /// Enables extending the bounds of the histogram beyond the data itself. - /// - /// - [JsonInclude, JsonPropertyName("extended_bounds")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? ExtendedBounds { get; set; } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar. - /// - /// - [JsonInclude, JsonPropertyName("fixed_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? FixedInterval { get; set; } - - /// - /// - /// The date format used to format key_as_string in the response. - /// If no format is specified, the first date format specified in the field mapping is used. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Limits the histogram to specified bounds. - /// - /// - [JsonInclude, JsonPropertyName("hard_bounds")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? HardBounds { get; set; } - - /// - /// - /// Only returns buckets that have min_doc_count number of documents. - /// By default, all buckets between the first bucket that matches documents and the last one are returned. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public int? MinDocCount { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public DateTimeOffset? Missing { get; set; } - - /// - /// - /// Changes the start value of each bucket by the specified positive (+) or negative offset (-) duration. - /// - /// - [JsonInclude, JsonPropertyName("offset")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Offset { get; set; } - - /// - /// - /// The sort order of the returned buckets. - /// - /// - [JsonInclude, JsonPropertyName("order")] - [SingleOrManyCollectionConverter(typeof(KeyValuePair))] - public ICollection>? Order { get; set; } - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Time zone used for bucketing and rounding. - /// Defaults to Coordinated Universal Time (UTC). - /// - /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(DateHistogramAggregation dateHistogramAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.DateHistogram(dateHistogramAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy(DateHistogramAggregation dateHistogramAggregation) => Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy.DateHistogram(dateHistogramAggregation); -} - -public sealed partial class DateHistogramAggregationDescriptor : SerializableDescriptor> -{ - internal DateHistogramAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public DateHistogramAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? CalendarIntervalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? ExtendedBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor ExtendedBoundsDescriptor { get; set; } - private Action ExtendedBoundsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FixedIntervalValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? HardBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor HardBoundsDescriptor { get; set; } - private Action HardBoundsDescriptorAction { get; set; } - private int? MinDocCountValue { get; set; } - private DateTimeOffset? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? OffsetValue { get; set; } - private ICollection>? OrderValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// Calendar-aware interval. - /// Can be specified using the unit name, such as month, or as a single unit quantity, such as 1M. - /// - /// - public DateHistogramAggregationDescriptor CalendarInterval(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? calendarInterval) - { - CalendarIntervalValue = calendarInterval; - return Self; - } - - /// - /// - /// Enables extending the bounds of the histogram beyond the data itself. - /// - /// - public DateHistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? extendedBounds) - { - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsValue = extendedBounds; - return Self; - } - - public DateHistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor descriptor) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsDescriptor = descriptor; - return Self; - } - - public DateHistogramAggregationDescriptor ExtendedBounds(Action configure) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - public DateHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - public DateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - public DateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar. - /// - /// - public DateHistogramAggregationDescriptor FixedInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? fixedInterval) - { - FixedIntervalValue = fixedInterval; - return Self; - } - - /// - /// - /// The date format used to format key_as_string in the response. - /// If no format is specified, the first date format specified in the field mapping is used. - /// - /// - public DateHistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Limits the histogram to specified bounds. - /// - /// - public DateHistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? hardBounds) - { - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = null; - HardBoundsValue = hardBounds; - return Self; - } - - public DateHistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor descriptor) - { - HardBoundsValue = null; - HardBoundsDescriptorAction = null; - HardBoundsDescriptor = descriptor; - return Self; - } - - public DateHistogramAggregationDescriptor HardBounds(Action configure) - { - HardBoundsValue = null; - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Only returns buckets that have min_doc_count number of documents. - /// By default, all buckets between the first bucket that matches documents and the last one are returned. - /// - /// - public DateHistogramAggregationDescriptor MinDocCount(int? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public DateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Changes the start value of each bucket by the specified positive (+) or negative offset (-) duration. - /// - /// - public DateHistogramAggregationDescriptor Offset(Elastic.Clients.Elasticsearch.Serverless.Duration? offset) - { - OffsetValue = offset; - return Self; - } - - /// - /// - /// The sort order of the returned buckets. - /// - /// - public DateHistogramAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - public DateHistogramAggregationDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DateHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Time zone used for bucketing and rounding. - /// Defaults to Coordinated Universal Time (UTC). - /// - /// - public DateHistogramAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CalendarIntervalValue is not null) - { - writer.WritePropertyName("calendar_interval"); - JsonSerializer.Serialize(writer, CalendarIntervalValue, options); - } - - if (ExtendedBoundsDescriptor is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsDescriptor, options); - } - else if (ExtendedBoundsDescriptorAction is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor(ExtendedBoundsDescriptorAction), options); - } - else if (ExtendedBoundsValue is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FixedIntervalValue is not null) - { - writer.WritePropertyName("fixed_interval"); - JsonSerializer.Serialize(writer, FixedIntervalValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HardBoundsDescriptor is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsDescriptor, options); - } - else if (HardBoundsDescriptorAction is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor(HardBoundsDescriptorAction), options); - } - else if (HardBoundsValue is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (OffsetValue is not null) - { - writer.WritePropertyName("offset"); - JsonSerializer.Serialize(writer, OffsetValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DateHistogramAggregationDescriptor : SerializableDescriptor -{ - internal DateHistogramAggregationDescriptor(Action configure) => configure.Invoke(this); - - public DateHistogramAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? CalendarIntervalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? ExtendedBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor ExtendedBoundsDescriptor { get; set; } - private Action ExtendedBoundsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FixedIntervalValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? HardBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor HardBoundsDescriptor { get; set; } - private Action HardBoundsDescriptorAction { get; set; } - private int? MinDocCountValue { get; set; } - private DateTimeOffset? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? OffsetValue { get; set; } - private ICollection>? OrderValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// Calendar-aware interval. - /// Can be specified using the unit name, such as month, or as a single unit quantity, such as 1M. - /// - /// - public DateHistogramAggregationDescriptor CalendarInterval(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? calendarInterval) - { - CalendarIntervalValue = calendarInterval; - return Self; - } - - /// - /// - /// Enables extending the bounds of the histogram beyond the data itself. - /// - /// - public DateHistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? extendedBounds) - { - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsValue = extendedBounds; - return Self; - } - - public DateHistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor descriptor) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsDescriptor = descriptor; - return Self; - } - - public DateHistogramAggregationDescriptor ExtendedBounds(Action configure) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - public DateHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - public DateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build a histogram. - /// - /// - public DateHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar. - /// - /// - public DateHistogramAggregationDescriptor FixedInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? fixedInterval) - { - FixedIntervalValue = fixedInterval; - return Self; - } - - /// - /// - /// The date format used to format key_as_string in the response. - /// If no format is specified, the first date format specified in the field mapping is used. - /// - /// - public DateHistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Limits the histogram to specified bounds. - /// - /// - public DateHistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDate? hardBounds) - { - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = null; - HardBoundsValue = hardBounds; - return Self; - } - - public DateHistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor descriptor) - { - HardBoundsValue = null; - HardBoundsDescriptorAction = null; - HardBoundsDescriptor = descriptor; - return Self; - } - - public DateHistogramAggregationDescriptor HardBounds(Action configure) - { - HardBoundsValue = null; - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Only returns buckets that have min_doc_count number of documents. - /// By default, all buckets between the first bucket that matches documents and the last one are returned. - /// - /// - public DateHistogramAggregationDescriptor MinDocCount(int? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public DateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Changes the start value of each bucket by the specified positive (+) or negative offset (-) duration. - /// - /// - public DateHistogramAggregationDescriptor Offset(Elastic.Clients.Elasticsearch.Serverless.Duration? offset) - { - OffsetValue = offset; - return Self; - } - - /// - /// - /// The sort order of the returned buckets. - /// - /// - public DateHistogramAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - public DateHistogramAggregationDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DateHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DateHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Time zone used for bucketing and rounding. - /// Defaults to Coordinated Universal Time (UTC). - /// - /// - public DateHistogramAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CalendarIntervalValue is not null) - { - writer.WritePropertyName("calendar_interval"); - JsonSerializer.Serialize(writer, CalendarIntervalValue, options); - } - - if (ExtendedBoundsDescriptor is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsDescriptor, options); - } - else if (ExtendedBoundsDescriptorAction is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor(ExtendedBoundsDescriptorAction), options); - } - else if (ExtendedBoundsValue is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FixedIntervalValue is not null) - { - writer.WritePropertyName("fixed_interval"); - JsonSerializer.Serialize(writer, FixedIntervalValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HardBoundsDescriptor is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsDescriptor, options); - } - else if (HardBoundsDescriptorAction is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsDateDescriptor(HardBoundsDescriptorAction), options); - } - else if (HardBoundsValue is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (OffsetValue is not null) - { - writer.WritePropertyName("offset"); - JsonSerializer.Serialize(writer, OffsetValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramBucket.g.cs deleted file mode 100644 index 26386f3c977..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramBucket.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class DateHistogramBucketConverter : JsonConverter -{ - public override DateHistogramBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - long key = default; - string? keyAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new DateHistogramBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key, KeyAsString = keyAsString }; - } - - public override void Write(Utf8JsonWriter writer, DateHistogramBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'DateHistogramBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(DateHistogramBucketConverter))] -public sealed partial class DateHistogramBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public long Key { get; init; } - public string? KeyAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregate.g.cs deleted file mode 100644 index a885c04604d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a date_range aggregation. Same format as a for a range aggregation: from and to -/// in buckets are milliseconds since the Epoch, represented as a floating point number. -/// -/// -public sealed partial class DateRangeAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs deleted file mode 100644 index a35e230e557..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs +++ /dev/null @@ -1,449 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DateRangeAggregation -{ - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The date format used to format from and to in the response. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - /// - /// - /// Array of date ranges. - /// - /// - [JsonInclude, JsonPropertyName("ranges")] - public ICollection? Ranges { get; set; } - - /// - /// - /// Time zone used to convert dates from another time zone to UTC. - /// - /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(DateRangeAggregation dateRangeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.DateRange(dateRangeAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(DateRangeAggregation dateRangeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.DateRange(dateRangeAggregation); -} - -public sealed partial class DateRangeAggregationDescriptor : SerializableDescriptor> -{ - internal DateRangeAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public DateRangeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public DateRangeAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public DateRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public DateRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date format used to format from and to in the response. - /// - /// - public DateRangeAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public DateRangeAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Array of date ranges. - /// - /// - public DateRangeAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public DateRangeAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public DateRangeAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public DateRangeAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Time zone used to convert dates from another time zone to UTC. - /// - /// - public DateRangeAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DateRangeAggregationDescriptor : SerializableDescriptor -{ - internal DateRangeAggregationDescriptor(Action configure) => configure.Invoke(this); - - public DateRangeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public DateRangeAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public DateRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public DateRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date format used to format from and to in the response. - /// - /// - public DateRangeAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public DateRangeAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Array of date ranges. - /// - /// - public DateRangeAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public DateRangeAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public DateRangeAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public DateRangeAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Time zone used to convert dates from another time zone to UTC. - /// - /// - public DateRangeAggregationDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeExpression.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeExpression.g.cs deleted file mode 100644 index cb2b74a1c7f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeExpression.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DateRangeExpression -{ - /// - /// - /// Start of the range (inclusive). - /// - /// - [JsonInclude, JsonPropertyName("from")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? From { get; set; } - - /// - /// - /// Custom key to return the range with. - /// - /// - [JsonInclude, JsonPropertyName("key")] - public string? Key { get; set; } - - /// - /// - /// End of the range (exclusive). - /// - /// - [JsonInclude, JsonPropertyName("to")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? To { get; set; } -} - -public sealed partial class DateRangeExpressionDescriptor : SerializableDescriptor -{ - internal DateRangeExpressionDescriptor(Action configure) => configure.Invoke(this); - - public DateRangeExpressionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? FromValue { get; set; } - private string? KeyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? ToValue { get; set; } - - /// - /// - /// Start of the range (inclusive). - /// - /// - public DateRangeExpressionDescriptor From(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Custom key to return the range with. - /// - /// - public DateRangeExpressionDescriptor Key(string? key) - { - KeyValue = key; - return Self; - } - - /// - /// - /// End of the range (exclusive). - /// - /// - public DateRangeExpressionDescriptor To(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? to) - { - ToValue = to; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue is not null) - { - writer.WritePropertyName("from"); - JsonSerializer.Serialize(writer, FromValue, options); - } - - if (!string.IsNullOrEmpty(KeyValue)) - { - writer.WritePropertyName("key"); - writer.WriteStringValue(KeyValue); - } - - if (ToValue is not null) - { - writer.WritePropertyName("to"); - JsonSerializer.Serialize(writer, ToValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregate.g.cs deleted file mode 100644 index d5399747ce3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregate.g.cs +++ /dev/null @@ -1,49 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DerivativeAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("normalized_value")] - public double? NormalizedValue { get; init; } - [JsonInclude, JsonPropertyName("normalized_value_as_string")] - public string? NormalizedValueAsString { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs deleted file mode 100644 index c9f68edb9ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DerivativeAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(DerivativeAggregation derivativeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Derivative(derivativeAggregation); -} - -public sealed partial class DerivativeAggregationDescriptor : SerializableDescriptor -{ - internal DerivativeAggregationDescriptor(Action configure) => configure.Invoke(this); - - public DerivativeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public DerivativeAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public DerivativeAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public DerivativeAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs deleted file mode 100644 index 41f701194fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs +++ /dev/null @@ -1,373 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class DiversifiedSamplerAggregation -{ - /// - /// - /// The type of value used for de-duplication. - /// - /// - [JsonInclude, JsonPropertyName("execution_hint")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? ExecutionHint { get; set; } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Limits how many documents are permitted per choice of de-duplicating value. - /// - /// - [JsonInclude, JsonPropertyName("max_docs_per_value")] - public int? MaxDocsPerValue { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Limits how many top-scoring documents are collected in the sample processed on each shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(DiversifiedSamplerAggregation diversifiedSamplerAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.DiversifiedSampler(diversifiedSamplerAggregation); -} - -public sealed partial class DiversifiedSamplerAggregationDescriptor : SerializableDescriptor> -{ - internal DiversifiedSamplerAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public DiversifiedSamplerAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private int? MaxDocsPerValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private int? ShardSizeValue { get; set; } - - /// - /// - /// The type of value used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Limits how many documents are permitted per choice of de-duplicating value. - /// - /// - public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? maxDocsPerValue) - { - MaxDocsPerValueValue = maxDocsPerValue; - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Limits how many top-scoring documents are collected in the sample processed on each shard. - /// - /// - public DiversifiedSamplerAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MaxDocsPerValueValue.HasValue) - { - writer.WritePropertyName("max_docs_per_value"); - writer.WriteNumberValue(MaxDocsPerValueValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DiversifiedSamplerAggregationDescriptor : SerializableDescriptor -{ - internal DiversifiedSamplerAggregationDescriptor(Action configure) => configure.Invoke(this); - - public DiversifiedSamplerAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private int? MaxDocsPerValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private int? ShardSizeValue { get; set; } - - /// - /// - /// The type of value used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field used to provide values used for de-duplication. - /// - /// - public DiversifiedSamplerAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Limits how many documents are permitted per choice of de-duplicating value. - /// - /// - public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? maxDocsPerValue) - { - MaxDocsPerValueValue = maxDocsPerValue; - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Limits how many top-scoring documents are collected in the sample processed on each shard. - /// - /// - public DiversifiedSamplerAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MaxDocsPerValueValue.HasValue) - { - writer.WritePropertyName("max_docs_per_value"); - writer.WriteNumberValue(MaxDocsPerValueValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs deleted file mode 100644 index 10bb23a1570..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a terms aggregation when the field is some kind of decimal number like a float, double, or distance. -/// -/// -public sealed partial class DoubleTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count_error_upper_bound")] - public long? DocCountErrorUpperBound { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("sum_other_doc_count")] - public long? SumOtherDocCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs deleted file mode 100644 index 5dc845c246a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class DoubleTermsBucketConverter : JsonConverter -{ - public override DoubleTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - long? docCountErrorUpperBound = default; - double key = default; - string? keyAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "doc_count_error_upper_bound") - { - docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new DoubleTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; - } - - public override void Write(Utf8JsonWriter writer, DoubleTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'DoubleTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(DoubleTermsBucketConverter))] -public sealed partial class DoubleTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public long? DocCountErrorUpperBound { get; init; } - public double Key { get; init; } - public string? KeyAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsDate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsDate.g.cs deleted file mode 100644 index fb847e470d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsDate.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ExtendedBoundsDate -{ - /// - /// - /// Maximum value for the bound. - /// - /// - [JsonInclude, JsonPropertyName("max")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? Max { get; set; } - - /// - /// - /// Minimum value for the bound. - /// - /// - [JsonInclude, JsonPropertyName("min")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? Min { get; set; } -} - -public sealed partial class ExtendedBoundsDateDescriptor : SerializableDescriptor -{ - internal ExtendedBoundsDateDescriptor(Action configure) => configure.Invoke(this); - - public ExtendedBoundsDateDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? MaxValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? MinValue { get; set; } - - /// - /// - /// Maximum value for the bound. - /// - /// - public ExtendedBoundsDateDescriptor Max(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? max) - { - MaxValue = max; - return Self; - } - - /// - /// - /// Minimum value for the bound. - /// - /// - public ExtendedBoundsDateDescriptor Min(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FieldDateMath? min) - { - MinValue = min; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxValue is not null) - { - writer.WritePropertyName("max"); - JsonSerializer.Serialize(writer, MaxValue, options); - } - - if (MinValue is not null) - { - writer.WritePropertyName("min"); - JsonSerializer.Serialize(writer, MinValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsFloat.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsFloat.g.cs deleted file mode 100644 index a37a0be8325..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedBoundsFloat.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ExtendedBoundsFloat -{ - /// - /// - /// Maximum value for the bound. - /// - /// - [JsonInclude, JsonPropertyName("max")] - public float? Max { get; set; } - - /// - /// - /// Minimum value for the bound. - /// - /// - [JsonInclude, JsonPropertyName("min")] - public float? Min { get; set; } -} - -public sealed partial class ExtendedBoundsFloatDescriptor : SerializableDescriptor -{ - internal ExtendedBoundsFloatDescriptor(Action configure) => configure.Invoke(this); - - public ExtendedBoundsFloatDescriptor() : base() - { - } - - private float? MaxValue { get; set; } - private float? MinValue { get; set; } - - /// - /// - /// Maximum value for the bound. - /// - /// - public ExtendedBoundsFloatDescriptor Max(float? max) - { - MaxValue = max; - return Self; - } - - /// - /// - /// Minimum value for the bound. - /// - /// - public ExtendedBoundsFloatDescriptor Min(float? min) - { - MinValue = min; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxValue.HasValue) - { - writer.WritePropertyName("max"); - writer.WriteNumberValue(MaxValue.Value); - } - - if (MinValue.HasValue) - { - writer.WritePropertyName("min"); - writer.WriteNumberValue(MinValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs deleted file mode 100644 index fedb4c95f79..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs +++ /dev/null @@ -1,80 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ExtendedStatsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("avg")] - public double? Avg { get; init; } - [JsonInclude, JsonPropertyName("avg_as_string")] - public string? AvgAsString { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("max")] - public double? Max { get; init; } - [JsonInclude, JsonPropertyName("max_as_string")] - public string? MaxAsString { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("min")] - public double? Min { get; init; } - [JsonInclude, JsonPropertyName("min_as_string")] - public string? MinAsString { get; init; } - [JsonInclude, JsonPropertyName("std_deviation")] - public double? StdDeviation { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_as_string")] - public string? StdDeviationAsString { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_bounds")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StandardDeviationBounds? StdDeviationBounds { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_bounds_as_string")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StandardDeviationBoundsAsString? StdDeviationBoundsAsString { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_population")] - public double? StdDeviationPopulation { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_sampling")] - public double? StdDeviationSampling { get; init; } - [JsonInclude, JsonPropertyName("sum")] - public double Sum { get; init; } - [JsonInclude, JsonPropertyName("sum_as_string")] - public string? SumAsString { get; init; } - [JsonInclude, JsonPropertyName("sum_of_squares")] - public double? SumOfSquares { get; init; } - [JsonInclude, JsonPropertyName("sum_of_squares_as_string")] - public string? SumOfSquaresAsString { get; init; } - [JsonInclude, JsonPropertyName("variance")] - public double? Variance { get; init; } - [JsonInclude, JsonPropertyName("variance_as_string")] - public string? VarianceAsString { get; init; } - [JsonInclude, JsonPropertyName("variance_population")] - public double? VariancePopulation { get; init; } - [JsonInclude, JsonPropertyName("variance_population_as_string")] - public string? VariancePopulationAsString { get; init; } - [JsonInclude, JsonPropertyName("variance_sampling")] - public double? VarianceSampling { get; init; } - [JsonInclude, JsonPropertyName("variance_sampling_as_string")] - public string? VarianceSamplingAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs deleted file mode 100644 index f96241d7a75..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs +++ /dev/null @@ -1,360 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ExtendedStatsAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// The number of standard deviations above/below the mean to display. - /// - /// - [JsonInclude, JsonPropertyName("sigma")] - public double? Sigma { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ExtendedStatsAggregation extendedStatsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.ExtendedStats(extendedStatsAggregation); -} - -public sealed partial class ExtendedStatsAggregationDescriptor : SerializableDescriptor> -{ - internal ExtendedStatsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public ExtendedStatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private double? SigmaValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ExtendedStatsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ExtendedStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ExtendedStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ExtendedStatsAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public ExtendedStatsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public ExtendedStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ExtendedStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ExtendedStatsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of standard deviations above/below the mean to display. - /// - /// - public ExtendedStatsAggregationDescriptor Sigma(double? sigma) - { - SigmaValue = sigma; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SigmaValue.HasValue) - { - writer.WritePropertyName("sigma"); - writer.WriteNumberValue(SigmaValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ExtendedStatsAggregationDescriptor : SerializableDescriptor -{ - internal ExtendedStatsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ExtendedStatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private double? SigmaValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ExtendedStatsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ExtendedStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ExtendedStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ExtendedStatsAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public ExtendedStatsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public ExtendedStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ExtendedStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ExtendedStatsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of standard deviations above/below the mean to display. - /// - /// - public ExtendedStatsAggregationDescriptor Sigma(double? sigma) - { - SigmaValue = sigma; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SigmaValue.HasValue) - { - writer.WritePropertyName("sigma"); - writer.WriteNumberValue(SigmaValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs deleted file mode 100644 index 2d1e56afb66..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs +++ /dev/null @@ -1,80 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ExtendedStatsBucketAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("avg")] - public double? Avg { get; init; } - [JsonInclude, JsonPropertyName("avg_as_string")] - public string? AvgAsString { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("max")] - public double? Max { get; init; } - [JsonInclude, JsonPropertyName("max_as_string")] - public string? MaxAsString { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("min")] - public double? Min { get; init; } - [JsonInclude, JsonPropertyName("min_as_string")] - public string? MinAsString { get; init; } - [JsonInclude, JsonPropertyName("std_deviation")] - public double? StdDeviation { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_as_string")] - public string? StdDeviationAsString { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_bounds")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StandardDeviationBounds? StdDeviationBounds { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_bounds_as_string")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.StandardDeviationBoundsAsString? StdDeviationBoundsAsString { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_population")] - public double? StdDeviationPopulation { get; init; } - [JsonInclude, JsonPropertyName("std_deviation_sampling")] - public double? StdDeviationSampling { get; init; } - [JsonInclude, JsonPropertyName("sum")] - public double Sum { get; init; } - [JsonInclude, JsonPropertyName("sum_as_string")] - public string? SumAsString { get; init; } - [JsonInclude, JsonPropertyName("sum_of_squares")] - public double? SumOfSquares { get; init; } - [JsonInclude, JsonPropertyName("sum_of_squares_as_string")] - public string? SumOfSquaresAsString { get; init; } - [JsonInclude, JsonPropertyName("variance")] - public double? Variance { get; init; } - [JsonInclude, JsonPropertyName("variance_as_string")] - public string? VarianceAsString { get; init; } - [JsonInclude, JsonPropertyName("variance_population")] - public double? VariancePopulation { get; init; } - [JsonInclude, JsonPropertyName("variance_population_as_string")] - public string? VariancePopulationAsString { get; init; } - [JsonInclude, JsonPropertyName("variance_sampling")] - public double? VarianceSampling { get; init; } - [JsonInclude, JsonPropertyName("variance_sampling_as_string")] - public string? VarianceSamplingAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs deleted file mode 100644 index 28c9ff862a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ExtendedStatsBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The number of standard deviations above/below the mean to display. - /// - /// - [JsonInclude, JsonPropertyName("sigma")] - public double? Sigma { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ExtendedStatsBucketAggregation extendedStatsBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.ExtendedStatsBucket(extendedStatsBucketAggregation); -} - -public sealed partial class ExtendedStatsBucketAggregationDescriptor : SerializableDescriptor -{ - internal ExtendedStatsBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ExtendedStatsBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private double? SigmaValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public ExtendedStatsBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public ExtendedStatsBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public ExtendedStatsBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The number of standard deviations above/below the mean to display. - /// - /// - public ExtendedStatsBucketAggregationDescriptor Sigma(double? sigma) - { - SigmaValue = sigma; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (SigmaValue.HasValue) - { - writer.WritePropertyName("sigma"); - writer.WriteNumberValue(SigmaValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FieldDateMath.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FieldDateMath.g.cs deleted file mode 100644 index b3b67cd970e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FieldDateMath.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// A date range limit, represented either as a DateMath expression or a number expressed -/// according to the target field's precision. -/// -/// -public sealed partial class FieldDateMath : Union -{ - public FieldDateMath(string Expr) : base(Expr) - { - } - - public FieldDateMath(double Value) : base(Value) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FilterAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FilterAggregate.g.cs deleted file mode 100644 index 1518ef244d1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FilterAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class FilterAggregateConverter : JsonConverter -{ - public override FilterAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new FilterAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, FilterAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'FilterAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(FilterAggregateConverter))] -public sealed partial class FilterAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregate.g.cs deleted file mode 100644 index a830d0c0c65..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class FiltersAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs deleted file mode 100644 index bb446d659a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs +++ /dev/null @@ -1,197 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class FiltersAggregation -{ - /// - /// - /// Collection of queries from which to build buckets. - /// - /// - [JsonInclude, JsonPropertyName("filters")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? Filters { get; set; } - - /// - /// - /// Set to true to add a bucket to the response which will contain all documents that do not match any of the given filters. - /// - /// - [JsonInclude, JsonPropertyName("other_bucket")] - public bool? OtherBucket { get; set; } - - /// - /// - /// The key with which the other bucket is returned. - /// - /// - [JsonInclude, JsonPropertyName("other_bucket_key")] - public string? OtherBucketKey { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(FiltersAggregation filtersAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Filters(filtersAggregation); -} - -public sealed partial class FiltersAggregationDescriptor : SerializableDescriptor> -{ - internal FiltersAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public FiltersAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? FiltersValue { get; set; } - private bool? OtherBucketValue { get; set; } - private string? OtherBucketKeyValue { get; set; } - - /// - /// - /// Collection of queries from which to build buckets. - /// - /// - public FiltersAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? filters) - { - FiltersValue = filters; - return Self; - } - - /// - /// - /// Set to true to add a bucket to the response which will contain all documents that do not match any of the given filters. - /// - /// - public FiltersAggregationDescriptor OtherBucket(bool? otherBucket = true) - { - OtherBucketValue = otherBucket; - return Self; - } - - /// - /// - /// The key with which the other bucket is returned. - /// - /// - public FiltersAggregationDescriptor OtherBucketKey(string? otherBucketKey) - { - OtherBucketKeyValue = otherBucketKey; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FiltersValue is not null) - { - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - } - - if (OtherBucketValue.HasValue) - { - writer.WritePropertyName("other_bucket"); - writer.WriteBooleanValue(OtherBucketValue.Value); - } - - if (!string.IsNullOrEmpty(OtherBucketKeyValue)) - { - writer.WritePropertyName("other_bucket_key"); - writer.WriteStringValue(OtherBucketKeyValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FiltersAggregationDescriptor : SerializableDescriptor -{ - internal FiltersAggregationDescriptor(Action configure) => configure.Invoke(this); - - public FiltersAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? FiltersValue { get; set; } - private bool? OtherBucketValue { get; set; } - private string? OtherBucketKeyValue { get; set; } - - /// - /// - /// Collection of queries from which to build buckets. - /// - /// - public FiltersAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? filters) - { - FiltersValue = filters; - return Self; - } - - /// - /// - /// Set to true to add a bucket to the response which will contain all documents that do not match any of the given filters. - /// - /// - public FiltersAggregationDescriptor OtherBucket(bool? otherBucket = true) - { - OtherBucketValue = otherBucket; - return Self; - } - - /// - /// - /// The key with which the other bucket is returned. - /// - /// - public FiltersAggregationDescriptor OtherBucketKey(string? otherBucketKey) - { - OtherBucketKeyValue = otherBucketKey; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FiltersValue is not null) - { - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - } - - if (OtherBucketValue.HasValue) - { - writer.WritePropertyName("other_bucket"); - writer.WriteBooleanValue(OtherBucketValue.Value); - } - - if (!string.IsNullOrEmpty(OtherBucketKeyValue)) - { - writer.WritePropertyName("other_bucket_key"); - writer.WriteStringValue(OtherBucketKeyValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersBucket.g.cs deleted file mode 100644 index 0de13876564..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersBucket.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class FiltersBucketConverter : JsonConverter -{ - public override FiltersBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new FiltersBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount }; - } - - public override void Write(Utf8JsonWriter writer, FiltersBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'FiltersBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(FiltersBucketConverter))] -public sealed partial class FiltersBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregate.g.cs deleted file mode 100644 index 10327902268..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class FrequentItemSetsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs deleted file mode 100644 index f6e4457f7de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs +++ /dev/null @@ -1,461 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class FrequentItemSetsAggregation -{ - /// - /// - /// Fields to analyze. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - public ICollection Fields { get; set; } - - /// - /// - /// Query that filters documents from analysis. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - - /// - /// - /// The minimum size of one item set. - /// - /// - [JsonInclude, JsonPropertyName("minimum_set_size")] - public int? MinimumSetSize { get; set; } - - /// - /// - /// The minimum support of one item set. - /// - /// - [JsonInclude, JsonPropertyName("minimum_support")] - public double? MinimumSupport { get; set; } - - /// - /// - /// The number of top item sets to return. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(FrequentItemSetsAggregation frequentItemSetsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.FrequentItemSets(frequentItemSetsAggregation); -} - -public sealed partial class FrequentItemSetsAggregationDescriptor : SerializableDescriptor> -{ - internal FrequentItemSetsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public FrequentItemSetsAggregationDescriptor() : base() - { - } - - private ICollection FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor FieldsDescriptor { get; set; } - private Action> FieldsDescriptorAction { get; set; } - private Action>[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private int? MinimumSetSizeValue { get; set; } - private double? MinimumSupportValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Fields to analyze. - /// - /// - public FrequentItemSetsAggregationDescriptor Fields(ICollection fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Fields(Action> configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Fields(params Action>[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Query that filters documents from analysis. - /// - /// - public FrequentItemSetsAggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum size of one item set. - /// - /// - public FrequentItemSetsAggregationDescriptor MinimumSetSize(int? minimumSetSize) - { - MinimumSetSizeValue = minimumSetSize; - return Self; - } - - /// - /// - /// The minimum support of one item set. - /// - /// - public FrequentItemSetsAggregationDescriptor MinimumSupport(double? minimumSupport) - { - MinimumSupportValue = minimumSupport; - return Self; - } - - /// - /// - /// The number of top item sets to return. - /// - /// - public FrequentItemSetsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (MinimumSetSizeValue.HasValue) - { - writer.WritePropertyName("minimum_set_size"); - writer.WriteNumberValue(MinimumSetSizeValue.Value); - } - - if (MinimumSupportValue.HasValue) - { - writer.WritePropertyName("minimum_support"); - writer.WriteNumberValue(MinimumSupportValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FrequentItemSetsAggregationDescriptor : SerializableDescriptor -{ - internal FrequentItemSetsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public FrequentItemSetsAggregationDescriptor() : base() - { - } - - private ICollection FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor FieldsDescriptor { get; set; } - private Action FieldsDescriptorAction { get; set; } - private Action[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private int? MinimumSetSizeValue { get; set; } - private double? MinimumSupportValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Fields to analyze. - /// - /// - public FrequentItemSetsAggregationDescriptor Fields(ICollection fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Fields(Action configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Fields(params Action[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Query that filters documents from analysis. - /// - /// - public FrequentItemSetsAggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public FrequentItemSetsAggregationDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum size of one item set. - /// - /// - public FrequentItemSetsAggregationDescriptor MinimumSetSize(int? minimumSetSize) - { - MinimumSetSizeValue = minimumSetSize; - return Self; - } - - /// - /// - /// The minimum support of one item set. - /// - /// - public FrequentItemSetsAggregationDescriptor MinimumSupport(double? minimumSupport) - { - MinimumSupportValue = minimumSupport; - return Self; - } - - /// - /// - /// The number of top item sets to return. - /// - /// - public FrequentItemSetsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.FrequentItemSetsFieldDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (MinimumSetSizeValue.HasValue) - { - writer.WritePropertyName("minimum_set_size"); - writer.WriteNumberValue(MinimumSetSizeValue.Value); - } - - if (MinimumSupportValue.HasValue) - { - writer.WritePropertyName("minimum_support"); - writer.WriteNumberValue(MinimumSupportValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsBucket.g.cs deleted file mode 100644 index 61749981144..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsBucket.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class FrequentItemSetsBucketConverter : JsonConverter -{ - public override FrequentItemSetsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary> key = default; - double support = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize>>(ref reader, options); - continue; - } - - if (property == "support") - { - support = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new FrequentItemSetsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key, Support = support }; - } - - public override void Write(Utf8JsonWriter writer, FrequentItemSetsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'FrequentItemSetsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(FrequentItemSetsBucketConverter))] -public sealed partial class FrequentItemSetsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary> Key { get; init; } - public double Support { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsField.g.cs deleted file mode 100644 index d602457cf05..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FrequentItemSetsField.g.cs +++ /dev/null @@ -1,201 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class FrequentItemSetsField -{ - /// - /// - /// Values to exclude. - /// Can be regular expression strings or arrays of strings of exact terms. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? Exclude { get; set; } - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Values to include. - /// Can be regular expression strings or arrays of strings of exact terms. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? Include { get; set; } -} - -public sealed partial class FrequentItemSetsFieldDescriptor : SerializableDescriptor> -{ - internal FrequentItemSetsFieldDescriptor(Action> configure) => configure.Invoke(this); - - public FrequentItemSetsFieldDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - - /// - /// - /// Values to exclude. - /// Can be regular expression strings or arrays of strings of exact terms. - /// - /// - public FrequentItemSetsFieldDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - public FrequentItemSetsFieldDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public FrequentItemSetsFieldDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public FrequentItemSetsFieldDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Values to include. - /// Can be regular expression strings or arrays of strings of exact terms. - /// - /// - public FrequentItemSetsFieldDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FrequentItemSetsFieldDescriptor : SerializableDescriptor -{ - internal FrequentItemSetsFieldDescriptor(Action configure) => configure.Invoke(this); - - public FrequentItemSetsFieldDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - - /// - /// - /// Values to exclude. - /// Can be regular expression strings or arrays of strings of exact terms. - /// - /// - public FrequentItemSetsFieldDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - public FrequentItemSetsFieldDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public FrequentItemSetsFieldDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public FrequentItemSetsFieldDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Values to include. - /// Can be regular expression strings or arrays of strings of exact terms. - /// - /// - public FrequentItemSetsFieldDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregate.g.cs deleted file mode 100644 index 45bdf6b6fa1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoBoundsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("bounds")] - public Elastic.Clients.Elasticsearch.Serverless.GeoBounds? Bounds { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs deleted file mode 100644 index fc7717d21b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs +++ /dev/null @@ -1,332 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoBoundsAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Specifies whether the bounding box should be allowed to overlap the international date line. - /// - /// - [JsonInclude, JsonPropertyName("wrap_longitude")] - public bool? WrapLongitude { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GeoBoundsAggregation geoBoundsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.GeoBounds(geoBoundsAggregation); -} - -public sealed partial class GeoBoundsAggregationDescriptor : SerializableDescriptor> -{ - internal GeoBoundsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeoBoundsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? WrapLongitudeValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoBoundsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoBoundsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoBoundsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public GeoBoundsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public GeoBoundsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public GeoBoundsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public GeoBoundsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies whether the bounding box should be allowed to overlap the international date line. - /// - /// - public GeoBoundsAggregationDescriptor WrapLongitude(bool? wrapLongitude = true) - { - WrapLongitudeValue = wrapLongitude; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (WrapLongitudeValue.HasValue) - { - writer.WritePropertyName("wrap_longitude"); - writer.WriteBooleanValue(WrapLongitudeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoBoundsAggregationDescriptor : SerializableDescriptor -{ - internal GeoBoundsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeoBoundsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? WrapLongitudeValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoBoundsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoBoundsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoBoundsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public GeoBoundsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public GeoBoundsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public GeoBoundsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public GeoBoundsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Specifies whether the bounding box should be allowed to overlap the international date line. - /// - /// - public GeoBoundsAggregationDescriptor WrapLongitude(bool? wrapLongitude = true) - { - WrapLongitudeValue = wrapLongitude; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (WrapLongitudeValue.HasValue) - { - writer.WritePropertyName("wrap_longitude"); - writer.WriteBooleanValue(WrapLongitudeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregate.g.cs deleted file mode 100644 index 2743788a100..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoCentroidAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("location")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation? Location { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs deleted file mode 100644 index e3d5fd215f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs +++ /dev/null @@ -1,345 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoCentroidAggregation -{ - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("location")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation? Location { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GeoCentroidAggregation geoCentroidAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.GeoCentroid(geoCentroidAggregation); -} - -public sealed partial class GeoCentroidAggregationDescriptor : SerializableDescriptor> -{ - internal GeoCentroidAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeoCentroidAggregationDescriptor() : base() - { - } - - private long? CountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? LocationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - public GeoCentroidAggregationDescriptor Count(long? count) - { - CountValue = count; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoCentroidAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoCentroidAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoCentroidAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoCentroidAggregationDescriptor Location(Elastic.Clients.Elasticsearch.Serverless.GeoLocation? location) - { - LocationValue = location; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public GeoCentroidAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public GeoCentroidAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public GeoCentroidAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public GeoCentroidAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CountValue.HasValue) - { - writer.WritePropertyName("count"); - writer.WriteNumberValue(CountValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (LocationValue is not null) - { - writer.WritePropertyName("location"); - JsonSerializer.Serialize(writer, LocationValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoCentroidAggregationDescriptor : SerializableDescriptor -{ - internal GeoCentroidAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeoCentroidAggregationDescriptor() : base() - { - } - - private long? CountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? LocationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - public GeoCentroidAggregationDescriptor Count(long? count) - { - CountValue = count; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoCentroidAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoCentroidAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public GeoCentroidAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoCentroidAggregationDescriptor Location(Elastic.Clients.Elasticsearch.Serverless.GeoLocation? location) - { - LocationValue = location; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public GeoCentroidAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public GeoCentroidAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public GeoCentroidAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public GeoCentroidAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CountValue.HasValue) - { - writer.WritePropertyName("count"); - writer.WriteNumberValue(CountValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (LocationValue is not null) - { - writer.WritePropertyName("location"); - JsonSerializer.Serialize(writer, LocationValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs deleted file mode 100644 index df2c4d5c0ba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a geo_distance aggregation. The unit for from and to is meters by default. -/// -/// -public sealed partial class GeoDistanceAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs deleted file mode 100644 index 704e70503a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs +++ /dev/null @@ -1,445 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoDistanceAggregation -{ - /// - /// - /// The distance calculation type. - /// - /// - [JsonInclude, JsonPropertyName("distance_type")] - public Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceType { get; set; } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The origin used to evaluate the distance. - /// - /// - [JsonInclude, JsonPropertyName("origin")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation? Origin { get; set; } - - /// - /// - /// An array of ranges used to bucket documents. - /// - /// - [JsonInclude, JsonPropertyName("ranges")] - public ICollection? Ranges { get; set; } - - /// - /// - /// The distance unit. - /// - /// - [JsonInclude, JsonPropertyName("unit")] - public Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? Unit { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GeoDistanceAggregation geoDistanceAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.GeoDistance(geoDistanceAggregation); -} - -public sealed partial class GeoDistanceAggregationDescriptor : SerializableDescriptor> -{ - internal GeoDistanceAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeoDistanceAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? OriginValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? UnitValue { get; set; } - - /// - /// - /// The distance calculation type. - /// - /// - public GeoDistanceAggregationDescriptor DistanceType(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? distanceType) - { - DistanceTypeValue = distanceType; - return Self; - } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The origin used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Origin(Elastic.Clients.Elasticsearch.Serverless.GeoLocation? origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// An array of ranges used to bucket documents. - /// - /// - public GeoDistanceAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public GeoDistanceAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public GeoDistanceAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public GeoDistanceAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - /// - /// - /// The distance unit. - /// - /// - public GeoDistanceAggregationDescriptor Unit(Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? unit) - { - UnitValue = unit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DistanceTypeValue is not null) - { - writer.WritePropertyName("distance_type"); - JsonSerializer.Serialize(writer, DistanceTypeValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (OriginValue is not null) - { - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - if (UnitValue is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, UnitValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoDistanceAggregationDescriptor : SerializableDescriptor -{ - internal GeoDistanceAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeoDistanceAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? OriginValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? UnitValue { get; set; } - - /// - /// - /// The distance calculation type. - /// - /// - public GeoDistanceAggregationDescriptor DistanceType(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? distanceType) - { - DistanceTypeValue = distanceType; - return Self; - } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field of type geo_point used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The origin used to evaluate the distance. - /// - /// - public GeoDistanceAggregationDescriptor Origin(Elastic.Clients.Elasticsearch.Serverless.GeoLocation? origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// An array of ranges used to bucket documents. - /// - /// - public GeoDistanceAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public GeoDistanceAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public GeoDistanceAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public GeoDistanceAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - /// - /// - /// The distance unit. - /// - /// - public GeoDistanceAggregationDescriptor Unit(Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? unit) - { - UnitValue = unit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DistanceTypeValue is not null) - { - writer.WritePropertyName("distance_type"); - JsonSerializer.Serialize(writer, DistanceTypeValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (OriginValue is not null) - { - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - if (UnitValue is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, UnitValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregate.g.cs deleted file mode 100644 index b2072a2fefa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregate.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoLineAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("geometry")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLine Geometry { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("properties")] - public object Properties { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs deleted file mode 100644 index 190f4d4c11b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineAggregation.g.cs +++ /dev/null @@ -1,409 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoLineAggregation -{ - /// - /// - /// When true, returns an additional array of the sort values in the feature properties. - /// - /// - [JsonInclude, JsonPropertyName("include_sort")] - public bool? IncludeSort { get; set; } - - /// - /// - /// The name of the geo_point field. - /// - /// - [JsonInclude, JsonPropertyName("point")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint Point { get; set; } - - /// - /// - /// The maximum length of the line represented in the aggregation. - /// Valid sizes are between 1 and 10000. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// When the geo_line aggregation is nested inside a time_series aggregation, this field defaults to @timestamp, and any other value will result in error. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort Sort { get; set; } - - /// - /// - /// The order in which the line is sorted (ascending or descending). - /// - /// - [JsonInclude, JsonPropertyName("sort_order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? SortOrder { get; set; } -} - -public sealed partial class GeoLineAggregationDescriptor : SerializableDescriptor> -{ - internal GeoLineAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeoLineAggregationDescriptor() : base() - { - } - - private bool? IncludeSortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint PointValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePointDescriptor PointDescriptor { get; set; } - private Action> PointDescriptorAction { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSortDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? SortOrderValue { get; set; } - - /// - /// - /// When true, returns an additional array of the sort values in the feature properties. - /// - /// - public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) - { - IncludeSortValue = includeSort; - return Self; - } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLineAggregationDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint point) - { - PointDescriptor = null; - PointDescriptorAction = null; - PointValue = point; - return Self; - } - - public GeoLineAggregationDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePointDescriptor descriptor) - { - PointValue = null; - PointDescriptorAction = null; - PointDescriptor = descriptor; - return Self; - } - - public GeoLineAggregationDescriptor Point(Action> configure) - { - PointValue = null; - PointDescriptor = null; - PointDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum length of the line represented in the aggregation. - /// Valid sizes are between 1 and 10000. - /// - /// - public GeoLineAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// When the geo_line aggregation is nested inside a time_series aggregation, this field defaults to @timestamp, and any other value will result in error. - /// - /// - public GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public GeoLineAggregationDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - - /// - /// - /// The order in which the line is sorted (ascending or descending). - /// - /// - public GeoLineAggregationDescriptor SortOrder(Elastic.Clients.Elasticsearch.Serverless.SortOrder? sortOrder) - { - SortOrderValue = sortOrder; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IncludeSortValue.HasValue) - { - writer.WritePropertyName("include_sort"); - writer.WriteBooleanValue(IncludeSortValue.Value); - } - - if (PointDescriptor is not null) - { - writer.WritePropertyName("point"); - JsonSerializer.Serialize(writer, PointDescriptor, options); - } - else if (PointDescriptorAction is not null) - { - writer.WritePropertyName("point"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePointDescriptor(PointDescriptorAction), options); - } - else - { - writer.WritePropertyName("point"); - JsonSerializer.Serialize(writer, PointValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSortDescriptor(SortDescriptorAction), options); - } - else - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (SortOrderValue is not null) - { - writer.WritePropertyName("sort_order"); - JsonSerializer.Serialize(writer, SortOrderValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoLineAggregationDescriptor : SerializableDescriptor -{ - internal GeoLineAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeoLineAggregationDescriptor() : base() - { - } - - private bool? IncludeSortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint PointValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePointDescriptor PointDescriptor { get; set; } - private Action PointDescriptorAction { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSortDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? SortOrderValue { get; set; } - - /// - /// - /// When true, returns an additional array of the sort values in the feature properties. - /// - /// - public GeoLineAggregationDescriptor IncludeSort(bool? includeSort = true) - { - IncludeSortValue = includeSort; - return Self; - } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLineAggregationDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePoint point) - { - PointDescriptor = null; - PointDescriptorAction = null; - PointValue = point; - return Self; - } - - public GeoLineAggregationDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePointDescriptor descriptor) - { - PointValue = null; - PointDescriptorAction = null; - PointDescriptor = descriptor; - return Self; - } - - public GeoLineAggregationDescriptor Point(Action configure) - { - PointValue = null; - PointDescriptor = null; - PointDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum length of the line represented in the aggregation. - /// Valid sizes are between 1 and 10000. - /// - /// - public GeoLineAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// When the geo_line aggregation is nested inside a time_series aggregation, this field defaults to @timestamp, and any other value will result in error. - /// - /// - public GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSort sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public GeoLineAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public GeoLineAggregationDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - - /// - /// - /// The order in which the line is sorted (ascending or descending). - /// - /// - public GeoLineAggregationDescriptor SortOrder(Elastic.Clients.Elasticsearch.Serverless.SortOrder? sortOrder) - { - SortOrderValue = sortOrder; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IncludeSortValue.HasValue) - { - writer.WritePropertyName("include_sort"); - writer.WriteBooleanValue(IncludeSortValue.Value); - } - - if (PointDescriptor is not null) - { - writer.WritePropertyName("point"); - JsonSerializer.Serialize(writer, PointDescriptor, options); - } - else if (PointDescriptorAction is not null) - { - writer.WritePropertyName("point"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLinePointDescriptor(PointDescriptorAction), options); - } - else - { - writer.WritePropertyName("point"); - JsonSerializer.Serialize(writer, PointValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeoLineSortDescriptor(SortDescriptorAction), options); - } - else - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (SortOrderValue is not null) - { - writer.WritePropertyName("sort_order"); - JsonSerializer.Serialize(writer, SortOrderValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLinePoint.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLinePoint.g.cs deleted file mode 100644 index b91af1b478e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLinePoint.g.cs +++ /dev/null @@ -1,143 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoLinePoint -{ - /// - /// - /// The name of the geo_point field. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } -} - -public sealed partial class GeoLinePointDescriptor : SerializableDescriptor> -{ - internal GeoLinePointDescriptor(Action> configure) => configure.Invoke(this); - - public GeoLinePointDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLinePointDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLinePointDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLinePointDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class GeoLinePointDescriptor : SerializableDescriptor -{ - internal GeoLinePointDescriptor(Action configure) => configure.Invoke(this); - - public GeoLinePointDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLinePointDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLinePointDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the geo_point field. - /// - /// - public GeoLinePointDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineSort.g.cs deleted file mode 100644 index c841571ce4a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoLineSort.g.cs +++ /dev/null @@ -1,143 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeoLineSort -{ - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } -} - -public sealed partial class GeoLineSortDescriptor : SerializableDescriptor> -{ - internal GeoLineSortDescriptor(Action> configure) => configure.Invoke(this); - - public GeoLineSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - public GeoLineSortDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - public GeoLineSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - public GeoLineSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class GeoLineSortDescriptor : SerializableDescriptor -{ - internal GeoLineSortDescriptor(Action configure) => configure.Invoke(this); - - public GeoLineSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - public GeoLineSortDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - public GeoLineSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the numeric field to use as the sort key for ordering the points. - /// - /// - public GeoLineSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregate.g.cs deleted file mode 100644 index 3480803eef0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeohashGridAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs deleted file mode 100644 index 58ae2f5cc99..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs +++ /dev/null @@ -1,339 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeohashGridAggregation -{ - /// - /// - /// The bounding box to filter the points in each bucket. - /// - /// - [JsonInclude, JsonPropertyName("bounds")] - public Elastic.Clients.Elasticsearch.Serverless.GeoBounds? Bounds { get; set; } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The string length of the geohashes used to define cells/buckets in the results. - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? Precision { get; set; } - - /// - /// - /// Allows for more accurate counting of the top cells returned in the final result the aggregation. - /// Defaults to returning max(10,(size x number-of-shards)) buckets from each shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// The maximum number of geohash buckets to return. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GeohashGridAggregation geohashGridAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.GeohashGrid(geohashGridAggregation); -} - -public sealed partial class GeohashGridAggregationDescriptor : SerializableDescriptor> -{ - internal GeohashGridAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeohashGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? PrecisionValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// The bounding box to filter the points in each bucket. - /// - /// - public GeohashGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - public GeohashGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - public GeohashGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - public GeohashGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string length of the geohashes used to define cells/buckets in the results. - /// - /// - public GeohashGridAggregationDescriptor Precision(Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Allows for more accurate counting of the top cells returned in the final result the aggregation. - /// Defaults to returning max(10,(size x number-of-shards)) buckets from each shard. - /// - /// - public GeohashGridAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum number of geohash buckets to return. - /// - /// - public GeohashGridAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeohashGridAggregationDescriptor : SerializableDescriptor -{ - internal GeohashGridAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeohashGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? PrecisionValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// The bounding box to filter the points in each bucket. - /// - /// - public GeohashGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - public GeohashGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - public GeohashGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohash_grid aggregates all array values. - /// - /// - public GeohashGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string length of the geohashes used to define cells/buckets in the results. - /// - /// - public GeohashGridAggregationDescriptor Precision(Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Allows for more accurate counting of the top cells returned in the final result the aggregation. - /// Defaults to returning max(10,(size x number-of-shards)) buckets from each shard. - /// - /// - public GeohashGridAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum number of geohash buckets to return. - /// - /// - public GeohashGridAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridBucket.g.cs deleted file mode 100644 index 1bb531d814f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class GeohashGridBucketConverter : JsonConverter -{ - public override GeohashGridBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - string key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new GeohashGridBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, GeohashGridBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'GeohashGridBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(GeohashGridBucketConverter))] -public sealed partial class GeohashGridBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public string Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregate.g.cs deleted file mode 100644 index 1667939d82a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeohexGridAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs deleted file mode 100644 index 06c865c90b0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs +++ /dev/null @@ -1,331 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeohexGridAggregation -{ - /// - /// - /// Bounding box used to filter the geo-points in each bucket. - /// - /// - [JsonInclude, JsonPropertyName("bounds")] - public Elastic.Clients.Elasticsearch.Serverless.GeoBounds? Bounds { get; set; } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Integer zoom of the key used to defined cells or buckets - /// in the results. Value should be between 0-15. - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public int? Precision { get; set; } - - /// - /// - /// Number of buckets returned from each shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// Maximum number of buckets to return. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GeohexGridAggregation geohexGridAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.GeohexGrid(geohexGridAggregation); -} - -public sealed partial class GeohexGridAggregationDescriptor : SerializableDescriptor> -{ - internal GeohexGridAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeohexGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? PrecisionValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Bounding box used to filter the geo-points in each bucket. - /// - /// - public GeohexGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - public GeohexGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - public GeohexGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - public GeohexGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Integer zoom of the key used to defined cells or buckets - /// in the results. Value should be between 0-15. - /// - /// - public GeohexGridAggregationDescriptor Precision(int? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Number of buckets returned from each shard. - /// - /// - public GeohexGridAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// Maximum number of buckets to return. - /// - /// - public GeohexGridAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeohexGridAggregationDescriptor : SerializableDescriptor -{ - internal GeohexGridAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeohexGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? PrecisionValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Bounding box used to filter the geo-points in each bucket. - /// - /// - public GeohexGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - public GeohexGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - public GeohexGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geohex_grid aggregates all array values. - /// - /// - public GeohexGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Integer zoom of the key used to defined cells or buckets - /// in the results. Value should be between 0-15. - /// - /// - public GeohexGridAggregationDescriptor Precision(int? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Number of buckets returned from each shard. - /// - /// - public GeohexGridAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// Maximum number of buckets to return. - /// - /// - public GeohexGridAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridBucket.g.cs deleted file mode 100644 index 5878ecf1f79..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class GeohexGridBucketConverter : JsonConverter -{ - public override GeohexGridBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - string key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new GeohexGridBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, GeohexGridBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'GeohexGridBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(GeohexGridBucketConverter))] -public sealed partial class GeohexGridBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public string Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregate.g.cs deleted file mode 100644 index 8e6cb1d6d12..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeotileGridAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs deleted file mode 100644 index 18d182ef309..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs +++ /dev/null @@ -1,343 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GeotileGridAggregation -{ - /// - /// - /// A bounding box to filter the geo-points or geo-shapes in each bucket. - /// - /// - [JsonInclude, JsonPropertyName("bounds")] - public Elastic.Clients.Elasticsearch.Serverless.GeoBounds? Bounds { get; set; } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Integer zoom of the key used to define cells/buckets in the results. - /// Values outside of the range [0,29] will be rejected. - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public double? Precision { get; set; } - - /// - /// - /// Allows for more accurate counting of the top cells returned in the final result the aggregation. - /// Defaults to returning max(10,(size x number-of-shards)) buckets from each shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// The maximum number of buckets to return. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GeotileGridAggregation geotileGridAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.GeotileGrid(geotileGridAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy(GeotileGridAggregation geotileGridAggregation) => Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy.GeotileGrid(geotileGridAggregation); -} - -public sealed partial class GeotileGridAggregationDescriptor : SerializableDescriptor> -{ - internal GeotileGridAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public GeotileGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private double? PrecisionValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// A bounding box to filter the geo-points or geo-shapes in each bucket. - /// - /// - public GeotileGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - public GeotileGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - public GeotileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - public GeotileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Integer zoom of the key used to define cells/buckets in the results. - /// Values outside of the range [0,29] will be rejected. - /// - /// - public GeotileGridAggregationDescriptor Precision(double? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Allows for more accurate counting of the top cells returned in the final result the aggregation. - /// Defaults to returning max(10,(size x number-of-shards)) buckets from each shard. - /// - /// - public GeotileGridAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum number of buckets to return. - /// - /// - public GeotileGridAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeotileGridAggregationDescriptor : SerializableDescriptor -{ - internal GeotileGridAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GeotileGridAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private double? PrecisionValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// A bounding box to filter the geo-points or geo-shapes in each bucket. - /// - /// - public GeotileGridAggregationDescriptor Bounds(Elastic.Clients.Elasticsearch.Serverless.GeoBounds? bounds) - { - BoundsValue = bounds; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - public GeotileGridAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - public GeotileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing indexed geo_point or geo_shape values. - /// If the field contains an array, geotile_grid aggregates all array values. - /// - /// - public GeotileGridAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Integer zoom of the key used to define cells/buckets in the results. - /// Values outside of the range [0,29] will be rejected. - /// - /// - public GeotileGridAggregationDescriptor Precision(double? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Allows for more accurate counting of the top cells returned in the final result the aggregation. - /// Defaults to returning max(10,(size x number-of-shards)) buckets from each shard. - /// - /// - public GeotileGridAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum number of buckets to return. - /// - /// - public GeotileGridAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoundsValue is not null) - { - writer.WritePropertyName("bounds"); - JsonSerializer.Serialize(writer, BoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridBucket.g.cs deleted file mode 100644 index cfcaeda800e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class GeotileGridBucketConverter : JsonConverter -{ - public override GeotileGridBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - string key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new GeotileGridBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, GeotileGridBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'GeotileGridBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(GeotileGridBucketConverter))] -public sealed partial class GeotileGridBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public string Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregate.g.cs deleted file mode 100644 index d20cbd31f1c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class GlobalAggregateConverter : JsonConverter -{ - public override GlobalAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new GlobalAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, GlobalAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'GlobalAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(GlobalAggregateConverter))] -public sealed partial class GlobalAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs deleted file mode 100644 index 244d0e213aa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GlobalAggregation -{ -} - -public sealed partial class GlobalAggregationDescriptor : SerializableDescriptor -{ - internal GlobalAggregationDescriptor(Action configure) => configure.Invoke(this); - - public GlobalAggregationDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs deleted file mode 100644 index 1c2904f0f6c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class GoogleNormalizedDistanceHeuristic -{ - /// - /// - /// Set to false if you defined a custom background filter that represents a different set of documents that you want to compare to. - /// - /// - [JsonInclude, JsonPropertyName("background_is_superset")] - public bool? BackgroundIsSuperset { get; set; } -} - -public sealed partial class GoogleNormalizedDistanceHeuristicDescriptor : SerializableDescriptor -{ - internal GoogleNormalizedDistanceHeuristicDescriptor(Action configure) => configure.Invoke(this); - - public GoogleNormalizedDistanceHeuristicDescriptor() : base() - { - } - - private bool? BackgroundIsSupersetValue { get; set; } - - /// - /// - /// Set to false if you defined a custom background filter that represents a different set of documents that you want to compare to. - /// - /// - public GoogleNormalizedDistanceHeuristicDescriptor BackgroundIsSuperset(bool? backgroundIsSuperset = true) - { - BackgroundIsSupersetValue = backgroundIsSuperset; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BackgroundIsSupersetValue.HasValue) - { - writer.WritePropertyName("background_is_superset"); - writer.WriteBooleanValue(BackgroundIsSupersetValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrMethod.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrMethod.g.cs deleted file mode 100644 index 49a13fbb1ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrMethod.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class HdrMethod -{ - /// - /// - /// Specifies the resolution of values for the histogram in number of significant digits. - /// - /// - [JsonInclude, JsonPropertyName("number_of_significant_value_digits")] - public int? NumberOfSignificantValueDigits { get; set; } -} - -public sealed partial class HdrMethodDescriptor : SerializableDescriptor -{ - internal HdrMethodDescriptor(Action configure) => configure.Invoke(this); - - public HdrMethodDescriptor() : base() - { - } - - private int? NumberOfSignificantValueDigitsValue { get; set; } - - /// - /// - /// Specifies the resolution of values for the histogram in number of significant digits. - /// - /// - public HdrMethodDescriptor NumberOfSignificantValueDigits(int? numberOfSignificantValueDigits) - { - NumberOfSignificantValueDigitsValue = numberOfSignificantValueDigits; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumberOfSignificantValueDigitsValue.HasValue) - { - writer.WritePropertyName("number_of_significant_value_digits"); - writer.WriteNumberValue(NumberOfSignificantValueDigitsValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentileRanksAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentileRanksAggregate.g.cs deleted file mode 100644 index 6cc5bdc26df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentileRanksAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class HdrPercentileRanksAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("values")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Percentiles Values { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentilesAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentilesAggregate.g.cs deleted file mode 100644 index 5da78134c81..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HdrPercentilesAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class HdrPercentilesAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("values")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Percentiles Values { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregate.g.cs deleted file mode 100644 index ca1937cb8c6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class HistogramAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs deleted file mode 100644 index 35865ac046e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs +++ /dev/null @@ -1,717 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class HistogramAggregation -{ - /// - /// - /// Enables extending the bounds of the histogram beyond the data itself. - /// - /// - [JsonInclude, JsonPropertyName("extended_bounds")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? ExtendedBounds { get; set; } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Limits the range of buckets in the histogram. - /// It is particularly useful in the case of open data ranges that can result in a very large number of buckets. - /// - /// - [JsonInclude, JsonPropertyName("hard_bounds")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? HardBounds { get; set; } - - /// - /// - /// The interval for the buckets. - /// Must be a positive decimal. - /// - /// - [JsonInclude, JsonPropertyName("interval")] - public double? Interval { get; set; } - - /// - /// - /// Only returns buckets that have min_doc_count number of documents. - /// By default, the response will fill gaps in the histogram with empty buckets. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public int? MinDocCount { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public double? Missing { get; set; } - - /// - /// - /// By default, the bucket keys start with 0 and then continue in even spaced steps of interval. - /// The bucket boundaries can be shifted by using the offset option. - /// - /// - [JsonInclude, JsonPropertyName("offset")] - public double? Offset { get; set; } - - /// - /// - /// The sort order of the returned buckets. - /// By default, the returned buckets are sorted by their key ascending. - /// - /// - [JsonInclude, JsonPropertyName("order")] - [SingleOrManyCollectionConverter(typeof(KeyValuePair))] - public ICollection>? Order { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(HistogramAggregation histogramAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Histogram(histogramAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy(HistogramAggregation histogramAggregation) => Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy.Histogram(histogramAggregation); -} - -public sealed partial class HistogramAggregationDescriptor : SerializableDescriptor> -{ - internal HistogramAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public HistogramAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? ExtendedBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor ExtendedBoundsDescriptor { get; set; } - private Action ExtendedBoundsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? HardBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor HardBoundsDescriptor { get; set; } - private Action HardBoundsDescriptorAction { get; set; } - private double? IntervalValue { get; set; } - private int? MinDocCountValue { get; set; } - private double? MissingValue { get; set; } - private double? OffsetValue { get; set; } - private ICollection>? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Enables extending the bounds of the histogram beyond the data itself. - /// - /// - public HistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? extendedBounds) - { - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsValue = extendedBounds; - return Self; - } - - public HistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor descriptor) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsDescriptor = descriptor; - return Self; - } - - public HistogramAggregationDescriptor ExtendedBounds(Action configure) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - public HistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - public HistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - public HistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public HistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Limits the range of buckets in the histogram. - /// It is particularly useful in the case of open data ranges that can result in a very large number of buckets. - /// - /// - public HistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? hardBounds) - { - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = null; - HardBoundsValue = hardBounds; - return Self; - } - - public HistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor descriptor) - { - HardBoundsValue = null; - HardBoundsDescriptorAction = null; - HardBoundsDescriptor = descriptor; - return Self; - } - - public HistogramAggregationDescriptor HardBounds(Action configure) - { - HardBoundsValue = null; - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval for the buckets. - /// Must be a positive decimal. - /// - /// - public HistogramAggregationDescriptor Interval(double? interval) - { - IntervalValue = interval; - return Self; - } - - /// - /// - /// Only returns buckets that have min_doc_count number of documents. - /// By default, the response will fill gaps in the histogram with empty buckets. - /// - /// - public HistogramAggregationDescriptor MinDocCount(int? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public HistogramAggregationDescriptor Missing(double? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// By default, the bucket keys start with 0 and then continue in even spaced steps of interval. - /// The bucket boundaries can be shifted by using the offset option. - /// - /// - public HistogramAggregationDescriptor Offset(double? offset) - { - OffsetValue = offset; - return Self; - } - - /// - /// - /// The sort order of the returned buckets. - /// By default, the returned buckets are sorted by their key ascending. - /// - /// - public HistogramAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - public HistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public HistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public HistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExtendedBoundsDescriptor is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsDescriptor, options); - } - else if (ExtendedBoundsDescriptorAction is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor(ExtendedBoundsDescriptorAction), options); - } - else if (ExtendedBoundsValue is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HardBoundsDescriptor is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsDescriptor, options); - } - else if (HardBoundsDescriptorAction is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor(HardBoundsDescriptorAction), options); - } - else if (HardBoundsValue is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsValue, options); - } - - if (IntervalValue.HasValue) - { - writer.WritePropertyName("interval"); - writer.WriteNumberValue(IntervalValue.Value); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (OffsetValue.HasValue) - { - writer.WritePropertyName("offset"); - writer.WriteNumberValue(OffsetValue.Value); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class HistogramAggregationDescriptor : SerializableDescriptor -{ - internal HistogramAggregationDescriptor(Action configure) => configure.Invoke(this); - - public HistogramAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? ExtendedBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor ExtendedBoundsDescriptor { get; set; } - private Action ExtendedBoundsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? HardBoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor HardBoundsDescriptor { get; set; } - private Action HardBoundsDescriptorAction { get; set; } - private double? IntervalValue { get; set; } - private int? MinDocCountValue { get; set; } - private double? MissingValue { get; set; } - private double? OffsetValue { get; set; } - private ICollection>? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Enables extending the bounds of the histogram beyond the data itself. - /// - /// - public HistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? extendedBounds) - { - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsValue = extendedBounds; - return Self; - } - - public HistogramAggregationDescriptor ExtendedBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor descriptor) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptorAction = null; - ExtendedBoundsDescriptor = descriptor; - return Self; - } - - public HistogramAggregationDescriptor ExtendedBounds(Action configure) - { - ExtendedBoundsValue = null; - ExtendedBoundsDescriptor = null; - ExtendedBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - public HistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - public HistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to aggregate on. - /// - /// - public HistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public HistogramAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Limits the range of buckets in the histogram. - /// It is particularly useful in the case of open data ranges that can result in a very large number of buckets. - /// - /// - public HistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloat? hardBounds) - { - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = null; - HardBoundsValue = hardBounds; - return Self; - } - - public HistogramAggregationDescriptor HardBounds(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor descriptor) - { - HardBoundsValue = null; - HardBoundsDescriptorAction = null; - HardBoundsDescriptor = descriptor; - return Self; - } - - public HistogramAggregationDescriptor HardBounds(Action configure) - { - HardBoundsValue = null; - HardBoundsDescriptor = null; - HardBoundsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval for the buckets. - /// Must be a positive decimal. - /// - /// - public HistogramAggregationDescriptor Interval(double? interval) - { - IntervalValue = interval; - return Self; - } - - /// - /// - /// Only returns buckets that have min_doc_count number of documents. - /// By default, the response will fill gaps in the histogram with empty buckets. - /// - /// - public HistogramAggregationDescriptor MinDocCount(int? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public HistogramAggregationDescriptor Missing(double? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// By default, the bucket keys start with 0 and then continue in even spaced steps of interval. - /// The bucket boundaries can be shifted by using the offset option. - /// - /// - public HistogramAggregationDescriptor Offset(double? offset) - { - OffsetValue = offset; - return Self; - } - - /// - /// - /// The sort order of the returned buckets. - /// By default, the returned buckets are sorted by their key ascending. - /// - /// - public HistogramAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - public HistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public HistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public HistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExtendedBoundsDescriptor is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsDescriptor, options); - } - else if (ExtendedBoundsDescriptorAction is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor(ExtendedBoundsDescriptorAction), options); - } - else if (ExtendedBoundsValue is not null) - { - writer.WritePropertyName("extended_bounds"); - JsonSerializer.Serialize(writer, ExtendedBoundsValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HardBoundsDescriptor is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsDescriptor, options); - } - else if (HardBoundsDescriptorAction is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ExtendedBoundsFloatDescriptor(HardBoundsDescriptorAction), options); - } - else if (HardBoundsValue is not null) - { - writer.WritePropertyName("hard_bounds"); - JsonSerializer.Serialize(writer, HardBoundsValue, options); - } - - if (IntervalValue.HasValue) - { - writer.WritePropertyName("interval"); - writer.WriteNumberValue(IntervalValue.Value); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (OffsetValue.HasValue) - { - writer.WritePropertyName("offset"); - writer.WriteNumberValue(OffsetValue.Value); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramBucket.g.cs deleted file mode 100644 index fe02969739e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramBucket.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class HistogramBucketConverter : JsonConverter -{ - public override HistogramBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - double key = default; - string? keyAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new HistogramBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key, KeyAsString = keyAsString }; - } - - public override void Write(Utf8JsonWriter writer, HistogramBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'HistogramBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(HistogramBucketConverter))] -public sealed partial class HistogramBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public double Key { get; init; } - public string? KeyAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregate.g.cs deleted file mode 100644 index c181704ab19..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregate.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class InferenceAggregateConverter : JsonConverter -{ - public override InferenceAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyCollection? featureImportance = default; - IReadOnlyDictionary? meta = default; - IReadOnlyCollection? topClasses = default; - Elastic.Clients.Elasticsearch.Serverless.FieldValue? value = default; - string? warning = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "feature_importance") - { - featureImportance = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "top_classes") - { - topClasses = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "value") - { - value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "warning") - { - warning = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - return new InferenceAggregate { Data = additionalProperties, FeatureImportance = featureImportance, Meta = meta, TopClasses = topClasses, Value = value, Warning = warning }; - } - - public override void Write(Utf8JsonWriter writer, InferenceAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'InferenceAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(InferenceAggregateConverter))] -public sealed partial class InferenceAggregate : IAggregate -{ - /// - /// - /// Additional data - /// - /// - public IReadOnlyDictionary Data { get; init; } - public IReadOnlyCollection? FeatureImportance { get; init; } - public IReadOnlyDictionary? Meta { get; init; } - public IReadOnlyCollection? TopClasses { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Value { get; init; } - public string? Warning { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs deleted file mode 100644 index b34d2de30f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ /dev/null @@ -1,340 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class InferenceAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// Contains the inference type and its options. - /// - /// - [JsonInclude, JsonPropertyName("inference_config")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfig { get; set; } - - /// - /// - /// The ID or alias for the trained model. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public Elastic.Clients.Elasticsearch.Serverless.Name ModelId { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(InferenceAggregation inferenceAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Inference(inferenceAggregation); -} - -public sealed partial class InferenceAggregationDescriptor : SerializableDescriptor> -{ - internal InferenceAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action> InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name ModelIdValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public InferenceAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// Contains the inference type and its options. - /// - /// - public InferenceAggregationDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public InferenceAggregationDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public InferenceAggregationDescriptor InferenceConfig(Action> configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ID or alias for the trained model. - /// - /// - public InferenceAggregationDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Name modelId) - { - ModelIdValue = modelId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - writer.WritePropertyName("model_id"); - JsonSerializer.Serialize(writer, ModelIdValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceAggregationDescriptor : SerializableDescriptor -{ - internal InferenceAggregationDescriptor(Action configure) => configure.Invoke(this); - - public InferenceAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name ModelIdValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public InferenceAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public InferenceAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// Contains the inference type and its options. - /// - /// - public InferenceAggregationDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public InferenceAggregationDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public InferenceAggregationDescriptor InferenceConfig(Action configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ID or alias for the trained model. - /// - /// - public InferenceAggregationDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Name modelId) - { - ModelIdValue = modelId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - writer.WritePropertyName("model_id"); - JsonSerializer.Serialize(writer, ModelIdValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceClassImportance.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceClassImportance.g.cs deleted file mode 100644 index e857a14b7ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceClassImportance.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class InferenceClassImportance -{ - [JsonInclude, JsonPropertyName("class_name")] - public string ClassName { get; init; } - [JsonInclude, JsonPropertyName("importance")] - public double Importance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceConfig.g.cs deleted file mode 100644 index e0656593355..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceConfig.g.cs +++ /dev/null @@ -1,242 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -[JsonConverter(typeof(InferenceConfigConverter))] -public sealed partial class InferenceConfig -{ - internal InferenceConfig(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 InferenceConfig Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => new InferenceConfig("classification", classificationInferenceOptions); - public static InferenceConfig Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => new InferenceConfig("regression", regressionInferenceOptions); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class InferenceConfigConverter : JsonConverter -{ - public override InferenceConfig 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; - 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 == "classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regression") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'InferenceConfig' from the response."); - } - - var result = new InferenceConfig(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, InferenceConfig value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions)value.Variant, options); - break; - case "regression": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigDescriptor : SerializableDescriptor> -{ - internal InferenceConfigDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceConfigDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => Set(classificationInferenceOptions, "classification"); - public InferenceConfigDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => Set(regressionInferenceOptions, "regression"); - public InferenceConfigDescriptor Regression(Action> configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigDescriptor : SerializableDescriptor -{ - internal InferenceConfigDescriptor(Action configure) => configure.Invoke(this); - - public InferenceConfigDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => Set(classificationInferenceOptions, "classification"); - public InferenceConfigDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => Set(regressionInferenceOptions, "regression"); - public InferenceConfigDescriptor Regression(Action configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs deleted file mode 100644 index 830304e4b81..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceFeatureImportance.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class InferenceFeatureImportance -{ - [JsonInclude, JsonPropertyName("classes")] - public IReadOnlyCollection? Classes { get; init; } - [JsonInclude, JsonPropertyName("feature_name")] - public string FeatureName { get; init; } - [JsonInclude, JsonPropertyName("importance")] - public double? Importance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceTopClassEntry.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceTopClassEntry.g.cs deleted file mode 100644 index c92cd3773e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceTopClassEntry.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class InferenceTopClassEntry -{ - [JsonInclude, JsonPropertyName("class_name")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue ClassName { get; init; } - [JsonInclude, JsonPropertyName("class_probability")] - public double ClassProbability { get; init; } - [JsonInclude, JsonPropertyName("class_score")] - public double ClassScore { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregate.g.cs deleted file mode 100644 index e5cc36e2271..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class IpPrefixAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs deleted file mode 100644 index c3de028c560..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs +++ /dev/null @@ -1,316 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class IpPrefixAggregation -{ - /// - /// - /// Defines whether the prefix length is appended to IP address keys in the response. - /// - /// - [JsonInclude, JsonPropertyName("append_prefix_length")] - public bool? AppendPrefixLength { get; set; } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Defines whether the prefix applies to IPv6 addresses. - /// - /// - [JsonInclude, JsonPropertyName("is_ipv6")] - public bool? IsIpv6 { get; set; } - - /// - /// - /// Minimum number of documents in a bucket for it to be included in the response. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public long? MinDocCount { get; set; } - - /// - /// - /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32]. - /// For IPv6 addresses the accepted range is [0, 128]. - /// - /// - [JsonInclude, JsonPropertyName("prefix_length")] - public int PrefixLength { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(IpPrefixAggregation ipPrefixAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.IpPrefix(ipPrefixAggregation); -} - -public sealed partial class IpPrefixAggregationDescriptor : SerializableDescriptor> -{ - internal IpPrefixAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public IpPrefixAggregationDescriptor() : base() - { - } - - private bool? AppendPrefixLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IsIpv6Value { get; set; } - private long? MinDocCountValue { get; set; } - private int PrefixLengthValue { get; set; } - - /// - /// - /// Defines whether the prefix length is appended to IP address keys in the response. - /// - /// - public IpPrefixAggregationDescriptor AppendPrefixLength(bool? appendPrefixLength = true) - { - AppendPrefixLengthValue = appendPrefixLength; - return Self; - } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - public IpPrefixAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - public IpPrefixAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - public IpPrefixAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Defines whether the prefix applies to IPv6 addresses. - /// - /// - public IpPrefixAggregationDescriptor IsIpv6(bool? isIpv6 = true) - { - IsIpv6Value = isIpv6; - return Self; - } - - /// - /// - /// Minimum number of documents in a bucket for it to be included in the response. - /// - /// - public IpPrefixAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32]. - /// For IPv6 addresses the accepted range is [0, 128]. - /// - /// - public IpPrefixAggregationDescriptor PrefixLength(int prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AppendPrefixLengthValue.HasValue) - { - writer.WritePropertyName("append_prefix_length"); - writer.WriteBooleanValue(AppendPrefixLengthValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IsIpv6Value.HasValue) - { - writer.WritePropertyName("is_ipv6"); - writer.WriteBooleanValue(IsIpv6Value.Value); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue); - writer.WriteEndObject(); - } -} - -public sealed partial class IpPrefixAggregationDescriptor : SerializableDescriptor -{ - internal IpPrefixAggregationDescriptor(Action configure) => configure.Invoke(this); - - public IpPrefixAggregationDescriptor() : base() - { - } - - private bool? AppendPrefixLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IsIpv6Value { get; set; } - private long? MinDocCountValue { get; set; } - private int PrefixLengthValue { get; set; } - - /// - /// - /// Defines whether the prefix length is appended to IP address keys in the response. - /// - /// - public IpPrefixAggregationDescriptor AppendPrefixLength(bool? appendPrefixLength = true) - { - AppendPrefixLengthValue = appendPrefixLength; - return Self; - } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - public IpPrefixAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - public IpPrefixAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The IP address field to aggregation on. The field mapping type must be ip. - /// - /// - public IpPrefixAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Defines whether the prefix applies to IPv6 addresses. - /// - /// - public IpPrefixAggregationDescriptor IsIpv6(bool? isIpv6 = true) - { - IsIpv6Value = isIpv6; - return Self; - } - - /// - /// - /// Minimum number of documents in a bucket for it to be included in the response. - /// - /// - public IpPrefixAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32]. - /// For IPv6 addresses the accepted range is [0, 128]. - /// - /// - public IpPrefixAggregationDescriptor PrefixLength(int prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AppendPrefixLengthValue.HasValue) - { - writer.WritePropertyName("append_prefix_length"); - writer.WriteBooleanValue(AppendPrefixLengthValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IsIpv6Value.HasValue) - { - writer.WritePropertyName("is_ipv6"); - writer.WriteBooleanValue(IsIpv6Value.Value); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixBucket.g.cs deleted file mode 100644 index 8ad90a71f6b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixBucket.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class IpPrefixBucketConverter : JsonConverter -{ - public override IpPrefixBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - bool isIpv6 = default; - string key = default; - string? netmask = default; - int prefixLength = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "is_ipv6") - { - isIpv6 = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "netmask") - { - netmask = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "prefix_length") - { - prefixLength = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new IpPrefixBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, IsIpv6 = isIpv6, Key = key, Netmask = netmask, PrefixLength = prefixLength }; - } - - public override void Write(Utf8JsonWriter writer, IpPrefixBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'IpPrefixBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(IpPrefixBucketConverter))] -public sealed partial class IpPrefixBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public bool IsIpv6 { get; init; } - public string Key { get; init; } - public string? Netmask { get; init; } - public int PrefixLength { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregate.g.cs deleted file mode 100644 index 93fe5cb476e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class IpRangeAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs deleted file mode 100644 index daa1f0b6788..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs +++ /dev/null @@ -1,313 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class IpRangeAggregation -{ - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Array of IP ranges. - /// - /// - [JsonInclude, JsonPropertyName("ranges")] - public ICollection? Ranges { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(IpRangeAggregation ipRangeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.IpRange(ipRangeAggregation); -} - -public sealed partial class IpRangeAggregationDescriptor : SerializableDescriptor> -{ - internal IpRangeAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public IpRangeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - public IpRangeAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - public IpRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - public IpRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Array of IP ranges. - /// - /// - public IpRangeAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public IpRangeAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public IpRangeAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public IpRangeAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IpRangeAggregationDescriptor : SerializableDescriptor -{ - internal IpRangeAggregationDescriptor(Action configure) => configure.Invoke(this); - - public IpRangeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - public IpRangeAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - public IpRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are used to build ranges. - /// - /// - public IpRangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Array of IP ranges. - /// - /// - public IpRangeAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public IpRangeAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public IpRangeAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public IpRangeAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregationRange.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregationRange.g.cs deleted file mode 100644 index 5258d7ee53b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregationRange.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class IpRangeAggregationRange -{ - /// - /// - /// Start of the range. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public string? From { get; set; } - - /// - /// - /// IP range defined as a CIDR mask. - /// - /// - [JsonInclude, JsonPropertyName("mask")] - public string? Mask { get; set; } - - /// - /// - /// End of the range. - /// - /// - [JsonInclude, JsonPropertyName("to")] - public string? To { get; set; } -} - -public sealed partial class IpRangeAggregationRangeDescriptor : SerializableDescriptor -{ - internal IpRangeAggregationRangeDescriptor(Action configure) => configure.Invoke(this); - - public IpRangeAggregationRangeDescriptor() : base() - { - } - - private string? FromValue { get; set; } - private string? MaskValue { get; set; } - private string? ToValue { get; set; } - - /// - /// - /// Start of the range. - /// - /// - public IpRangeAggregationRangeDescriptor From(string? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// IP range defined as a CIDR mask. - /// - /// - public IpRangeAggregationRangeDescriptor Mask(string? mask) - { - MaskValue = mask; - return Self; - } - - /// - /// - /// End of the range. - /// - /// - public IpRangeAggregationRangeDescriptor To(string? to) - { - ToValue = to; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FromValue)) - { - writer.WritePropertyName("from"); - writer.WriteStringValue(FromValue); - } - - if (!string.IsNullOrEmpty(MaskValue)) - { - writer.WritePropertyName("mask"); - writer.WriteStringValue(MaskValue); - } - - if (!string.IsNullOrEmpty(ToValue)) - { - writer.WritePropertyName("to"); - writer.WriteStringValue(ToValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeBucket.g.cs deleted file mode 100644 index eb63a544bb6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeBucket.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class IpRangeBucketConverter : JsonConverter -{ - public override IpRangeBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - string? from = default; - string? key = default; - string? to = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "from") - { - from = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "to") - { - to = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new IpRangeBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, From = from, Key = key, To = to }; - } - - public override void Write(Utf8JsonWriter writer, IpRangeBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'IpRangeBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(IpRangeBucketConverter))] -public sealed partial class IpRangeBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public string? From { get; init; } - public string? Key { get; init; } - public string? To { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsAggregate.g.cs deleted file mode 100644 index f609bb3999b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsAggregate.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of the rare_terms aggregation when the field is some kind of whole number like a integer, long, or a date. -/// -/// -public sealed partial class LongRareTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsBucket.g.cs deleted file mode 100644 index 97f7fb82c59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongRareTermsBucket.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class LongRareTermsBucketConverter : JsonConverter -{ - public override LongRareTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - long key = default; - string? keyAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new LongRareTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key, KeyAsString = keyAsString }; - } - - public override void Write(Utf8JsonWriter writer, LongRareTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'LongRareTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(LongRareTermsBucketConverter))] -public sealed partial class LongRareTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public long Key { get; init; } - public string? KeyAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsAggregate.g.cs deleted file mode 100644 index b4bfc3acf8f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a terms aggregation when the field is some kind of whole number like a integer, long, or a date. -/// -/// -public sealed partial class LongTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count_error_upper_bound")] - public long? DocCountErrorUpperBound { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("sum_other_doc_count")] - public long? SumOtherDocCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs deleted file mode 100644 index 6d3ebf56606..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/LongTermsBucket.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class LongTermsBucketConverter : JsonConverter -{ - public override LongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - long? docCountErrorUpperBound = default; - long key = default; - string? keyAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "doc_count_error_upper_bound") - { - docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new LongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; - } - - public override void Write(Utf8JsonWriter writer, LongTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'LongTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(LongTermsBucketConverter))] -public sealed partial class LongTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public long? DocCountErrorUpperBound { get; init; } - public long Key { get; init; } - public string? KeyAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregate.g.cs deleted file mode 100644 index 04992647c72..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MatrixStatsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("doc_count")] - public long DocCount { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyCollection? Fields { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs deleted file mode 100644 index dd596d44720..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs +++ /dev/null @@ -1,201 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MatrixStatsAggregation -{ - /// - /// - /// An array of fields for computing the statistics. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public IDictionary? Missing { get; set; } - - /// - /// - /// Array value the aggregation will use for array or multi-valued fields. - /// - /// - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.SortMode? Mode { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MatrixStatsAggregation matrixStatsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MatrixStats(matrixStatsAggregation); -} - -public sealed partial class MatrixStatsAggregationDescriptor : SerializableDescriptor> -{ - internal MatrixStatsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public MatrixStatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private IDictionary? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - - /// - /// - /// An array of fields for computing the statistics. - /// - /// - public MatrixStatsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MatrixStatsAggregationDescriptor Missing(Func, FluentDictionary> selector) - { - MissingValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array value the aggregation will use for array or multi-valued fields. - /// - /// - public MatrixStatsAggregationDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MatrixStatsAggregationDescriptor : SerializableDescriptor -{ - internal MatrixStatsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MatrixStatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private IDictionary? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - - /// - /// - /// An array of fields for computing the statistics. - /// - /// - public MatrixStatsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MatrixStatsAggregationDescriptor Missing(Func, FluentDictionary> selector) - { - MissingValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array value the aggregation will use for array or multi-valued fields. - /// - /// - public MatrixStatsAggregationDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsFields.g.cs deleted file mode 100644 index 7938ea4a34d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsFields.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MatrixStatsFields -{ - [JsonInclude, JsonPropertyName("correlation")] - [ReadOnlyFieldDictionaryConverter(typeof(double))] - public IReadOnlyDictionary Correlation { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("covariance")] - [ReadOnlyFieldDictionaryConverter(typeof(double))] - public IReadOnlyDictionary Covariance { get; init; } - [JsonInclude, JsonPropertyName("kurtosis")] - public double Kurtosis { get; init; } - [JsonInclude, JsonPropertyName("mean")] - public double Mean { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("skewness")] - public double Skewness { get; init; } - [JsonInclude, JsonPropertyName("variance")] - public double Variance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregate.g.cs deleted file mode 100644 index a17cee15fdd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MaxAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregation.g.cs deleted file mode 100644 index 48cc3ed00d9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxAggregation.g.cs +++ /dev/null @@ -1,316 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MaxAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MaxAggregation maxAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Max(maxAggregation); -} - -public sealed partial class MaxAggregationDescriptor : SerializableDescriptor> -{ - internal MaxAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public MaxAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MaxAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MaxAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MaxAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MaxAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MaxAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public MaxAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public MaxAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public MaxAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MaxAggregationDescriptor : SerializableDescriptor -{ - internal MaxAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MaxAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MaxAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MaxAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MaxAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MaxAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MaxAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public MaxAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public MaxAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public MaxAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs deleted file mode 100644 index 74a0107649f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MaxBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MaxBucketAggregation maxBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MaxBucket(maxBucketAggregation); -} - -public sealed partial class MaxBucketAggregationDescriptor : SerializableDescriptor -{ - internal MaxBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MaxBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public MaxBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public MaxBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public MaxBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs deleted file mode 100644 index 572d8d27a3a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MedianAbsoluteDeviationAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs deleted file mode 100644 index 7d38f3e70ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs +++ /dev/null @@ -1,360 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MedianAbsoluteDeviationAggregation -{ - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - [JsonInclude, JsonPropertyName("compression")] - public double? Compression { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MedianAbsoluteDeviationAggregation medianAbsoluteDeviationAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MedianAbsoluteDeviation(medianAbsoluteDeviationAggregation); -} - -public sealed partial class MedianAbsoluteDeviationAggregationDescriptor : SerializableDescriptor> -{ - internal MedianAbsoluteDeviationAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public MedianAbsoluteDeviationAggregationDescriptor() : base() - { - } - - private double? CompressionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Compression(double? compression) - { - CompressionValue = compression; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CompressionValue.HasValue) - { - writer.WritePropertyName("compression"); - writer.WriteNumberValue(CompressionValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MedianAbsoluteDeviationAggregationDescriptor : SerializableDescriptor -{ - internal MedianAbsoluteDeviationAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MedianAbsoluteDeviationAggregationDescriptor() : base() - { - } - - private double? CompressionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Compression(double? compression) - { - CompressionValue = compression; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MedianAbsoluteDeviationAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public MedianAbsoluteDeviationAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CompressionValue.HasValue) - { - writer.WritePropertyName("compression"); - writer.WriteNumberValue(CompressionValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregate.g.cs deleted file mode 100644 index c027bc24cfb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MinAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregation.g.cs deleted file mode 100644 index 65f06dbcddc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinAggregation.g.cs +++ /dev/null @@ -1,316 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MinAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MinAggregation minAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Min(minAggregation); -} - -public sealed partial class MinAggregationDescriptor : SerializableDescriptor> -{ - internal MinAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public MinAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MinAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MinAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MinAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MinAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MinAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public MinAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public MinAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public MinAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MinAggregationDescriptor : SerializableDescriptor -{ - internal MinAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MinAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MinAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MinAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public MinAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MinAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MinAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public MinAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public MinAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public MinAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs deleted file mode 100644 index 795a7b40807..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MinBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MinBucketAggregation minBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MinBucket(minBucketAggregation); -} - -public sealed partial class MinBucketAggregationDescriptor : SerializableDescriptor -{ - internal MinBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MinBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public MinBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public MinBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public MinBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregate.g.cs deleted file mode 100644 index 7beb0b402f8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class MissingAggregateConverter : JsonConverter -{ - public override MissingAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new MissingAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, MissingAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'MissingAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(MissingAggregateConverter))] -public sealed partial class MissingAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs deleted file mode 100644 index 4f0bbb3cf1c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs +++ /dev/null @@ -1,182 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MissingAggregation -{ - /// - /// - /// The name of the field. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MissingAggregation missingAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Missing(missingAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(MissingAggregation missingAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.Missing(missingAggregation); -} - -public sealed partial class MissingAggregationDescriptor : SerializableDescriptor> -{ - internal MissingAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public MissingAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - - /// - /// - /// The name of the field. - /// - /// - public MissingAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public MissingAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public MissingAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MissingAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MissingAggregationDescriptor : SerializableDescriptor -{ - internal MissingAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MissingAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - - /// - /// - /// The name of the field. - /// - /// - public MissingAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public MissingAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public MissingAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MissingAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs deleted file mode 100644 index 8e64de08216..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs +++ /dev/null @@ -1,209 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MovingFunctionAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The script that should be executed on each window of data. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public string? Script { get; set; } - - /// - /// - /// By default, the window consists of the last n values excluding the current bucket. - /// Increasing shift by 1, moves the starting window position by 1 to the right. - /// - /// - [JsonInclude, JsonPropertyName("shift")] - public int? Shift { get; set; } - - /// - /// - /// The size of window to "slide" across the histogram. - /// - /// - [JsonInclude, JsonPropertyName("window")] - public int? Window { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MovingFunctionAggregation movingFunctionAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MovingFn(movingFunctionAggregation); -} - -public sealed partial class MovingFunctionAggregationDescriptor : SerializableDescriptor -{ - internal MovingFunctionAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MovingFunctionAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private string? ScriptValue { get; set; } - private int? ShiftValue { get; set; } - private int? WindowValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public MovingFunctionAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public MovingFunctionAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public MovingFunctionAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The script that should be executed on each window of data. - /// - /// - public MovingFunctionAggregationDescriptor Script(string? script) - { - ScriptValue = script; - return Self; - } - - /// - /// - /// By default, the window consists of the last n values excluding the current bucket. - /// Increasing shift by 1, moves the starting window position by 1 to the right. - /// - /// - public MovingFunctionAggregationDescriptor Shift(int? shift) - { - ShiftValue = shift; - return Self; - } - - /// - /// - /// The size of window to "slide" across the histogram. - /// - /// - public MovingFunctionAggregationDescriptor Window(int? window) - { - WindowValue = window; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (!string.IsNullOrEmpty(ScriptValue)) - { - writer.WritePropertyName("script"); - writer.WriteStringValue(ScriptValue); - } - - if (ShiftValue.HasValue) - { - writer.WritePropertyName("shift"); - writer.WriteNumberValue(ShiftValue.Value); - } - - if (WindowValue.HasValue) - { - writer.WritePropertyName("window"); - writer.WriteNumberValue(WindowValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs deleted file mode 100644 index dce677b84f8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs +++ /dev/null @@ -1,183 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MovingPercentilesAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// By default, the window consists of the last n values excluding the current bucket. - /// Increasing shift by 1, moves the starting window position by 1 to the right. - /// - /// - [JsonInclude, JsonPropertyName("shift")] - public int? Shift { get; set; } - - /// - /// - /// The size of window to "slide" across the histogram. - /// - /// - [JsonInclude, JsonPropertyName("window")] - public int? Window { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MovingPercentilesAggregation movingPercentilesAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MovingPercentiles(movingPercentilesAggregation); -} - -public sealed partial class MovingPercentilesAggregationDescriptor : SerializableDescriptor -{ - internal MovingPercentilesAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MovingPercentilesAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private int? ShiftValue { get; set; } - private int? WindowValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public MovingPercentilesAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public MovingPercentilesAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public MovingPercentilesAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// By default, the window consists of the last n values excluding the current bucket. - /// Increasing shift by 1, moves the starting window position by 1 to the right. - /// - /// - public MovingPercentilesAggregationDescriptor Shift(int? shift) - { - ShiftValue = shift; - return Self; - } - - /// - /// - /// The size of window to "slide" across the histogram. - /// - /// - public MovingPercentilesAggregationDescriptor Window(int? window) - { - WindowValue = window; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (ShiftValue.HasValue) - { - writer.WritePropertyName("shift"); - writer.WriteNumberValue(ShiftValue.Value); - } - - if (WindowValue.HasValue) - { - writer.WritePropertyName("window"); - writer.WriteNumberValue(WindowValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermLookup.g.cs deleted file mode 100644 index 1ae2d7fc6d4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermLookup.g.cs +++ /dev/null @@ -1,190 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MultiTermLookup -{ - /// - /// - /// A fields from which to retrieve terms. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } -} - -public sealed partial class MultiTermLookupDescriptor : SerializableDescriptor> -{ - internal MultiTermLookupDescriptor(Action> configure) => configure.Invoke(this); - - public MultiTermLookupDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - - /// - /// - /// A fields from which to retrieve terms. - /// - /// - public MultiTermLookupDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A fields from which to retrieve terms. - /// - /// - public MultiTermLookupDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A fields from which to retrieve terms. - /// - /// - public MultiTermLookupDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MultiTermLookupDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MultiTermLookupDescriptor : SerializableDescriptor -{ - internal MultiTermLookupDescriptor(Action configure) => configure.Invoke(this); - - public MultiTermLookupDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - - /// - /// - /// A fields from which to retrieve terms. - /// - /// - public MultiTermLookupDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A fields from which to retrieve terms. - /// - /// - public MultiTermLookupDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A fields from which to retrieve terms. - /// - /// - public MultiTermLookupDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public MultiTermLookupDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs deleted file mode 100644 index 2cbb83d7203..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MultiTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count_error_upper_bound")] - public long? DocCountErrorUpperBound { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("sum_other_doc_count")] - public long? SumOtherDocCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs deleted file mode 100644 index 385bae8dd19..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ /dev/null @@ -1,540 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MultiTermsAggregation -{ - /// - /// - /// Specifies the strategy for data collection. - /// - /// - [JsonInclude, JsonPropertyName("collect_mode")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectMode { get; set; } - - /// - /// - /// The minimum number of documents in a bucket for it to be returned. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public long? MinDocCount { get; set; } - - /// - /// - /// Specifies the sort order of the buckets. - /// Defaults to sorting by descending document count. - /// - /// - [JsonInclude, JsonPropertyName("order")] - [SingleOrManyCollectionConverter(typeof(KeyValuePair))] - public ICollection>? Order { get; set; } - - /// - /// - /// The minimum number of documents in a bucket on each shard for it to be returned. - /// - /// - [JsonInclude, JsonPropertyName("shard_min_doc_count")] - public long? ShardMinDocCount { get; set; } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// Calculates the doc count error on per term basis. - /// - /// - [JsonInclude, JsonPropertyName("show_term_doc_count_error")] - public bool? ShowTermDocCountError { get; set; } - - /// - /// - /// The number of term buckets should be returned out of the overall terms list. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The field from which to generate sets of terms. - /// - /// - [JsonInclude, JsonPropertyName("terms")] - public ICollection Terms { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MultiTermsAggregation multiTermsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MultiTerms(multiTermsAggregation); -} - -public sealed partial class MultiTermsAggregationDescriptor : SerializableDescriptor> -{ - internal MultiTermsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public MultiTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private long? MinDocCountValue { get; set; } - private ICollection>? OrderValue { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private bool? ShowTermDocCountErrorValue { get; set; } - private int? SizeValue { get; set; } - private ICollection TermsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor TermsDescriptor { get; set; } - private Action> TermsDescriptorAction { get; set; } - private Action>[] TermsDescriptorActions { get; set; } - - /// - /// - /// Specifies the strategy for data collection. - /// - /// - public MultiTermsAggregationDescriptor CollectMode(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? collectMode) - { - CollectModeValue = collectMode; - return Self; - } - - /// - /// - /// The minimum number of documents in a bucket for it to be returned. - /// - /// - public MultiTermsAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Specifies the sort order of the buckets. - /// Defaults to sorting by descending document count. - /// - /// - public MultiTermsAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// The minimum number of documents in a bucket on each shard for it to be returned. - /// - /// - public MultiTermsAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public MultiTermsAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// Calculates the doc count error on per term basis. - /// - /// - public MultiTermsAggregationDescriptor ShowTermDocCountError(bool? showTermDocCountError = true) - { - ShowTermDocCountErrorValue = showTermDocCountError; - return Self; - } - - /// - /// - /// The number of term buckets should be returned out of the overall terms list. - /// - /// - public MultiTermsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The field from which to generate sets of terms. - /// - /// - public MultiTermsAggregationDescriptor Terms(ICollection terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsValue = terms; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsDescriptor = descriptor; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Action> configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorActions = null; - TermsDescriptorAction = configure; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(params Action>[] configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollectModeValue is not null) - { - writer.WritePropertyName("collect_mode"); - JsonSerializer.Serialize(writer, CollectModeValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (ShowTermDocCountErrorValue.HasValue) - { - writer.WritePropertyName("show_term_doc_count_error"); - writer.WriteBooleanValue(ShowTermDocCountErrorValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - writer.WriteEndArray(); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor(TermsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TermsDescriptorActions is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - foreach (var action in TermsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MultiTermsAggregationDescriptor : SerializableDescriptor -{ - internal MultiTermsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public MultiTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private long? MinDocCountValue { get; set; } - private ICollection>? OrderValue { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private bool? ShowTermDocCountErrorValue { get; set; } - private int? SizeValue { get; set; } - private ICollection TermsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor TermsDescriptor { get; set; } - private Action TermsDescriptorAction { get; set; } - private Action[] TermsDescriptorActions { get; set; } - - /// - /// - /// Specifies the strategy for data collection. - /// - /// - public MultiTermsAggregationDescriptor CollectMode(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? collectMode) - { - CollectModeValue = collectMode; - return Self; - } - - /// - /// - /// The minimum number of documents in a bucket for it to be returned. - /// - /// - public MultiTermsAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Specifies the sort order of the buckets. - /// Defaults to sorting by descending document count. - /// - /// - public MultiTermsAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// The minimum number of documents in a bucket on each shard for it to be returned. - /// - /// - public MultiTermsAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public MultiTermsAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// Calculates the doc count error on per term basis. - /// - /// - public MultiTermsAggregationDescriptor ShowTermDocCountError(bool? showTermDocCountError = true) - { - ShowTermDocCountErrorValue = showTermDocCountError; - return Self; - } - - /// - /// - /// The number of term buckets should be returned out of the overall terms list. - /// - /// - public MultiTermsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The field from which to generate sets of terms. - /// - /// - public MultiTermsAggregationDescriptor Terms(ICollection terms) - { - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsValue = terms; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor descriptor) - { - TermsValue = null; - TermsDescriptorAction = null; - TermsDescriptorActions = null; - TermsDescriptor = descriptor; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(Action configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorActions = null; - TermsDescriptorAction = configure; - return Self; - } - - public MultiTermsAggregationDescriptor Terms(params Action[] configure) - { - TermsValue = null; - TermsDescriptor = null; - TermsDescriptorAction = null; - TermsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollectModeValue is not null) - { - writer.WritePropertyName("collect_mode"); - JsonSerializer.Serialize(writer, CollectModeValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (ShowTermDocCountErrorValue.HasValue) - { - writer.WritePropertyName("show_term_doc_count_error"); - writer.WriteBooleanValue(ShowTermDocCountErrorValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (TermsDescriptor is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TermsDescriptor, options); - writer.WriteEndArray(); - } - else if (TermsDescriptorAction is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor(TermsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TermsDescriptorActions is not null) - { - writer.WritePropertyName("terms"); - writer.WriteStartArray(); - foreach (var action in TermsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MultiTermLookupDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsBucket.g.cs deleted file mode 100644 index 8ffc914e5ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsBucket.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class MultiTermsBucketConverter : JsonConverter -{ - public override MultiTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - long? docCountErrorUpperBound = default; - IReadOnlyCollection key = default; - string? keyAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "doc_count_error_upper_bound") - { - docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new MultiTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key, KeyAsString = keyAsString }; - } - - public override void Write(Utf8JsonWriter writer, MultiTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'MultiTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(MultiTermsBucketConverter))] -public sealed partial class MultiTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public long? DocCountErrorUpperBound { get; init; } - public IReadOnlyCollection Key { get; init; } - public string? KeyAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs deleted file mode 100644 index 6dbd0ff16e2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MutualInformationHeuristic.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class MutualInformationHeuristic -{ - /// - /// - /// Set to false if you defined a custom background filter that represents a different set of documents that you want to compare to. - /// - /// - [JsonInclude, JsonPropertyName("background_is_superset")] - public bool? BackgroundIsSuperset { get; set; } - - /// - /// - /// Set to false to filter out the terms that appear less often in the subset than in documents outside the subset. - /// - /// - [JsonInclude, JsonPropertyName("include_negatives")] - public bool? IncludeNegatives { get; set; } -} - -public sealed partial class MutualInformationHeuristicDescriptor : SerializableDescriptor -{ - internal MutualInformationHeuristicDescriptor(Action configure) => configure.Invoke(this); - - public MutualInformationHeuristicDescriptor() : base() - { - } - - private bool? BackgroundIsSupersetValue { get; set; } - private bool? IncludeNegativesValue { get; set; } - - /// - /// - /// Set to false if you defined a custom background filter that represents a different set of documents that you want to compare to. - /// - /// - public MutualInformationHeuristicDescriptor BackgroundIsSuperset(bool? backgroundIsSuperset = true) - { - BackgroundIsSupersetValue = backgroundIsSuperset; - return Self; - } - - /// - /// - /// Set to false to filter out the terms that appear less often in the subset than in documents outside the subset. - /// - /// - public MutualInformationHeuristicDescriptor IncludeNegatives(bool? includeNegatives = true) - { - IncludeNegativesValue = includeNegatives; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BackgroundIsSupersetValue.HasValue) - { - writer.WritePropertyName("background_is_superset"); - writer.WriteBooleanValue(BackgroundIsSupersetValue.Value); - } - - if (IncludeNegativesValue.HasValue) - { - writer.WritePropertyName("include_negatives"); - writer.WriteBooleanValue(IncludeNegativesValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregate.g.cs deleted file mode 100644 index 2fecd1dea37..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class NestedAggregateConverter : JsonConverter -{ - public override NestedAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new NestedAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, NestedAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'NestedAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(NestedAggregateConverter))] -public sealed partial class NestedAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs deleted file mode 100644 index 995d92ab418..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs +++ /dev/null @@ -1,153 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class NestedAggregation -{ - /// - /// - /// The path to the field of type nested. - /// - /// - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Path { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(NestedAggregation nestedAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Nested(nestedAggregation); -} - -public sealed partial class NestedAggregationDescriptor : SerializableDescriptor> -{ - internal NestedAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public NestedAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - - /// - /// - /// The path to the field of type nested. - /// - /// - public NestedAggregationDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// The path to the field of type nested. - /// - /// - public NestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// The path to the field of type nested. - /// - /// - public NestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class NestedAggregationDescriptor : SerializableDescriptor -{ - internal NestedAggregationDescriptor(Action configure) => configure.Invoke(this); - - public NestedAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - - /// - /// - /// The path to the field of type nested. - /// - /// - public NestedAggregationDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// The path to the field of type nested. - /// - /// - public NestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// The path to the field of type nested. - /// - /// - public NestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NormalizeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NormalizeAggregation.g.cs deleted file mode 100644 index e5316d862a8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NormalizeAggregation.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class NormalizeAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The specific method to apply. - /// - /// - [JsonInclude, JsonPropertyName("method")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeMethod? Method { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(NormalizeAggregation normalizeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Normalize(normalizeAggregation); -} - -public sealed partial class NormalizeAggregationDescriptor : SerializableDescriptor -{ - internal NormalizeAggregationDescriptor(Action configure) => configure.Invoke(this); - - public NormalizeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeMethod? MethodValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public NormalizeAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public NormalizeAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public NormalizeAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The specific method to apply. - /// - /// - public NormalizeAggregationDescriptor Method(Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeMethod? method) - { - MethodValue = method; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (MethodValue is not null) - { - writer.WritePropertyName("method"); - JsonSerializer.Serialize(writer, MethodValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregate.g.cs deleted file mode 100644 index c504491ea66..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class ParentAggregateConverter : JsonConverter -{ - public override ParentAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new ParentAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, ParentAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'ParentAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(ParentAggregateConverter))] -public sealed partial class ParentAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs deleted file mode 100644 index e02954c66d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ParentAggregation -{ - /// - /// - /// The child type that should be selected. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string? Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ParentAggregation parentAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Parent(parentAggregation); -} - -public sealed partial class ParentAggregationDescriptor : SerializableDescriptor -{ - internal ParentAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ParentAggregationDescriptor() : base() - { - } - - private string? TypeValue { get; set; } - - /// - /// - /// The child type that should be selected. - /// - /// - public ParentAggregationDescriptor Type(string? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(TypeValue)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentageScoreHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentageScoreHeuristic.g.cs deleted file mode 100644 index 0e51bc998df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentageScoreHeuristic.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class PercentageScoreHeuristic -{ -} - -public sealed partial class PercentageScoreHeuristicDescriptor : SerializableDescriptor -{ - internal PercentageScoreHeuristicDescriptor(Action configure) => configure.Invoke(this); - - public PercentageScoreHeuristicDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs deleted file mode 100644 index 67de21797b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs +++ /dev/null @@ -1,568 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class PercentileRanksAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks. - /// - /// - [JsonInclude, JsonPropertyName("hdr")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? Hdr { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Sets parameters for the default TDigest algorithm used to calculate percentile ranks. - /// - /// - [JsonInclude, JsonPropertyName("tdigest")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? TDigest { get; set; } - - /// - /// - /// An array of values for which to calculate the percentile ranks. - /// - /// - [JsonInclude, JsonPropertyName("values")] - public ICollection? Values { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(PercentileRanksAggregation percentileRanksAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.PercentileRanks(percentileRanksAggregation); -} - -public sealed partial class PercentileRanksAggregationDescriptor : SerializableDescriptor> -{ - internal PercentileRanksAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public PercentileRanksAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? HdrValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor HdrDescriptor { get; set; } - private Action HdrDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? TDigestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor TDigestDescriptor { get; set; } - private Action TDigestDescriptorAction { get; set; } - private ICollection? ValuesValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentileRanksAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentileRanksAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentileRanksAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PercentileRanksAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks. - /// - /// - public PercentileRanksAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? hdr) - { - HdrDescriptor = null; - HdrDescriptorAction = null; - HdrValue = hdr; - return Self; - } - - public PercentileRanksAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor descriptor) - { - HdrValue = null; - HdrDescriptorAction = null; - HdrDescriptor = descriptor; - return Self; - } - - public PercentileRanksAggregationDescriptor Hdr(Action configure) - { - HdrValue = null; - HdrDescriptor = null; - HdrDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public PercentileRanksAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public PercentileRanksAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PercentileRanksAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PercentileRanksAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Sets parameters for the default TDigest algorithm used to calculate percentile ranks. - /// - /// - public PercentileRanksAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? tDigest) - { - TDigestDescriptor = null; - TDigestDescriptorAction = null; - TDigestValue = tDigest; - return Self; - } - - public PercentileRanksAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor descriptor) - { - TDigestValue = null; - TDigestDescriptorAction = null; - TDigestDescriptor = descriptor; - return Self; - } - - public PercentileRanksAggregationDescriptor TDigest(Action configure) - { - TDigestValue = null; - TDigestDescriptor = null; - TDigestDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of values for which to calculate the percentile ranks. - /// - /// - public PercentileRanksAggregationDescriptor Values(ICollection? values) - { - ValuesValue = values; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HdrDescriptor is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrDescriptor, options); - } - else if (HdrDescriptorAction is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor(HdrDescriptorAction), options); - } - else if (HdrValue is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TDigestDescriptor is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestDescriptor, options); - } - else if (TDigestDescriptorAction is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor(TDigestDescriptorAction), options); - } - else if (TDigestValue is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestValue, options); - } - - if (ValuesValue is not null) - { - writer.WritePropertyName("values"); - JsonSerializer.Serialize(writer, ValuesValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PercentileRanksAggregationDescriptor : SerializableDescriptor -{ - internal PercentileRanksAggregationDescriptor(Action configure) => configure.Invoke(this); - - public PercentileRanksAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? HdrValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor HdrDescriptor { get; set; } - private Action HdrDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? TDigestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor TDigestDescriptor { get; set; } - private Action TDigestDescriptorAction { get; set; } - private ICollection? ValuesValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentileRanksAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentileRanksAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentileRanksAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PercentileRanksAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks. - /// - /// - public PercentileRanksAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? hdr) - { - HdrDescriptor = null; - HdrDescriptorAction = null; - HdrValue = hdr; - return Self; - } - - public PercentileRanksAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor descriptor) - { - HdrValue = null; - HdrDescriptorAction = null; - HdrDescriptor = descriptor; - return Self; - } - - public PercentileRanksAggregationDescriptor Hdr(Action configure) - { - HdrValue = null; - HdrDescriptor = null; - HdrDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public PercentileRanksAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public PercentileRanksAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PercentileRanksAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PercentileRanksAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Sets parameters for the default TDigest algorithm used to calculate percentile ranks. - /// - /// - public PercentileRanksAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? tDigest) - { - TDigestDescriptor = null; - TDigestDescriptorAction = null; - TDigestValue = tDigest; - return Self; - } - - public PercentileRanksAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor descriptor) - { - TDigestValue = null; - TDigestDescriptorAction = null; - TDigestDescriptor = descriptor; - return Self; - } - - public PercentileRanksAggregationDescriptor TDigest(Action configure) - { - TDigestValue = null; - TDigestDescriptor = null; - TDigestDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of values for which to calculate the percentile ranks. - /// - /// - public PercentileRanksAggregationDescriptor Values(ICollection? values) - { - ValuesValue = values; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HdrDescriptor is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrDescriptor, options); - } - else if (HdrDescriptorAction is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor(HdrDescriptorAction), options); - } - else if (HdrValue is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TDigestDescriptor is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestDescriptor, options); - } - else if (TDigestDescriptorAction is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor(TDigestDescriptorAction), options); - } - else if (TDigestValue is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestValue, options); - } - - if (ValuesValue is not null) - { - writer.WritePropertyName("values"); - JsonSerializer.Serialize(writer, ValuesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Percentiles.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Percentiles.g.cs deleted file mode 100644 index e38861b6f11..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/Percentiles.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class Percentiles : Union, IReadOnlyCollection> -{ - public Percentiles(IReadOnlyDictionary Keyed) : base(Keyed) - { - } - - public Percentiles(IReadOnlyCollection Array) : base(Array) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesAggregation.g.cs deleted file mode 100644 index ab5dd97184a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesAggregation.g.cs +++ /dev/null @@ -1,568 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class PercentilesAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles. - /// - /// - [JsonInclude, JsonPropertyName("hdr")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? Hdr { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - /// - /// - /// The percentiles to calculate. - /// - /// - [JsonInclude, JsonPropertyName("percents")] - public ICollection? Percents { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Sets parameters for the default TDigest algorithm used to calculate percentiles. - /// - /// - [JsonInclude, JsonPropertyName("tdigest")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? TDigest { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(PercentilesAggregation percentilesAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Percentiles(percentilesAggregation); -} - -public sealed partial class PercentilesAggregationDescriptor : SerializableDescriptor> -{ - internal PercentilesAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public PercentilesAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? HdrValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor HdrDescriptor { get; set; } - private Action HdrDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private ICollection? PercentsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? TDigestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor TDigestDescriptor { get; set; } - private Action TDigestDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentilesAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentilesAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentilesAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PercentilesAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles. - /// - /// - public PercentilesAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? hdr) - { - HdrDescriptor = null; - HdrDescriptorAction = null; - HdrValue = hdr; - return Self; - } - - public PercentilesAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor descriptor) - { - HdrValue = null; - HdrDescriptorAction = null; - HdrDescriptor = descriptor; - return Self; - } - - public PercentilesAggregationDescriptor Hdr(Action configure) - { - HdrValue = null; - HdrDescriptor = null; - HdrDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public PercentilesAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// The percentiles to calculate. - /// - /// - public PercentilesAggregationDescriptor Percents(ICollection? percents) - { - PercentsValue = percents; - return Self; - } - - public PercentilesAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PercentilesAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PercentilesAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Sets parameters for the default TDigest algorithm used to calculate percentiles. - /// - /// - public PercentilesAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? tDigest) - { - TDigestDescriptor = null; - TDigestDescriptorAction = null; - TDigestValue = tDigest; - return Self; - } - - public PercentilesAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor descriptor) - { - TDigestValue = null; - TDigestDescriptorAction = null; - TDigestDescriptor = descriptor; - return Self; - } - - public PercentilesAggregationDescriptor TDigest(Action configure) - { - TDigestValue = null; - TDigestDescriptor = null; - TDigestDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HdrDescriptor is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrDescriptor, options); - } - else if (HdrDescriptorAction is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor(HdrDescriptorAction), options); - } - else if (HdrValue is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (PercentsValue is not null) - { - writer.WritePropertyName("percents"); - JsonSerializer.Serialize(writer, PercentsValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TDigestDescriptor is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestDescriptor, options); - } - else if (TDigestDescriptorAction is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor(TDigestDescriptorAction), options); - } - else if (TDigestValue is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PercentilesAggregationDescriptor : SerializableDescriptor -{ - internal PercentilesAggregationDescriptor(Action configure) => configure.Invoke(this); - - public PercentilesAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? HdrValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor HdrDescriptor { get; set; } - private Action HdrDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private ICollection? PercentsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? TDigestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor TDigestDescriptor { get; set; } - private Action TDigestDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentilesAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentilesAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public PercentilesAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PercentilesAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles. - /// - /// - public PercentilesAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethod? hdr) - { - HdrDescriptor = null; - HdrDescriptorAction = null; - HdrValue = hdr; - return Self; - } - - public PercentilesAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor descriptor) - { - HdrValue = null; - HdrDescriptorAction = null; - HdrDescriptor = descriptor; - return Self; - } - - public PercentilesAggregationDescriptor Hdr(Action configure) - { - HdrValue = null; - HdrDescriptor = null; - HdrDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public PercentilesAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// The percentiles to calculate. - /// - /// - public PercentilesAggregationDescriptor Percents(ICollection? percents) - { - PercentsValue = percents; - return Self; - } - - public PercentilesAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PercentilesAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PercentilesAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Sets parameters for the default TDigest algorithm used to calculate percentiles. - /// - /// - public PercentilesAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigest? tDigest) - { - TDigestDescriptor = null; - TDigestDescriptorAction = null; - TDigestValue = tDigest; - return Self; - } - - public PercentilesAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor descriptor) - { - TDigestValue = null; - TDigestDescriptorAction = null; - TDigestDescriptor = descriptor; - return Self; - } - - public PercentilesAggregationDescriptor TDigest(Action configure) - { - TDigestValue = null; - TDigestDescriptor = null; - TDigestDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (HdrDescriptor is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrDescriptor, options); - } - else if (HdrDescriptorAction is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.HdrMethodDescriptor(HdrDescriptorAction), options); - } - else if (HdrValue is not null) - { - writer.WritePropertyName("hdr"); - JsonSerializer.Serialize(writer, HdrValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (PercentsValue is not null) - { - writer.WritePropertyName("percents"); - JsonSerializer.Serialize(writer, PercentsValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TDigestDescriptor is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestDescriptor, options); - } - else if (TDigestDescriptorAction is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TDigestDescriptor(TDigestDescriptorAction), options); - } - else if (TDigestValue is not null) - { - writer.WritePropertyName("tdigest"); - JsonSerializer.Serialize(writer, TDigestValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs deleted file mode 100644 index e29d1a9a062..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class PercentilesBucketAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("values")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Percentiles Values { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs deleted file mode 100644 index a89020e7e24..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class PercentilesBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The list of percentiles to calculate. - /// - /// - [JsonInclude, JsonPropertyName("percents")] - public ICollection? Percents { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(PercentilesBucketAggregation percentilesBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.PercentilesBucket(percentilesBucketAggregation); -} - -public sealed partial class PercentilesBucketAggregationDescriptor : SerializableDescriptor -{ - internal PercentilesBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public PercentilesBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private ICollection? PercentsValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public PercentilesBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public PercentilesBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public PercentilesBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The list of percentiles to calculate. - /// - /// - public PercentilesBucketAggregationDescriptor Percents(ICollection? percents) - { - PercentsValue = percents; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (PercentsValue is not null) - { - writer.WritePropertyName("percents"); - JsonSerializer.Serialize(writer, PercentsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregate.g.cs deleted file mode 100644 index b27d6bb4052..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class RangeAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs deleted file mode 100644 index 8912410a1ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs +++ /dev/null @@ -1,477 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class RangeAggregation -{ - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public int? Missing { get; set; } - - /// - /// - /// An array of ranges used to bucket documents. - /// - /// - [JsonInclude, JsonPropertyName("ranges")] - public ICollection? Ranges { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(RangeAggregation rangeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Range(rangeAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(RangeAggregation rangeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.Range(rangeAggregation); -} - -public sealed partial class RangeAggregationDescriptor : SerializableDescriptor> -{ - internal RangeAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public RangeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private int? MissingValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public RangeAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public RangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public RangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RangeAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public RangeAggregationDescriptor Missing(int? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// An array of ranges used to bucket documents. - /// - /// - public RangeAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public RangeAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public RangeAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public RangeAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - public RangeAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public RangeAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public RangeAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RangeAggregationDescriptor : SerializableDescriptor -{ - internal RangeAggregationDescriptor(Action configure) => configure.Invoke(this); - - public RangeAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private int? MissingValue { get; set; } - private ICollection? RangesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } - private Action RangesDescriptorAction { get; set; } - private Action[] RangesDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public RangeAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public RangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field whose values are use to build ranges. - /// - /// - public RangeAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RangeAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public RangeAggregationDescriptor Missing(int? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// An array of ranges used to bucket documents. - /// - /// - public RangeAggregationDescriptor Ranges(ICollection? ranges) - { - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesValue = ranges; - return Self; - } - - public RangeAggregationDescriptor Ranges(Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor descriptor) - { - RangesValue = null; - RangesDescriptorAction = null; - RangesDescriptorActions = null; - RangesDescriptor = descriptor; - return Self; - } - - public RangeAggregationDescriptor Ranges(Action configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorActions = null; - RangesDescriptorAction = configure; - return Self; - } - - public RangeAggregationDescriptor Ranges(params Action[] configure) - { - RangesValue = null; - RangesDescriptor = null; - RangesDescriptorAction = null; - RangesDescriptorActions = configure; - return Self; - } - - public RangeAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public RangeAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public RangeAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (RangesDescriptor is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RangesDescriptor, options); - writer.WriteEndArray(); - } - else if (RangesDescriptorAction is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(RangesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RangesDescriptorActions is not null) - { - writer.WritePropertyName("ranges"); - writer.WriteStartArray(); - foreach (var action in RangesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (RangesValue is not null) - { - writer.WritePropertyName("ranges"); - JsonSerializer.Serialize(writer, RangesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeBucket.g.cs deleted file mode 100644 index 92d28d6da79..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeBucket.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class RangeBucketConverter : JsonConverter -{ - public override RangeBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - double? from = default; - string? fromAsString = default; - string? key = default; - double? to = default; - string? toAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "from") - { - from = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "from_as_string") - { - fromAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "to") - { - to = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "to_as_string") - { - toAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new RangeBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, From = from, FromAsString = fromAsString, Key = key, To = to, ToAsString = toAsString }; - } - - public override void Write(Utf8JsonWriter writer, RangeBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'RangeBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(RangeBucketConverter))] -public sealed partial class RangeBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public double? From { get; init; } - public string? FromAsString { get; init; } - - /// - /// - /// The bucket key. Present if the aggregation is not keyed - /// - /// - public string? Key { get; init; } - public double? To { get; init; } - public string? ToAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs deleted file mode 100644 index e92635a541b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs +++ /dev/null @@ -1,407 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class RareTermsAggregation -{ - /// - /// - /// Terms that should be excluded from the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? Exclude { get; set; } - - /// - /// - /// The field from which to return rare terms. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Terms that should be included in the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? Include { get; set; } - - /// - /// - /// The maximum number of documents a term should appear in. - /// - /// - [JsonInclude, JsonPropertyName("max_doc_count")] - public long? MaxDocCount { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - /// - /// - /// The precision of the internal CuckooFilters. - /// Smaller precision leads to better approximation, but higher memory usage. - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public double? Precision { get; set; } - [JsonInclude, JsonPropertyName("value_type")] - public string? ValueType { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(RareTermsAggregation rareTermsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.RareTerms(rareTermsAggregation); -} - -public sealed partial class RareTermsAggregationDescriptor : SerializableDescriptor> -{ - internal RareTermsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public RareTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private long? MaxDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private double? PrecisionValue { get; set; } - private string? ValueTypeValue { get; set; } - - /// - /// - /// Terms that should be excluded from the aggregation. - /// - /// - public RareTermsAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// The field from which to return rare terms. - /// - /// - public RareTermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return rare terms. - /// - /// - public RareTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return rare terms. - /// - /// - public RareTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Terms that should be included in the aggregation. - /// - /// - public RareTermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// The maximum number of documents a term should appear in. - /// - /// - public RareTermsAggregationDescriptor MaxDocCount(long? maxDocCount) - { - MaxDocCountValue = maxDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public RareTermsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// The precision of the internal CuckooFilters. - /// Smaller precision leads to better approximation, but higher memory usage. - /// - /// - public RareTermsAggregationDescriptor Precision(double? precision) - { - PrecisionValue = precision; - return Self; - } - - public RareTermsAggregationDescriptor ValueType(string? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (MaxDocCountValue.HasValue) - { - writer.WritePropertyName("max_doc_count"); - writer.WriteNumberValue(MaxDocCountValue.Value); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (!string.IsNullOrEmpty(ValueTypeValue)) - { - writer.WritePropertyName("value_type"); - writer.WriteStringValue(ValueTypeValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RareTermsAggregationDescriptor : SerializableDescriptor -{ - internal RareTermsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public RareTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private long? MaxDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private double? PrecisionValue { get; set; } - private string? ValueTypeValue { get; set; } - - /// - /// - /// Terms that should be excluded from the aggregation. - /// - /// - public RareTermsAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// The field from which to return rare terms. - /// - /// - public RareTermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return rare terms. - /// - /// - public RareTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return rare terms. - /// - /// - public RareTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Terms that should be included in the aggregation. - /// - /// - public RareTermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// The maximum number of documents a term should appear in. - /// - /// - public RareTermsAggregationDescriptor MaxDocCount(long? maxDocCount) - { - MaxDocCountValue = maxDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public RareTermsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// The precision of the internal CuckooFilters. - /// Smaller precision leads to better approximation, but higher memory usage. - /// - /// - public RareTermsAggregationDescriptor Precision(double? precision) - { - PrecisionValue = precision; - return Self; - } - - public RareTermsAggregationDescriptor ValueType(string? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (MaxDocCountValue.HasValue) - { - writer.WritePropertyName("max_doc_count"); - writer.WriteNumberValue(MaxDocCountValue.Value); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (PrecisionValue.HasValue) - { - writer.WritePropertyName("precision"); - writer.WriteNumberValue(PrecisionValue.Value); - } - - if (!string.IsNullOrEmpty(ValueTypeValue)) - { - writer.WritePropertyName("value_type"); - writer.WriteStringValue(ValueTypeValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregate.g.cs deleted file mode 100644 index 303bfe634f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class RateAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("value")] - public double Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregation.g.cs deleted file mode 100644 index a87f9578bfc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RateAggregation.g.cs +++ /dev/null @@ -1,407 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class RateAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - /// - /// - /// How the rate is calculated. - /// - /// - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateMode? Mode { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// The interval used to calculate the rate. - /// By default, the interval of the date_histogram is used. - /// - /// - [JsonInclude, JsonPropertyName("unit")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? Unit { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(RateAggregation rateAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Rate(rateAggregation); -} - -public sealed partial class RateAggregationDescriptor : SerializableDescriptor> -{ - internal RateAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public RateAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? UnitValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public RateAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public RateAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public RateAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RateAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public RateAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// How the rate is calculated. - /// - /// - public RateAggregationDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateMode? mode) - { - ModeValue = mode; - return Self; - } - - public RateAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public RateAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public RateAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval used to calculate the rate. - /// By default, the interval of the date_histogram is used. - /// - /// - public RateAggregationDescriptor Unit(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? unit) - { - UnitValue = unit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (UnitValue is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, UnitValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RateAggregationDescriptor : SerializableDescriptor -{ - internal RateAggregationDescriptor(Action configure) => configure.Invoke(this); - - public RateAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? UnitValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public RateAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public RateAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public RateAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RateAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public RateAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// How the rate is calculated. - /// - /// - public RateAggregationDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RateMode? mode) - { - ModeValue = mode; - return Self; - } - - public RateAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public RateAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public RateAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval used to calculate the rate. - /// By default, the interval of the date_histogram is used. - /// - /// - public RateAggregationDescriptor Unit(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CalendarInterval? unit) - { - UnitValue = unit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (UnitValue is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, UnitValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs deleted file mode 100644 index b4dcfa21b23..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class ReverseNestedAggregateConverter : JsonConverter -{ - public override ReverseNestedAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new ReverseNestedAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, ReverseNestedAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'ReverseNestedAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(ReverseNestedAggregateConverter))] -public sealed partial class ReverseNestedAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs deleted file mode 100644 index 43c5ca5e4b5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs +++ /dev/null @@ -1,160 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ReverseNestedAggregation -{ - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Path { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ReverseNestedAggregation reverseNestedAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.ReverseNested(reverseNestedAggregation); -} - -public sealed partial class ReverseNestedAggregationDescriptor : SerializableDescriptor> -{ - internal ReverseNestedAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public ReverseNestedAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - public ReverseNestedAggregationDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - public ReverseNestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - public ReverseNestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ReverseNestedAggregationDescriptor : SerializableDescriptor -{ - internal ReverseNestedAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ReverseNestedAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - public ReverseNestedAggregationDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - public ReverseNestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Defines the nested object field that should be joined back to. - /// The default is empty, which means that it joins back to the root/main document level. - /// - /// - public ReverseNestedAggregationDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregate.g.cs deleted file mode 100644 index f067ef6d31b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class SamplerAggregateConverter : JsonConverter -{ - public override SamplerAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new SamplerAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, SamplerAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'SamplerAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(SamplerAggregateConverter))] -public sealed partial class SamplerAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregation.g.cs deleted file mode 100644 index c9c3d45d203..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SamplerAggregation.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SamplerAggregation -{ - /// - /// - /// Limits how many top-scoring documents are collected in the sample processed on each shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SamplerAggregation samplerAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Sampler(samplerAggregation); -} - -public sealed partial class SamplerAggregationDescriptor : SerializableDescriptor -{ - internal SamplerAggregationDescriptor(Action configure) => configure.Invoke(this); - - public SamplerAggregationDescriptor() : base() - { - } - - private int? ShardSizeValue { get; set; } - - /// - /// - /// Limits how many top-scoring documents are collected in the sample processed on each shard. - /// - /// - public SamplerAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedHeuristic.g.cs deleted file mode 100644 index 75d1cc8978b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedHeuristic.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ScriptedHeuristic -{ - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } -} - -public sealed partial class ScriptedHeuristicDescriptor : SerializableDescriptor -{ - internal ScriptedHeuristicDescriptor(Action configure) => configure.Invoke(this); - - public ScriptedHeuristicDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - public ScriptedHeuristicDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptedHeuristicDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptedHeuristicDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs deleted file mode 100644 index 51ddfb89dc8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ScriptedMetricAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("value")] - public object Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs deleted file mode 100644 index 789e93828b2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ScriptedMetricAggregation.g.cs +++ /dev/null @@ -1,763 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ScriptedMetricAggregation -{ - /// - /// - /// Runs once on each shard after document collection is complete. - /// Allows the aggregation to consolidate the state returned from each shard. - /// - /// - [JsonInclude, JsonPropertyName("combine_script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? CombineScript { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Runs prior to any collection of documents. - /// Allows the aggregation to set up any initial state. - /// - /// - [JsonInclude, JsonPropertyName("init_script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? InitScript { get; set; } - - /// - /// - /// Run once per document collected. - /// If no combine_script is specified, the resulting state needs to be stored in the state object. - /// - /// - [JsonInclude, JsonPropertyName("map_script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? MapScript { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - - /// - /// - /// A global object with script parameters for init, map and combine scripts. - /// It is shared between the scripts. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// Runs once on the coordinating node after all shards have returned their results. - /// The script is provided with access to a variable states, which is an array of the result of the combine_script on each shard. - /// - /// - [JsonInclude, JsonPropertyName("reduce_script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? ReduceScript { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ScriptedMetricAggregation scriptedMetricAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.ScriptedMetric(scriptedMetricAggregation); -} - -public sealed partial class ScriptedMetricAggregationDescriptor : SerializableDescriptor> -{ - internal ScriptedMetricAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public ScriptedMetricAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? CombineScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor CombineScriptDescriptor { get; set; } - private Action CombineScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? InitScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor InitScriptDescriptor { get; set; } - private Action InitScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? MapScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor MapScriptDescriptor { get; set; } - private Action MapScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ReduceScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ReduceScriptDescriptor { get; set; } - private Action ReduceScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Runs once on each shard after document collection is complete. - /// Allows the aggregation to consolidate the state returned from each shard. - /// - /// - public ScriptedMetricAggregationDescriptor CombineScript(Elastic.Clients.Elasticsearch.Serverless.Script? combineScript) - { - CombineScriptDescriptor = null; - CombineScriptDescriptorAction = null; - CombineScriptValue = combineScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor CombineScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - CombineScriptValue = null; - CombineScriptDescriptorAction = null; - CombineScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor CombineScript(Action configure) - { - CombineScriptValue = null; - CombineScriptDescriptor = null; - CombineScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ScriptedMetricAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ScriptedMetricAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ScriptedMetricAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Runs prior to any collection of documents. - /// Allows the aggregation to set up any initial state. - /// - /// - public ScriptedMetricAggregationDescriptor InitScript(Elastic.Clients.Elasticsearch.Serverless.Script? initScript) - { - InitScriptDescriptor = null; - InitScriptDescriptorAction = null; - InitScriptValue = initScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor InitScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - InitScriptValue = null; - InitScriptDescriptorAction = null; - InitScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor InitScript(Action configure) - { - InitScriptValue = null; - InitScriptDescriptor = null; - InitScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Run once per document collected. - /// If no combine_script is specified, the resulting state needs to be stored in the state object. - /// - /// - public ScriptedMetricAggregationDescriptor MapScript(Elastic.Clients.Elasticsearch.Serverless.Script? mapScript) - { - MapScriptDescriptor = null; - MapScriptDescriptorAction = null; - MapScriptValue = mapScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor MapScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - MapScriptValue = null; - MapScriptDescriptorAction = null; - MapScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor MapScript(Action configure) - { - MapScriptValue = null; - MapScriptDescriptor = null; - MapScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public ScriptedMetricAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// A global object with script parameters for init, map and combine scripts. - /// It is shared between the scripts. - /// - /// - public ScriptedMetricAggregationDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Runs once on the coordinating node after all shards have returned their results. - /// The script is provided with access to a variable states, which is an array of the result of the combine_script on each shard. - /// - /// - public ScriptedMetricAggregationDescriptor ReduceScript(Elastic.Clients.Elasticsearch.Serverless.Script? reduceScript) - { - ReduceScriptDescriptor = null; - ReduceScriptDescriptorAction = null; - ReduceScriptValue = reduceScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor ReduceScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ReduceScriptValue = null; - ReduceScriptDescriptorAction = null; - ReduceScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor ReduceScript(Action configure) - { - ReduceScriptValue = null; - ReduceScriptDescriptor = null; - ReduceScriptDescriptorAction = configure; - return Self; - } - - public ScriptedMetricAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptedMetricAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CombineScriptDescriptor is not null) - { - writer.WritePropertyName("combine_script"); - JsonSerializer.Serialize(writer, CombineScriptDescriptor, options); - } - else if (CombineScriptDescriptorAction is not null) - { - writer.WritePropertyName("combine_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(CombineScriptDescriptorAction), options); - } - else if (CombineScriptValue is not null) - { - writer.WritePropertyName("combine_script"); - JsonSerializer.Serialize(writer, CombineScriptValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (InitScriptDescriptor is not null) - { - writer.WritePropertyName("init_script"); - JsonSerializer.Serialize(writer, InitScriptDescriptor, options); - } - else if (InitScriptDescriptorAction is not null) - { - writer.WritePropertyName("init_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(InitScriptDescriptorAction), options); - } - else if (InitScriptValue is not null) - { - writer.WritePropertyName("init_script"); - JsonSerializer.Serialize(writer, InitScriptValue, options); - } - - if (MapScriptDescriptor is not null) - { - writer.WritePropertyName("map_script"); - JsonSerializer.Serialize(writer, MapScriptDescriptor, options); - } - else if (MapScriptDescriptorAction is not null) - { - writer.WritePropertyName("map_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(MapScriptDescriptorAction), options); - } - else if (MapScriptValue is not null) - { - writer.WritePropertyName("map_script"); - JsonSerializer.Serialize(writer, MapScriptValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ReduceScriptDescriptor is not null) - { - writer.WritePropertyName("reduce_script"); - JsonSerializer.Serialize(writer, ReduceScriptDescriptor, options); - } - else if (ReduceScriptDescriptorAction is not null) - { - writer.WritePropertyName("reduce_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ReduceScriptDescriptorAction), options); - } - else if (ReduceScriptValue is not null) - { - writer.WritePropertyName("reduce_script"); - JsonSerializer.Serialize(writer, ReduceScriptValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ScriptedMetricAggregationDescriptor : SerializableDescriptor -{ - internal ScriptedMetricAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ScriptedMetricAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? CombineScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor CombineScriptDescriptor { get; set; } - private Action CombineScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? InitScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor InitScriptDescriptor { get; set; } - private Action InitScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? MapScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor MapScriptDescriptor { get; set; } - private Action MapScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ReduceScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ReduceScriptDescriptor { get; set; } - private Action ReduceScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Runs once on each shard after document collection is complete. - /// Allows the aggregation to consolidate the state returned from each shard. - /// - /// - public ScriptedMetricAggregationDescriptor CombineScript(Elastic.Clients.Elasticsearch.Serverless.Script? combineScript) - { - CombineScriptDescriptor = null; - CombineScriptDescriptorAction = null; - CombineScriptValue = combineScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor CombineScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - CombineScriptValue = null; - CombineScriptDescriptorAction = null; - CombineScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor CombineScript(Action configure) - { - CombineScriptValue = null; - CombineScriptDescriptor = null; - CombineScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ScriptedMetricAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ScriptedMetricAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ScriptedMetricAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Runs prior to any collection of documents. - /// Allows the aggregation to set up any initial state. - /// - /// - public ScriptedMetricAggregationDescriptor InitScript(Elastic.Clients.Elasticsearch.Serverless.Script? initScript) - { - InitScriptDescriptor = null; - InitScriptDescriptorAction = null; - InitScriptValue = initScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor InitScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - InitScriptValue = null; - InitScriptDescriptorAction = null; - InitScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor InitScript(Action configure) - { - InitScriptValue = null; - InitScriptDescriptor = null; - InitScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Run once per document collected. - /// If no combine_script is specified, the resulting state needs to be stored in the state object. - /// - /// - public ScriptedMetricAggregationDescriptor MapScript(Elastic.Clients.Elasticsearch.Serverless.Script? mapScript) - { - MapScriptDescriptor = null; - MapScriptDescriptorAction = null; - MapScriptValue = mapScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor MapScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - MapScriptValue = null; - MapScriptDescriptorAction = null; - MapScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor MapScript(Action configure) - { - MapScriptValue = null; - MapScriptDescriptor = null; - MapScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public ScriptedMetricAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// A global object with script parameters for init, map and combine scripts. - /// It is shared between the scripts. - /// - /// - public ScriptedMetricAggregationDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Runs once on the coordinating node after all shards have returned their results. - /// The script is provided with access to a variable states, which is an array of the result of the combine_script on each shard. - /// - /// - public ScriptedMetricAggregationDescriptor ReduceScript(Elastic.Clients.Elasticsearch.Serverless.Script? reduceScript) - { - ReduceScriptDescriptor = null; - ReduceScriptDescriptorAction = null; - ReduceScriptValue = reduceScript; - return Self; - } - - public ScriptedMetricAggregationDescriptor ReduceScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ReduceScriptValue = null; - ReduceScriptDescriptorAction = null; - ReduceScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor ReduceScript(Action configure) - { - ReduceScriptValue = null; - ReduceScriptDescriptor = null; - ReduceScriptDescriptorAction = configure; - return Self; - } - - public ScriptedMetricAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptedMetricAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptedMetricAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CombineScriptDescriptor is not null) - { - writer.WritePropertyName("combine_script"); - JsonSerializer.Serialize(writer, CombineScriptDescriptor, options); - } - else if (CombineScriptDescriptorAction is not null) - { - writer.WritePropertyName("combine_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(CombineScriptDescriptorAction), options); - } - else if (CombineScriptValue is not null) - { - writer.WritePropertyName("combine_script"); - JsonSerializer.Serialize(writer, CombineScriptValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (InitScriptDescriptor is not null) - { - writer.WritePropertyName("init_script"); - JsonSerializer.Serialize(writer, InitScriptDescriptor, options); - } - else if (InitScriptDescriptorAction is not null) - { - writer.WritePropertyName("init_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(InitScriptDescriptorAction), options); - } - else if (InitScriptValue is not null) - { - writer.WritePropertyName("init_script"); - JsonSerializer.Serialize(writer, InitScriptValue, options); - } - - if (MapScriptDescriptor is not null) - { - writer.WritePropertyName("map_script"); - JsonSerializer.Serialize(writer, MapScriptDescriptor, options); - } - else if (MapScriptDescriptorAction is not null) - { - writer.WritePropertyName("map_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(MapScriptDescriptorAction), options); - } - else if (MapScriptValue is not null) - { - writer.WritePropertyName("map_script"); - JsonSerializer.Serialize(writer, MapScriptValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (ReduceScriptDescriptor is not null) - { - writer.WritePropertyName("reduce_script"); - JsonSerializer.Serialize(writer, ReduceScriptDescriptor, options); - } - else if (ReduceScriptDescriptorAction is not null) - { - writer.WritePropertyName("reduce_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ReduceScriptDescriptorAction), options); - } - else if (ReduceScriptValue is not null) - { - writer.WritePropertyName("reduce_script"); - JsonSerializer.Serialize(writer, ReduceScriptValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs deleted file mode 100644 index ce7e96c21ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs +++ /dev/null @@ -1,157 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SerialDifferencingAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - /// - /// - /// The historical bucket to subtract from the current value. - /// Must be a positive, non-zero integer. - /// - /// - [JsonInclude, JsonPropertyName("lag")] - public int? Lag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SerialDifferencingAggregation serialDifferencingAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SerialDiff(serialDifferencingAggregation); -} - -public sealed partial class SerialDifferencingAggregationDescriptor : SerializableDescriptor -{ - internal SerialDifferencingAggregationDescriptor(Action configure) => configure.Invoke(this); - - public SerialDifferencingAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private int? LagValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public SerialDifferencingAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public SerialDifferencingAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public SerialDifferencingAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - /// - /// - /// The historical bucket to subtract from the current value. - /// Must be a positive, non-zero integer. - /// - /// - public SerialDifferencingAggregationDescriptor Lag(int? lag) - { - LagValue = lag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - if (LagValue.HasValue) - { - writer.WritePropertyName("lag"); - writer.WriteNumberValue(LagValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs deleted file mode 100644 index 682a7e49a9e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SignificantLongTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("bg_count")] - public long? BgCount { get; init; } - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count")] - public long? DocCount { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsBucket.g.cs deleted file mode 100644 index b2e0622e3b8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantLongTermsBucket.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class SignificantLongTermsBucketConverter : JsonConverter -{ - public override SignificantLongTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long bgCount = default; - long docCount = default; - long key = default; - string? keyAsString = default; - double score = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "bg_count") - { - bgCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "score") - { - score = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new SignificantLongTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), BgCount = bgCount, DocCount = docCount, Key = key, KeyAsString = keyAsString, Score = score }; - } - - public override void Write(Utf8JsonWriter writer, SignificantLongTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'SignificantLongTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(SignificantLongTermsBucketConverter))] -public sealed partial class SignificantLongTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long BgCount { get; init; } - public long DocCount { get; init; } - public long Key { get; init; } - public string? KeyAsString { get; init; } - public double Score { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs deleted file mode 100644 index 636834cdfd1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SignificantStringTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("bg_count")] - public long? BgCount { get; init; } - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count")] - public long? DocCount { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsBucket.g.cs deleted file mode 100644 index 4adf4ae4fc4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantStringTermsBucket.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class SignificantStringTermsBucketConverter : JsonConverter -{ - public override SignificantStringTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long bgCount = default; - long docCount = default; - string key = default; - double score = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "bg_count") - { - bgCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "score") - { - score = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new SignificantStringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), BgCount = bgCount, DocCount = docCount, Key = key, Score = score }; - } - - public override void Write(Utf8JsonWriter writer, SignificantStringTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'SignificantStringTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(SignificantStringTermsBucketConverter))] -public sealed partial class SignificantStringTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long BgCount { get; init; } - public long DocCount { get; init; } - public string Key { get; init; } - public double Score { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs deleted file mode 100644 index 68da3188fa9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs +++ /dev/null @@ -1,1195 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SignificantTermsAggregation -{ - /// - /// - /// A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index. - /// - /// - [JsonInclude, JsonPropertyName("background_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? BackgroundFilter { get; set; } - - /// - /// - /// Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("chi_square")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? ChiSquare { get; set; } - - /// - /// - /// Terms to exclude. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? Exclude { get; set; } - - /// - /// - /// Mechanism by which the aggregation should be executed: using field values directly or using global ordinals. - /// - /// - [JsonInclude, JsonPropertyName("execution_hint")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHint { get; set; } - - /// - /// - /// The field from which to return significant terms. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("gnd")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? Gnd { get; set; } - - /// - /// - /// Terms to include. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? Include { get; set; } - - /// - /// - /// Use JLH score as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("jlh")] - public Elastic.Clients.Elasticsearch.Serverless.EmptyObject? Jlh { get; set; } - - /// - /// - /// Only return terms that are found in more than min_doc_count hits. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public long? MinDocCount { get; set; } - - /// - /// - /// Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("mutual_information")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformation { get; set; } - - /// - /// - /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. - /// - /// - [JsonInclude, JsonPropertyName("percentage")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? Percentage { get; set; } - - /// - /// - /// Customized score, implemented via a script. - /// - /// - [JsonInclude, JsonPropertyName("script_heuristic")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? ScriptHeuristic { get; set; } - - /// - /// - /// Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the min_doc_count. - /// Terms will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - [JsonInclude, JsonPropertyName("shard_min_doc_count")] - public long? ShardMinDocCount { get; set; } - - /// - /// - /// Can be used to control the volumes of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SignificantTermsAggregation significantTermsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SignificantTerms(significantTermsAggregation); -} - -public sealed partial class SignificantTermsAggregationDescriptor : SerializableDescriptor> -{ - internal SignificantTermsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public SignificantTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? BackgroundFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor BackgroundFilterDescriptor { get; set; } - private Action> BackgroundFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? ChiSquareValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor ChiSquareDescriptor { get; set; } - private Action ChiSquareDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? GndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor GndDescriptor { get; set; } - private Action GndDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } - private Action JlhDescriptorAction { get; set; } - private long? MinDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } - private Action MutualInformationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } - private Action PercentageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? ScriptHeuristicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor ScriptHeuristicDescriptor { get; set; } - private Action ScriptHeuristicDescriptorAction { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index. - /// - /// - public SignificantTermsAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? backgroundFilter) - { - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterValue = backgroundFilter; - return Self; - } - - public SignificantTermsAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor BackgroundFilter(Action> configure) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? chiSquare) - { - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = null; - ChiSquareValue = chiSquare; - return Self; - } - - public SignificantTermsAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor descriptor) - { - ChiSquareValue = null; - ChiSquareDescriptorAction = null; - ChiSquareDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor ChiSquare(Action configure) - { - ChiSquareValue = null; - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = configure; - return Self; - } - - /// - /// - /// Terms to exclude. - /// - /// - public SignificantTermsAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Mechanism by which the aggregation should be executed: using field values directly or using global ordinals. - /// - /// - public SignificantTermsAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field from which to return significant terms. - /// - /// - public SignificantTermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant terms. - /// - /// - public SignificantTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant terms. - /// - /// - public SignificantTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? gnd) - { - GndDescriptor = null; - GndDescriptorAction = null; - GndValue = gnd; - return Self; - } - - public SignificantTermsAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor descriptor) - { - GndValue = null; - GndDescriptorAction = null; - GndDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor Gnd(Action configure) - { - GndValue = null; - GndDescriptor = null; - GndDescriptorAction = configure; - return Self; - } - - /// - /// - /// Terms to include. - /// - /// - public SignificantTermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Use JLH score as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObject? jlh) - { - JlhDescriptor = null; - JlhDescriptorAction = null; - JlhValue = jlh; - return Self; - } - - public SignificantTermsAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor descriptor) - { - JlhValue = null; - JlhDescriptorAction = null; - JlhDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor Jlh(Action configure) - { - JlhValue = null; - JlhDescriptor = null; - JlhDescriptorAction = configure; - return Self; - } - - /// - /// - /// Only return terms that are found in more than min_doc_count hits. - /// - /// - public SignificantTermsAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? mutualInformation) - { - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = null; - MutualInformationValue = mutualInformation; - return Self; - } - - public SignificantTermsAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor descriptor) - { - MutualInformationValue = null; - MutualInformationDescriptorAction = null; - MutualInformationDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor MutualInformation(Action configure) - { - MutualInformationValue = null; - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = configure; - return Self; - } - - /// - /// - /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. - /// - /// - public SignificantTermsAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? percentage) - { - PercentageDescriptor = null; - PercentageDescriptorAction = null; - PercentageValue = percentage; - return Self; - } - - public SignificantTermsAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor descriptor) - { - PercentageValue = null; - PercentageDescriptorAction = null; - PercentageDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor Percentage(Action configure) - { - PercentageValue = null; - PercentageDescriptor = null; - PercentageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Customized score, implemented via a script. - /// - /// - public SignificantTermsAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? scriptHeuristic) - { - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicValue = scriptHeuristic; - return Self; - } - - public SignificantTermsAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor descriptor) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor ScriptHeuristic(Action configure) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = configure; - return Self; - } - - /// - /// - /// Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the min_doc_count. - /// Terms will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - public SignificantTermsAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// Can be used to control the volumes of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public SignificantTermsAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - public SignificantTermsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BackgroundFilterDescriptor is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterDescriptor, options); - } - else if (BackgroundFilterDescriptorAction is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(BackgroundFilterDescriptorAction), options); - } - else if (BackgroundFilterValue is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterValue, options); - } - - if (ChiSquareDescriptor is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareDescriptor, options); - } - else if (ChiSquareDescriptorAction is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor(ChiSquareDescriptorAction), options); - } - else if (ChiSquareValue is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareValue, options); - } - - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (GndDescriptor is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndDescriptor, options); - } - else if (GndDescriptorAction is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor(GndDescriptorAction), options); - } - else if (GndValue is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndValue, options); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (JlhDescriptor is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhDescriptor, options); - } - else if (JlhDescriptorAction is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor(JlhDescriptorAction), options); - } - else if (JlhValue is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MutualInformationDescriptor is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationDescriptor, options); - } - else if (MutualInformationDescriptorAction is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor(MutualInformationDescriptorAction), options); - } - else if (MutualInformationValue is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationValue, options); - } - - if (PercentageDescriptor is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageDescriptor, options); - } - else if (PercentageDescriptorAction is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor(PercentageDescriptorAction), options); - } - else if (PercentageValue is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageValue, options); - } - - if (ScriptHeuristicDescriptor is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicDescriptor, options); - } - else if (ScriptHeuristicDescriptorAction is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor(ScriptHeuristicDescriptorAction), options); - } - else if (ScriptHeuristicValue is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicValue, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SignificantTermsAggregationDescriptor : SerializableDescriptor -{ - internal SignificantTermsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public SignificantTermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? BackgroundFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor BackgroundFilterDescriptor { get; set; } - private Action BackgroundFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? ChiSquareValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor ChiSquareDescriptor { get; set; } - private Action ChiSquareDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? GndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor GndDescriptor { get; set; } - private Action GndDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } - private Action JlhDescriptorAction { get; set; } - private long? MinDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } - private Action MutualInformationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } - private Action PercentageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? ScriptHeuristicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor ScriptHeuristicDescriptor { get; set; } - private Action ScriptHeuristicDescriptorAction { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index. - /// - /// - public SignificantTermsAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? backgroundFilter) - { - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterValue = backgroundFilter; - return Self; - } - - public SignificantTermsAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor BackgroundFilter(Action configure) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? chiSquare) - { - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = null; - ChiSquareValue = chiSquare; - return Self; - } - - public SignificantTermsAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor descriptor) - { - ChiSquareValue = null; - ChiSquareDescriptorAction = null; - ChiSquareDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor ChiSquare(Action configure) - { - ChiSquareValue = null; - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = configure; - return Self; - } - - /// - /// - /// Terms to exclude. - /// - /// - public SignificantTermsAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Mechanism by which the aggregation should be executed: using field values directly or using global ordinals. - /// - /// - public SignificantTermsAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field from which to return significant terms. - /// - /// - public SignificantTermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant terms. - /// - /// - public SignificantTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant terms. - /// - /// - public SignificantTermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? gnd) - { - GndDescriptor = null; - GndDescriptorAction = null; - GndValue = gnd; - return Self; - } - - public SignificantTermsAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor descriptor) - { - GndValue = null; - GndDescriptorAction = null; - GndDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor Gnd(Action configure) - { - GndValue = null; - GndDescriptor = null; - GndDescriptorAction = configure; - return Self; - } - - /// - /// - /// Terms to include. - /// - /// - public SignificantTermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Use JLH score as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObject? jlh) - { - JlhDescriptor = null; - JlhDescriptorAction = null; - JlhValue = jlh; - return Self; - } - - public SignificantTermsAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor descriptor) - { - JlhValue = null; - JlhDescriptorAction = null; - JlhDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor Jlh(Action configure) - { - JlhValue = null; - JlhDescriptor = null; - JlhDescriptorAction = configure; - return Self; - } - - /// - /// - /// Only return terms that are found in more than min_doc_count hits. - /// - /// - public SignificantTermsAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score. - /// - /// - public SignificantTermsAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? mutualInformation) - { - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = null; - MutualInformationValue = mutualInformation; - return Self; - } - - public SignificantTermsAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor descriptor) - { - MutualInformationValue = null; - MutualInformationDescriptorAction = null; - MutualInformationDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor MutualInformation(Action configure) - { - MutualInformationValue = null; - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = configure; - return Self; - } - - /// - /// - /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. - /// - /// - public SignificantTermsAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? percentage) - { - PercentageDescriptor = null; - PercentageDescriptorAction = null; - PercentageValue = percentage; - return Self; - } - - public SignificantTermsAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor descriptor) - { - PercentageValue = null; - PercentageDescriptorAction = null; - PercentageDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor Percentage(Action configure) - { - PercentageValue = null; - PercentageDescriptor = null; - PercentageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Customized score, implemented via a script. - /// - /// - public SignificantTermsAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? scriptHeuristic) - { - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicValue = scriptHeuristic; - return Self; - } - - public SignificantTermsAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor descriptor) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicDescriptor = descriptor; - return Self; - } - - public SignificantTermsAggregationDescriptor ScriptHeuristic(Action configure) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = configure; - return Self; - } - - /// - /// - /// Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the min_doc_count. - /// Terms will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - public SignificantTermsAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// Can be used to control the volumes of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public SignificantTermsAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - public SignificantTermsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BackgroundFilterDescriptor is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterDescriptor, options); - } - else if (BackgroundFilterDescriptorAction is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(BackgroundFilterDescriptorAction), options); - } - else if (BackgroundFilterValue is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterValue, options); - } - - if (ChiSquareDescriptor is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareDescriptor, options); - } - else if (ChiSquareDescriptorAction is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor(ChiSquareDescriptorAction), options); - } - else if (ChiSquareValue is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareValue, options); - } - - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (GndDescriptor is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndDescriptor, options); - } - else if (GndDescriptorAction is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor(GndDescriptorAction), options); - } - else if (GndValue is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndValue, options); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (JlhDescriptor is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhDescriptor, options); - } - else if (JlhDescriptorAction is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor(JlhDescriptorAction), options); - } - else if (JlhValue is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MutualInformationDescriptor is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationDescriptor, options); - } - else if (MutualInformationDescriptorAction is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor(MutualInformationDescriptorAction), options); - } - else if (MutualInformationValue is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationValue, options); - } - - if (PercentageDescriptor is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageDescriptor, options); - } - else if (PercentageDescriptorAction is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor(PercentageDescriptorAction), options); - } - else if (PercentageValue is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageValue, options); - } - - if (ScriptHeuristicDescriptor is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicDescriptor, options); - } - else if (ScriptHeuristicDescriptorAction is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor(ScriptHeuristicDescriptorAction), options); - } - else if (ScriptHeuristicValue is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicValue, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs deleted file mode 100644 index 3b445cbbdda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs +++ /dev/null @@ -1,1284 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SignificantTextAggregation -{ - /// - /// - /// A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index. - /// - /// - [JsonInclude, JsonPropertyName("background_filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? BackgroundFilter { get; set; } - - /// - /// - /// Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("chi_square")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? ChiSquare { get; set; } - - /// - /// - /// Values to exclude. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? Exclude { get; set; } - - /// - /// - /// Determines whether the aggregation will use field values directly or global ordinals. - /// - /// - [JsonInclude, JsonPropertyName("execution_hint")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHint { get; set; } - - /// - /// - /// The field from which to return significant text. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Whether to out duplicate text to deal with noisy data. - /// - /// - [JsonInclude, JsonPropertyName("filter_duplicate_text")] - public bool? FilterDuplicateText { get; set; } - - /// - /// - /// Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("gnd")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? Gnd { get; set; } - - /// - /// - /// Values to include. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? Include { get; set; } - - /// - /// - /// Use JLH score as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("jlh")] - public Elastic.Clients.Elasticsearch.Serverless.EmptyObject? Jlh { get; set; } - - /// - /// - /// Only return values that are found in more than min_doc_count hits. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public long? MinDocCount { get; set; } - - /// - /// - /// Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score. - /// - /// - [JsonInclude, JsonPropertyName("mutual_information")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformation { get; set; } - - /// - /// - /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. - /// - /// - [JsonInclude, JsonPropertyName("percentage")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? Percentage { get; set; } - - /// - /// - /// Customized score, implemented via a script. - /// - /// - [JsonInclude, JsonPropertyName("script_heuristic")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? ScriptHeuristic { get; set; } - - /// - /// - /// Regulates the certainty a shard has if the values should actually be added to the candidate list or not with respect to the min_doc_count. - /// Values will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - [JsonInclude, JsonPropertyName("shard_min_doc_count")] - public long? ShardMinDocCount { get; set; } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Overrides the JSON _source fields from which text will be analyzed. - /// - /// - [JsonInclude, JsonPropertyName("source_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFields { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SignificantTextAggregation significantTextAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SignificantText(significantTextAggregation); -} - -public sealed partial class SignificantTextAggregationDescriptor : SerializableDescriptor> -{ - internal SignificantTextAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public SignificantTextAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? BackgroundFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor BackgroundFilterDescriptor { get; set; } - private Action> BackgroundFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? ChiSquareValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor ChiSquareDescriptor { get; set; } - private Action ChiSquareDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private bool? FilterDuplicateTextValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? GndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor GndDescriptor { get; set; } - private Action GndDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } - private Action JlhDescriptorAction { get; set; } - private long? MinDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } - private Action MutualInformationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } - private Action PercentageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? ScriptHeuristicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor ScriptHeuristicDescriptor { get; set; } - private Action ScriptHeuristicDescriptorAction { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFieldsValue { get; set; } - - /// - /// - /// A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index. - /// - /// - public SignificantTextAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? backgroundFilter) - { - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterValue = backgroundFilter; - return Self; - } - - public SignificantTextAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor BackgroundFilter(Action> configure) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score. - /// - /// - public SignificantTextAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? chiSquare) - { - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = null; - ChiSquareValue = chiSquare; - return Self; - } - - public SignificantTextAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor descriptor) - { - ChiSquareValue = null; - ChiSquareDescriptorAction = null; - ChiSquareDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor ChiSquare(Action configure) - { - ChiSquareValue = null; - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = configure; - return Self; - } - - /// - /// - /// Values to exclude. - /// - /// - public SignificantTextAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Determines whether the aggregation will use field values directly or global ordinals. - /// - /// - public SignificantTextAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field from which to return significant text. - /// - /// - public SignificantTextAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant text. - /// - /// - public SignificantTextAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant text. - /// - /// - public SignificantTextAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Whether to out duplicate text to deal with noisy data. - /// - /// - public SignificantTextAggregationDescriptor FilterDuplicateText(bool? filterDuplicateText = true) - { - FilterDuplicateTextValue = filterDuplicateText; - return Self; - } - - /// - /// - /// Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score. - /// - /// - public SignificantTextAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? gnd) - { - GndDescriptor = null; - GndDescriptorAction = null; - GndValue = gnd; - return Self; - } - - public SignificantTextAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor descriptor) - { - GndValue = null; - GndDescriptorAction = null; - GndDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor Gnd(Action configure) - { - GndValue = null; - GndDescriptor = null; - GndDescriptorAction = configure; - return Self; - } - - /// - /// - /// Values to include. - /// - /// - public SignificantTextAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Use JLH score as the significance score. - /// - /// - public SignificantTextAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObject? jlh) - { - JlhDescriptor = null; - JlhDescriptorAction = null; - JlhValue = jlh; - return Self; - } - - public SignificantTextAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor descriptor) - { - JlhValue = null; - JlhDescriptorAction = null; - JlhDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor Jlh(Action configure) - { - JlhValue = null; - JlhDescriptor = null; - JlhDescriptorAction = configure; - return Self; - } - - /// - /// - /// Only return values that are found in more than min_doc_count hits. - /// - /// - public SignificantTextAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score. - /// - /// - public SignificantTextAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? mutualInformation) - { - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = null; - MutualInformationValue = mutualInformation; - return Self; - } - - public SignificantTextAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor descriptor) - { - MutualInformationValue = null; - MutualInformationDescriptorAction = null; - MutualInformationDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor MutualInformation(Action configure) - { - MutualInformationValue = null; - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = configure; - return Self; - } - - /// - /// - /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. - /// - /// - public SignificantTextAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? percentage) - { - PercentageDescriptor = null; - PercentageDescriptorAction = null; - PercentageValue = percentage; - return Self; - } - - public SignificantTextAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor descriptor) - { - PercentageValue = null; - PercentageDescriptorAction = null; - PercentageDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor Percentage(Action configure) - { - PercentageValue = null; - PercentageDescriptor = null; - PercentageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Customized score, implemented via a script. - /// - /// - public SignificantTextAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? scriptHeuristic) - { - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicValue = scriptHeuristic; - return Self; - } - - public SignificantTextAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor descriptor) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor ScriptHeuristic(Action configure) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = configure; - return Self; - } - - /// - /// - /// Regulates the certainty a shard has if the values should actually be added to the candidate list or not with respect to the min_doc_count. - /// Values will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - public SignificantTextAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public SignificantTextAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - public SignificantTextAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Overrides the JSON _source fields from which text will be analyzed. - /// - /// - public SignificantTextAggregationDescriptor SourceFields(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceFields) - { - SourceFieldsValue = sourceFields; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BackgroundFilterDescriptor is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterDescriptor, options); - } - else if (BackgroundFilterDescriptorAction is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(BackgroundFilterDescriptorAction), options); - } - else if (BackgroundFilterValue is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterValue, options); - } - - if (ChiSquareDescriptor is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareDescriptor, options); - } - else if (ChiSquareDescriptorAction is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor(ChiSquareDescriptorAction), options); - } - else if (ChiSquareValue is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareValue, options); - } - - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FilterDuplicateTextValue.HasValue) - { - writer.WritePropertyName("filter_duplicate_text"); - writer.WriteBooleanValue(FilterDuplicateTextValue.Value); - } - - if (GndDescriptor is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndDescriptor, options); - } - else if (GndDescriptorAction is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor(GndDescriptorAction), options); - } - else if (GndValue is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndValue, options); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (JlhDescriptor is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhDescriptor, options); - } - else if (JlhDescriptorAction is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor(JlhDescriptorAction), options); - } - else if (JlhValue is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MutualInformationDescriptor is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationDescriptor, options); - } - else if (MutualInformationDescriptorAction is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor(MutualInformationDescriptorAction), options); - } - else if (MutualInformationValue is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationValue, options); - } - - if (PercentageDescriptor is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageDescriptor, options); - } - else if (PercentageDescriptorAction is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor(PercentageDescriptorAction), options); - } - else if (PercentageValue is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageValue, options); - } - - if (ScriptHeuristicDescriptor is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicDescriptor, options); - } - else if (ScriptHeuristicDescriptorAction is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor(ScriptHeuristicDescriptorAction), options); - } - else if (ScriptHeuristicValue is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicValue, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SourceFieldsValue is not null) - { - writer.WritePropertyName("source_fields"); - JsonSerializer.Serialize(writer, SourceFieldsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SignificantTextAggregationDescriptor : SerializableDescriptor -{ - internal SignificantTextAggregationDescriptor(Action configure) => configure.Invoke(this); - - public SignificantTextAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? BackgroundFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor BackgroundFilterDescriptor { get; set; } - private Action BackgroundFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? ChiSquareValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor ChiSquareDescriptor { get; set; } - private Action ChiSquareDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private bool? FilterDuplicateTextValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? GndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor GndDescriptor { get; set; } - private Action GndDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } - private Action JlhDescriptorAction { get; set; } - private long? MinDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } - private Action MutualInformationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } - private Action PercentageDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? ScriptHeuristicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor ScriptHeuristicDescriptor { get; set; } - private Action ScriptHeuristicDescriptorAction { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFieldsValue { get; set; } - - /// - /// - /// A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index. - /// - /// - public SignificantTextAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? backgroundFilter) - { - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterValue = backgroundFilter; - return Self; - } - - public SignificantTextAggregationDescriptor BackgroundFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptorAction = null; - BackgroundFilterDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor BackgroundFilter(Action configure) - { - BackgroundFilterValue = null; - BackgroundFilterDescriptor = null; - BackgroundFilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score. - /// - /// - public SignificantTextAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristic? chiSquare) - { - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = null; - ChiSquareValue = chiSquare; - return Self; - } - - public SignificantTextAggregationDescriptor ChiSquare(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor descriptor) - { - ChiSquareValue = null; - ChiSquareDescriptorAction = null; - ChiSquareDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor ChiSquare(Action configure) - { - ChiSquareValue = null; - ChiSquareDescriptor = null; - ChiSquareDescriptorAction = configure; - return Self; - } - - /// - /// - /// Values to exclude. - /// - /// - public SignificantTextAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Determines whether the aggregation will use field values directly or global ordinals. - /// - /// - public SignificantTextAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field from which to return significant text. - /// - /// - public SignificantTextAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant text. - /// - /// - public SignificantTextAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return significant text. - /// - /// - public SignificantTextAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Whether to out duplicate text to deal with noisy data. - /// - /// - public SignificantTextAggregationDescriptor FilterDuplicateText(bool? filterDuplicateText = true) - { - FilterDuplicateTextValue = filterDuplicateText; - return Self; - } - - /// - /// - /// Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score. - /// - /// - public SignificantTextAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristic? gnd) - { - GndDescriptor = null; - GndDescriptorAction = null; - GndValue = gnd; - return Self; - } - - public SignificantTextAggregationDescriptor Gnd(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor descriptor) - { - GndValue = null; - GndDescriptorAction = null; - GndDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor Gnd(Action configure) - { - GndValue = null; - GndDescriptor = null; - GndDescriptorAction = configure; - return Self; - } - - /// - /// - /// Values to include. - /// - /// - public SignificantTextAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Use JLH score as the significance score. - /// - /// - public SignificantTextAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObject? jlh) - { - JlhDescriptor = null; - JlhDescriptorAction = null; - JlhValue = jlh; - return Self; - } - - public SignificantTextAggregationDescriptor Jlh(Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor descriptor) - { - JlhValue = null; - JlhDescriptorAction = null; - JlhDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor Jlh(Action configure) - { - JlhValue = null; - JlhDescriptor = null; - JlhDescriptorAction = configure; - return Self; - } - - /// - /// - /// Only return values that are found in more than min_doc_count hits. - /// - /// - public SignificantTextAggregationDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score. - /// - /// - public SignificantTextAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? mutualInformation) - { - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = null; - MutualInformationValue = mutualInformation; - return Self; - } - - public SignificantTextAggregationDescriptor MutualInformation(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor descriptor) - { - MutualInformationValue = null; - MutualInformationDescriptorAction = null; - MutualInformationDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor MutualInformation(Action configure) - { - MutualInformationValue = null; - MutualInformationDescriptor = null; - MutualInformationDescriptorAction = configure; - return Self; - } - - /// - /// - /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. - /// - /// - public SignificantTextAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? percentage) - { - PercentageDescriptor = null; - PercentageDescriptorAction = null; - PercentageValue = percentage; - return Self; - } - - public SignificantTextAggregationDescriptor Percentage(Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor descriptor) - { - PercentageValue = null; - PercentageDescriptorAction = null; - PercentageDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor Percentage(Action configure) - { - PercentageValue = null; - PercentageDescriptor = null; - PercentageDescriptorAction = configure; - return Self; - } - - /// - /// - /// Customized score, implemented via a script. - /// - /// - public SignificantTextAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristic? scriptHeuristic) - { - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicValue = scriptHeuristic; - return Self; - } - - public SignificantTextAggregationDescriptor ScriptHeuristic(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor descriptor) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptorAction = null; - ScriptHeuristicDescriptor = descriptor; - return Self; - } - - public SignificantTextAggregationDescriptor ScriptHeuristic(Action configure) - { - ScriptHeuristicValue = null; - ScriptHeuristicDescriptor = null; - ScriptHeuristicDescriptorAction = configure; - return Self; - } - - /// - /// - /// Regulates the certainty a shard has if the values should actually be added to the candidate list or not with respect to the min_doc_count. - /// Values will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - public SignificantTextAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public SignificantTextAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - public SignificantTextAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Overrides the JSON _source fields from which text will be analyzed. - /// - /// - public SignificantTextAggregationDescriptor SourceFields(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceFields) - { - SourceFieldsValue = sourceFields; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BackgroundFilterDescriptor is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterDescriptor, options); - } - else if (BackgroundFilterDescriptorAction is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(BackgroundFilterDescriptorAction), options); - } - else if (BackgroundFilterValue is not null) - { - writer.WritePropertyName("background_filter"); - JsonSerializer.Serialize(writer, BackgroundFilterValue, options); - } - - if (ChiSquareDescriptor is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareDescriptor, options); - } - else if (ChiSquareDescriptorAction is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ChiSquareHeuristicDescriptor(ChiSquareDescriptorAction), options); - } - else if (ChiSquareValue is not null) - { - writer.WritePropertyName("chi_square"); - JsonSerializer.Serialize(writer, ChiSquareValue, options); - } - - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FilterDuplicateTextValue.HasValue) - { - writer.WritePropertyName("filter_duplicate_text"); - writer.WriteBooleanValue(FilterDuplicateTextValue.Value); - } - - if (GndDescriptor is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndDescriptor, options); - } - else if (GndDescriptorAction is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.GoogleNormalizedDistanceHeuristicDescriptor(GndDescriptorAction), options); - } - else if (GndValue is not null) - { - writer.WritePropertyName("gnd"); - JsonSerializer.Serialize(writer, GndValue, options); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (JlhDescriptor is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhDescriptor, options); - } - else if (JlhDescriptorAction is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor(JlhDescriptorAction), options); - } - else if (JlhValue is not null) - { - writer.WritePropertyName("jlh"); - JsonSerializer.Serialize(writer, JlhValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MutualInformationDescriptor is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationDescriptor, options); - } - else if (MutualInformationDescriptorAction is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor(MutualInformationDescriptorAction), options); - } - else if (MutualInformationValue is not null) - { - writer.WritePropertyName("mutual_information"); - JsonSerializer.Serialize(writer, MutualInformationValue, options); - } - - if (PercentageDescriptor is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageDescriptor, options); - } - else if (PercentageDescriptorAction is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor(PercentageDescriptorAction), options); - } - else if (PercentageValue is not null) - { - writer.WritePropertyName("percentage"); - JsonSerializer.Serialize(writer, PercentageValue, options); - } - - if (ScriptHeuristicDescriptor is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicDescriptor, options); - } - else if (ScriptHeuristicDescriptorAction is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.ScriptedHeuristicDescriptor(ScriptHeuristicDescriptorAction), options); - } - else if (ScriptHeuristicValue is not null) - { - writer.WritePropertyName("script_heuristic"); - JsonSerializer.Serialize(writer, ScriptHeuristicValue, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SourceFieldsValue is not null) - { - writer.WritePropertyName("source_fields"); - JsonSerializer.Serialize(writer, SourceFieldsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs deleted file mode 100644 index 68ac88cf2db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SimpleValueAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs deleted file mode 100644 index a20d40dca76..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBounds.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StandardDeviationBounds -{ - [JsonInclude, JsonPropertyName("lower")] - public double? Lower { get; init; } - [JsonInclude, JsonPropertyName("lower_population")] - public double? LowerPopulation { get; init; } - [JsonInclude, JsonPropertyName("lower_sampling")] - public double? LowerSampling { get; init; } - [JsonInclude, JsonPropertyName("upper")] - public double? Upper { get; init; } - [JsonInclude, JsonPropertyName("upper_population")] - public double? UpperPopulation { get; init; } - [JsonInclude, JsonPropertyName("upper_sampling")] - public double? UpperSampling { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBoundsAsString.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBoundsAsString.g.cs deleted file mode 100644 index 1dfe7f7db77..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StandardDeviationBoundsAsString.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StandardDeviationBoundsAsString -{ - [JsonInclude, JsonPropertyName("lower")] - public string Lower { get; init; } - [JsonInclude, JsonPropertyName("lower_population")] - public string LowerPopulation { get; init; } - [JsonInclude, JsonPropertyName("lower_sampling")] - public string LowerSampling { get; init; } - [JsonInclude, JsonPropertyName("upper")] - public string Upper { get; init; } - [JsonInclude, JsonPropertyName("upper_population")] - public string UpperPopulation { get; init; } - [JsonInclude, JsonPropertyName("upper_sampling")] - public string UpperSampling { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregate.g.cs deleted file mode 100644 index cd96a122c42..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregate.g.cs +++ /dev/null @@ -1,58 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Statistics aggregation result. min, max and avg are missing if there were no values to process -/// (count is zero). -/// -/// -public sealed partial class StatsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("avg")] - public double? Avg { get; init; } - [JsonInclude, JsonPropertyName("avg_as_string")] - public string? AvgAsString { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("max")] - public double? Max { get; init; } - [JsonInclude, JsonPropertyName("max_as_string")] - public string? MaxAsString { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("min")] - public double? Min { get; init; } - [JsonInclude, JsonPropertyName("min_as_string")] - public string? MinAsString { get; init; } - [JsonInclude, JsonPropertyName("sum")] - public double Sum { get; init; } - [JsonInclude, JsonPropertyName("sum_as_string")] - public string? SumAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregation.g.cs deleted file mode 100644 index 24d99d20aa3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsAggregation.g.cs +++ /dev/null @@ -1,316 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StatsAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(StatsAggregation statsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Stats(statsAggregation); -} - -public sealed partial class StatsAggregationDescriptor : SerializableDescriptor> -{ - internal StatsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public StatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StatsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public StatsAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public StatsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public StatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public StatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public StatsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class StatsAggregationDescriptor : SerializableDescriptor -{ - internal StatsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public StatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StatsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public StatsAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public StatsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public StatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public StatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public StatsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs deleted file mode 100644 index fa25df9afbd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StatsBucketAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("avg")] - public double? Avg { get; init; } - [JsonInclude, JsonPropertyName("avg_as_string")] - public string? AvgAsString { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("max")] - public double? Max { get; init; } - [JsonInclude, JsonPropertyName("max_as_string")] - public string? MaxAsString { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("min")] - public double? Min { get; init; } - [JsonInclude, JsonPropertyName("min_as_string")] - public string? MinAsString { get; init; } - [JsonInclude, JsonPropertyName("sum")] - public double Sum { get; init; } - [JsonInclude, JsonPropertyName("sum_as_string")] - public string? SumAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs deleted file mode 100644 index 216123f3b03..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StatsBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(StatsBucketAggregation statsBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.StatsBucket(statsBucketAggregation); -} - -public sealed partial class StatsBucketAggregationDescriptor : SerializableDescriptor -{ - internal StatsBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public StatsBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public StatsBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public StatsBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public StatsBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsAggregate.g.cs deleted file mode 100644 index 04fb7cdb10c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsAggregate.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of the rare_terms aggregation when the field is a string. -/// -/// -public sealed partial class StringRareTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsBucket.g.cs deleted file mode 100644 index 1bc02b85d3b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringRareTermsBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class StringRareTermsBucketConverter : JsonConverter -{ - public override StringRareTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - string key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new StringRareTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, StringRareTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'StringRareTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(StringRareTermsBucketConverter))] -public sealed partial class StringRareTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public string Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregate.g.cs deleted file mode 100644 index 8fe673d457a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregate.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StringStatsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("avg_length")] - public double? AvgLength { get; init; } - [JsonInclude, JsonPropertyName("avg_length_as_string")] - public string? AvgLengthAsString { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("distribution")] - public IReadOnlyDictionary? Distribution { get; init; } - [JsonInclude, JsonPropertyName("entropy")] - public double? Entropy { get; init; } - [JsonInclude, JsonPropertyName("max_length")] - public int? MaxLength { get; init; } - [JsonInclude, JsonPropertyName("max_length_as_string")] - public string? MaxLengthAsString { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("min_length")] - public int? MinLength { get; init; } - [JsonInclude, JsonPropertyName("min_length_as_string")] - public string? MinLengthAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregation.g.cs deleted file mode 100644 index b92f2f6afa0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringStatsAggregation.g.cs +++ /dev/null @@ -1,332 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class StringStatsAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Shows the probability distribution for all characters. - /// - /// - [JsonInclude, JsonPropertyName("show_distribution")] - public bool? ShowDistribution { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(StringStatsAggregation stringStatsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.StringStats(stringStatsAggregation); -} - -public sealed partial class StringStatsAggregationDescriptor : SerializableDescriptor> -{ - internal StringStatsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public StringStatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? ShowDistributionValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StringStatsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StringStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StringStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public StringStatsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public StringStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public StringStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public StringStatsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Shows the probability distribution for all characters. - /// - /// - public StringStatsAggregationDescriptor ShowDistribution(bool? showDistribution = true) - { - ShowDistributionValue = showDistribution; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShowDistributionValue.HasValue) - { - writer.WritePropertyName("show_distribution"); - writer.WriteBooleanValue(ShowDistributionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class StringStatsAggregationDescriptor : SerializableDescriptor -{ - internal StringStatsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public StringStatsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? ShowDistributionValue { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StringStatsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StringStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public StringStatsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public StringStatsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public StringStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public StringStatsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public StringStatsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Shows the probability distribution for all characters. - /// - /// - public StringStatsAggregationDescriptor ShowDistribution(bool? showDistribution = true) - { - ShowDistributionValue = showDistribution; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShowDistributionValue.HasValue) - { - writer.WritePropertyName("show_distribution"); - writer.WriteBooleanValue(ShowDistributionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsAggregate.g.cs deleted file mode 100644 index 88ae16d8ebf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a terms aggregation when the field is a string. -/// -/// -public sealed partial class StringTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count_error_upper_bound")] - public long? DocCountErrorUpperBound { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("sum_other_doc_count")] - public long? SumOtherDocCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs deleted file mode 100644 index 013a4dbbaed..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StringTermsBucket.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class StringTermsBucketConverter : JsonConverter -{ - public override StringTermsBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - long? docCountErrorUpperBound = default; - Elastic.Clients.Elasticsearch.Serverless.FieldValue key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "doc_count_error_upper_bound") - { - docCountErrorUpperBound = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new StringTermsBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, DocCountErrorUpperBound = docCountErrorUpperBound, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, StringTermsBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'StringTermsBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(StringTermsBucketConverter))] -public sealed partial class StringTermsBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public long? DocCountErrorUpperBound { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.FieldValue Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregate.g.cs deleted file mode 100644 index 238d466c9b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregate.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Sum aggregation result. value is always present and is zero if there were no values to process. -/// -/// -public sealed partial class SumAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregation.g.cs deleted file mode 100644 index 5c73f9a9e1b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumAggregation.g.cs +++ /dev/null @@ -1,316 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SumAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SumAggregation sumAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Sum(sumAggregation); -} - -public sealed partial class SumAggregationDescriptor : SerializableDescriptor> -{ - internal SumAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public SumAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public SumAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public SumAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public SumAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SumAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public SumAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public SumAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public SumAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public SumAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SumAggregationDescriptor : SerializableDescriptor -{ - internal SumAggregationDescriptor(Action configure) => configure.Invoke(this); - - public SumAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public SumAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public SumAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public SumAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SumAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public SumAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public SumAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public SumAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public SumAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs deleted file mode 100644 index 5ee5875ebec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs +++ /dev/null @@ -1,129 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class SumBucketAggregation -{ - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - [JsonInclude, JsonPropertyName("buckets_path")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPath { get; set; } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - [JsonInclude, JsonPropertyName("gap_policy")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SumBucketAggregation sumBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SumBucket(sumBucketAggregation); -} - -public sealed partial class SumBucketAggregationDescriptor : SerializableDescriptor -{ - internal SumBucketAggregationDescriptor(Action configure) => configure.Invoke(this); - - public SumBucketAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - - /// - /// - /// Path to the buckets that contain one set of values to correlate. - /// - /// - public SumBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - - /// - /// - /// DecimalFormat pattern for the output value. - /// If specified, the formatted value is returned in the aggregation’s value_as_string property. - /// - /// - public SumBucketAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Policy to apply when gaps are found in the data. - /// - /// - public SumBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? gapPolicy) - { - GapPolicyValue = gapPolicy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GapPolicyValue is not null) - { - writer.WritePropertyName("gap_policy"); - JsonSerializer.Serialize(writer, GapPolicyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigest.g.cs deleted file mode 100644 index 4b8114bc7bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigest.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TDigest -{ - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - [JsonInclude, JsonPropertyName("compression")] - public int? Compression { get; set; } -} - -public sealed partial class TDigestDescriptor : SerializableDescriptor -{ - internal TDigestDescriptor(Action configure) => configure.Invoke(this); - - public TDigestDescriptor() : base() - { - } - - private int? CompressionValue { get; set; } - - /// - /// - /// Limits the maximum number of nodes used by the underlying TDigest algorithm to 20 * compression, enabling control of memory usage and approximation error. - /// - /// - public TDigestDescriptor Compression(int? compression) - { - CompressionValue = compression; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CompressionValue.HasValue) - { - writer.WritePropertyName("compression"); - writer.WriteNumberValue(CompressionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs deleted file mode 100644 index f17b90e7338..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentileRanksAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TDigestPercentileRanksAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("values")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Percentiles Values { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentilesAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentilesAggregate.g.cs deleted file mode 100644 index bd47ae63781..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TDigestPercentilesAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TDigestPercentilesAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("values")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Percentiles Values { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregate.g.cs deleted file mode 100644 index d2c7657b542..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregate.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TTestAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs deleted file mode 100644 index a91f300f7dd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs +++ /dev/null @@ -1,317 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TTestAggregation -{ - /// - /// - /// Test population A. - /// - /// - [JsonInclude, JsonPropertyName("a")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? a { get; set; } - - /// - /// - /// Test population B. - /// - /// - [JsonInclude, JsonPropertyName("b")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? b { get; set; } - - /// - /// - /// The type of test. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(TTestAggregation tTestAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.TTest(tTestAggregation); -} - -public sealed partial class TTestAggregationDescriptor : SerializableDescriptor> -{ - internal TTestAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public TTestAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? aValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor aDescriptor { get; set; } - private Action> aDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? bValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor bDescriptor { get; set; } - private Action> bDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? TypeValue { get; set; } - - /// - /// - /// Test population A. - /// - /// - public TTestAggregationDescriptor a(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? a) - { - aDescriptor = null; - aDescriptorAction = null; - aValue = a; - return Self; - } - - public TTestAggregationDescriptor a(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor descriptor) - { - aValue = null; - aDescriptorAction = null; - aDescriptor = descriptor; - return Self; - } - - public TTestAggregationDescriptor a(Action> configure) - { - aValue = null; - aDescriptor = null; - aDescriptorAction = configure; - return Self; - } - - /// - /// - /// Test population B. - /// - /// - public TTestAggregationDescriptor b(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? b) - { - bDescriptor = null; - bDescriptorAction = null; - bValue = b; - return Self; - } - - public TTestAggregationDescriptor b(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor descriptor) - { - bValue = null; - bDescriptorAction = null; - bDescriptor = descriptor; - return Self; - } - - public TTestAggregationDescriptor b(Action> configure) - { - bValue = null; - bDescriptor = null; - bDescriptorAction = configure; - return Self; - } - - /// - /// - /// The type of test. - /// - /// - public TTestAggregationDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (aDescriptor is not null) - { - writer.WritePropertyName("a"); - JsonSerializer.Serialize(writer, aDescriptor, options); - } - else if (aDescriptorAction is not null) - { - writer.WritePropertyName("a"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor(aDescriptorAction), options); - } - else if (aValue is not null) - { - writer.WritePropertyName("a"); - JsonSerializer.Serialize(writer, aValue, options); - } - - if (bDescriptor is not null) - { - writer.WritePropertyName("b"); - JsonSerializer.Serialize(writer, bDescriptor, options); - } - else if (bDescriptorAction is not null) - { - writer.WritePropertyName("b"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor(bDescriptorAction), options); - } - else if (bValue is not null) - { - writer.WritePropertyName("b"); - JsonSerializer.Serialize(writer, bValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TTestAggregationDescriptor : SerializableDescriptor -{ - internal TTestAggregationDescriptor(Action configure) => configure.Invoke(this); - - public TTestAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? aValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor aDescriptor { get; set; } - private Action aDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? bValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor bDescriptor { get; set; } - private Action bDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? TypeValue { get; set; } - - /// - /// - /// Test population A. - /// - /// - public TTestAggregationDescriptor a(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? a) - { - aDescriptor = null; - aDescriptorAction = null; - aValue = a; - return Self; - } - - public TTestAggregationDescriptor a(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor descriptor) - { - aValue = null; - aDescriptorAction = null; - aDescriptor = descriptor; - return Self; - } - - public TTestAggregationDescriptor a(Action configure) - { - aValue = null; - aDescriptor = null; - aDescriptorAction = configure; - return Self; - } - - /// - /// - /// Test population B. - /// - /// - public TTestAggregationDescriptor b(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? b) - { - bDescriptor = null; - bDescriptorAction = null; - bValue = b; - return Self; - } - - public TTestAggregationDescriptor b(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor descriptor) - { - bValue = null; - bDescriptorAction = null; - bDescriptor = descriptor; - return Self; - } - - public TTestAggregationDescriptor b(Action configure) - { - bValue = null; - bDescriptor = null; - bDescriptorAction = configure; - return Self; - } - - /// - /// - /// The type of test. - /// - /// - public TTestAggregationDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (aDescriptor is not null) - { - writer.WritePropertyName("a"); - JsonSerializer.Serialize(writer, aDescriptor, options); - } - else if (aDescriptorAction is not null) - { - writer.WritePropertyName("a"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor(aDescriptorAction), options); - } - else if (aValue is not null) - { - writer.WritePropertyName("a"); - JsonSerializer.Serialize(writer, aValue, options); - } - - if (bDescriptor is not null) - { - writer.WritePropertyName("b"); - JsonSerializer.Serialize(writer, bDescriptor, options); - } - else if (bDescriptorAction is not null) - { - writer.WritePropertyName("b"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor(bDescriptorAction), options); - } - else if (bValue is not null) - { - writer.WritePropertyName("b"); - JsonSerializer.Serialize(writer, bValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs deleted file mode 100644 index 84596ba6190..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ /dev/null @@ -1,874 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TermsAggregation -{ - /// - /// - /// Determines how child aggregations should be calculated: breadth-first or depth-first. - /// - /// - [JsonInclude, JsonPropertyName("collect_mode")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectMode { get; set; } - - /// - /// - /// Values to exclude. - /// Accepts regular expressions and partitions. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? Exclude { get; set; } - - /// - /// - /// Determines whether the aggregation will use field values directly or global ordinals. - /// - /// - [JsonInclude, JsonPropertyName("execution_hint")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHint { get; set; } - - /// - /// - /// The field from which to return terms. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Values to include. - /// Accepts regular expressions and partitions. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? Include { get; set; } - - /// - /// - /// Only return values that are found in more than min_doc_count hits. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public int? MinDocCount { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("missing_bucket")] - public bool? MissingBucket { get; set; } - [JsonInclude, JsonPropertyName("missing_order")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrder { get; set; } - - /// - /// - /// Specifies the sort order of the buckets. - /// Defaults to sorting by descending document count. - /// - /// - [JsonInclude, JsonPropertyName("order")] - [SingleOrManyCollectionConverter(typeof(KeyValuePair))] - public ICollection>? Order { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the min_doc_count. - /// Terms will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - [JsonInclude, JsonPropertyName("shard_min_doc_count")] - public long? ShardMinDocCount { get; set; } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// Set to true to return the doc_count_error_upper_bound, which is an upper bound to the error on the doc_count returned by each shard. - /// - /// - [JsonInclude, JsonPropertyName("show_term_doc_count_error")] - public bool? ShowTermDocCountError { get; set; } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Coerced unmapped fields into the specified type. - /// - /// - [JsonInclude, JsonPropertyName("value_type")] - public string? ValueType { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(TermsAggregation termsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Terms(termsAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(TermsAggregation termsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.Terms(termsAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy(TermsAggregation termsAggregation) => Elastic.Clients.Elasticsearch.Serverless.TransformManagement.PivotGroupBy.Terms(termsAggregation); -} - -public sealed partial class TermsAggregationDescriptor : SerializableDescriptor> -{ - internal TermsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public TermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private int? MinDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private ICollection>? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private bool? ShowTermDocCountErrorValue { get; set; } - private int? SizeValue { get; set; } - private string? ValueTypeValue { get; set; } - - /// - /// - /// Determines how child aggregations should be calculated: breadth-first or depth-first. - /// - /// - public TermsAggregationDescriptor CollectMode(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? collectMode) - { - CollectModeValue = collectMode; - return Self; - } - - /// - /// - /// Values to exclude. - /// Accepts regular expressions and partitions. - /// - /// - public TermsAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Determines whether the aggregation will use field values directly or global ordinals. - /// - /// - public TermsAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field from which to return terms. - /// - /// - public TermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return terms. - /// - /// - public TermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return terms. - /// - /// - public TermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Values to include. - /// Accepts regular expressions and partitions. - /// - /// - public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Only return values that are found in more than min_doc_count hits. - /// - /// - public TermsAggregationDescriptor MinDocCount(int? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public TermsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TermsAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public TermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - /// - /// - /// Specifies the sort order of the buckets. - /// Defaults to sorting by descending document count. - /// - /// - public TermsAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - public TermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TermsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the min_doc_count. - /// Terms will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - public TermsAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public TermsAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// Set to true to return the doc_count_error_upper_bound, which is an upper bound to the error on the doc_count returned by each shard. - /// - /// - public TermsAggregationDescriptor ShowTermDocCountError(bool? showTermDocCountError = true) - { - ShowTermDocCountErrorValue = showTermDocCountError; - return Self; - } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - public TermsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Coerced unmapped fields into the specified type. - /// - /// - public TermsAggregationDescriptor ValueType(string? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollectModeValue is not null) - { - writer.WritePropertyName("collect_mode"); - JsonSerializer.Serialize(writer, CollectModeValue, options); - } - - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (ShowTermDocCountErrorValue.HasValue) - { - writer.WritePropertyName("show_term_doc_count_error"); - writer.WriteBooleanValue(ShowTermDocCountErrorValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (!string.IsNullOrEmpty(ValueTypeValue)) - { - writer.WritePropertyName("value_type"); - writer.WriteStringValue(ValueTypeValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TermsAggregationDescriptor : SerializableDescriptor -{ - internal TermsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public TermsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? ExecutionHintValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private int? MinDocCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private bool? MissingBucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private ICollection>? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? ShardSizeValue { get; set; } - private bool? ShowTermDocCountErrorValue { get; set; } - private int? SizeValue { get; set; } - private string? ValueTypeValue { get; set; } - - /// - /// - /// Determines how child aggregations should be calculated: breadth-first or depth-first. - /// - /// - public TermsAggregationDescriptor CollectMode(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? collectMode) - { - CollectModeValue = collectMode; - return Self; - } - - /// - /// - /// Values to exclude. - /// Accepts regular expressions and partitions. - /// - /// - public TermsAggregationDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsExclude? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Determines whether the aggregation will use field values directly or global ordinals. - /// - /// - public TermsAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationExecutionHint? executionHint) - { - ExecutionHintValue = executionHint; - return Self; - } - - /// - /// - /// The field from which to return terms. - /// - /// - public TermsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return terms. - /// - /// - public TermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to return terms. - /// - /// - public TermsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Values to include. - /// Accepts regular expressions and partitions. - /// - /// - public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Only return values that are found in more than min_doc_count hits. - /// - /// - public TermsAggregationDescriptor MinDocCount(int? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public TermsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TermsAggregationDescriptor MissingBucket(bool? missingBucket = true) - { - MissingBucketValue = missingBucket; - return Self; - } - - public TermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? missingOrder) - { - MissingOrderValue = missingOrder; - return Self; - } - - /// - /// - /// Specifies the sort order of the buckets. - /// Defaults to sorting by descending document count. - /// - /// - public TermsAggregationDescriptor Order(ICollection>? order) - { - OrderValue = order; - return Self; - } - - public TermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TermsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TermsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the min_doc_count. - /// Terms will only be considered if their local shard frequency within the set is higher than the shard_min_doc_count. - /// - /// - public TermsAggregationDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// The number of candidate terms produced by each shard. - /// By default, shard_size will be automatically estimated based on the number of shards and the size parameter. - /// - /// - public TermsAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// Set to true to return the doc_count_error_upper_bound, which is an upper bound to the error on the doc_count returned by each shard. - /// - /// - public TermsAggregationDescriptor ShowTermDocCountError(bool? showTermDocCountError = true) - { - ShowTermDocCountErrorValue = showTermDocCountError; - return Self; - } - - /// - /// - /// The number of buckets returned out of the overall terms list. - /// - /// - public TermsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Coerced unmapped fields into the specified type. - /// - /// - public TermsAggregationDescriptor ValueType(string? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollectModeValue is not null) - { - writer.WritePropertyName("collect_mode"); - JsonSerializer.Serialize(writer, CollectModeValue, options); - } - - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (ExecutionHintValue is not null) - { - writer.WritePropertyName("execution_hint"); - JsonSerializer.Serialize(writer, ExecutionHintValue, options); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (MissingBucketValue.HasValue) - { - writer.WritePropertyName("missing_bucket"); - writer.WriteBooleanValue(MissingBucketValue.Value); - } - - if (MissingOrderValue is not null) - { - writer.WritePropertyName("missing_order"); - JsonSerializer.Serialize(writer, MissingOrderValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize>(OrderValue, writer, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (ShowTermDocCountErrorValue.HasValue) - { - writer.WritePropertyName("show_term_doc_count_error"); - writer.WriteBooleanValue(ShowTermDocCountErrorValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (!string.IsNullOrEmpty(ValueTypeValue)) - { - writer.WritePropertyName("value_type"); - writer.WriteStringValue(ValueTypeValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs deleted file mode 100644 index 45d39ff326b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TestPopulation.g.cs +++ /dev/null @@ -1,335 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TestPopulation -{ - /// - /// - /// The field to aggregate. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// A filter used to define a set of records to run unpaired t-test on. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } -} - -public sealed partial class TestPopulationDescriptor : SerializableDescriptor> -{ - internal TestPopulationDescriptor(Action> configure) => configure.Invoke(this); - - public TestPopulationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field to aggregate. - /// - /// - public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to aggregate. - /// - /// - public TestPopulationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to aggregate. - /// - /// - public TestPopulationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A filter used to define a set of records to run unpaired t-test on. - /// - /// - public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TestPopulationDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TestPopulationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TestPopulationDescriptor : SerializableDescriptor -{ - internal TestPopulationDescriptor(Action configure) => configure.Invoke(this); - - public TestPopulationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field to aggregate. - /// - /// - public TestPopulationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to aggregate. - /// - /// - public TestPopulationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to aggregate. - /// - /// - public TestPopulationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A filter used to define a set of records to run unpaired t-test on. - /// - /// - public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public TestPopulationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public TestPopulationDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TestPopulationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TestPopulationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs deleted file mode 100644 index 8eeb3961a76..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TimeSeriesAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs deleted file mode 100644 index 920d0906f9c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TimeSeriesBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class TimeSeriesBucketConverter : JsonConverter -{ - public override TimeSeriesBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary key = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new TimeSeriesBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key }; - } - - public override void Write(Utf8JsonWriter writer, TimeSeriesBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'TimeSeriesBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(TimeSeriesBucketConverter))] -public sealed partial class TimeSeriesBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary Key { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregate.g.cs deleted file mode 100644 index 661c3246f20..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TopHitsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata Hits { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs deleted file mode 100644 index e61be0c1116..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ /dev/null @@ -1,1272 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TopHitsAggregation -{ - /// - /// - /// Fields for which to return doc values. - /// - /// - [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - public ICollection? Fields { get; set; } - - /// - /// - /// Starting document offset. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. - /// - /// - [JsonInclude, JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// Returns the result of one or more script evaluations for each hit. - /// - /// - [JsonInclude, JsonPropertyName("script_fields")] - public IDictionary? ScriptFields { get; set; } - - /// - /// - /// If true, returns sequence number and primary term of the last modification of each hit. - /// - /// - [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// - /// The maximum number of top matching hits to return per bucket. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Sort order of the top matching hits. - /// By default, the hits are sorted by the score of the main query. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - /// - /// - /// Selects the fields of the source that are returned. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - - /// - /// - /// Returns values for the specified stored fields (fields that use the store mapping option). - /// - /// - [JsonInclude, JsonPropertyName("stored_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - - /// - /// - /// If true, calculates and returns document scores, even if the scores are not used for sorting. - /// - /// - [JsonInclude, JsonPropertyName("track_scores")] - public bool? TrackScores { get; set; } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(TopHitsAggregation topHitsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.TopHits(topHitsAggregation); -} - -public sealed partial class TopHitsAggregationDescriptor : SerializableDescriptor> -{ - internal TopHitsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public TopHitsAggregationDescriptor() : base() - { - } - - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action> DocvalueFieldsDescriptorAction { get; set; } - private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action> FieldsDescriptorAction { get; set; } - private Action>[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private bool? TrackScoresValue { get; set; } - private bool? VersionValue { get; set; } - - /// - /// - /// Fields for which to return doc values. - /// - /// - public TopHitsAggregationDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public TopHitsAggregationDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor DocvalueFields(Action> configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor DocvalueFields(params Action>[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public TopHitsAggregationDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopHitsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopHitsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopHitsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public TopHitsAggregationDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public TopHitsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Fields(Action> configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor Fields(params Action>[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. - /// - /// - public TopHitsAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. - /// - /// - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Action> configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public TopHitsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopHitsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TopHitsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Returns the result of one or more script evaluations for each hit. - /// - /// - public TopHitsAggregationDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification of each hit. - /// - /// - public TopHitsAggregationDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The maximum number of top matching hits to return per bucket. - /// - /// - public TopHitsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Sort order of the top matching hits. - /// By default, the hits are sorted by the score of the main query. - /// - /// - public TopHitsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Selects the fields of the source that are returned. - /// - /// - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Returns values for the specified stored fields (fields that use the store mapping option). - /// - /// - public TopHitsAggregationDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - /// - /// - /// If true, calculates and returns document scores, even if the scores are not used for sorting. - /// - /// - public TopHitsAggregationDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public TopHitsAggregationDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TopHitsAggregationDescriptor : SerializableDescriptor -{ - internal TopHitsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public TopHitsAggregationDescriptor() : base() - { - } - - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action DocvalueFieldsDescriptorAction { get; set; } - private Action[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action FieldsDescriptorAction { get; set; } - private Action[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private bool? TrackScoresValue { get; set; } - private bool? VersionValue { get; set; } - - /// - /// - /// Fields for which to return doc values. - /// - /// - public TopHitsAggregationDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public TopHitsAggregationDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor DocvalueFields(Action configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor DocvalueFields(params Action[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public TopHitsAggregationDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopHitsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopHitsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopHitsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public TopHitsAggregationDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public TopHitsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Fields(Action configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor Fields(params Action[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. - /// - /// - public TopHitsAggregationDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results. - /// - /// - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public TopHitsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopHitsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TopHitsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// Returns the result of one or more script evaluations for each hit. - /// - /// - public TopHitsAggregationDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification of each hit. - /// - /// - public TopHitsAggregationDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The maximum number of top matching hits to return per bucket. - /// - /// - public TopHitsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Sort order of the top matching hits. - /// By default, the hits are sorted by the score of the main query. - /// - /// - public TopHitsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopHitsAggregationDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public TopHitsAggregationDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Selects the fields of the source that are returned. - /// - /// - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Returns values for the specified stored fields (fields that use the store mapping option). - /// - /// - public TopHitsAggregationDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - /// - /// - /// If true, calculates and returns document scores, even if the scores are not used for sorting. - /// - /// - public TopHitsAggregationDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public TopHitsAggregationDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetrics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetrics.g.cs deleted file mode 100644 index d52e6a7d158..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetrics.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TopMetrics -{ - [JsonInclude, JsonPropertyName("metrics")] - public IReadOnlyDictionary Metrics { get; init; } - [JsonInclude, JsonPropertyName("sort")] - public IReadOnlyCollection Sort { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs deleted file mode 100644 index 196c66f7a93..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TopMetricsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("top")] - public IReadOnlyCollection Top { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs deleted file mode 100644 index 2fbf37981d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs +++ /dev/null @@ -1,646 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TopMetricsAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// The fields of the top document to return. - /// - /// - [JsonInclude, JsonPropertyName("metrics")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValue))] - public ICollection? Metrics { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// The number of top documents from which to return metrics. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The sort order of the documents. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(TopMetricsAggregation topMetricsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.TopMetrics(topMetricsAggregation); -} - -public sealed partial class TopMetricsAggregationDescriptor : SerializableDescriptor> -{ - internal TopMetricsAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public TopMetricsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor MetricsDescriptor { get; set; } - private Action> MetricsDescriptorAction { get; set; } - private Action>[] MetricsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The fields of the top document to return. - /// - /// - public TopMetricsAggregationDescriptor Metrics(ICollection? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsDescriptorActions = null; - MetricsValue = metrics; - return Self; - } - - public TopMetricsAggregationDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptorActions = null; - MetricsDescriptor = descriptor; - return Self; - } - - public TopMetricsAggregationDescriptor Metrics(Action> configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorActions = null; - MetricsDescriptorAction = configure; - return Self; - } - - public TopMetricsAggregationDescriptor Metrics(params Action>[] configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public TopMetricsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of top documents from which to return metrics. - /// - /// - public TopMetricsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The sort order of the documents. - /// - /// - public TopMetricsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopMetricsAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopMetricsAggregationDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public TopMetricsAggregationDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsDescriptorActions is not null) - { - writer.WritePropertyName("metrics"); - if (MetricsDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in MetricsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor(action), options); - } - - if (MetricsDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - SingleOrManySerializationHelper.Serialize(MetricsValue, writer, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TopMetricsAggregationDescriptor : SerializableDescriptor -{ - internal TopMetricsAggregationDescriptor(Action configure) => configure.Invoke(this); - - public TopMetricsAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private ICollection? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Action[] MetricsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopMetricsAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public TopMetricsAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The fields of the top document to return. - /// - /// - public TopMetricsAggregationDescriptor Metrics(ICollection? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsDescriptorActions = null; - MetricsValue = metrics; - return Self; - } - - public TopMetricsAggregationDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptorActions = null; - MetricsDescriptor = descriptor; - return Self; - } - - public TopMetricsAggregationDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorActions = null; - MetricsDescriptorAction = configure; - return Self; - } - - public TopMetricsAggregationDescriptor Metrics(params Action[] configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public TopMetricsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public TopMetricsAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of top documents from which to return metrics. - /// - /// - public TopMetricsAggregationDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The sort order of the documents. - /// - /// - public TopMetricsAggregationDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public TopMetricsAggregationDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public TopMetricsAggregationDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public TopMetricsAggregationDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsDescriptorActions is not null) - { - writer.WritePropertyName("metrics"); - if (MetricsDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in MetricsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.TopMetricsValueDescriptor(action), options); - } - - if (MetricsDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - SingleOrManySerializationHelper.Serialize(MetricsValue, writer, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsValue.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsValue.g.cs deleted file mode 100644 index 2d425cf31c3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopMetricsValue.g.cs +++ /dev/null @@ -1,143 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class TopMetricsValue -{ - /// - /// - /// A field to return as a metric. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } -} - -public sealed partial class TopMetricsValueDescriptor : SerializableDescriptor> -{ - internal TopMetricsValueDescriptor(Action> configure) => configure.Invoke(this); - - public TopMetricsValueDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// A field to return as a metric. - /// - /// - public TopMetricsValueDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field to return as a metric. - /// - /// - public TopMetricsValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field to return as a metric. - /// - /// - public TopMetricsValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class TopMetricsValueDescriptor : SerializableDescriptor -{ - internal TopMetricsValueDescriptor(Action configure) => configure.Invoke(this); - - public TopMetricsValueDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// A field to return as a metric. - /// - /// - public TopMetricsValueDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field to return as a metric. - /// - /// - public TopMetricsValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A field to return as a metric. - /// - /// - public TopMetricsValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedRareTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedRareTermsAggregate.g.cs deleted file mode 100644 index 1c1fbf17411..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedRareTermsAggregate.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a rare_terms aggregation when the field is unmapped. buckets is always empty. -/// -/// -public sealed partial class UnmappedRareTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSamplerAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSamplerAggregate.g.cs deleted file mode 100644 index 631e5546508..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSamplerAggregate.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class UnmappedSamplerAggregateConverter : JsonConverter -{ - public override UnmappedSamplerAggregate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - IReadOnlyDictionary? meta = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "meta") - { - meta = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new UnmappedSamplerAggregate { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Meta = meta }; - } - - public override void Write(Utf8JsonWriter writer, UnmappedSamplerAggregate value, JsonSerializerOptions options) - { - throw new NotImplementedException("'UnmappedSamplerAggregate' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(UnmappedSamplerAggregateConverter))] -public sealed partial class UnmappedSamplerAggregate : IAggregate -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs deleted file mode 100644 index 5d1b5dc369d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of the significant_terms aggregation on an unmapped field. buckets is always empty. -/// -/// -public sealed partial class UnmappedSignificantTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("bg_count")] - public long? BgCount { get; init; } - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count")] - public long? DocCount { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs deleted file mode 100644 index cc5108caa82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Result of a terms aggregation when the field is unmapped. buckets is always empty. -/// -/// -public sealed partial class UnmappedTermsAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("doc_count_error_upper_bound")] - public long? DocCountErrorUpperBound { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("sum_other_doc_count")] - public long? SumOtherDocCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregate.g.cs deleted file mode 100644 index c17384089a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregate.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Value count aggregation result. value is always present. -/// -/// -public sealed partial class ValueCountAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregation.g.cs deleted file mode 100644 index 3670bc51476..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ValueCountAggregation.g.cs +++ /dev/null @@ -1,317 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class ValueCountAggregation -{ - /// - /// - /// The field on which to run the aggregation. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(ValueCountAggregation valueCountAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.ValueCount(valueCountAggregation); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(ValueCountAggregation valueCountAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.ValueCount(valueCountAggregation); -} - -public sealed partial class ValueCountAggregationDescriptor : SerializableDescriptor> -{ - internal ValueCountAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public ValueCountAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ValueCountAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ValueCountAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ValueCountAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ValueCountAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public ValueCountAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public ValueCountAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ValueCountAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ValueCountAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ValueCountAggregationDescriptor : SerializableDescriptor -{ - internal ValueCountAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ValueCountAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ValueCountAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ValueCountAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field on which to run the aggregation. - /// - /// - public ValueCountAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ValueCountAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The value to apply to documents that do not have a value. - /// By default, documents without a value are ignored. - /// - /// - public ValueCountAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public ValueCountAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ValueCountAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ValueCountAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs deleted file mode 100644 index 4007ed3e8a8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class VariableWidthHistogramAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("buckets")] - public IReadOnlyCollection Buckets { get; init; } - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs deleted file mode 100644 index 3505931b801..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs +++ /dev/null @@ -1,379 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class VariableWidthHistogramAggregation -{ - /// - /// - /// The target number of buckets. - /// - /// - [JsonInclude, JsonPropertyName("buckets")] - public int? Buckets { get; set; } - - /// - /// - /// The name of the field. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run. - /// Defaults to min(10 * shard_size, 50000). - /// - /// - [JsonInclude, JsonPropertyName("initial_buffer")] - public int? InitialBuffer { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// The number of buckets that the coordinating node will request from each shard. - /// Defaults to buckets * 50. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(VariableWidthHistogramAggregation variableWidthHistogramAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.VariableWidthHistogram(variableWidthHistogramAggregation); -} - -public sealed partial class VariableWidthHistogramAggregationDescriptor : SerializableDescriptor> -{ - internal VariableWidthHistogramAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public VariableWidthHistogramAggregationDescriptor() : base() - { - } - - private int? BucketsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private int? InitialBufferValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private int? ShardSizeValue { get; set; } - - /// - /// - /// The target number of buckets. - /// - /// - public VariableWidthHistogramAggregationDescriptor Buckets(int? buckets) - { - BucketsValue = buckets; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public VariableWidthHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public VariableWidthHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public VariableWidthHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run. - /// Defaults to min(10 * shard_size, 50000). - /// - /// - public VariableWidthHistogramAggregationDescriptor InitialBuffer(int? initialBuffer) - { - InitialBufferValue = initialBuffer; - return Self; - } - - public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public VariableWidthHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of buckets that the coordinating node will request from each shard. - /// Defaults to buckets * 50. - /// - /// - public VariableWidthHistogramAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsValue.HasValue) - { - writer.WritePropertyName("buckets"); - writer.WriteNumberValue(BucketsValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (InitialBufferValue.HasValue) - { - writer.WritePropertyName("initial_buffer"); - writer.WriteNumberValue(InitialBufferValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class VariableWidthHistogramAggregationDescriptor : SerializableDescriptor -{ - internal VariableWidthHistogramAggregationDescriptor(Action configure) => configure.Invoke(this); - - public VariableWidthHistogramAggregationDescriptor() : base() - { - } - - private int? BucketsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private int? InitialBufferValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private int? ShardSizeValue { get; set; } - - /// - /// - /// The target number of buckets. - /// - /// - public VariableWidthHistogramAggregationDescriptor Buckets(int? buckets) - { - BucketsValue = buckets; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public VariableWidthHistogramAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public VariableWidthHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field. - /// - /// - public VariableWidthHistogramAggregationDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run. - /// Defaults to min(10 * shard_size, 50000). - /// - /// - public VariableWidthHistogramAggregationDescriptor InitialBuffer(int? initialBuffer) - { - InitialBufferValue = initialBuffer; - return Self; - } - - public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public VariableWidthHistogramAggregationDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of buckets that the coordinating node will request from each shard. - /// Defaults to buckets * 50. - /// - /// - public VariableWidthHistogramAggregationDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketsValue.HasValue) - { - writer.WritePropertyName("buckets"); - writer.WriteNumberValue(BucketsValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (InitialBufferValue.HasValue) - { - writer.WritePropertyName("initial_buffer"); - writer.WriteNumberValue(InitialBufferValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramBucket.g.cs deleted file mode 100644 index a088c167857..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramBucket.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -internal sealed partial class VariableWidthHistogramBucketConverter : JsonConverter -{ - public override VariableWidthHistogramBucket Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - long docCount = default; - double key = default; - string? keyAsString = default; - double max = default; - string? maxAsString = default; - double min = default; - string? minAsString = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "doc_count") - { - docCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key") - { - key = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "key_as_string") - { - keyAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max") - { - max = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_as_string") - { - maxAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "min") - { - min = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "min_as_string") - { - minAsString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property.Contains("#")) - { - additionalProperties ??= new Dictionary(); - AggregateDictionaryConverter.ReadItem(ref reader, options, additionalProperties, property); - continue; - } - - throw new JsonException("Unknown property read from JSON."); - } - } - - return new VariableWidthHistogramBucket { Aggregations = new Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary(additionalProperties), DocCount = docCount, Key = key, KeyAsString = keyAsString, Max = max, MaxAsString = maxAsString, Min = min, MinAsString = minAsString }; - } - - public override void Write(Utf8JsonWriter writer, VariableWidthHistogramBucket value, JsonSerializerOptions options) - { - throw new NotImplementedException("'VariableWidthHistogramBucket' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(VariableWidthHistogramBucketConverter))] -public sealed partial class VariableWidthHistogramBucket -{ - /// - /// - /// Nested aggregations - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary Aggregations { get; init; } - public long DocCount { get; init; } - public double Key { get; init; } - public string? KeyAsString { get; init; } - public double Max { get; init; } - public string? MaxAsString { get; init; } - public double Min { get; init; } - public string? MinAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs deleted file mode 100644 index e54a85ecb15..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -/// -/// -/// Weighted average aggregation result. value is missing if the weight was set to zero. -/// -/// -public sealed partial class WeightedAverageAggregate : IAggregate -{ - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The metric value. A missing value generally means that there was no data to aggregate, - /// unless specified otherwise. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double? Value { get; init; } - [JsonInclude, JsonPropertyName("value_as_string")] - public string? ValueAsString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs deleted file mode 100644 index 0ac4cfbcb50..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ /dev/null @@ -1,345 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class WeightedAverageAggregation -{ - /// - /// - /// A numeric response formatter. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// Configuration for the field that provides the values. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? Value { get; set; } - [JsonInclude, JsonPropertyName("value_type")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueType { get; set; } - - /// - /// - /// Configuration for the field or script that provides the weights. - /// - /// - [JsonInclude, JsonPropertyName("weight")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? Weight { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(WeightedAverageAggregation weightedAverageAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.WeightedAvg(weightedAverageAggregation); -} - -public sealed partial class WeightedAverageAggregationDescriptor : SerializableDescriptor> -{ - internal WeightedAverageAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public WeightedAverageAggregationDescriptor() : base() - { - } - - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? ValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor ValueDescriptor { get; set; } - private Action> ValueDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? WeightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor WeightDescriptor { get; set; } - private Action> WeightDescriptorAction { get; set; } - - /// - /// - /// A numeric response formatter. - /// - /// - public WeightedAverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Configuration for the field that provides the values. - /// - /// - public WeightedAverageAggregationDescriptor Value(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? value) - { - ValueDescriptor = null; - ValueDescriptorAction = null; - ValueValue = value; - return Self; - } - - public WeightedAverageAggregationDescriptor Value(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor descriptor) - { - ValueValue = null; - ValueDescriptorAction = null; - ValueDescriptor = descriptor; - return Self; - } - - public WeightedAverageAggregationDescriptor Value(Action> configure) - { - ValueValue = null; - ValueDescriptor = null; - ValueDescriptorAction = configure; - return Self; - } - - public WeightedAverageAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - /// - /// - /// Configuration for the field or script that provides the weights. - /// - /// - public WeightedAverageAggregationDescriptor Weight(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? weight) - { - WeightDescriptor = null; - WeightDescriptorAction = null; - WeightValue = weight; - return Self; - } - - public WeightedAverageAggregationDescriptor Weight(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor descriptor) - { - WeightValue = null; - WeightDescriptorAction = null; - WeightDescriptor = descriptor; - return Self; - } - - public WeightedAverageAggregationDescriptor Weight(Action> configure) - { - WeightValue = null; - WeightDescriptor = null; - WeightDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (ValueDescriptor is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueDescriptor, options); - } - else if (ValueDescriptorAction is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor(ValueDescriptorAction), options); - } - else if (ValueValue is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - if (WeightDescriptor is not null) - { - writer.WritePropertyName("weight"); - JsonSerializer.Serialize(writer, WeightDescriptor, options); - } - else if (WeightDescriptorAction is not null) - { - writer.WritePropertyName("weight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor(WeightDescriptorAction), options); - } - else if (WeightValue is not null) - { - writer.WritePropertyName("weight"); - JsonSerializer.Serialize(writer, WeightValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class WeightedAverageAggregationDescriptor : SerializableDescriptor -{ - internal WeightedAverageAggregationDescriptor(Action configure) => configure.Invoke(this); - - public WeightedAverageAggregationDescriptor() : base() - { - } - - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? ValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor ValueDescriptor { get; set; } - private Action ValueDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? ValueTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? WeightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor WeightDescriptor { get; set; } - private Action WeightDescriptorAction { get; set; } - - /// - /// - /// A numeric response formatter. - /// - /// - public WeightedAverageAggregationDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Configuration for the field that provides the values. - /// - /// - public WeightedAverageAggregationDescriptor Value(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? value) - { - ValueDescriptor = null; - ValueDescriptorAction = null; - ValueValue = value; - return Self; - } - - public WeightedAverageAggregationDescriptor Value(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor descriptor) - { - ValueValue = null; - ValueDescriptorAction = null; - ValueDescriptor = descriptor; - return Self; - } - - public WeightedAverageAggregationDescriptor Value(Action configure) - { - ValueValue = null; - ValueDescriptor = null; - ValueDescriptorAction = configure; - return Self; - } - - public WeightedAverageAggregationDescriptor ValueType(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueType? valueType) - { - ValueTypeValue = valueType; - return Self; - } - - /// - /// - /// Configuration for the field or script that provides the weights. - /// - /// - public WeightedAverageAggregationDescriptor Weight(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? weight) - { - WeightDescriptor = null; - WeightDescriptorAction = null; - WeightValue = weight; - return Self; - } - - public WeightedAverageAggregationDescriptor Weight(Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor descriptor) - { - WeightValue = null; - WeightDescriptorAction = null; - WeightDescriptor = descriptor; - return Self; - } - - public WeightedAverageAggregationDescriptor Weight(Action configure) - { - WeightValue = null; - WeightDescriptor = null; - WeightDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (ValueDescriptor is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueDescriptor, options); - } - else if (ValueDescriptorAction is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor(ValueDescriptorAction), options); - } - else if (ValueValue is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - } - - if (ValueTypeValue is not null) - { - writer.WritePropertyName("value_type"); - JsonSerializer.Serialize(writer, ValueTypeValue, options); - } - - if (WeightDescriptor is not null) - { - writer.WritePropertyName("weight"); - JsonSerializer.Serialize(writer, WeightDescriptor, options); - } - else if (WeightDescriptorAction is not null) - { - writer.WritePropertyName("weight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor(WeightDescriptorAction), options); - } - else if (WeightValue is not null) - { - writer.WritePropertyName("weight"); - JsonSerializer.Serialize(writer, WeightValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageValue.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageValue.g.cs deleted file mode 100644 index 8819c604890..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageValue.g.cs +++ /dev/null @@ -1,283 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -public sealed partial class WeightedAverageValue -{ - /// - /// - /// The field from which to extract the values or weights. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - - /// - /// - /// A value or weight to use if the field is missing. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public double? Missing { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } -} - -public sealed partial class WeightedAverageValueDescriptor : SerializableDescriptor> -{ - internal WeightedAverageValueDescriptor(Action> configure) => configure.Invoke(this); - - public WeightedAverageValueDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private double? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field from which to extract the values or weights. - /// - /// - public WeightedAverageValueDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to extract the values or weights. - /// - /// - public WeightedAverageValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to extract the values or weights. - /// - /// - public WeightedAverageValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A value or weight to use if the field is missing. - /// - /// - public WeightedAverageValueDescriptor Missing(double? missing) - { - MissingValue = missing; - return Self; - } - - public WeightedAverageValueDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public WeightedAverageValueDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public WeightedAverageValueDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class WeightedAverageValueDescriptor : SerializableDescriptor -{ - internal WeightedAverageValueDescriptor(Action configure) => configure.Invoke(this); - - public WeightedAverageValueDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private double? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// The field from which to extract the values or weights. - /// - /// - public WeightedAverageValueDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to extract the values or weights. - /// - /// - public WeightedAverageValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field from which to extract the values or weights. - /// - /// - public WeightedAverageValueDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// A value or weight to use if the field is missing. - /// - /// - public WeightedAverageValueDescriptor Missing(double? missing) - { - MissingValue = missing; - return Self; - } - - public WeightedAverageValueDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public WeightedAverageValueDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public WeightedAverageValueDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Analyzers.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Analyzers.g.cs deleted file mode 100644 index 6bd7654a3b8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Analyzers.g.cs +++ /dev/null @@ -1,512 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public partial class Analyzers : IsADictionary -{ - public Analyzers() - { - } - - public Analyzers(IDictionary container) : base(container) - { - } - - public void Add(string name, IAnalyzer analyzer) => BackingDictionary.Add(Sanitize(name), analyzer); - public bool TryGetAnalyzer(string name, [NotNullWhen(returnValue: true)] out IAnalyzer analyzer) => BackingDictionary.TryGetValue(Sanitize(name), out analyzer); - - public bool TryGetAnalyzer(string name, [NotNullWhen(returnValue: true)] out T? analyzer) where T : class, IAnalyzer - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - analyzer = finalValue; - return true; - } - - analyzer = null; - return false; - } -} - -public sealed partial class AnalyzersDescriptor : IsADictionaryDescriptor -{ - public AnalyzersDescriptor() : base(new Analyzers()) - { - } - - public AnalyzersDescriptor(Analyzers analyzers) : base(analyzers ?? new Analyzers()) - { - } - - public AnalyzersDescriptor Arabic(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Arabic(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Arabic(string analyzerName, ArabicAnalyzer arabicAnalyzer) => AssignVariant(analyzerName, arabicAnalyzer); - public AnalyzersDescriptor Armenian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Armenian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Armenian(string analyzerName, ArmenianAnalyzer armenianAnalyzer) => AssignVariant(analyzerName, armenianAnalyzer); - public AnalyzersDescriptor Basque(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Basque(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Basque(string analyzerName, BasqueAnalyzer basqueAnalyzer) => AssignVariant(analyzerName, basqueAnalyzer); - public AnalyzersDescriptor Bengali(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Bengali(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Bengali(string analyzerName, BengaliAnalyzer bengaliAnalyzer) => AssignVariant(analyzerName, bengaliAnalyzer); - public AnalyzersDescriptor Brazilian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Brazilian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Brazilian(string analyzerName, BrazilianAnalyzer brazilianAnalyzer) => AssignVariant(analyzerName, brazilianAnalyzer); - public AnalyzersDescriptor Bulgarian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Bulgarian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Bulgarian(string analyzerName, BulgarianAnalyzer bulgarianAnalyzer) => AssignVariant(analyzerName, bulgarianAnalyzer); - public AnalyzersDescriptor Catalan(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Catalan(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Catalan(string analyzerName, CatalanAnalyzer catalanAnalyzer) => AssignVariant(analyzerName, catalanAnalyzer); - public AnalyzersDescriptor Chinese(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Chinese(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Chinese(string analyzerName, ChineseAnalyzer chineseAnalyzer) => AssignVariant(analyzerName, chineseAnalyzer); - public AnalyzersDescriptor Cjk(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Cjk(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Cjk(string analyzerName, CjkAnalyzer cjkAnalyzer) => AssignVariant(analyzerName, cjkAnalyzer); - public AnalyzersDescriptor Custom(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Custom(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Custom(string analyzerName, CustomAnalyzer customAnalyzer) => AssignVariant(analyzerName, customAnalyzer); - public AnalyzersDescriptor Czech(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Czech(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Czech(string analyzerName, CzechAnalyzer czechAnalyzer) => AssignVariant(analyzerName, czechAnalyzer); - public AnalyzersDescriptor Danish(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Danish(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Danish(string analyzerName, DanishAnalyzer danishAnalyzer) => AssignVariant(analyzerName, danishAnalyzer); - public AnalyzersDescriptor Dutch(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Dutch(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Dutch(string analyzerName, DutchAnalyzer dutchAnalyzer) => AssignVariant(analyzerName, dutchAnalyzer); - public AnalyzersDescriptor English(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor English(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor English(string analyzerName, EnglishAnalyzer englishAnalyzer) => AssignVariant(analyzerName, englishAnalyzer); - public AnalyzersDescriptor Estonian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Estonian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Estonian(string analyzerName, EstonianAnalyzer estonianAnalyzer) => AssignVariant(analyzerName, estonianAnalyzer); - public AnalyzersDescriptor Fingerprint(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Fingerprint(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Fingerprint(string analyzerName, FingerprintAnalyzer fingerprintAnalyzer) => AssignVariant(analyzerName, fingerprintAnalyzer); - public AnalyzersDescriptor Finnish(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Finnish(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Finnish(string analyzerName, FinnishAnalyzer finnishAnalyzer) => AssignVariant(analyzerName, finnishAnalyzer); - public AnalyzersDescriptor French(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor French(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor French(string analyzerName, FrenchAnalyzer frenchAnalyzer) => AssignVariant(analyzerName, frenchAnalyzer); - public AnalyzersDescriptor Galician(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Galician(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Galician(string analyzerName, GalicianAnalyzer galicianAnalyzer) => AssignVariant(analyzerName, galicianAnalyzer); - public AnalyzersDescriptor German(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor German(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor German(string analyzerName, GermanAnalyzer germanAnalyzer) => AssignVariant(analyzerName, germanAnalyzer); - public AnalyzersDescriptor Greek(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Greek(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Greek(string analyzerName, GreekAnalyzer greekAnalyzer) => AssignVariant(analyzerName, greekAnalyzer); - public AnalyzersDescriptor Hindi(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Hindi(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Hindi(string analyzerName, HindiAnalyzer hindiAnalyzer) => AssignVariant(analyzerName, hindiAnalyzer); - public AnalyzersDescriptor Hungarian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Hungarian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Hungarian(string analyzerName, HungarianAnalyzer hungarianAnalyzer) => AssignVariant(analyzerName, hungarianAnalyzer); - public AnalyzersDescriptor Icu(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Icu(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Icu(string analyzerName, IcuAnalyzer icuAnalyzer) => AssignVariant(analyzerName, icuAnalyzer); - public AnalyzersDescriptor Indonesian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Indonesian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Indonesian(string analyzerName, IndonesianAnalyzer indonesianAnalyzer) => AssignVariant(analyzerName, indonesianAnalyzer); - public AnalyzersDescriptor Irish(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Irish(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Irish(string analyzerName, IrishAnalyzer irishAnalyzer) => AssignVariant(analyzerName, irishAnalyzer); - public AnalyzersDescriptor Italian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Italian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Italian(string analyzerName, ItalianAnalyzer italianAnalyzer) => AssignVariant(analyzerName, italianAnalyzer); - public AnalyzersDescriptor Keyword(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Keyword(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Keyword(string analyzerName, KeywordAnalyzer keywordAnalyzer) => AssignVariant(analyzerName, keywordAnalyzer); - public AnalyzersDescriptor Kuromoji(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Kuromoji(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Kuromoji(string analyzerName, KuromojiAnalyzer kuromojiAnalyzer) => AssignVariant(analyzerName, kuromojiAnalyzer); - public AnalyzersDescriptor Language(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Language(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Language(string analyzerName, LanguageAnalyzer languageAnalyzer) => AssignVariant(analyzerName, languageAnalyzer); - public AnalyzersDescriptor Latvian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Latvian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Latvian(string analyzerName, LatvianAnalyzer latvianAnalyzer) => AssignVariant(analyzerName, latvianAnalyzer); - public AnalyzersDescriptor Lithuanian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Lithuanian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Lithuanian(string analyzerName, LithuanianAnalyzer lithuanianAnalyzer) => AssignVariant(analyzerName, lithuanianAnalyzer); - public AnalyzersDescriptor Nori(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Nori(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Nori(string analyzerName, NoriAnalyzer noriAnalyzer) => AssignVariant(analyzerName, noriAnalyzer); - public AnalyzersDescriptor Norwegian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Norwegian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Norwegian(string analyzerName, NorwegianAnalyzer norwegianAnalyzer) => AssignVariant(analyzerName, norwegianAnalyzer); - public AnalyzersDescriptor Pattern(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Pattern(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Pattern(string analyzerName, PatternAnalyzer patternAnalyzer) => AssignVariant(analyzerName, patternAnalyzer); - public AnalyzersDescriptor Persian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Persian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Persian(string analyzerName, PersianAnalyzer persianAnalyzer) => AssignVariant(analyzerName, persianAnalyzer); - public AnalyzersDescriptor Portuguese(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Portuguese(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Portuguese(string analyzerName, PortugueseAnalyzer portugueseAnalyzer) => AssignVariant(analyzerName, portugueseAnalyzer); - public AnalyzersDescriptor Romanian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Romanian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Romanian(string analyzerName, RomanianAnalyzer romanianAnalyzer) => AssignVariant(analyzerName, romanianAnalyzer); - public AnalyzersDescriptor Russian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Russian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Russian(string analyzerName, RussianAnalyzer russianAnalyzer) => AssignVariant(analyzerName, russianAnalyzer); - public AnalyzersDescriptor Serbian(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Serbian(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Serbian(string analyzerName, SerbianAnalyzer serbianAnalyzer) => AssignVariant(analyzerName, serbianAnalyzer); - public AnalyzersDescriptor Simple(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Simple(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Simple(string analyzerName, SimpleAnalyzer simpleAnalyzer) => AssignVariant(analyzerName, simpleAnalyzer); - public AnalyzersDescriptor Snowball(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Snowball(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Snowball(string analyzerName, SnowballAnalyzer snowballAnalyzer) => AssignVariant(analyzerName, snowballAnalyzer); - public AnalyzersDescriptor Sorani(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Sorani(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Sorani(string analyzerName, SoraniAnalyzer soraniAnalyzer) => AssignVariant(analyzerName, soraniAnalyzer); - public AnalyzersDescriptor Spanish(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Spanish(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Spanish(string analyzerName, SpanishAnalyzer spanishAnalyzer) => AssignVariant(analyzerName, spanishAnalyzer); - public AnalyzersDescriptor Standard(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Standard(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Standard(string analyzerName, StandardAnalyzer standardAnalyzer) => AssignVariant(analyzerName, standardAnalyzer); - public AnalyzersDescriptor Stop(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Stop(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Stop(string analyzerName, StopAnalyzer stopAnalyzer) => AssignVariant(analyzerName, stopAnalyzer); - public AnalyzersDescriptor Swedish(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Swedish(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Swedish(string analyzerName, SwedishAnalyzer swedishAnalyzer) => AssignVariant(analyzerName, swedishAnalyzer); - public AnalyzersDescriptor Thai(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Thai(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Thai(string analyzerName, ThaiAnalyzer thaiAnalyzer) => AssignVariant(analyzerName, thaiAnalyzer); - public AnalyzersDescriptor Turkish(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Turkish(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Turkish(string analyzerName, TurkishAnalyzer turkishAnalyzer) => AssignVariant(analyzerName, turkishAnalyzer); - public AnalyzersDescriptor Whitespace(string analyzerName) => AssignVariant(analyzerName, null); - public AnalyzersDescriptor Whitespace(string analyzerName, Action configure) => AssignVariant(analyzerName, configure); - public AnalyzersDescriptor Whitespace(string analyzerName, WhitespaceAnalyzer whitespaceAnalyzer) => AssignVariant(analyzerName, whitespaceAnalyzer); -} - -internal sealed partial class AnalyzerInterfaceConverter : JsonConverter -{ - public override IAnalyzer Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "arabic": - return JsonSerializer.Deserialize(ref reader, options); - case "armenian": - return JsonSerializer.Deserialize(ref reader, options); - case "basque": - return JsonSerializer.Deserialize(ref reader, options); - case "bengali": - return JsonSerializer.Deserialize(ref reader, options); - case "brazilian": - return JsonSerializer.Deserialize(ref reader, options); - case "bulgarian": - return JsonSerializer.Deserialize(ref reader, options); - case "catalan": - return JsonSerializer.Deserialize(ref reader, options); - case "chinese": - return JsonSerializer.Deserialize(ref reader, options); - case "cjk": - return JsonSerializer.Deserialize(ref reader, options); - case "custom": - return JsonSerializer.Deserialize(ref reader, options); - case "czech": - return JsonSerializer.Deserialize(ref reader, options); - case "danish": - return JsonSerializer.Deserialize(ref reader, options); - case "dutch": - return JsonSerializer.Deserialize(ref reader, options); - case "english": - return JsonSerializer.Deserialize(ref reader, options); - case "estonian": - return JsonSerializer.Deserialize(ref reader, options); - case "fingerprint": - return JsonSerializer.Deserialize(ref reader, options); - case "finnish": - return JsonSerializer.Deserialize(ref reader, options); - case "french": - return JsonSerializer.Deserialize(ref reader, options); - case "galician": - return JsonSerializer.Deserialize(ref reader, options); - case "german": - return JsonSerializer.Deserialize(ref reader, options); - case "greek": - return JsonSerializer.Deserialize(ref reader, options); - case "hindi": - return JsonSerializer.Deserialize(ref reader, options); - case "hungarian": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_analyzer": - return JsonSerializer.Deserialize(ref reader, options); - case "indonesian": - return JsonSerializer.Deserialize(ref reader, options); - case "irish": - return JsonSerializer.Deserialize(ref reader, options); - case "italian": - return JsonSerializer.Deserialize(ref reader, options); - case "keyword": - return JsonSerializer.Deserialize(ref reader, options); - case "kuromoji": - return JsonSerializer.Deserialize(ref reader, options); - case "language": - return JsonSerializer.Deserialize(ref reader, options); - case "latvian": - return JsonSerializer.Deserialize(ref reader, options); - case "lithuanian": - return JsonSerializer.Deserialize(ref reader, options); - case "nori": - return JsonSerializer.Deserialize(ref reader, options); - case "norwegian": - return JsonSerializer.Deserialize(ref reader, options); - case "pattern": - return JsonSerializer.Deserialize(ref reader, options); - case "persian": - return JsonSerializer.Deserialize(ref reader, options); - case "portuguese": - return JsonSerializer.Deserialize(ref reader, options); - case "romanian": - return JsonSerializer.Deserialize(ref reader, options); - case "russian": - return JsonSerializer.Deserialize(ref reader, options); - case "serbian": - return JsonSerializer.Deserialize(ref reader, options); - case "simple": - return JsonSerializer.Deserialize(ref reader, options); - case "snowball": - return JsonSerializer.Deserialize(ref reader, options); - case "sorani": - return JsonSerializer.Deserialize(ref reader, options); - case "spanish": - return JsonSerializer.Deserialize(ref reader, options); - case "standard": - return JsonSerializer.Deserialize(ref reader, options); - case "stop": - return JsonSerializer.Deserialize(ref reader, options); - case "swedish": - return JsonSerializer.Deserialize(ref reader, options); - case "thai": - return JsonSerializer.Deserialize(ref reader, options); - case "turkish": - return JsonSerializer.Deserialize(ref reader, options); - case "whitespace": - return JsonSerializer.Deserialize(ref reader, options); - default: - return JsonSerializer.Deserialize(ref reader, options); - } - } - - public override void Write(Utf8JsonWriter writer, IAnalyzer value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "arabic": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ArabicAnalyzer), options); - return; - case "armenian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ArmenianAnalyzer), options); - return; - case "basque": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BasqueAnalyzer), options); - return; - case "bengali": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BengaliAnalyzer), options); - return; - case "brazilian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BrazilianAnalyzer), options); - return; - case "bulgarian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BulgarianAnalyzer), options); - return; - case "catalan": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CatalanAnalyzer), options); - return; - case "chinese": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ChineseAnalyzer), options); - return; - case "cjk": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CjkAnalyzer), options); - return; - case "custom": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzer), options); - return; - case "czech": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CzechAnalyzer), options); - return; - case "danish": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.DanishAnalyzer), options); - return; - case "dutch": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.DutchAnalyzer), options); - return; - case "english": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EnglishAnalyzer), options); - return; - case "estonian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EstonianAnalyzer), options); - return; - case "fingerprint": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintAnalyzer), options); - return; - case "finnish": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FinnishAnalyzer), options); - return; - case "french": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FrenchAnalyzer), options); - return; - case "galician": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.GalicianAnalyzer), options); - return; - case "german": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.GermanAnalyzer), options); - return; - case "greek": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.GreekAnalyzer), options); - return; - case "hindi": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HindiAnalyzer), options); - return; - case "hungarian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HungarianAnalyzer), options); - return; - case "icu_analyzer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuAnalyzer), options); - return; - case "indonesian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IndonesianAnalyzer), options); - return; - case "irish": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IrishAnalyzer), options); - return; - case "italian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ItalianAnalyzer), options); - return; - case "keyword": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordAnalyzer), options); - return; - case "kuromoji": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiAnalyzer), options); - return; - case "language": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LanguageAnalyzer), options); - return; - case "latvian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LatvianAnalyzer), options); - return; - case "lithuanian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LithuanianAnalyzer), options); - return; - case "nori": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriAnalyzer), options); - return; - case "norwegian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NorwegianAnalyzer), options); - return; - case "pattern": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternAnalyzer), options); - return; - case "persian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PersianAnalyzer), options); - return; - case "portuguese": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PortugueseAnalyzer), options); - return; - case "romanian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.RomanianAnalyzer), options); - return; - case "russian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.RussianAnalyzer), options); - return; - case "serbian": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SerbianAnalyzer), options); - return; - case "simple": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SimpleAnalyzer), options); - return; - case "snowball": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballAnalyzer), options); - return; - case "sorani": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SoraniAnalyzer), options); - return; - case "spanish": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SpanishAnalyzer), options); - return; - case "standard": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardAnalyzer), options); - return; - case "stop": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StopAnalyzer), options); - return; - case "swedish": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SwedishAnalyzer), options); - return; - case "thai": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiAnalyzer), options); - return; - case "turkish": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.TurkishAnalyzer), options); - return; - case "whitespace": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceAnalyzer), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(AnalyzerInterfaceConverter))] -public partial interface IAnalyzer -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArabicAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArabicAnalyzer.g.cs deleted file mode 100644 index 87783f17690..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArabicAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ArabicAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "arabic"; -} - -public sealed partial class ArabicAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ArabicAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public ArabicAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public ArabicAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public ArabicAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public ArabicAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("arabic"); - writer.WriteEndObject(); - } - - ArabicAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArmenianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArmenianAnalyzer.g.cs deleted file mode 100644 index cbbf0f7e7f8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ArmenianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ArmenianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "armenian"; -} - -public sealed partial class ArmenianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ArmenianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public ArmenianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public ArmenianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public ArmenianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public ArmenianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("armenian"); - writer.WriteEndObject(); - } - - ArmenianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs deleted file mode 100644 index 4360889efcb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class AsciiFoldingTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "asciifolding"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class AsciiFoldingTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal AsciiFoldingTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public AsciiFoldingTokenFilterDescriptor() : base() - { - } - - private bool? PreserveOriginalValue { get; set; } - private string? VersionValue { get; set; } - - public AsciiFoldingTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public AsciiFoldingTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("asciifolding"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - AsciiFoldingTokenFilter IBuildableDescriptor.Build() => new() - { - PreserveOriginal = PreserveOriginalValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BasqueAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BasqueAnalyzer.g.cs deleted file mode 100644 index 7ab1d7efbd0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BasqueAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class BasqueAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "basque"; -} - -public sealed partial class BasqueAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal BasqueAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public BasqueAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public BasqueAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public BasqueAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public BasqueAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("basque"); - writer.WriteEndObject(); - } - - BasqueAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BengaliAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BengaliAnalyzer.g.cs deleted file mode 100644 index 951c03fed86..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BengaliAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class BengaliAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "bengali"; -} - -public sealed partial class BengaliAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal BengaliAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public BengaliAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public BengaliAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public BengaliAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public BengaliAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("bengali"); - writer.WriteEndObject(); - } - - BengaliAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BrazilianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BrazilianAnalyzer.g.cs deleted file mode 100644 index 1bde324bc93..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BrazilianAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class BrazilianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "brazilian"; -} - -public sealed partial class BrazilianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal BrazilianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public BrazilianAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public BrazilianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public BrazilianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("brazilian"); - writer.WriteEndObject(); - } - - BrazilianAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BulgarianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BulgarianAnalyzer.g.cs deleted file mode 100644 index 626ffb4a980..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/BulgarianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class BulgarianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "bulgarian"; -} - -public sealed partial class BulgarianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal BulgarianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public BulgarianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public BulgarianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public BulgarianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public BulgarianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("bulgarian"); - writer.WriteEndObject(); - } - - BulgarianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CatalanAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CatalanAnalyzer.g.cs deleted file mode 100644 index 05bcbee46aa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CatalanAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CatalanAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "catalan"; -} - -public sealed partial class CatalanAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CatalanAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public CatalanAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public CatalanAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public CatalanAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public CatalanAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("catalan"); - writer.WriteEndObject(); - } - - CatalanAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharFilters.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharFilters.g.cs deleted file mode 100644 index 2e369133ca6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharFilters.g.cs +++ /dev/null @@ -1,153 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public partial class CharFilters : IsADictionary -{ - public CharFilters() - { - } - - public CharFilters(IDictionary container) : base(container) - { - } - - public void Add(string name, ICharFilter charFilter) => BackingDictionary.Add(Sanitize(name), charFilter); - public bool TryGetCharFilter(string name, [NotNullWhen(returnValue: true)] out ICharFilter charFilter) => BackingDictionary.TryGetValue(Sanitize(name), out charFilter); - - public bool TryGetCharFilter(string name, [NotNullWhen(returnValue: true)] out T? charFilter) where T : class, ICharFilter - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - charFilter = finalValue; - return true; - } - - charFilter = null; - return false; - } -} - -public sealed partial class CharFiltersDescriptor : IsADictionaryDescriptor -{ - public CharFiltersDescriptor() : base(new CharFilters()) - { - } - - public CharFiltersDescriptor(CharFilters charFilters) : base(charFilters ?? new CharFilters()) - { - } - - public CharFiltersDescriptor HtmlStrip(string charFilterName) => AssignVariant(charFilterName, null); - public CharFiltersDescriptor HtmlStrip(string charFilterName, Action configure) => AssignVariant(charFilterName, configure); - public CharFiltersDescriptor HtmlStrip(string charFilterName, HtmlStripCharFilter htmlStripCharFilter) => AssignVariant(charFilterName, htmlStripCharFilter); - public CharFiltersDescriptor IcuNormalization(string charFilterName) => AssignVariant(charFilterName, null); - public CharFiltersDescriptor IcuNormalization(string charFilterName, Action configure) => AssignVariant(charFilterName, configure); - public CharFiltersDescriptor IcuNormalization(string charFilterName, IcuNormalizationCharFilter icuNormalizationCharFilter) => AssignVariant(charFilterName, icuNormalizationCharFilter); - public CharFiltersDescriptor KuromojiIterationMark(string charFilterName) => AssignVariant(charFilterName, null); - public CharFiltersDescriptor KuromojiIterationMark(string charFilterName, Action configure) => AssignVariant(charFilterName, configure); - public CharFiltersDescriptor KuromojiIterationMark(string charFilterName, KuromojiIterationMarkCharFilter kuromojiIterationMarkCharFilter) => AssignVariant(charFilterName, kuromojiIterationMarkCharFilter); - public CharFiltersDescriptor Mapping(string charFilterName) => AssignVariant(charFilterName, null); - public CharFiltersDescriptor Mapping(string charFilterName, Action configure) => AssignVariant(charFilterName, configure); - public CharFiltersDescriptor Mapping(string charFilterName, MappingCharFilter mappingCharFilter) => AssignVariant(charFilterName, mappingCharFilter); - public CharFiltersDescriptor PatternReplace(string charFilterName) => AssignVariant(charFilterName, null); - public CharFiltersDescriptor PatternReplace(string charFilterName, Action configure) => AssignVariant(charFilterName, configure); - public CharFiltersDescriptor PatternReplace(string charFilterName, PatternReplaceCharFilter patternReplaceCharFilter) => AssignVariant(charFilterName, patternReplaceCharFilter); -} - -internal sealed partial class CharFilterInterfaceConverter : JsonConverter -{ - public override ICharFilter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "html_strip": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_normalizer": - return JsonSerializer.Deserialize(ref reader, options); - case "kuromoji_iteration_mark": - return JsonSerializer.Deserialize(ref reader, options); - case "mapping": - return JsonSerializer.Deserialize(ref reader, options); - case "pattern_replace": - return JsonSerializer.Deserialize(ref reader, options); - default: - ThrowHelper.ThrowUnknownTaggedUnionVariantJsonException(type, typeof(ICharFilter)); - return null; - } - } - - public override void Write(Utf8JsonWriter writer, ICharFilter value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "html_strip": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HtmlStripCharFilter), options); - return; - case "icu_normalizer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationCharFilter), options); - return; - case "kuromoji_iteration_mark": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiIterationMarkCharFilter), options); - return; - case "mapping": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.MappingCharFilter), options); - return; - case "pattern_replace": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternReplaceCharFilter), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(CharFilterInterfaceConverter))] -public partial interface ICharFilter -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharGroupTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharGroupTokenizer.g.cs deleted file mode 100644 index 25a623fa3cb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CharGroupTokenizer.g.cs +++ /dev/null @@ -1,102 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CharGroupTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("max_token_length")] - public int? MaxTokenLength { get; set; } - [JsonInclude, JsonPropertyName("tokenize_on_chars")] - public ICollection TokenizeOnChars { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "char_group"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class CharGroupTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CharGroupTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public CharGroupTokenizerDescriptor() : base() - { - } - - private int? MaxTokenLengthValue { get; set; } - private ICollection TokenizeOnCharsValue { get; set; } - private string? VersionValue { get; set; } - - public CharGroupTokenizerDescriptor MaxTokenLength(int? maxTokenLength) - { - MaxTokenLengthValue = maxTokenLength; - return Self; - } - - public CharGroupTokenizerDescriptor TokenizeOnChars(ICollection tokenizeOnChars) - { - TokenizeOnCharsValue = tokenizeOnChars; - return Self; - } - - public CharGroupTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenLengthValue.HasValue) - { - writer.WritePropertyName("max_token_length"); - writer.WriteNumberValue(MaxTokenLengthValue.Value); - } - - writer.WritePropertyName("tokenize_on_chars"); - JsonSerializer.Serialize(writer, TokenizeOnCharsValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("char_group"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - CharGroupTokenizer IBuildableDescriptor.Build() => new() - { - MaxTokenLength = MaxTokenLengthValue, - TokenizeOnChars = TokenizeOnCharsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ChineseAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ChineseAnalyzer.g.cs deleted file mode 100644 index 346475e7101..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ChineseAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ChineseAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "chinese"; -} - -public sealed partial class ChineseAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ChineseAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public ChineseAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public ChineseAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public ChineseAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("chinese"); - writer.WriteEndObject(); - } - - ChineseAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CjkAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CjkAnalyzer.g.cs deleted file mode 100644 index 3c5155d81ee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CjkAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CjkAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "cjk"; -} - -public sealed partial class CjkAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CjkAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public CjkAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public CjkAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public CjkAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("cjk"); - writer.WriteEndObject(); - } - - CjkAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs deleted file mode 100644 index dd3cd63d201..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ClassicTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("max_token_length")] - public int? MaxTokenLength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "classic"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class ClassicTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ClassicTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public ClassicTokenizerDescriptor() : base() - { - } - - private int? MaxTokenLengthValue { get; set; } - private string? VersionValue { get; set; } - - public ClassicTokenizerDescriptor MaxTokenLength(int? maxTokenLength) - { - MaxTokenLengthValue = maxTokenLength; - return Self; - } - - public ClassicTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenLengthValue.HasValue) - { - writer.WritePropertyName("max_token_length"); - writer.WriteNumberValue(MaxTokenLengthValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("classic"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - ClassicTokenizer IBuildableDescriptor.Build() => new() - { - MaxTokenLength = MaxTokenLengthValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs deleted file mode 100644 index 042bb74c9e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CommonGramsTokenFilter.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CommonGramsTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("common_words")] - public ICollection? CommonWords { get; set; } - [JsonInclude, JsonPropertyName("common_words_path")] - public string? CommonWordsPath { get; set; } - [JsonInclude, JsonPropertyName("ignore_case")] - public bool? IgnoreCase { get; set; } - [JsonInclude, JsonPropertyName("query_mode")] - public bool? QueryMode { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "common_grams"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class CommonGramsTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CommonGramsTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public CommonGramsTokenFilterDescriptor() : base() - { - } - - private ICollection? CommonWordsValue { get; set; } - private string? CommonWordsPathValue { get; set; } - private bool? IgnoreCaseValue { get; set; } - private bool? QueryModeValue { get; set; } - private string? VersionValue { get; set; } - - public CommonGramsTokenFilterDescriptor CommonWords(ICollection? commonWords) - { - CommonWordsValue = commonWords; - return Self; - } - - public CommonGramsTokenFilterDescriptor CommonWordsPath(string? commonWordsPath) - { - CommonWordsPathValue = commonWordsPath; - return Self; - } - - public CommonGramsTokenFilterDescriptor IgnoreCase(bool? ignoreCase = true) - { - IgnoreCaseValue = ignoreCase; - return Self; - } - - public CommonGramsTokenFilterDescriptor QueryMode(bool? queryMode = true) - { - QueryModeValue = queryMode; - return Self; - } - - public CommonGramsTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CommonWordsValue is not null) - { - writer.WritePropertyName("common_words"); - JsonSerializer.Serialize(writer, CommonWordsValue, options); - } - - if (!string.IsNullOrEmpty(CommonWordsPathValue)) - { - writer.WritePropertyName("common_words_path"); - writer.WriteStringValue(CommonWordsPathValue); - } - - if (IgnoreCaseValue.HasValue) - { - writer.WritePropertyName("ignore_case"); - writer.WriteBooleanValue(IgnoreCaseValue.Value); - } - - if (QueryModeValue.HasValue) - { - writer.WritePropertyName("query_mode"); - writer.WriteBooleanValue(QueryModeValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("common_grams"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - CommonGramsTokenFilter IBuildableDescriptor.Build() => new() - { - CommonWords = CommonWordsValue, - CommonWordsPath = CommonWordsPathValue, - IgnoreCase = IgnoreCaseValue, - QueryMode = QueryModeValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ConditionTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ConditionTokenFilter.g.cs deleted file mode 100644 index 8f3bccf1177..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ConditionTokenFilter.g.cs +++ /dev/null @@ -1,156 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ConditionTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("filter")] - public ICollection Filter { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "condition"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class ConditionTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ConditionTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public ConditionTokenFilterDescriptor() : base() - { - } - - private ICollection FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? VersionValue { get; set; } - - public ConditionTokenFilterDescriptor Filter(ICollection filter) - { - FilterValue = filter; - return Self; - } - - public ConditionTokenFilterDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ConditionTokenFilterDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ConditionTokenFilterDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ConditionTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("condition"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ConditionTokenFilter IBuildableDescriptor.Build() => new() - { - Filter = FilterValue, - Script = BuildScript(), - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomAnalyzer.g.cs deleted file mode 100644 index 8032c00b2a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomAnalyzer.g.cs +++ /dev/null @@ -1,135 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CustomAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("char_filter")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? CharFilter { get; set; } - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Filter { get; set; } - [JsonInclude, JsonPropertyName("position_increment_gap")] - public int? PositionIncrementGap { get; set; } - [JsonInclude, JsonPropertyName("position_offset_gap")] - public int? PositionOffsetGap { get; set; } - [JsonInclude, JsonPropertyName("tokenizer")] - public string Tokenizer { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "custom"; -} - -public sealed partial class CustomAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CustomAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public CustomAnalyzerDescriptor() : base() - { - } - - private ICollection? CharFilterValue { get; set; } - private ICollection? FilterValue { get; set; } - private int? PositionIncrementGapValue { get; set; } - private int? PositionOffsetGapValue { get; set; } - private string TokenizerValue { get; set; } - - public CustomAnalyzerDescriptor CharFilter(ICollection? charFilter) - { - CharFilterValue = charFilter; - return Self; - } - - public CustomAnalyzerDescriptor Filter(ICollection? filter) - { - FilterValue = filter; - return Self; - } - - public CustomAnalyzerDescriptor PositionIncrementGap(int? positionIncrementGap) - { - PositionIncrementGapValue = positionIncrementGap; - return Self; - } - - public CustomAnalyzerDescriptor PositionOffsetGap(int? positionOffsetGap) - { - PositionOffsetGapValue = positionOffsetGap; - return Self; - } - - public CustomAnalyzerDescriptor Tokenizer(string tokenizer) - { - TokenizerValue = tokenizer; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CharFilterValue is not null) - { - writer.WritePropertyName("char_filter"); - SingleOrManySerializationHelper.Serialize(CharFilterValue, writer, options); - } - - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (PositionIncrementGapValue.HasValue) - { - writer.WritePropertyName("position_increment_gap"); - writer.WriteNumberValue(PositionIncrementGapValue.Value); - } - - if (PositionOffsetGapValue.HasValue) - { - writer.WritePropertyName("position_offset_gap"); - writer.WriteNumberValue(PositionOffsetGapValue.Value); - } - - writer.WritePropertyName("tokenizer"); - writer.WriteStringValue(TokenizerValue); - writer.WritePropertyName("type"); - writer.WriteStringValue("custom"); - writer.WriteEndObject(); - } - - CustomAnalyzer IBuildableDescriptor.Build() => new() - { - CharFilter = CharFilterValue, - Filter = FilterValue, - PositionIncrementGap = PositionIncrementGapValue, - PositionOffsetGap = PositionOffsetGapValue, - Tokenizer = TokenizerValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomNormalizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomNormalizer.g.cs deleted file mode 100644 index d860de1f8b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CustomNormalizer.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CustomNormalizer : INormalizer -{ - [JsonInclude, JsonPropertyName("char_filter")] - public ICollection? CharFilter { get; set; } - [JsonInclude, JsonPropertyName("filter")] - public ICollection? Filter { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "custom"; -} - -public sealed partial class CustomNormalizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CustomNormalizerDescriptor(Action configure) => configure.Invoke(this); - - public CustomNormalizerDescriptor() : base() - { - } - - private ICollection? CharFilterValue { get; set; } - private ICollection? FilterValue { get; set; } - - public CustomNormalizerDescriptor CharFilter(ICollection? charFilter) - { - CharFilterValue = charFilter; - return Self; - } - - public CustomNormalizerDescriptor Filter(ICollection? filter) - { - FilterValue = filter; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CharFilterValue is not null) - { - writer.WritePropertyName("char_filter"); - JsonSerializer.Serialize(writer, CharFilterValue, options); - } - - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("custom"); - writer.WriteEndObject(); - } - - CustomNormalizer IBuildableDescriptor.Build() => new() - { - CharFilter = CharFilterValue, - Filter = FilterValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CzechAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CzechAnalyzer.g.cs deleted file mode 100644 index 2ab33835403..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/CzechAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class CzechAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "czech"; -} - -public sealed partial class CzechAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CzechAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public CzechAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public CzechAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public CzechAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public CzechAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("czech"); - writer.WriteEndObject(); - } - - CzechAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DanishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DanishAnalyzer.g.cs deleted file mode 100644 index 1a564e5d309..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DanishAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class DanishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "danish"; -} - -public sealed partial class DanishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DanishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public DanishAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public DanishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public DanishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("danish"); - writer.WriteEndObject(); - } - - DanishAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs deleted file mode 100644 index 053b6eff686..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class DelimitedPayloadTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("delimiter")] - public string? Delimiter { get; set; } - [JsonInclude, JsonPropertyName("encoding")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.DelimitedPayloadEncoding? Encoding { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "delimited_payload"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class DelimitedPayloadTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DelimitedPayloadTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public DelimitedPayloadTokenFilterDescriptor() : base() - { - } - - private string? DelimiterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.DelimitedPayloadEncoding? EncodingValue { get; set; } - private string? VersionValue { get; set; } - - public DelimitedPayloadTokenFilterDescriptor Delimiter(string? delimiter) - { - DelimiterValue = delimiter; - return Self; - } - - public DelimitedPayloadTokenFilterDescriptor Encoding(Elastic.Clients.Elasticsearch.Serverless.Analysis.DelimitedPayloadEncoding? encoding) - { - EncodingValue = encoding; - return Self; - } - - public DelimitedPayloadTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DelimiterValue)) - { - writer.WritePropertyName("delimiter"); - writer.WriteStringValue(DelimiterValue); - } - - if (EncodingValue is not null) - { - writer.WritePropertyName("encoding"); - JsonSerializer.Serialize(writer, EncodingValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("delimited_payload"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - DelimitedPayloadTokenFilter IBuildableDescriptor.Build() => new() - { - Delimiter = DelimiterValue, - Encoding = EncodingValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs deleted file mode 100644 index 7fc6b44b4ae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs +++ /dev/null @@ -1,186 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class DictionaryDecompounderTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("hyphenation_patterns_path")] - public string? HyphenationPatternsPath { get; set; } - [JsonInclude, JsonPropertyName("max_subword_size")] - public int? MaxSubwordSize { get; set; } - [JsonInclude, JsonPropertyName("min_subword_size")] - public int? MinSubwordSize { get; set; } - [JsonInclude, JsonPropertyName("min_word_size")] - public int? MinWordSize { get; set; } - [JsonInclude, JsonPropertyName("only_longest_match")] - public bool? OnlyLongestMatch { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "dictionary_decompounder"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } - [JsonInclude, JsonPropertyName("word_list")] - public ICollection? WordList { get; set; } - [JsonInclude, JsonPropertyName("word_list_path")] - public string? WordListPath { get; set; } -} - -public sealed partial class DictionaryDecompounderTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DictionaryDecompounderTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public DictionaryDecompounderTokenFilterDescriptor() : base() - { - } - - private string? HyphenationPatternsPathValue { get; set; } - private int? MaxSubwordSizeValue { get; set; } - private int? MinSubwordSizeValue { get; set; } - private int? MinWordSizeValue { get; set; } - private bool? OnlyLongestMatchValue { get; set; } - private string? VersionValue { get; set; } - private ICollection? WordListValue { get; set; } - private string? WordListPathValue { get; set; } - - public DictionaryDecompounderTokenFilterDescriptor HyphenationPatternsPath(string? hyphenationPatternsPath) - { - HyphenationPatternsPathValue = hyphenationPatternsPath; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor MaxSubwordSize(int? maxSubwordSize) - { - MaxSubwordSizeValue = maxSubwordSize; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor MinSubwordSize(int? minSubwordSize) - { - MinSubwordSizeValue = minSubwordSize; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor MinWordSize(int? minWordSize) - { - MinWordSizeValue = minWordSize; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor OnlyLongestMatch(bool? onlyLongestMatch = true) - { - OnlyLongestMatchValue = onlyLongestMatch; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor WordList(ICollection? wordList) - { - WordListValue = wordList; - return Self; - } - - public DictionaryDecompounderTokenFilterDescriptor WordListPath(string? wordListPath) - { - WordListPathValue = wordListPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(HyphenationPatternsPathValue)) - { - writer.WritePropertyName("hyphenation_patterns_path"); - writer.WriteStringValue(HyphenationPatternsPathValue); - } - - if (MaxSubwordSizeValue.HasValue) - { - writer.WritePropertyName("max_subword_size"); - writer.WriteNumberValue(MaxSubwordSizeValue.Value); - } - - if (MinSubwordSizeValue.HasValue) - { - writer.WritePropertyName("min_subword_size"); - writer.WriteNumberValue(MinSubwordSizeValue.Value); - } - - if (MinWordSizeValue.HasValue) - { - writer.WritePropertyName("min_word_size"); - writer.WriteNumberValue(MinWordSizeValue.Value); - } - - if (OnlyLongestMatchValue.HasValue) - { - writer.WritePropertyName("only_longest_match"); - writer.WriteBooleanValue(OnlyLongestMatchValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("dictionary_decompounder"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - if (WordListValue is not null) - { - writer.WritePropertyName("word_list"); - JsonSerializer.Serialize(writer, WordListValue, options); - } - - if (!string.IsNullOrEmpty(WordListPathValue)) - { - writer.WritePropertyName("word_list_path"); - writer.WriteStringValue(WordListPathValue); - } - - writer.WriteEndObject(); - } - - DictionaryDecompounderTokenFilter IBuildableDescriptor.Build() => new() - { - HyphenationPatternsPath = HyphenationPatternsPathValue, - MaxSubwordSize = MaxSubwordSizeValue, - MinSubwordSize = MinSubwordSizeValue, - MinWordSize = MinWordSizeValue, - OnlyLongestMatch = OnlyLongestMatchValue, - Version = VersionValue, - WordList = WordListValue, - WordListPath = WordListPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DutchAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DutchAnalyzer.g.cs deleted file mode 100644 index 988e5393d2c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/DutchAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class DutchAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "dutch"; -} - -public sealed partial class DutchAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DutchAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public DutchAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public DutchAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public DutchAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public DutchAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("dutch"); - writer.WriteEndObject(); - } - - DutchAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs deleted file mode 100644 index 4fcc17e8802..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class EdgeNGramTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("max_gram")] - public int? MaxGram { get; set; } - [JsonInclude, JsonPropertyName("min_gram")] - public int? MinGram { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - [JsonInclude, JsonPropertyName("side")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.EdgeNGramSide? Side { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "edge_ngram"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class EdgeNGramTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal EdgeNGramTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public EdgeNGramTokenFilterDescriptor() : base() - { - } - - private int? MaxGramValue { get; set; } - private int? MinGramValue { get; set; } - private bool? PreserveOriginalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.EdgeNGramSide? SideValue { get; set; } - private string? VersionValue { get; set; } - - public EdgeNGramTokenFilterDescriptor MaxGram(int? maxGram) - { - MaxGramValue = maxGram; - return Self; - } - - public EdgeNGramTokenFilterDescriptor MinGram(int? minGram) - { - MinGramValue = minGram; - return Self; - } - - public EdgeNGramTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public EdgeNGramTokenFilterDescriptor Side(Elastic.Clients.Elasticsearch.Serverless.Analysis.EdgeNGramSide? side) - { - SideValue = side; - return Self; - } - - public EdgeNGramTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxGramValue.HasValue) - { - writer.WritePropertyName("max_gram"); - writer.WriteNumberValue(MaxGramValue.Value); - } - - if (MinGramValue.HasValue) - { - writer.WritePropertyName("min_gram"); - writer.WriteNumberValue(MinGramValue.Value); - } - - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - if (SideValue is not null) - { - writer.WritePropertyName("side"); - JsonSerializer.Serialize(writer, SideValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("edge_ngram"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - EdgeNGramTokenFilter IBuildableDescriptor.Build() => new() - { - MaxGram = MaxGramValue, - MinGram = MinGramValue, - PreserveOriginal = PreserveOriginalValue, - Side = SideValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs deleted file mode 100644 index a4e14124507..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class EdgeNGramTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("custom_token_chars")] - public string? CustomTokenChars { get; set; } - [JsonInclude, JsonPropertyName("max_gram")] - public int? MaxGram { get; set; } - [JsonInclude, JsonPropertyName("min_gram")] - public int? MinGram { get; set; } - [JsonInclude, JsonPropertyName("token_chars")] - public ICollection? TokenChars { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "edge_ngram"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class EdgeNGramTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal EdgeNGramTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public EdgeNGramTokenizerDescriptor() : base() - { - } - - private string? CustomTokenCharsValue { get; set; } - private int? MaxGramValue { get; set; } - private int? MinGramValue { get; set; } - private ICollection? TokenCharsValue { get; set; } - private string? VersionValue { get; set; } - - public EdgeNGramTokenizerDescriptor CustomTokenChars(string? customTokenChars) - { - CustomTokenCharsValue = customTokenChars; - return Self; - } - - public EdgeNGramTokenizerDescriptor MaxGram(int? maxGram) - { - MaxGramValue = maxGram; - return Self; - } - - public EdgeNGramTokenizerDescriptor MinGram(int? minGram) - { - MinGramValue = minGram; - return Self; - } - - public EdgeNGramTokenizerDescriptor TokenChars(ICollection? tokenChars) - { - TokenCharsValue = tokenChars; - return Self; - } - - public EdgeNGramTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CustomTokenCharsValue)) - { - writer.WritePropertyName("custom_token_chars"); - writer.WriteStringValue(CustomTokenCharsValue); - } - - if (MaxGramValue.HasValue) - { - writer.WritePropertyName("max_gram"); - writer.WriteNumberValue(MaxGramValue.Value); - } - - if (MinGramValue.HasValue) - { - writer.WritePropertyName("min_gram"); - writer.WriteNumberValue(MinGramValue.Value); - } - - if (TokenCharsValue is not null) - { - writer.WritePropertyName("token_chars"); - JsonSerializer.Serialize(writer, TokenCharsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("edge_ngram"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - EdgeNGramTokenizer IBuildableDescriptor.Build() => new() - { - CustomTokenChars = CustomTokenCharsValue, - MaxGram = MaxGramValue, - MinGram = MinGramValue, - TokenChars = TokenCharsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ElisionTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ElisionTokenFilter.g.cs deleted file mode 100644 index 1eff891e4f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ElisionTokenFilter.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ElisionTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("articles")] - public ICollection? Articles { get; set; } - [JsonInclude, JsonPropertyName("articles_case")] - public bool? ArticlesCase { get; set; } - [JsonInclude, JsonPropertyName("articles_path")] - public string? ArticlesPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "elision"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class ElisionTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ElisionTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public ElisionTokenFilterDescriptor() : base() - { - } - - private ICollection? ArticlesValue { get; set; } - private bool? ArticlesCaseValue { get; set; } - private string? ArticlesPathValue { get; set; } - private string? VersionValue { get; set; } - - public ElisionTokenFilterDescriptor Articles(ICollection? articles) - { - ArticlesValue = articles; - return Self; - } - - public ElisionTokenFilterDescriptor ArticlesCase(bool? articlesCase = true) - { - ArticlesCaseValue = articlesCase; - return Self; - } - - public ElisionTokenFilterDescriptor ArticlesPath(string? articlesPath) - { - ArticlesPathValue = articlesPath; - return Self; - } - - public ElisionTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ArticlesValue is not null) - { - writer.WritePropertyName("articles"); - JsonSerializer.Serialize(writer, ArticlesValue, options); - } - - if (ArticlesCaseValue.HasValue) - { - writer.WritePropertyName("articles_case"); - writer.WriteBooleanValue(ArticlesCaseValue.Value); - } - - if (!string.IsNullOrEmpty(ArticlesPathValue)) - { - writer.WritePropertyName("articles_path"); - writer.WriteStringValue(ArticlesPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("elision"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - ElisionTokenFilter IBuildableDescriptor.Build() => new() - { - Articles = ArticlesValue, - ArticlesCase = ArticlesCaseValue, - ArticlesPath = ArticlesPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EnglishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EnglishAnalyzer.g.cs deleted file mode 100644 index f7840444ac6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EnglishAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class EnglishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "english"; -} - -public sealed partial class EnglishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal EnglishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public EnglishAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public EnglishAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public EnglishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public EnglishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("english"); - writer.WriteEndObject(); - } - - EnglishAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EstonianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EstonianAnalyzer.g.cs deleted file mode 100644 index 33b4a41442b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EstonianAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class EstonianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "estonian"; -} - -public sealed partial class EstonianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal EstonianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public EstonianAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public EstonianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public EstonianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("estonian"); - writer.WriteEndObject(); - } - - EstonianAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs deleted file mode 100644 index bb792973a82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs +++ /dev/null @@ -1,143 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class FingerprintAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("max_output_size")] - public int MaxOutputSize { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool PreserveOriginal { get; set; } - [JsonInclude, JsonPropertyName("separator")] - public string Separator { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "fingerprint"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class FingerprintAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FingerprintAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public FingerprintAnalyzerDescriptor() : base() - { - } - - private int MaxOutputSizeValue { get; set; } - private bool PreserveOriginalValue { get; set; } - private string SeparatorValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - private string? VersionValue { get; set; } - - public FingerprintAnalyzerDescriptor MaxOutputSize(int maxOutputSize) - { - MaxOutputSizeValue = maxOutputSize; - return Self; - } - - public FingerprintAnalyzerDescriptor PreserveOriginal(bool preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public FingerprintAnalyzerDescriptor Separator(string separator) - { - SeparatorValue = separator; - return Self; - } - - public FingerprintAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public FingerprintAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - public FingerprintAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("max_output_size"); - writer.WriteNumberValue(MaxOutputSizeValue); - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue); - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("fingerprint"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - FingerprintAnalyzer IBuildableDescriptor.Build() => new() - { - MaxOutputSize = MaxOutputSizeValue, - PreserveOriginal = PreserveOriginalValue, - Separator = SeparatorValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs deleted file mode 100644 index 561f46132d4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class FingerprintTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("max_output_size")] - public int? MaxOutputSize { get; set; } - [JsonInclude, JsonPropertyName("separator")] - public string? Separator { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "fingerprint"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class FingerprintTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FingerprintTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public FingerprintTokenFilterDescriptor() : base() - { - } - - private int? MaxOutputSizeValue { get; set; } - private string? SeparatorValue { get; set; } - private string? VersionValue { get; set; } - - public FingerprintTokenFilterDescriptor MaxOutputSize(int? maxOutputSize) - { - MaxOutputSizeValue = maxOutputSize; - return Self; - } - - public FingerprintTokenFilterDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - public FingerprintTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxOutputSizeValue.HasValue) - { - writer.WritePropertyName("max_output_size"); - writer.WriteNumberValue(MaxOutputSizeValue.Value); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("fingerprint"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - FingerprintTokenFilter IBuildableDescriptor.Build() => new() - { - MaxOutputSize = MaxOutputSizeValue, - Separator = SeparatorValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FinnishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FinnishAnalyzer.g.cs deleted file mode 100644 index ac99cc9a655..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FinnishAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class FinnishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "finnish"; -} - -public sealed partial class FinnishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FinnishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public FinnishAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public FinnishAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public FinnishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public FinnishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("finnish"); - writer.WriteEndObject(); - } - - FinnishAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FrenchAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FrenchAnalyzer.g.cs deleted file mode 100644 index f24252dbd45..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/FrenchAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class FrenchAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "french"; -} - -public sealed partial class FrenchAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FrenchAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public FrenchAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public FrenchAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public FrenchAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public FrenchAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("french"); - writer.WriteEndObject(); - } - - FrenchAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GalicianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GalicianAnalyzer.g.cs deleted file mode 100644 index 7d2d6eb67b6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GalicianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class GalicianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "galician"; -} - -public sealed partial class GalicianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal GalicianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public GalicianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public GalicianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public GalicianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public GalicianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("galician"); - writer.WriteEndObject(); - } - - GalicianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GermanAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GermanAnalyzer.g.cs deleted file mode 100644 index 3ac9153d3fb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GermanAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class GermanAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "german"; -} - -public sealed partial class GermanAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal GermanAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public GermanAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public GermanAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public GermanAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public GermanAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("german"); - writer.WriteEndObject(); - } - - GermanAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GreekAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GreekAnalyzer.g.cs deleted file mode 100644 index 2cdd8a4115a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/GreekAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class GreekAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "greek"; -} - -public sealed partial class GreekAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal GreekAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public GreekAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public GreekAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public GreekAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("greek"); - writer.WriteEndObject(); - } - - GreekAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HindiAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HindiAnalyzer.g.cs deleted file mode 100644 index 0e765e00b40..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HindiAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class HindiAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "hindi"; -} - -public sealed partial class HindiAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HindiAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public HindiAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public HindiAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public HindiAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public HindiAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("hindi"); - writer.WriteEndObject(); - } - - HindiAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs deleted file mode 100644 index 30c38662283..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class HtmlStripCharFilter : ICharFilter -{ - [JsonInclude, JsonPropertyName("escaped_tags")] - public ICollection? EscapedTags { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "html_strip"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class HtmlStripCharFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HtmlStripCharFilterDescriptor(Action configure) => configure.Invoke(this); - - public HtmlStripCharFilterDescriptor() : base() - { - } - - private ICollection? EscapedTagsValue { get; set; } - private string? VersionValue { get; set; } - - public HtmlStripCharFilterDescriptor EscapedTags(ICollection? escapedTags) - { - EscapedTagsValue = escapedTags; - return Self; - } - - public HtmlStripCharFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EscapedTagsValue is not null) - { - writer.WritePropertyName("escaped_tags"); - JsonSerializer.Serialize(writer, EscapedTagsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("html_strip"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - HtmlStripCharFilter IBuildableDescriptor.Build() => new() - { - EscapedTags = EscapedTagsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HungarianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HungarianAnalyzer.g.cs deleted file mode 100644 index a03ae71fec5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HungarianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class HungarianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "hungarian"; -} - -public sealed partial class HungarianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HungarianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public HungarianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public HungarianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public HungarianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public HungarianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("hungarian"); - writer.WriteEndObject(); - } - - HungarianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HunspellTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HunspellTokenFilter.g.cs deleted file mode 100644 index ce185492e8c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HunspellTokenFilter.g.cs +++ /dev/null @@ -1,134 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class HunspellTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("dedup")] - public bool? Dedup { get; set; } - [JsonInclude, JsonPropertyName("dictionary")] - public string? Dictionary { get; set; } - [JsonInclude, JsonPropertyName("locale")] - public string Locale { get; set; } - [JsonInclude, JsonPropertyName("longest_only")] - public bool? LongestOnly { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "hunspell"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class HunspellTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HunspellTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public HunspellTokenFilterDescriptor() : base() - { - } - - private bool? DedupValue { get; set; } - private string? DictionaryValue { get; set; } - private string LocaleValue { get; set; } - private bool? LongestOnlyValue { get; set; } - private string? VersionValue { get; set; } - - public HunspellTokenFilterDescriptor Dedup(bool? dedup = true) - { - DedupValue = dedup; - return Self; - } - - public HunspellTokenFilterDescriptor Dictionary(string? dictionary) - { - DictionaryValue = dictionary; - return Self; - } - - public HunspellTokenFilterDescriptor Locale(string locale) - { - LocaleValue = locale; - return Self; - } - - public HunspellTokenFilterDescriptor LongestOnly(bool? longestOnly = true) - { - LongestOnlyValue = longestOnly; - return Self; - } - - public HunspellTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DedupValue.HasValue) - { - writer.WritePropertyName("dedup"); - writer.WriteBooleanValue(DedupValue.Value); - } - - if (!string.IsNullOrEmpty(DictionaryValue)) - { - writer.WritePropertyName("dictionary"); - writer.WriteStringValue(DictionaryValue); - } - - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - if (LongestOnlyValue.HasValue) - { - writer.WritePropertyName("longest_only"); - writer.WriteBooleanValue(LongestOnlyValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("hunspell"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - HunspellTokenFilter IBuildableDescriptor.Build() => new() - { - Dedup = DedupValue, - Dictionary = DictionaryValue, - Locale = LocaleValue, - LongestOnly = LongestOnlyValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs deleted file mode 100644 index d1cc538b5a3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs +++ /dev/null @@ -1,186 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class HyphenationDecompounderTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("hyphenation_patterns_path")] - public string? HyphenationPatternsPath { get; set; } - [JsonInclude, JsonPropertyName("max_subword_size")] - public int? MaxSubwordSize { get; set; } - [JsonInclude, JsonPropertyName("min_subword_size")] - public int? MinSubwordSize { get; set; } - [JsonInclude, JsonPropertyName("min_word_size")] - public int? MinWordSize { get; set; } - [JsonInclude, JsonPropertyName("only_longest_match")] - public bool? OnlyLongestMatch { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "hyphenation_decompounder"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } - [JsonInclude, JsonPropertyName("word_list")] - public ICollection? WordList { get; set; } - [JsonInclude, JsonPropertyName("word_list_path")] - public string? WordListPath { get; set; } -} - -public sealed partial class HyphenationDecompounderTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HyphenationDecompounderTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public HyphenationDecompounderTokenFilterDescriptor() : base() - { - } - - private string? HyphenationPatternsPathValue { get; set; } - private int? MaxSubwordSizeValue { get; set; } - private int? MinSubwordSizeValue { get; set; } - private int? MinWordSizeValue { get; set; } - private bool? OnlyLongestMatchValue { get; set; } - private string? VersionValue { get; set; } - private ICollection? WordListValue { get; set; } - private string? WordListPathValue { get; set; } - - public HyphenationDecompounderTokenFilterDescriptor HyphenationPatternsPath(string? hyphenationPatternsPath) - { - HyphenationPatternsPathValue = hyphenationPatternsPath; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor MaxSubwordSize(int? maxSubwordSize) - { - MaxSubwordSizeValue = maxSubwordSize; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor MinSubwordSize(int? minSubwordSize) - { - MinSubwordSizeValue = minSubwordSize; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor MinWordSize(int? minWordSize) - { - MinWordSizeValue = minWordSize; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor OnlyLongestMatch(bool? onlyLongestMatch = true) - { - OnlyLongestMatchValue = onlyLongestMatch; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor WordList(ICollection? wordList) - { - WordListValue = wordList; - return Self; - } - - public HyphenationDecompounderTokenFilterDescriptor WordListPath(string? wordListPath) - { - WordListPathValue = wordListPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(HyphenationPatternsPathValue)) - { - writer.WritePropertyName("hyphenation_patterns_path"); - writer.WriteStringValue(HyphenationPatternsPathValue); - } - - if (MaxSubwordSizeValue.HasValue) - { - writer.WritePropertyName("max_subword_size"); - writer.WriteNumberValue(MaxSubwordSizeValue.Value); - } - - if (MinSubwordSizeValue.HasValue) - { - writer.WritePropertyName("min_subword_size"); - writer.WriteNumberValue(MinSubwordSizeValue.Value); - } - - if (MinWordSizeValue.HasValue) - { - writer.WritePropertyName("min_word_size"); - writer.WriteNumberValue(MinWordSizeValue.Value); - } - - if (OnlyLongestMatchValue.HasValue) - { - writer.WritePropertyName("only_longest_match"); - writer.WriteBooleanValue(OnlyLongestMatchValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("hyphenation_decompounder"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - if (WordListValue is not null) - { - writer.WritePropertyName("word_list"); - JsonSerializer.Serialize(writer, WordListValue, options); - } - - if (!string.IsNullOrEmpty(WordListPathValue)) - { - writer.WritePropertyName("word_list_path"); - writer.WriteStringValue(WordListPathValue); - } - - writer.WriteEndObject(); - } - - HyphenationDecompounderTokenFilter IBuildableDescriptor.Build() => new() - { - HyphenationPatternsPath = HyphenationPatternsPathValue, - MaxSubwordSize = MaxSubwordSizeValue, - MinSubwordSize = MinSubwordSizeValue, - MinWordSize = MinWordSizeValue, - OnlyLongestMatch = OnlyLongestMatchValue, - Version = VersionValue, - WordList = WordListValue, - WordListPath = WordListPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuAnalyzer.g.cs deleted file mode 100644 index 6742ebcd511..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuAnalyzer.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("method")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType Method { get; set; } - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationMode Mode { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_analyzer"; -} - -public sealed partial class IcuAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public IcuAnalyzerDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType MethodValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationMode ModeValue { get; set; } - - public IcuAnalyzerDescriptor Method(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType method) - { - MethodValue = method; - return Self; - } - - public IcuAnalyzerDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationMode mode) - { - ModeValue = mode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("method"); - JsonSerializer.Serialize(writer, MethodValue, options); - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_analyzer"); - writer.WriteEndObject(); - } - - IcuAnalyzer IBuildableDescriptor.Build() => new() - { - Method = MethodValue, - Mode = ModeValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs deleted file mode 100644 index 2848f5d0609..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs +++ /dev/null @@ -1,266 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuCollationTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("alternate")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? Alternate { get; set; } - [JsonInclude, JsonPropertyName("case_first")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; } - [JsonInclude, JsonPropertyName("case_level")] - public bool? CaseLevel { get; set; } - [JsonInclude, JsonPropertyName("country")] - public string? Country { get; set; } - [JsonInclude, JsonPropertyName("decomposition")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? Decomposition { get; set; } - [JsonInclude, JsonPropertyName("hiragana_quaternary_mode")] - public bool? HiraganaQuaternaryMode { get; set; } - [JsonInclude, JsonPropertyName("language")] - public string? Language { get; set; } - [JsonInclude, JsonPropertyName("numeric")] - public bool? Numeric { get; set; } - [JsonInclude, JsonPropertyName("rules")] - public string? Rules { get; set; } - [JsonInclude, JsonPropertyName("strength")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? Strength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_collation"; - - [JsonInclude, JsonPropertyName("variable_top")] - public string? VariableTop { get; set; } - [JsonInclude, JsonPropertyName("variant")] - public string? Variant { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class IcuCollationTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuCollationTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public IcuCollationTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } - private bool? CaseLevelValue { get; set; } - private string? CountryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } - private bool? HiraganaQuaternaryModeValue { get; set; } - private string? LanguageValue { get; set; } - private bool? NumericValue { get; set; } - private string? RulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } - private string? VariableTopValue { get; set; } - private string? VariantValue { get; set; } - private string? VersionValue { get; set; } - - public IcuCollationTokenFilterDescriptor Alternate(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? alternate) - { - AlternateValue = alternate; - return Self; - } - - public IcuCollationTokenFilterDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst) - { - CaseFirstValue = caseFirst; - return Self; - } - - public IcuCollationTokenFilterDescriptor CaseLevel(bool? caseLevel = true) - { - CaseLevelValue = caseLevel; - return Self; - } - - public IcuCollationTokenFilterDescriptor Country(string? country) - { - CountryValue = country; - return Self; - } - - public IcuCollationTokenFilterDescriptor Decomposition(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? decomposition) - { - DecompositionValue = decomposition; - return Self; - } - - public IcuCollationTokenFilterDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) - { - HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; - return Self; - } - - public IcuCollationTokenFilterDescriptor Language(string? language) - { - LanguageValue = language; - return Self; - } - - public IcuCollationTokenFilterDescriptor Numeric(bool? numeric = true) - { - NumericValue = numeric; - return Self; - } - - public IcuCollationTokenFilterDescriptor Rules(string? rules) - { - RulesValue = rules; - return Self; - } - - public IcuCollationTokenFilterDescriptor Strength(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? strength) - { - StrengthValue = strength; - return Self; - } - - public IcuCollationTokenFilterDescriptor VariableTop(string? variableTop) - { - VariableTopValue = variableTop; - return Self; - } - - public IcuCollationTokenFilterDescriptor Variant(string? variant) - { - VariantValue = variant; - return Self; - } - - public IcuCollationTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlternateValue is not null) - { - writer.WritePropertyName("alternate"); - JsonSerializer.Serialize(writer, AlternateValue, options); - } - - if (CaseFirstValue is not null) - { - writer.WritePropertyName("case_first"); - JsonSerializer.Serialize(writer, CaseFirstValue, options); - } - - if (CaseLevelValue.HasValue) - { - writer.WritePropertyName("case_level"); - writer.WriteBooleanValue(CaseLevelValue.Value); - } - - if (!string.IsNullOrEmpty(CountryValue)) - { - writer.WritePropertyName("country"); - writer.WriteStringValue(CountryValue); - } - - if (DecompositionValue is not null) - { - writer.WritePropertyName("decomposition"); - JsonSerializer.Serialize(writer, DecompositionValue, options); - } - - if (HiraganaQuaternaryModeValue.HasValue) - { - writer.WritePropertyName("hiragana_quaternary_mode"); - writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); - } - - if (!string.IsNullOrEmpty(LanguageValue)) - { - writer.WritePropertyName("language"); - writer.WriteStringValue(LanguageValue); - } - - if (NumericValue.HasValue) - { - writer.WritePropertyName("numeric"); - writer.WriteBooleanValue(NumericValue.Value); - } - - if (!string.IsNullOrEmpty(RulesValue)) - { - writer.WritePropertyName("rules"); - writer.WriteStringValue(RulesValue); - } - - if (StrengthValue is not null) - { - writer.WritePropertyName("strength"); - JsonSerializer.Serialize(writer, StrengthValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_collation"); - if (!string.IsNullOrEmpty(VariableTopValue)) - { - writer.WritePropertyName("variable_top"); - writer.WriteStringValue(VariableTopValue); - } - - if (!string.IsNullOrEmpty(VariantValue)) - { - writer.WritePropertyName("variant"); - writer.WriteStringValue(VariantValue); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - IcuCollationTokenFilter IBuildableDescriptor.Build() => new() - { - Alternate = AlternateValue, - CaseFirst = CaseFirstValue, - CaseLevel = CaseLevelValue, - Country = CountryValue, - Decomposition = DecompositionValue, - HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, - Language = LanguageValue, - Numeric = NumericValue, - Rules = RulesValue, - Strength = StrengthValue, - VariableTop = VariableTopValue, - Variant = VariantValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs deleted file mode 100644 index 27a6a58e860..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuFoldingTokenFilter.g.cs +++ /dev/null @@ -1,85 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuFoldingTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_folding"; - - [JsonInclude, JsonPropertyName("unicode_set_filter")] - public string UnicodeSetFilter { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class IcuFoldingTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuFoldingTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public IcuFoldingTokenFilterDescriptor() : base() - { - } - - private string UnicodeSetFilterValue { get; set; } - private string? VersionValue { get; set; } - - public IcuFoldingTokenFilterDescriptor UnicodeSetFilter(string unicodeSetFilter) - { - UnicodeSetFilterValue = unicodeSetFilter; - return Self; - } - - public IcuFoldingTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_folding"); - writer.WritePropertyName("unicode_set_filter"); - writer.WriteStringValue(UnicodeSetFilterValue); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - IcuFoldingTokenFilter IBuildableDescriptor.Build() => new() - { - UnicodeSetFilter = UnicodeSetFilterValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs deleted file mode 100644 index 9ede316676f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuNormalizationCharFilter : ICharFilter -{ - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationMode? Mode { get; set; } - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType? Name { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_normalizer"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class IcuNormalizationCharFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuNormalizationCharFilterDescriptor(Action configure) => configure.Invoke(this); - - public IcuNormalizationCharFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType? NameValue { get; set; } - private string? VersionValue { get; set; } - - public IcuNormalizationCharFilterDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationMode? mode) - { - ModeValue = mode; - return Self; - } - - public IcuNormalizationCharFilterDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType? name) - { - NameValue = name; - return Self; - } - - public IcuNormalizationCharFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_normalizer"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - IcuNormalizationCharFilter IBuildableDescriptor.Build() => new() - { - Mode = ModeValue, - Name = NameValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs deleted file mode 100644 index c2fb98d7225..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuNormalizationTokenFilter.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuNormalizationTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType Name { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_normalizer"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class IcuNormalizationTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuNormalizationTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public IcuNormalizationTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType NameValue { get; set; } - private string? VersionValue { get; set; } - - public IcuNormalizationTokenFilterDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationType name) - { - NameValue = name; - return Self; - } - - public IcuNormalizationTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_normalizer"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - IcuNormalizationTokenFilter IBuildableDescriptor.Build() => new() - { - Name = NameValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTokenizer.g.cs deleted file mode 100644 index 2d8c8fa600c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTokenizer.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("rule_files")] - public string RuleFiles { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_tokenizer"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class IcuTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public IcuTokenizerDescriptor() : base() - { - } - - private string RuleFilesValue { get; set; } - private string? VersionValue { get; set; } - - public IcuTokenizerDescriptor RuleFiles(string ruleFiles) - { - RuleFilesValue = ruleFiles; - return Self; - } - - public IcuTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("rule_files"); - writer.WriteStringValue(RuleFilesValue); - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_tokenizer"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - IcuTokenizer IBuildableDescriptor.Build() => new() - { - RuleFiles = RuleFilesValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs deleted file mode 100644 index 7129fd84a9e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs +++ /dev/null @@ -1,102 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IcuTransformTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("dir")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuTransformDirection? Dir { get; set; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_transform"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class IcuTransformTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuTransformTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public IcuTransformTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuTransformDirection? DirValue { get; set; } - private string IdValue { get; set; } - private string? VersionValue { get; set; } - - public IcuTransformTokenFilterDescriptor Dir(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuTransformDirection? dir) - { - DirValue = dir; - return Self; - } - - public IcuTransformTokenFilterDescriptor Id(string id) - { - IdValue = id; - return Self; - } - - public IcuTransformTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DirValue is not null) - { - writer.WritePropertyName("dir"); - JsonSerializer.Serialize(writer, DirValue, options); - } - - writer.WritePropertyName("id"); - writer.WriteStringValue(IdValue); - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_transform"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - IcuTransformTokenFilter IBuildableDescriptor.Build() => new() - { - Dir = DirValue, - Id = IdValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IndonesianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IndonesianAnalyzer.g.cs deleted file mode 100644 index 2d51e30cdad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IndonesianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IndonesianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "indonesian"; -} - -public sealed partial class IndonesianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IndonesianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public IndonesianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public IndonesianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public IndonesianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public IndonesianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("indonesian"); - writer.WriteEndObject(); - } - - IndonesianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IrishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IrishAnalyzer.g.cs deleted file mode 100644 index bc0b931d3ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/IrishAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class IrishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "irish"; -} - -public sealed partial class IrishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IrishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public IrishAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public IrishAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public IrishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public IrishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("irish"); - writer.WriteEndObject(); - } - - IrishAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ItalianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ItalianAnalyzer.g.cs deleted file mode 100644 index 6f27eb0afdf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ItalianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ItalianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "italian"; -} - -public sealed partial class ItalianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ItalianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public ItalianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public ItalianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public ItalianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public ItalianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("italian"); - writer.WriteEndObject(); - } - - ItalianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KStemTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KStemTokenFilter.g.cs deleted file mode 100644 index 2376fc024de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KStemTokenFilter.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KStemTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "kstem"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KStemTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KStemTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KStemTokenFilterDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public KStemTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("kstem"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KStemTokenFilter IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs deleted file mode 100644 index b46fb678f59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KeepTypesTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.KeepTypesMode? Mode { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "keep_types"; - - [JsonInclude, JsonPropertyName("types")] - public ICollection? Types { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KeepTypesTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KeepTypesTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KeepTypesTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.KeepTypesMode? ModeValue { get; set; } - private ICollection? TypesValue { get; set; } - private string? VersionValue { get; set; } - - public KeepTypesTokenFilterDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeepTypesMode? mode) - { - ModeValue = mode; - return Self; - } - - public KeepTypesTokenFilterDescriptor Types(ICollection? types) - { - TypesValue = types; - return Self; - } - - public KeepTypesTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("keep_types"); - if (TypesValue is not null) - { - writer.WritePropertyName("types"); - JsonSerializer.Serialize(writer, TypesValue, options); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KeepTypesTokenFilter IBuildableDescriptor.Build() => new() - { - Mode = ModeValue, - Types = TypesValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs deleted file mode 100644 index e7d52565bd8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KeepWordsTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("keep_words")] - public ICollection? KeepWords { get; set; } - [JsonInclude, JsonPropertyName("keep_words_case")] - public bool? KeepWordsCase { get; set; } - [JsonInclude, JsonPropertyName("keep_words_path")] - public string? KeepWordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "keep"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KeepWordsTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KeepWordsTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KeepWordsTokenFilterDescriptor() : base() - { - } - - private ICollection? KeepWordsValue { get; set; } - private bool? KeepWordsCaseValue { get; set; } - private string? KeepWordsPathValue { get; set; } - private string? VersionValue { get; set; } - - public KeepWordsTokenFilterDescriptor KeepWords(ICollection? keepWords) - { - KeepWordsValue = keepWords; - return Self; - } - - public KeepWordsTokenFilterDescriptor KeepWordsCase(bool? keepWordsCase = true) - { - KeepWordsCaseValue = keepWordsCase; - return Self; - } - - public KeepWordsTokenFilterDescriptor KeepWordsPath(string? keepWordsPath) - { - KeepWordsPathValue = keepWordsPath; - return Self; - } - - public KeepWordsTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (KeepWordsValue is not null) - { - writer.WritePropertyName("keep_words"); - JsonSerializer.Serialize(writer, KeepWordsValue, options); - } - - if (KeepWordsCaseValue.HasValue) - { - writer.WritePropertyName("keep_words_case"); - writer.WriteBooleanValue(KeepWordsCaseValue.Value); - } - - if (!string.IsNullOrEmpty(KeepWordsPathValue)) - { - writer.WritePropertyName("keep_words_path"); - writer.WriteStringValue(KeepWordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("keep"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KeepWordsTokenFilter IBuildableDescriptor.Build() => new() - { - KeepWords = KeepWordsValue, - KeepWordsCase = KeepWordsCaseValue, - KeepWordsPath = KeepWordsPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordAnalyzer.g.cs deleted file mode 100644 index f282054e4e9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordAnalyzer.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KeywordAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "keyword"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KeywordAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KeywordAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public KeywordAnalyzerDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public KeywordAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("keyword"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KeywordAnalyzer IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs deleted file mode 100644 index 63c98e51412..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs +++ /dev/null @@ -1,139 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KeywordMarkerTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("ignore_case")] - public bool? IgnoreCase { get; set; } - [JsonInclude, JsonPropertyName("keywords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Keywords { get; set; } - [JsonInclude, JsonPropertyName("keywords_path")] - public string? KeywordsPath { get; set; } - [JsonInclude, JsonPropertyName("keywords_pattern")] - public string? KeywordsPattern { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "keyword_marker"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KeywordMarkerTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KeywordMarkerTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KeywordMarkerTokenFilterDescriptor() : base() - { - } - - private bool? IgnoreCaseValue { get; set; } - private ICollection? KeywordsValue { get; set; } - private string? KeywordsPathValue { get; set; } - private string? KeywordsPatternValue { get; set; } - private string? VersionValue { get; set; } - - public KeywordMarkerTokenFilterDescriptor IgnoreCase(bool? ignoreCase = true) - { - IgnoreCaseValue = ignoreCase; - return Self; - } - - public KeywordMarkerTokenFilterDescriptor Keywords(ICollection? keywords) - { - KeywordsValue = keywords; - return Self; - } - - public KeywordMarkerTokenFilterDescriptor KeywordsPath(string? keywordsPath) - { - KeywordsPathValue = keywordsPath; - return Self; - } - - public KeywordMarkerTokenFilterDescriptor KeywordsPattern(string? keywordsPattern) - { - KeywordsPatternValue = keywordsPattern; - return Self; - } - - public KeywordMarkerTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IgnoreCaseValue.HasValue) - { - writer.WritePropertyName("ignore_case"); - writer.WriteBooleanValue(IgnoreCaseValue.Value); - } - - if (KeywordsValue is not null) - { - writer.WritePropertyName("keywords"); - SingleOrManySerializationHelper.Serialize(KeywordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(KeywordsPathValue)) - { - writer.WritePropertyName("keywords_path"); - writer.WriteStringValue(KeywordsPathValue); - } - - if (!string.IsNullOrEmpty(KeywordsPatternValue)) - { - writer.WritePropertyName("keywords_pattern"); - writer.WriteStringValue(KeywordsPatternValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("keyword_marker"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KeywordMarkerTokenFilter IBuildableDescriptor.Build() => new() - { - IgnoreCase = IgnoreCaseValue, - Keywords = KeywordsValue, - KeywordsPath = KeywordsPathValue, - KeywordsPattern = KeywordsPatternValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs deleted file mode 100644 index 379e6bdb7e9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KeywordTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KeywordTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("buffer_size")] - public int? BufferSize { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "keyword"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KeywordTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KeywordTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public KeywordTokenizerDescriptor() : base() - { - } - - private int? BufferSizeValue { get; set; } - private string? VersionValue { get; set; } - - public KeywordTokenizerDescriptor BufferSize(int? bufferSize) - { - BufferSizeValue = bufferSize; - return Self; - } - - public KeywordTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BufferSizeValue.HasValue) - { - writer.WritePropertyName("buffer_size"); - writer.WriteNumberValue(BufferSizeValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("keyword"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KeywordTokenizer IBuildableDescriptor.Build() => new() - { - BufferSize = BufferSizeValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs deleted file mode 100644 index 1b2c9c03bc6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiAnalyzer.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KuromojiAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizationMode Mode { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "kuromoji"; - - [JsonInclude, JsonPropertyName("user_dictionary")] - public string? UserDictionary { get; set; } -} - -public sealed partial class KuromojiAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KuromojiAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public KuromojiAnalyzerDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizationMode ModeValue { get; set; } - private string? UserDictionaryValue { get; set; } - - public KuromojiAnalyzerDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizationMode mode) - { - ModeValue = mode; - return Self; - } - - public KuromojiAnalyzerDescriptor UserDictionary(string? userDictionary) - { - UserDictionaryValue = userDictionary; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("kuromoji"); - if (!string.IsNullOrEmpty(UserDictionaryValue)) - { - writer.WritePropertyName("user_dictionary"); - writer.WriteStringValue(UserDictionaryValue); - } - - writer.WriteEndObject(); - } - - KuromojiAnalyzer IBuildableDescriptor.Build() => new() - { - Mode = ModeValue, - UserDictionary = UserDictionaryValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs deleted file mode 100644 index 5ac4881c869..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiIterationMarkCharFilter.g.cs +++ /dev/null @@ -1,98 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KuromojiIterationMarkCharFilter : ICharFilter -{ - [JsonInclude, JsonPropertyName("normalize_kana")] - public bool NormalizeKana { get; set; } - [JsonInclude, JsonPropertyName("normalize_kanji")] - public bool NormalizeKanji { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "kuromoji_iteration_mark"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KuromojiIterationMarkCharFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KuromojiIterationMarkCharFilterDescriptor(Action configure) => configure.Invoke(this); - - public KuromojiIterationMarkCharFilterDescriptor() : base() - { - } - - private bool NormalizeKanaValue { get; set; } - private bool NormalizeKanjiValue { get; set; } - private string? VersionValue { get; set; } - - public KuromojiIterationMarkCharFilterDescriptor NormalizeKana(bool normalizeKana = true) - { - NormalizeKanaValue = normalizeKana; - return Self; - } - - public KuromojiIterationMarkCharFilterDescriptor NormalizeKanji(bool normalizeKanji = true) - { - NormalizeKanjiValue = normalizeKanji; - return Self; - } - - public KuromojiIterationMarkCharFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("normalize_kana"); - writer.WriteBooleanValue(NormalizeKanaValue); - writer.WritePropertyName("normalize_kanji"); - writer.WriteBooleanValue(NormalizeKanjiValue); - writer.WritePropertyName("type"); - writer.WriteStringValue("kuromoji_iteration_mark"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KuromojiIterationMarkCharFilter IBuildableDescriptor.Build() => new() - { - NormalizeKana = NormalizeKanaValue, - NormalizeKanji = NormalizeKanjiValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs deleted file mode 100644 index d80b03e1473..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiPartOfSpeechTokenFilter.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KuromojiPartOfSpeechTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("stoptags")] - public ICollection Stoptags { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "kuromoji_part_of_speech"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KuromojiPartOfSpeechTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KuromojiPartOfSpeechTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KuromojiPartOfSpeechTokenFilterDescriptor() : base() - { - } - - private ICollection StoptagsValue { get; set; } - private string? VersionValue { get; set; } - - public KuromojiPartOfSpeechTokenFilterDescriptor Stoptags(ICollection stoptags) - { - StoptagsValue = stoptags; - return Self; - } - - public KuromojiPartOfSpeechTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("stoptags"); - JsonSerializer.Serialize(writer, StoptagsValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("kuromoji_part_of_speech"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KuromojiPartOfSpeechTokenFilter IBuildableDescriptor.Build() => new() - { - Stoptags = StoptagsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs deleted file mode 100644 index a4ca5c9623a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiReadingFormTokenFilter.g.cs +++ /dev/null @@ -1,85 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KuromojiReadingFormTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "kuromoji_readingform"; - - [JsonInclude, JsonPropertyName("use_romaji")] - public bool UseRomaji { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KuromojiReadingFormTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KuromojiReadingFormTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KuromojiReadingFormTokenFilterDescriptor() : base() - { - } - - private bool UseRomajiValue { get; set; } - private string? VersionValue { get; set; } - - public KuromojiReadingFormTokenFilterDescriptor UseRomaji(bool useRomaji = true) - { - UseRomajiValue = useRomaji; - return Self; - } - - public KuromojiReadingFormTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("kuromoji_readingform"); - writer.WritePropertyName("use_romaji"); - writer.WriteBooleanValue(UseRomajiValue); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KuromojiReadingFormTokenFilter IBuildableDescriptor.Build() => new() - { - UseRomaji = UseRomajiValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs deleted file mode 100644 index 21b6ac2b863..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiStemmerTokenFilter.g.cs +++ /dev/null @@ -1,86 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KuromojiStemmerTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("minimum_length")] - public int MinimumLength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "kuromoji_stemmer"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KuromojiStemmerTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KuromojiStemmerTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public KuromojiStemmerTokenFilterDescriptor() : base() - { - } - - private int MinimumLengthValue { get; set; } - private string? VersionValue { get; set; } - - public KuromojiStemmerTokenFilterDescriptor MinimumLength(int minimumLength) - { - MinimumLengthValue = minimumLength; - return Self; - } - - public KuromojiStemmerTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("minimum_length"); - writer.WriteNumberValue(MinimumLengthValue); - writer.WritePropertyName("type"); - writer.WriteStringValue("kuromoji_stemmer"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KuromojiStemmerTokenFilter IBuildableDescriptor.Build() => new() - { - MinimumLength = MinimumLengthValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiTokenizer.g.cs deleted file mode 100644 index 457d5130d68..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/KuromojiTokenizer.g.cs +++ /dev/null @@ -1,182 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class KuromojiTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("discard_compound_token")] - public bool? DiscardCompoundToken { get; set; } - [JsonInclude, JsonPropertyName("discard_punctuation")] - public bool? DiscardPunctuation { get; set; } - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizationMode Mode { get; set; } - [JsonInclude, JsonPropertyName("nbest_cost")] - public int? NbestCost { get; set; } - [JsonInclude, JsonPropertyName("nbest_examples")] - public string? NbestExamples { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "kuromoji_tokenizer"; - - [JsonInclude, JsonPropertyName("user_dictionary")] - public string? UserDictionary { get; set; } - [JsonInclude, JsonPropertyName("user_dictionary_rules")] - public ICollection? UserDictionaryRules { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class KuromojiTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KuromojiTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public KuromojiTokenizerDescriptor() : base() - { - } - - private bool? DiscardCompoundTokenValue { get; set; } - private bool? DiscardPunctuationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizationMode ModeValue { get; set; } - private int? NbestCostValue { get; set; } - private string? NbestExamplesValue { get; set; } - private string? UserDictionaryValue { get; set; } - private ICollection? UserDictionaryRulesValue { get; set; } - private string? VersionValue { get; set; } - - public KuromojiTokenizerDescriptor DiscardCompoundToken(bool? discardCompoundToken = true) - { - DiscardCompoundTokenValue = discardCompoundToken; - return Self; - } - - public KuromojiTokenizerDescriptor DiscardPunctuation(bool? discardPunctuation = true) - { - DiscardPunctuationValue = discardPunctuation; - return Self; - } - - public KuromojiTokenizerDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizationMode mode) - { - ModeValue = mode; - return Self; - } - - public KuromojiTokenizerDescriptor NbestCost(int? nbestCost) - { - NbestCostValue = nbestCost; - return Self; - } - - public KuromojiTokenizerDescriptor NbestExamples(string? nbestExamples) - { - NbestExamplesValue = nbestExamples; - return Self; - } - - public KuromojiTokenizerDescriptor UserDictionary(string? userDictionary) - { - UserDictionaryValue = userDictionary; - return Self; - } - - public KuromojiTokenizerDescriptor UserDictionaryRules(ICollection? userDictionaryRules) - { - UserDictionaryRulesValue = userDictionaryRules; - return Self; - } - - public KuromojiTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DiscardCompoundTokenValue.HasValue) - { - writer.WritePropertyName("discard_compound_token"); - writer.WriteBooleanValue(DiscardCompoundTokenValue.Value); - } - - if (DiscardPunctuationValue.HasValue) - { - writer.WritePropertyName("discard_punctuation"); - writer.WriteBooleanValue(DiscardPunctuationValue.Value); - } - - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - if (NbestCostValue.HasValue) - { - writer.WritePropertyName("nbest_cost"); - writer.WriteNumberValue(NbestCostValue.Value); - } - - if (!string.IsNullOrEmpty(NbestExamplesValue)) - { - writer.WritePropertyName("nbest_examples"); - writer.WriteStringValue(NbestExamplesValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("kuromoji_tokenizer"); - if (!string.IsNullOrEmpty(UserDictionaryValue)) - { - writer.WritePropertyName("user_dictionary"); - writer.WriteStringValue(UserDictionaryValue); - } - - if (UserDictionaryRulesValue is not null) - { - writer.WritePropertyName("user_dictionary_rules"); - JsonSerializer.Serialize(writer, UserDictionaryRulesValue, options); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - KuromojiTokenizer IBuildableDescriptor.Build() => new() - { - DiscardCompoundToken = DiscardCompoundTokenValue, - DiscardPunctuation = DiscardPunctuationValue, - Mode = ModeValue, - NbestCost = NbestCostValue, - NbestExamples = NbestExamplesValue, - UserDictionary = UserDictionaryValue, - UserDictionaryRules = UserDictionaryRulesValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LanguageAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LanguageAnalyzer.g.cs deleted file mode 100644 index 0728851d857..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LanguageAnalyzer.g.cs +++ /dev/null @@ -1,131 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LanguageAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("language")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.Language Language { get; set; } - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "language"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class LanguageAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LanguageAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public LanguageAnalyzerDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.Language LanguageValue { get; set; } - private ICollection StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - private string? VersionValue { get; set; } - - public LanguageAnalyzerDescriptor Language(Elastic.Clients.Elasticsearch.Serverless.Analysis.Language language) - { - LanguageValue = language; - return Self; - } - - public LanguageAnalyzerDescriptor StemExclusion(ICollection stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public LanguageAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public LanguageAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - public LanguageAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("language"); - JsonSerializer.Serialize(writer, LanguageValue, options); - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("language"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - LanguageAnalyzer IBuildableDescriptor.Build() => new() - { - Language = LanguageValue, - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LatvianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LatvianAnalyzer.g.cs deleted file mode 100644 index a14c5062cbb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LatvianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LatvianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "latvian"; -} - -public sealed partial class LatvianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LatvianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public LatvianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public LatvianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public LatvianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public LatvianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("latvian"); - writer.WriteEndObject(); - } - - LatvianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LengthTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LengthTokenFilter.g.cs deleted file mode 100644 index 65ffaf5e8b0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LengthTokenFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LengthTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("max")] - public int? Max { get; set; } - [JsonInclude, JsonPropertyName("min")] - public int? Min { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "length"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class LengthTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LengthTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public LengthTokenFilterDescriptor() : base() - { - } - - private int? MaxValue { get; set; } - private int? MinValue { get; set; } - private string? VersionValue { get; set; } - - public LengthTokenFilterDescriptor Max(int? max) - { - MaxValue = max; - return Self; - } - - public LengthTokenFilterDescriptor Min(int? min) - { - MinValue = min; - return Self; - } - - public LengthTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxValue.HasValue) - { - writer.WritePropertyName("max"); - writer.WriteNumberValue(MaxValue.Value); - } - - if (MinValue.HasValue) - { - writer.WritePropertyName("min"); - writer.WriteNumberValue(MinValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("length"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - LengthTokenFilter IBuildableDescriptor.Build() => new() - { - Max = MaxValue, - Min = MinValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LetterTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LetterTokenizer.g.cs deleted file mode 100644 index 691c49bcf0a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LetterTokenizer.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LetterTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "letter"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class LetterTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LetterTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public LetterTokenizerDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public LetterTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("letter"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - LetterTokenizer IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs deleted file mode 100644 index 7d343f99696..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LimitTokenCountTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("consume_all_tokens")] - public bool? ConsumeAllTokens { get; set; } - [JsonInclude, JsonPropertyName("max_token_count")] - public int? MaxTokenCount { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "limit"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class LimitTokenCountTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LimitTokenCountTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public LimitTokenCountTokenFilterDescriptor() : base() - { - } - - private bool? ConsumeAllTokensValue { get; set; } - private int? MaxTokenCountValue { get; set; } - private string? VersionValue { get; set; } - - public LimitTokenCountTokenFilterDescriptor ConsumeAllTokens(bool? consumeAllTokens = true) - { - ConsumeAllTokensValue = consumeAllTokens; - return Self; - } - - public LimitTokenCountTokenFilterDescriptor MaxTokenCount(int? maxTokenCount) - { - MaxTokenCountValue = maxTokenCount; - return Self; - } - - public LimitTokenCountTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConsumeAllTokensValue.HasValue) - { - writer.WritePropertyName("consume_all_tokens"); - writer.WriteBooleanValue(ConsumeAllTokensValue.Value); - } - - if (MaxTokenCountValue.HasValue) - { - writer.WritePropertyName("max_token_count"); - writer.WriteNumberValue(MaxTokenCountValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("limit"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - LimitTokenCountTokenFilter IBuildableDescriptor.Build() => new() - { - ConsumeAllTokens = ConsumeAllTokensValue, - MaxTokenCount = MaxTokenCountValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LithuanianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LithuanianAnalyzer.g.cs deleted file mode 100644 index b676f04e394..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LithuanianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LithuanianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "lithuanian"; -} - -public sealed partial class LithuanianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LithuanianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public LithuanianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public LithuanianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public LithuanianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public LithuanianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("lithuanian"); - writer.WriteEndObject(); - } - - LithuanianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseNormalizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseNormalizer.g.cs deleted file mode 100644 index 91e6d9b7986..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseNormalizer.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LowercaseNormalizer : INormalizer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "lowercase"; -} - -public sealed partial class LowercaseNormalizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LowercaseNormalizerDescriptor(Action configure) => configure.Invoke(this); - - public LowercaseNormalizerDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("lowercase"); - writer.WriteEndObject(); - } - - LowercaseNormalizer IBuildableDescriptor.Build() => new() - { - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs deleted file mode 100644 index 3dc48eb8e5d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LowercaseTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("language")] - public string? Language { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "lowercase"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class LowercaseTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LowercaseTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public LowercaseTokenFilterDescriptor() : base() - { - } - - private string? LanguageValue { get; set; } - private string? VersionValue { get; set; } - - public LowercaseTokenFilterDescriptor Language(string? language) - { - LanguageValue = language; - return Self; - } - - public LowercaseTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(LanguageValue)) - { - writer.WritePropertyName("language"); - writer.WriteStringValue(LanguageValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("lowercase"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - LowercaseTokenFilter IBuildableDescriptor.Build() => new() - { - Language = LanguageValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenizer.g.cs deleted file mode 100644 index 641bce2dcbe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/LowercaseTokenizer.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class LowercaseTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "lowercase"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class LowercaseTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LowercaseTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public LowercaseTokenizerDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public LowercaseTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("lowercase"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - LowercaseTokenizer IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MappingCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MappingCharFilter.g.cs deleted file mode 100644 index 7073013bdda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MappingCharFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class MappingCharFilter : ICharFilter -{ - [JsonInclude, JsonPropertyName("mappings")] - public ICollection? Mappings { get; set; } - [JsonInclude, JsonPropertyName("mappings_path")] - public string? MappingsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "mapping"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class MappingCharFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal MappingCharFilterDescriptor(Action configure) => configure.Invoke(this); - - public MappingCharFilterDescriptor() : base() - { - } - - private ICollection? MappingsValue { get; set; } - private string? MappingsPathValue { get; set; } - private string? VersionValue { get; set; } - - public MappingCharFilterDescriptor Mappings(ICollection? mappings) - { - MappingsValue = mappings; - return Self; - } - - public MappingCharFilterDescriptor MappingsPath(string? mappingsPath) - { - MappingsPathValue = mappingsPath; - return Self; - } - - public MappingCharFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (!string.IsNullOrEmpty(MappingsPathValue)) - { - writer.WritePropertyName("mappings_path"); - writer.WriteStringValue(MappingsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("mapping"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - MappingCharFilter IBuildableDescriptor.Build() => new() - { - Mappings = MappingsValue, - MappingsPath = MappingsPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs deleted file mode 100644 index 7eeccd15ac6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs +++ /dev/null @@ -1,102 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class MultiplexerTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("filters")] - public ICollection Filters { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "multiplexer"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class MultiplexerTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal MultiplexerTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public MultiplexerTokenFilterDescriptor() : base() - { - } - - private ICollection FiltersValue { get; set; } - private bool? PreserveOriginalValue { get; set; } - private string? VersionValue { get; set; } - - public MultiplexerTokenFilterDescriptor Filters(ICollection filters) - { - FiltersValue = filters; - return Self; - } - - public MultiplexerTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public MultiplexerTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("multiplexer"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - MultiplexerTokenFilter IBuildableDescriptor.Build() => new() - { - Filters = FiltersValue, - PreserveOriginal = PreserveOriginalValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenFilter.g.cs deleted file mode 100644 index d1448a4b4b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenFilter.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class NGramTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("max_gram")] - public int? MaxGram { get; set; } - [JsonInclude, JsonPropertyName("min_gram")] - public int? MinGram { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "ngram"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class NGramTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NGramTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public NGramTokenFilterDescriptor() : base() - { - } - - private int? MaxGramValue { get; set; } - private int? MinGramValue { get; set; } - private bool? PreserveOriginalValue { get; set; } - private string? VersionValue { get; set; } - - public NGramTokenFilterDescriptor MaxGram(int? maxGram) - { - MaxGramValue = maxGram; - return Self; - } - - public NGramTokenFilterDescriptor MinGram(int? minGram) - { - MinGramValue = minGram; - return Self; - } - - public NGramTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public NGramTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxGramValue.HasValue) - { - writer.WritePropertyName("max_gram"); - writer.WriteNumberValue(MaxGramValue.Value); - } - - if (MinGramValue.HasValue) - { - writer.WritePropertyName("min_gram"); - writer.WriteNumberValue(MinGramValue.Value); - } - - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("ngram"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - NGramTokenFilter IBuildableDescriptor.Build() => new() - { - MaxGram = MaxGramValue, - MinGram = MinGramValue, - PreserveOriginal = PreserveOriginalValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs deleted file mode 100644 index d0fddb79b9b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class NGramTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("custom_token_chars")] - public string? CustomTokenChars { get; set; } - [JsonInclude, JsonPropertyName("max_gram")] - public int? MaxGram { get; set; } - [JsonInclude, JsonPropertyName("min_gram")] - public int? MinGram { get; set; } - [JsonInclude, JsonPropertyName("token_chars")] - public ICollection? TokenChars { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "ngram"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class NGramTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NGramTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public NGramTokenizerDescriptor() : base() - { - } - - private string? CustomTokenCharsValue { get; set; } - private int? MaxGramValue { get; set; } - private int? MinGramValue { get; set; } - private ICollection? TokenCharsValue { get; set; } - private string? VersionValue { get; set; } - - public NGramTokenizerDescriptor CustomTokenChars(string? customTokenChars) - { - CustomTokenCharsValue = customTokenChars; - return Self; - } - - public NGramTokenizerDescriptor MaxGram(int? maxGram) - { - MaxGramValue = maxGram; - return Self; - } - - public NGramTokenizerDescriptor MinGram(int? minGram) - { - MinGramValue = minGram; - return Self; - } - - public NGramTokenizerDescriptor TokenChars(ICollection? tokenChars) - { - TokenCharsValue = tokenChars; - return Self; - } - - public NGramTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CustomTokenCharsValue)) - { - writer.WritePropertyName("custom_token_chars"); - writer.WriteStringValue(CustomTokenCharsValue); - } - - if (MaxGramValue.HasValue) - { - writer.WritePropertyName("max_gram"); - writer.WriteNumberValue(MaxGramValue.Value); - } - - if (MinGramValue.HasValue) - { - writer.WritePropertyName("min_gram"); - writer.WriteNumberValue(MinGramValue.Value); - } - - if (TokenCharsValue is not null) - { - writer.WritePropertyName("token_chars"); - JsonSerializer.Serialize(writer, TokenCharsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("ngram"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - NGramTokenizer IBuildableDescriptor.Build() => new() - { - CustomTokenChars = CustomTokenCharsValue, - MaxGram = MaxGramValue, - MinGram = MinGramValue, - TokenChars = TokenCharsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriAnalyzer.g.cs deleted file mode 100644 index 20aef3c7ab8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriAnalyzer.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class NoriAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("decompound_mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriDecompoundMode? DecompoundMode { get; set; } - [JsonInclude, JsonPropertyName("stoptags")] - public ICollection? Stoptags { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "nori"; - - [JsonInclude, JsonPropertyName("user_dictionary")] - public string? UserDictionary { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class NoriAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NoriAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public NoriAnalyzerDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriDecompoundMode? DecompoundModeValue { get; set; } - private ICollection? StoptagsValue { get; set; } - private string? UserDictionaryValue { get; set; } - private string? VersionValue { get; set; } - - public NoriAnalyzerDescriptor DecompoundMode(Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriDecompoundMode? decompoundMode) - { - DecompoundModeValue = decompoundMode; - return Self; - } - - public NoriAnalyzerDescriptor Stoptags(ICollection? stoptags) - { - StoptagsValue = stoptags; - return Self; - } - - public NoriAnalyzerDescriptor UserDictionary(string? userDictionary) - { - UserDictionaryValue = userDictionary; - return Self; - } - - public NoriAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DecompoundModeValue is not null) - { - writer.WritePropertyName("decompound_mode"); - JsonSerializer.Serialize(writer, DecompoundModeValue, options); - } - - if (StoptagsValue is not null) - { - writer.WritePropertyName("stoptags"); - JsonSerializer.Serialize(writer, StoptagsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("nori"); - if (!string.IsNullOrEmpty(UserDictionaryValue)) - { - writer.WritePropertyName("user_dictionary"); - writer.WriteStringValue(UserDictionaryValue); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - NoriAnalyzer IBuildableDescriptor.Build() => new() - { - DecompoundMode = DecompoundModeValue, - Stoptags = StoptagsValue, - UserDictionary = UserDictionaryValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs deleted file mode 100644 index 553db15c24f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriPartOfSpeechTokenFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class NoriPartOfSpeechTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("stoptags")] - public ICollection? Stoptags { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "nori_part_of_speech"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class NoriPartOfSpeechTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NoriPartOfSpeechTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public NoriPartOfSpeechTokenFilterDescriptor() : base() - { - } - - private ICollection? StoptagsValue { get; set; } - private string? VersionValue { get; set; } - - public NoriPartOfSpeechTokenFilterDescriptor Stoptags(ICollection? stoptags) - { - StoptagsValue = stoptags; - return Self; - } - - public NoriPartOfSpeechTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StoptagsValue is not null) - { - writer.WritePropertyName("stoptags"); - JsonSerializer.Serialize(writer, StoptagsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("nori_part_of_speech"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - NoriPartOfSpeechTokenFilter IBuildableDescriptor.Build() => new() - { - Stoptags = StoptagsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriTokenizer.g.cs deleted file mode 100644 index b45fdb45130..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NoriTokenizer.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class NoriTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("decompound_mode")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriDecompoundMode? DecompoundMode { get; set; } - [JsonInclude, JsonPropertyName("discard_punctuation")] - public bool? DiscardPunctuation { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "nori_tokenizer"; - - [JsonInclude, JsonPropertyName("user_dictionary")] - public string? UserDictionary { get; set; } - [JsonInclude, JsonPropertyName("user_dictionary_rules")] - public ICollection? UserDictionaryRules { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class NoriTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NoriTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public NoriTokenizerDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriDecompoundMode? DecompoundModeValue { get; set; } - private bool? DiscardPunctuationValue { get; set; } - private string? UserDictionaryValue { get; set; } - private ICollection? UserDictionaryRulesValue { get; set; } - private string? VersionValue { get; set; } - - public NoriTokenizerDescriptor DecompoundMode(Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriDecompoundMode? decompoundMode) - { - DecompoundModeValue = decompoundMode; - return Self; - } - - public NoriTokenizerDescriptor DiscardPunctuation(bool? discardPunctuation = true) - { - DiscardPunctuationValue = discardPunctuation; - return Self; - } - - public NoriTokenizerDescriptor UserDictionary(string? userDictionary) - { - UserDictionaryValue = userDictionary; - return Self; - } - - public NoriTokenizerDescriptor UserDictionaryRules(ICollection? userDictionaryRules) - { - UserDictionaryRulesValue = userDictionaryRules; - return Self; - } - - public NoriTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DecompoundModeValue is not null) - { - writer.WritePropertyName("decompound_mode"); - JsonSerializer.Serialize(writer, DecompoundModeValue, options); - } - - if (DiscardPunctuationValue.HasValue) - { - writer.WritePropertyName("discard_punctuation"); - writer.WriteBooleanValue(DiscardPunctuationValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("nori_tokenizer"); - if (!string.IsNullOrEmpty(UserDictionaryValue)) - { - writer.WritePropertyName("user_dictionary"); - writer.WriteStringValue(UserDictionaryValue); - } - - if (UserDictionaryRulesValue is not null) - { - writer.WritePropertyName("user_dictionary_rules"); - JsonSerializer.Serialize(writer, UserDictionaryRulesValue, options); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - NoriTokenizer IBuildableDescriptor.Build() => new() - { - DecompoundMode = DecompoundModeValue, - DiscardPunctuation = DiscardPunctuationValue, - UserDictionary = UserDictionaryValue, - UserDictionaryRules = UserDictionaryRulesValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Normalizers.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Normalizers.g.cs deleted file mode 100644 index e5111e9b1b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Normalizers.g.cs +++ /dev/null @@ -1,131 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public partial class Normalizers : IsADictionary -{ - public Normalizers() - { - } - - public Normalizers(IDictionary container) : base(container) - { - } - - public void Add(string name, INormalizer normalizer) => BackingDictionary.Add(Sanitize(name), normalizer); - public bool TryGetNormalizer(string name, [NotNullWhen(returnValue: true)] out INormalizer normalizer) => BackingDictionary.TryGetValue(Sanitize(name), out normalizer); - - public bool TryGetNormalizer(string name, [NotNullWhen(returnValue: true)] out T? normalizer) where T : class, INormalizer - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - normalizer = finalValue; - return true; - } - - normalizer = null; - return false; - } -} - -public sealed partial class NormalizersDescriptor : IsADictionaryDescriptor -{ - public NormalizersDescriptor() : base(new Normalizers()) - { - } - - public NormalizersDescriptor(Normalizers normalizers) : base(normalizers ?? new Normalizers()) - { - } - - public NormalizersDescriptor Custom(string normalizerName) => AssignVariant(normalizerName, null); - public NormalizersDescriptor Custom(string normalizerName, Action configure) => AssignVariant(normalizerName, configure); - public NormalizersDescriptor Custom(string normalizerName, CustomNormalizer customNormalizer) => AssignVariant(normalizerName, customNormalizer); - public NormalizersDescriptor Lowercase(string normalizerName) => AssignVariant(normalizerName, null); - public NormalizersDescriptor Lowercase(string normalizerName, Action configure) => AssignVariant(normalizerName, configure); - public NormalizersDescriptor Lowercase(string normalizerName, LowercaseNormalizer lowercaseNormalizer) => AssignVariant(normalizerName, lowercaseNormalizer); -} - -internal sealed partial class NormalizerInterfaceConverter : JsonConverter -{ - public override INormalizer Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "custom": - return JsonSerializer.Deserialize(ref reader, options); - case "lowercase": - return JsonSerializer.Deserialize(ref reader, options); - default: - return JsonSerializer.Deserialize(ref reader, options); - } - } - - public override void Write(Utf8JsonWriter writer, INormalizer value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "custom": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomNormalizer), options); - return; - case "lowercase": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LowercaseNormalizer), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -[JsonConverter(typeof(NormalizerInterfaceConverter))] -public partial interface INormalizer -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NorwegianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NorwegianAnalyzer.g.cs deleted file mode 100644 index 5b88623985b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NorwegianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class NorwegianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "norwegian"; -} - -public sealed partial class NorwegianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NorwegianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public NorwegianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public NorwegianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public NorwegianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public NorwegianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("norwegian"); - writer.WriteEndObject(); - } - - NorwegianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs deleted file mode 100644 index cd21cf2e9b6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PathHierarchyTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("buffer_size")] - public int? BufferSize { get; set; } - [JsonInclude, JsonPropertyName("delimiter")] - public string? Delimiter { get; set; } - [JsonInclude, JsonPropertyName("replacement")] - public string? Replacement { get; set; } - [JsonInclude, JsonPropertyName("reverse")] - public bool? Reverse { get; set; } - [JsonInclude, JsonPropertyName("skip")] - public int? Skip { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "path_hierarchy"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PathHierarchyTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PathHierarchyTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public PathHierarchyTokenizerDescriptor() : base() - { - } - - private int? BufferSizeValue { get; set; } - private string? DelimiterValue { get; set; } - private string? ReplacementValue { get; set; } - private bool? ReverseValue { get; set; } - private int? SkipValue { get; set; } - private string? VersionValue { get; set; } - - public PathHierarchyTokenizerDescriptor BufferSize(int? bufferSize) - { - BufferSizeValue = bufferSize; - return Self; - } - - public PathHierarchyTokenizerDescriptor Delimiter(string? delimiter) - { - DelimiterValue = delimiter; - return Self; - } - - public PathHierarchyTokenizerDescriptor Replacement(string? replacement) - { - ReplacementValue = replacement; - return Self; - } - - public PathHierarchyTokenizerDescriptor Reverse(bool? reverse = true) - { - ReverseValue = reverse; - return Self; - } - - public PathHierarchyTokenizerDescriptor Skip(int? skip) - { - SkipValue = skip; - return Self; - } - - public PathHierarchyTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BufferSizeValue.HasValue) - { - writer.WritePropertyName("buffer_size"); - writer.WriteNumberValue(BufferSizeValue.Value); - } - - if (!string.IsNullOrEmpty(DelimiterValue)) - { - writer.WritePropertyName("delimiter"); - writer.WriteStringValue(DelimiterValue); - } - - if (!string.IsNullOrEmpty(ReplacementValue)) - { - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - } - - if (ReverseValue.HasValue) - { - writer.WritePropertyName("reverse"); - writer.WriteBooleanValue(ReverseValue.Value); - } - - if (SkipValue.HasValue) - { - writer.WritePropertyName("skip"); - writer.WriteNumberValue(SkipValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("path_hierarchy"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PathHierarchyTokenizer IBuildableDescriptor.Build() => new() - { - BufferSize = BufferSizeValue, - Delimiter = DelimiterValue, - Replacement = ReplacementValue, - Reverse = ReverseValue, - Skip = SkipValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternAnalyzer.g.cs deleted file mode 100644 index 93bf278a294..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternAnalyzer.g.cs +++ /dev/null @@ -1,135 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PatternAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("flags")] - public string? Flags { get; set; } - [JsonInclude, JsonPropertyName("lowercase")] - public bool? Lowercase { get; set; } - [JsonInclude, JsonPropertyName("pattern")] - public string Pattern { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "pattern"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PatternAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PatternAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public PatternAnalyzerDescriptor() : base() - { - } - - private string? FlagsValue { get; set; } - private bool? LowercaseValue { get; set; } - private string PatternValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? VersionValue { get; set; } - - public PatternAnalyzerDescriptor Flags(string? flags) - { - FlagsValue = flags; - return Self; - } - - public PatternAnalyzerDescriptor Lowercase(bool? lowercase = true) - { - LowercaseValue = lowercase; - return Self; - } - - public PatternAnalyzerDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - public PatternAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public PatternAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FlagsValue)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(FlagsValue); - } - - if (LowercaseValue.HasValue) - { - writer.WritePropertyName("lowercase"); - writer.WriteBooleanValue(LowercaseValue.Value); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("pattern"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PatternAnalyzer IBuildableDescriptor.Build() => new() - { - Flags = FlagsValue, - Lowercase = LowercaseValue, - Pattern = PatternValue, - Stopwords = StopwordsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs deleted file mode 100644 index 11b89a48d0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs +++ /dev/null @@ -1,102 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PatternCaptureTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("patterns")] - public ICollection Patterns { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "pattern_capture"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PatternCaptureTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PatternCaptureTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public PatternCaptureTokenFilterDescriptor() : base() - { - } - - private ICollection PatternsValue { get; set; } - private bool? PreserveOriginalValue { get; set; } - private string? VersionValue { get; set; } - - public PatternCaptureTokenFilterDescriptor Patterns(ICollection patterns) - { - PatternsValue = patterns; - return Self; - } - - public PatternCaptureTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public PatternCaptureTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("patterns"); - JsonSerializer.Serialize(writer, PatternsValue, options); - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("pattern_capture"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PatternCaptureTokenFilter IBuildableDescriptor.Build() => new() - { - Patterns = PatternsValue, - PreserveOriginal = PreserveOriginalValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs deleted file mode 100644 index dc98f7d7eea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceCharFilter.g.cs +++ /dev/null @@ -1,118 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PatternReplaceCharFilter : ICharFilter -{ - [JsonInclude, JsonPropertyName("flags")] - public string? Flags { get; set; } - [JsonInclude, JsonPropertyName("pattern")] - public string Pattern { get; set; } - [JsonInclude, JsonPropertyName("replacement")] - public string? Replacement { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "pattern_replace"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PatternReplaceCharFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PatternReplaceCharFilterDescriptor(Action configure) => configure.Invoke(this); - - public PatternReplaceCharFilterDescriptor() : base() - { - } - - private string? FlagsValue { get; set; } - private string PatternValue { get; set; } - private string? ReplacementValue { get; set; } - private string? VersionValue { get; set; } - - public PatternReplaceCharFilterDescriptor Flags(string? flags) - { - FlagsValue = flags; - return Self; - } - - public PatternReplaceCharFilterDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - public PatternReplaceCharFilterDescriptor Replacement(string? replacement) - { - ReplacementValue = replacement; - return Self; - } - - public PatternReplaceCharFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FlagsValue)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(FlagsValue); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (!string.IsNullOrEmpty(ReplacementValue)) - { - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("pattern_replace"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PatternReplaceCharFilter IBuildableDescriptor.Build() => new() - { - Flags = FlagsValue, - Pattern = PatternValue, - Replacement = ReplacementValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs deleted file mode 100644 index 1265acbcfae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs +++ /dev/null @@ -1,134 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PatternReplaceTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("all")] - public bool? All { get; set; } - [JsonInclude, JsonPropertyName("flags")] - public string? Flags { get; set; } - [JsonInclude, JsonPropertyName("pattern")] - public string Pattern { get; set; } - [JsonInclude, JsonPropertyName("replacement")] - public string? Replacement { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "pattern_replace"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PatternReplaceTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PatternReplaceTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public PatternReplaceTokenFilterDescriptor() : base() - { - } - - private bool? AllValue { get; set; } - private string? FlagsValue { get; set; } - private string PatternValue { get; set; } - private string? ReplacementValue { get; set; } - private string? VersionValue { get; set; } - - public PatternReplaceTokenFilterDescriptor All(bool? all = true) - { - AllValue = all; - return Self; - } - - public PatternReplaceTokenFilterDescriptor Flags(string? flags) - { - FlagsValue = flags; - return Self; - } - - public PatternReplaceTokenFilterDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - public PatternReplaceTokenFilterDescriptor Replacement(string? replacement) - { - ReplacementValue = replacement; - return Self; - } - - public PatternReplaceTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllValue.HasValue) - { - writer.WritePropertyName("all"); - writer.WriteBooleanValue(AllValue.Value); - } - - if (!string.IsNullOrEmpty(FlagsValue)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(FlagsValue); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (!string.IsNullOrEmpty(ReplacementValue)) - { - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("pattern_replace"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PatternReplaceTokenFilter IBuildableDescriptor.Build() => new() - { - All = AllValue, - Flags = FlagsValue, - Pattern = PatternValue, - Replacement = ReplacementValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternTokenizer.g.cs deleted file mode 100644 index d893220c095..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PatternTokenizer.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PatternTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("flags")] - public string? Flags { get; set; } - [JsonInclude, JsonPropertyName("group")] - public int? Group { get; set; } - [JsonInclude, JsonPropertyName("pattern")] - public string? Pattern { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "pattern"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PatternTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PatternTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public PatternTokenizerDescriptor() : base() - { - } - - private string? FlagsValue { get; set; } - private int? GroupValue { get; set; } - private string? PatternValue { get; set; } - private string? VersionValue { get; set; } - - public PatternTokenizerDescriptor Flags(string? flags) - { - FlagsValue = flags; - return Self; - } - - public PatternTokenizerDescriptor Group(int? group) - { - GroupValue = group; - return Self; - } - - public PatternTokenizerDescriptor Pattern(string? pattern) - { - PatternValue = pattern; - return Self; - } - - public PatternTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FlagsValue)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(FlagsValue); - } - - if (GroupValue.HasValue) - { - writer.WritePropertyName("group"); - writer.WriteNumberValue(GroupValue.Value); - } - - if (!string.IsNullOrEmpty(PatternValue)) - { - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("pattern"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PatternTokenizer IBuildableDescriptor.Build() => new() - { - Flags = FlagsValue, - Group = GroupValue, - Pattern = PatternValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PersianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PersianAnalyzer.g.cs deleted file mode 100644 index ea3eaf1c040..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PersianAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PersianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "persian"; -} - -public sealed partial class PersianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PersianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public PersianAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public PersianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public PersianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("persian"); - writer.WriteEndObject(); - } - - PersianAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs deleted file mode 100644 index 3a1e45c2e51..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs +++ /dev/null @@ -1,167 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PhoneticTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("encoder")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticEncoder Encoder { get; set; } - [JsonInclude, JsonPropertyName("languageset")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticLanguage))] - public ICollection? Languageset { get; set; } - [JsonInclude, JsonPropertyName("max_code_len")] - public int? MaxCodeLen { get; set; } - [JsonInclude, JsonPropertyName("name_type")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticNameType? NameType { get; set; } - [JsonInclude, JsonPropertyName("replace")] - public bool? Replace { get; set; } - [JsonInclude, JsonPropertyName("rule_type")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticRuleType? RuleType { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "phonetic"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PhoneticTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PhoneticTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public PhoneticTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticEncoder EncoderValue { get; set; } - private ICollection? LanguagesetValue { get; set; } - private int? MaxCodeLenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticNameType? NameTypeValue { get; set; } - private bool? ReplaceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticRuleType? RuleTypeValue { get; set; } - private string? VersionValue { get; set; } - - public PhoneticTokenFilterDescriptor Encoder(Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticEncoder encoder) - { - EncoderValue = encoder; - return Self; - } - - public PhoneticTokenFilterDescriptor Languageset(ICollection? languageset) - { - LanguagesetValue = languageset; - return Self; - } - - public PhoneticTokenFilterDescriptor MaxCodeLen(int? maxCodeLen) - { - MaxCodeLenValue = maxCodeLen; - return Self; - } - - public PhoneticTokenFilterDescriptor NameType(Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticNameType? nameType) - { - NameTypeValue = nameType; - return Self; - } - - public PhoneticTokenFilterDescriptor Replace(bool? replace = true) - { - ReplaceValue = replace; - return Self; - } - - public PhoneticTokenFilterDescriptor RuleType(Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticRuleType? ruleType) - { - RuleTypeValue = ruleType; - return Self; - } - - public PhoneticTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("encoder"); - JsonSerializer.Serialize(writer, EncoderValue, options); - if (LanguagesetValue is not null) - { - writer.WritePropertyName("languageset"); - SingleOrManySerializationHelper.Serialize(LanguagesetValue, writer, options); - } - - if (MaxCodeLenValue.HasValue) - { - writer.WritePropertyName("max_code_len"); - writer.WriteNumberValue(MaxCodeLenValue.Value); - } - - if (NameTypeValue is not null) - { - writer.WritePropertyName("name_type"); - JsonSerializer.Serialize(writer, NameTypeValue, options); - } - - if (ReplaceValue.HasValue) - { - writer.WritePropertyName("replace"); - writer.WriteBooleanValue(ReplaceValue.Value); - } - - if (RuleTypeValue is not null) - { - writer.WritePropertyName("rule_type"); - JsonSerializer.Serialize(writer, RuleTypeValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("phonetic"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PhoneticTokenFilter IBuildableDescriptor.Build() => new() - { - Encoder = EncoderValue, - Languageset = LanguagesetValue, - MaxCodeLen = MaxCodeLenValue, - NameType = NameTypeValue, - Replace = ReplaceValue, - RuleType = RuleTypeValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs deleted file mode 100644 index 8ba04f094a8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PorterStemTokenFilter.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PorterStemTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "porter_stem"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PorterStemTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PorterStemTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public PorterStemTokenFilterDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public PorterStemTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("porter_stem"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - PorterStemTokenFilter IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PortugueseAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PortugueseAnalyzer.g.cs deleted file mode 100644 index 0344ea7173f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PortugueseAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PortugueseAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "portuguese"; -} - -public sealed partial class PortugueseAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PortugueseAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public PortugueseAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public PortugueseAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public PortugueseAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public PortugueseAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("portuguese"); - writer.WriteEndObject(); - } - - PortugueseAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PredicateTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PredicateTokenFilter.g.cs deleted file mode 100644 index e80194acd42..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/PredicateTokenFilter.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class PredicateTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "predicate_token_filter"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class PredicateTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PredicateTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public PredicateTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? VersionValue { get; set; } - - public PredicateTokenFilterDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public PredicateTokenFilterDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public PredicateTokenFilterDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public PredicateTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("predicate_token_filter"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - PredicateTokenFilter IBuildableDescriptor.Build() => new() - { - Script = BuildScript(), - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs deleted file mode 100644 index d9b5a4654d4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RemoveDuplicatesTokenFilter.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class RemoveDuplicatesTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "remove_duplicates"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class RemoveDuplicatesTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal RemoveDuplicatesTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public RemoveDuplicatesTokenFilterDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public RemoveDuplicatesTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("remove_duplicates"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - RemoveDuplicatesTokenFilter IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ReverseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ReverseTokenFilter.g.cs deleted file mode 100644 index 1664a9991dd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ReverseTokenFilter.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ReverseTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "reverse"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class ReverseTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ReverseTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public ReverseTokenFilterDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public ReverseTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("reverse"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - ReverseTokenFilter IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RomanianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RomanianAnalyzer.g.cs deleted file mode 100644 index 37809cd82ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RomanianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class RomanianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "romanian"; -} - -public sealed partial class RomanianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal RomanianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public RomanianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public RomanianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public RomanianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public RomanianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("romanian"); - writer.WriteEndObject(); - } - - RomanianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RussianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RussianAnalyzer.g.cs deleted file mode 100644 index 8547f3c2ad7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/RussianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class RussianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "russian"; -} - -public sealed partial class RussianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal RussianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public RussianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public RussianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public RussianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public RussianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("russian"); - writer.WriteEndObject(); - } - - RussianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SerbianAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SerbianAnalyzer.g.cs deleted file mode 100644 index 9e978353e75..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SerbianAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SerbianAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "serbian"; -} - -public sealed partial class SerbianAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SerbianAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public SerbianAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public SerbianAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public SerbianAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public SerbianAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("serbian"); - writer.WriteEndObject(); - } - - SerbianAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ShingleTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ShingleTokenFilter.g.cs deleted file mode 100644 index 5a01cbb2009..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ShingleTokenFilter.g.cs +++ /dev/null @@ -1,170 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ShingleTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("filler_token")] - public string? FillerToken { get; set; } - [JsonInclude, JsonPropertyName("max_shingle_size")] - public object? MaxShingleSize { get; set; } - [JsonInclude, JsonPropertyName("min_shingle_size")] - public object? MinShingleSize { get; set; } - [JsonInclude, JsonPropertyName("output_unigrams")] - public bool? OutputUnigrams { get; set; } - [JsonInclude, JsonPropertyName("output_unigrams_if_no_shingles")] - public bool? OutputUnigramsIfNoShingles { get; set; } - [JsonInclude, JsonPropertyName("token_separator")] - public string? TokenSeparator { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "shingle"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class ShingleTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ShingleTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public ShingleTokenFilterDescriptor() : base() - { - } - - private string? FillerTokenValue { get; set; } - private object? MaxShingleSizeValue { get; set; } - private object? MinShingleSizeValue { get; set; } - private bool? OutputUnigramsValue { get; set; } - private bool? OutputUnigramsIfNoShinglesValue { get; set; } - private string? TokenSeparatorValue { get; set; } - private string? VersionValue { get; set; } - - public ShingleTokenFilterDescriptor FillerToken(string? fillerToken) - { - FillerTokenValue = fillerToken; - return Self; - } - - public ShingleTokenFilterDescriptor MaxShingleSize(object? maxShingleSize) - { - MaxShingleSizeValue = maxShingleSize; - return Self; - } - - public ShingleTokenFilterDescriptor MinShingleSize(object? minShingleSize) - { - MinShingleSizeValue = minShingleSize; - return Self; - } - - public ShingleTokenFilterDescriptor OutputUnigrams(bool? outputUnigrams = true) - { - OutputUnigramsValue = outputUnigrams; - return Self; - } - - public ShingleTokenFilterDescriptor OutputUnigramsIfNoShingles(bool? outputUnigramsIfNoShingles = true) - { - OutputUnigramsIfNoShinglesValue = outputUnigramsIfNoShingles; - return Self; - } - - public ShingleTokenFilterDescriptor TokenSeparator(string? tokenSeparator) - { - TokenSeparatorValue = tokenSeparator; - return Self; - } - - public ShingleTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FillerTokenValue)) - { - writer.WritePropertyName("filler_token"); - writer.WriteStringValue(FillerTokenValue); - } - - if (MaxShingleSizeValue is not null) - { - writer.WritePropertyName("max_shingle_size"); - JsonSerializer.Serialize(writer, MaxShingleSizeValue, options); - } - - if (MinShingleSizeValue is not null) - { - writer.WritePropertyName("min_shingle_size"); - JsonSerializer.Serialize(writer, MinShingleSizeValue, options); - } - - if (OutputUnigramsValue.HasValue) - { - writer.WritePropertyName("output_unigrams"); - writer.WriteBooleanValue(OutputUnigramsValue.Value); - } - - if (OutputUnigramsIfNoShinglesValue.HasValue) - { - writer.WritePropertyName("output_unigrams_if_no_shingles"); - writer.WriteBooleanValue(OutputUnigramsIfNoShinglesValue.Value); - } - - if (!string.IsNullOrEmpty(TokenSeparatorValue)) - { - writer.WritePropertyName("token_separator"); - writer.WriteStringValue(TokenSeparatorValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("shingle"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - ShingleTokenFilter IBuildableDescriptor.Build() => new() - { - FillerToken = FillerTokenValue, - MaxShingleSize = MaxShingleSizeValue, - MinShingleSize = MinShingleSizeValue, - OutputUnigrams = OutputUnigramsValue, - OutputUnigramsIfNoShingles = OutputUnigramsIfNoShinglesValue, - TokenSeparator = TokenSeparatorValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimpleAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimpleAnalyzer.g.cs deleted file mode 100644 index 9a175339f6c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimpleAnalyzer.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SimpleAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "simple"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SimpleAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SimpleAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public SimpleAnalyzerDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public SimpleAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("simple"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SimpleAnalyzer IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs deleted file mode 100644 index 7953d768925..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SimplePatternSplitTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("pattern")] - public string? Pattern { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "simple_pattern_split"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SimplePatternSplitTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SimplePatternSplitTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public SimplePatternSplitTokenizerDescriptor() : base() - { - } - - private string? PatternValue { get; set; } - private string? VersionValue { get; set; } - - public SimplePatternSplitTokenizerDescriptor Pattern(string? pattern) - { - PatternValue = pattern; - return Self; - } - - public SimplePatternSplitTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(PatternValue)) - { - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("simple_pattern_split"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SimplePatternSplitTokenizer IBuildableDescriptor.Build() => new() - { - Pattern = PatternValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs deleted file mode 100644 index 922ae85dd8e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SimplePatternTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("pattern")] - public string? Pattern { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "simple_pattern"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SimplePatternTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SimplePatternTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public SimplePatternTokenizerDescriptor() : base() - { - } - - private string? PatternValue { get; set; } - private string? VersionValue { get; set; } - - public SimplePatternTokenizerDescriptor Pattern(string? pattern) - { - PatternValue = pattern; - return Self; - } - - public SimplePatternTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(PatternValue)) - { - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("simple_pattern"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SimplePatternTokenizer IBuildableDescriptor.Build() => new() - { - Pattern = PatternValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballAnalyzer.g.cs deleted file mode 100644 index 98cb613c3b6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballAnalyzer.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SnowballAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("language")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballLanguage Language { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "snowball"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SnowballAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SnowballAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public SnowballAnalyzerDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballLanguage LanguageValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? VersionValue { get; set; } - - public SnowballAnalyzerDescriptor Language(Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballLanguage language) - { - LanguageValue = language; - return Self; - } - - public SnowballAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public SnowballAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("language"); - JsonSerializer.Serialize(writer, LanguageValue, options); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("snowball"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SnowballAnalyzer IBuildableDescriptor.Build() => new() - { - Language = LanguageValue, - Stopwords = StopwordsValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballTokenFilter.g.cs deleted file mode 100644 index 73a4eb08848..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SnowballTokenFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SnowballTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("language")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballLanguage? Language { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "snowball"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SnowballTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SnowballTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public SnowballTokenFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballLanguage? LanguageValue { get; set; } - private string? VersionValue { get; set; } - - public SnowballTokenFilterDescriptor Language(Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballLanguage? language) - { - LanguageValue = language; - return Self; - } - - public SnowballTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LanguageValue is not null) - { - writer.WritePropertyName("language"); - JsonSerializer.Serialize(writer, LanguageValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("snowball"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SnowballTokenFilter IBuildableDescriptor.Build() => new() - { - Language = LanguageValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SoraniAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SoraniAnalyzer.g.cs deleted file mode 100644 index f96bef1f1c9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SoraniAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SoraniAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "sorani"; -} - -public sealed partial class SoraniAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SoraniAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public SoraniAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public SoraniAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public SoraniAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public SoraniAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("sorani"); - writer.WriteEndObject(); - } - - SoraniAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SpanishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SpanishAnalyzer.g.cs deleted file mode 100644 index 7c67c7c246e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SpanishAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SpanishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "spanish"; -} - -public sealed partial class SpanishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SpanishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public SpanishAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public SpanishAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public SpanishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public SpanishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("spanish"); - writer.WriteEndObject(); - } - - SpanishAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardAnalyzer.g.cs deleted file mode 100644 index e064b2c5e0a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class StandardAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("max_token_length")] - public int? MaxTokenLength { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "standard"; -} - -public sealed partial class StandardAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal StandardAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public StandardAnalyzerDescriptor() : base() - { - } - - private int? MaxTokenLengthValue { get; set; } - private ICollection? StopwordsValue { get; set; } - - public StandardAnalyzerDescriptor MaxTokenLength(int? maxTokenLength) - { - MaxTokenLengthValue = maxTokenLength; - return Self; - } - - public StandardAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenLengthValue.HasValue) - { - writer.WritePropertyName("max_token_length"); - writer.WriteNumberValue(MaxTokenLengthValue.Value); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("standard"); - writer.WriteEndObject(); - } - - StandardAnalyzer IBuildableDescriptor.Build() => new() - { - MaxTokenLength = MaxTokenLengthValue, - Stopwords = StopwordsValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardTokenizer.g.cs deleted file mode 100644 index 9b1ce518ed7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StandardTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class StandardTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("max_token_length")] - public int? MaxTokenLength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "standard"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class StandardTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal StandardTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public StandardTokenizerDescriptor() : base() - { - } - - private int? MaxTokenLengthValue { get; set; } - private string? VersionValue { get; set; } - - public StandardTokenizerDescriptor MaxTokenLength(int? maxTokenLength) - { - MaxTokenLengthValue = maxTokenLength; - return Self; - } - - public StandardTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenLengthValue.HasValue) - { - writer.WritePropertyName("max_token_length"); - writer.WriteNumberValue(MaxTokenLengthValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("standard"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - StandardTokenizer IBuildableDescriptor.Build() => new() - { - MaxTokenLength = MaxTokenLengthValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs deleted file mode 100644 index 9a84a06184d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerOverrideTokenFilter.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class StemmerOverrideTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("rules")] - public ICollection? Rules { get; set; } - [JsonInclude, JsonPropertyName("rules_path")] - public string? RulesPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "stemmer_override"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class StemmerOverrideTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal StemmerOverrideTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public StemmerOverrideTokenFilterDescriptor() : base() - { - } - - private ICollection? RulesValue { get; set; } - private string? RulesPathValue { get; set; } - private string? VersionValue { get; set; } - - public StemmerOverrideTokenFilterDescriptor Rules(ICollection? rules) - { - RulesValue = rules; - return Self; - } - - public StemmerOverrideTokenFilterDescriptor RulesPath(string? rulesPath) - { - RulesPathValue = rulesPath; - return Self; - } - - public StemmerOverrideTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (RulesValue is not null) - { - writer.WritePropertyName("rules"); - JsonSerializer.Serialize(writer, RulesValue, options); - } - - if (!string.IsNullOrEmpty(RulesPathValue)) - { - writer.WritePropertyName("rules_path"); - writer.WriteStringValue(RulesPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("stemmer_override"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - StemmerOverrideTokenFilter IBuildableDescriptor.Build() => new() - { - Rules = RulesValue, - RulesPath = RulesPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerTokenFilter.g.cs deleted file mode 100644 index 3803785787e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StemmerTokenFilter.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -internal sealed partial class StemmerTokenFilterConverter : JsonConverter -{ - public override StemmerTokenFilter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new StemmerTokenFilter(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "language" || property == "name") - { - variant.Language = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, StemmerTokenFilter value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Language)) - { - writer.WritePropertyName("language"); - writer.WriteStringValue(value.Language); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("stemmer"); - if (!string.IsNullOrEmpty(value.Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(value.Version); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(StemmerTokenFilterConverter))] -public sealed partial class StemmerTokenFilter : ITokenFilter -{ - public string? Language { get; set; } - - public string Type => "stemmer"; - - public string? Version { get; set; } -} - -public sealed partial class StemmerTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal StemmerTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public StemmerTokenFilterDescriptor() : base() - { - } - - private string? LanguageValue { get; set; } - private string? VersionValue { get; set; } - - public StemmerTokenFilterDescriptor Language(string? language) - { - LanguageValue = language; - return Self; - } - - public StemmerTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(LanguageValue)) - { - writer.WritePropertyName("language"); - writer.WriteStringValue(LanguageValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("stemmer"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - StemmerTokenFilter IBuildableDescriptor.Build() => new() - { - Language = LanguageValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopAnalyzer.g.cs deleted file mode 100644 index 29e73833d84..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopAnalyzer.g.cs +++ /dev/null @@ -1,107 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class StopAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "stop"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class StopAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal StopAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public StopAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - private string? VersionValue { get; set; } - - public StopAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public StopAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - public StopAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("stop"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - StopAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopTokenFilter.g.cs deleted file mode 100644 index 59989df0afc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/StopTokenFilter.g.cs +++ /dev/null @@ -1,139 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class StopTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("ignore_case")] - public bool? IgnoreCase { get; set; } - [JsonInclude, JsonPropertyName("remove_trailing")] - public bool? RemoveTrailing { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "stop"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class StopTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal StopTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public StopTokenFilterDescriptor() : base() - { - } - - private bool? IgnoreCaseValue { get; set; } - private bool? RemoveTrailingValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - private string? VersionValue { get; set; } - - public StopTokenFilterDescriptor IgnoreCase(bool? ignoreCase = true) - { - IgnoreCaseValue = ignoreCase; - return Self; - } - - public StopTokenFilterDescriptor RemoveTrailing(bool? removeTrailing = true) - { - RemoveTrailingValue = removeTrailing; - return Self; - } - - public StopTokenFilterDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public StopTokenFilterDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - public StopTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IgnoreCaseValue.HasValue) - { - writer.WritePropertyName("ignore_case"); - writer.WriteBooleanValue(IgnoreCaseValue.Value); - } - - if (RemoveTrailingValue.HasValue) - { - writer.WritePropertyName("remove_trailing"); - writer.WriteBooleanValue(RemoveTrailingValue.Value); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("stop"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - StopTokenFilter IBuildableDescriptor.Build() => new() - { - IgnoreCase = IgnoreCaseValue, - RemoveTrailing = RemoveTrailingValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SwedishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SwedishAnalyzer.g.cs deleted file mode 100644 index ae01149d2e9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SwedishAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SwedishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "swedish"; -} - -public sealed partial class SwedishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SwedishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public SwedishAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public SwedishAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public SwedishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public SwedishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("swedish"); - writer.WriteEndObject(); - } - - SwedishAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs deleted file mode 100644 index 98e5bfa13f1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs +++ /dev/null @@ -1,202 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SynonymGraphTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("expand")] - public bool? Expand { get; set; } - [JsonInclude, JsonPropertyName("format")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymFormat? Format { get; set; } - [JsonInclude, JsonPropertyName("lenient")] - public bool? Lenient { get; set; } - [JsonInclude, JsonPropertyName("synonyms")] - public ICollection? Synonyms { get; set; } - [JsonInclude, JsonPropertyName("synonyms_path")] - public string? SynonymsPath { get; set; } - [JsonInclude, JsonPropertyName("synonyms_set")] - public string? SynonymsSet { get; set; } - [JsonInclude, JsonPropertyName("tokenizer")] - public string? Tokenizer { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "synonym_graph"; - - [JsonInclude, JsonPropertyName("updateable")] - public bool? Updateable { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SynonymGraphTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SynonymGraphTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public SynonymGraphTokenFilterDescriptor() : base() - { - } - - private bool? ExpandValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymFormat? FormatValue { get; set; } - private bool? LenientValue { get; set; } - private ICollection? SynonymsValue { get; set; } - private string? SynonymsPathValue { get; set; } - private string? SynonymsSetValue { get; set; } - private string? TokenizerValue { get; set; } - private bool? UpdateableValue { get; set; } - private string? VersionValue { get; set; } - - public SynonymGraphTokenFilterDescriptor Expand(bool? expand = true) - { - ExpandValue = expand; - return Self; - } - - public SynonymGraphTokenFilterDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymFormat? format) - { - FormatValue = format; - return Self; - } - - public SynonymGraphTokenFilterDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - public SynonymGraphTokenFilterDescriptor Synonyms(ICollection? synonyms) - { - SynonymsValue = synonyms; - return Self; - } - - public SynonymGraphTokenFilterDescriptor SynonymsPath(string? synonymsPath) - { - SynonymsPathValue = synonymsPath; - return Self; - } - - public SynonymGraphTokenFilterDescriptor SynonymsSet(string? synonymsSet) - { - SynonymsSetValue = synonymsSet; - return Self; - } - - public SynonymGraphTokenFilterDescriptor Tokenizer(string? tokenizer) - { - TokenizerValue = tokenizer; - return Self; - } - - public SynonymGraphTokenFilterDescriptor Updateable(bool? updateable = true) - { - UpdateableValue = updateable; - return Self; - } - - public SynonymGraphTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExpandValue.HasValue) - { - writer.WritePropertyName("expand"); - writer.WriteBooleanValue(ExpandValue.Value); - } - - if (FormatValue is not null) - { - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, FormatValue, options); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (SynonymsValue is not null) - { - writer.WritePropertyName("synonyms"); - JsonSerializer.Serialize(writer, SynonymsValue, options); - } - - if (!string.IsNullOrEmpty(SynonymsPathValue)) - { - writer.WritePropertyName("synonyms_path"); - writer.WriteStringValue(SynonymsPathValue); - } - - if (!string.IsNullOrEmpty(SynonymsSetValue)) - { - writer.WritePropertyName("synonyms_set"); - writer.WriteStringValue(SynonymsSetValue); - } - - if (!string.IsNullOrEmpty(TokenizerValue)) - { - writer.WritePropertyName("tokenizer"); - writer.WriteStringValue(TokenizerValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("synonym_graph"); - if (UpdateableValue.HasValue) - { - writer.WritePropertyName("updateable"); - writer.WriteBooleanValue(UpdateableValue.Value); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SynonymGraphTokenFilter IBuildableDescriptor.Build() => new() - { - Expand = ExpandValue, - Format = FormatValue, - Lenient = LenientValue, - Synonyms = SynonymsValue, - SynonymsPath = SynonymsPathValue, - SynonymsSet = SynonymsSetValue, - Tokenizer = TokenizerValue, - Updateable = UpdateableValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs deleted file mode 100644 index 979debe0f23..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs +++ /dev/null @@ -1,202 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class SynonymTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("expand")] - public bool? Expand { get; set; } - [JsonInclude, JsonPropertyName("format")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymFormat? Format { get; set; } - [JsonInclude, JsonPropertyName("lenient")] - public bool? Lenient { get; set; } - [JsonInclude, JsonPropertyName("synonyms")] - public ICollection? Synonyms { get; set; } - [JsonInclude, JsonPropertyName("synonyms_path")] - public string? SynonymsPath { get; set; } - [JsonInclude, JsonPropertyName("synonyms_set")] - public string? SynonymsSet { get; set; } - [JsonInclude, JsonPropertyName("tokenizer")] - public string? Tokenizer { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "synonym"; - - [JsonInclude, JsonPropertyName("updateable")] - public bool? Updateable { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class SynonymTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SynonymTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public SynonymTokenFilterDescriptor() : base() - { - } - - private bool? ExpandValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymFormat? FormatValue { get; set; } - private bool? LenientValue { get; set; } - private ICollection? SynonymsValue { get; set; } - private string? SynonymsPathValue { get; set; } - private string? SynonymsSetValue { get; set; } - private string? TokenizerValue { get; set; } - private bool? UpdateableValue { get; set; } - private string? VersionValue { get; set; } - - public SynonymTokenFilterDescriptor Expand(bool? expand = true) - { - ExpandValue = expand; - return Self; - } - - public SynonymTokenFilterDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymFormat? format) - { - FormatValue = format; - return Self; - } - - public SynonymTokenFilterDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - public SynonymTokenFilterDescriptor Synonyms(ICollection? synonyms) - { - SynonymsValue = synonyms; - return Self; - } - - public SynonymTokenFilterDescriptor SynonymsPath(string? synonymsPath) - { - SynonymsPathValue = synonymsPath; - return Self; - } - - public SynonymTokenFilterDescriptor SynonymsSet(string? synonymsSet) - { - SynonymsSetValue = synonymsSet; - return Self; - } - - public SynonymTokenFilterDescriptor Tokenizer(string? tokenizer) - { - TokenizerValue = tokenizer; - return Self; - } - - public SynonymTokenFilterDescriptor Updateable(bool? updateable = true) - { - UpdateableValue = updateable; - return Self; - } - - public SynonymTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExpandValue.HasValue) - { - writer.WritePropertyName("expand"); - writer.WriteBooleanValue(ExpandValue.Value); - } - - if (FormatValue is not null) - { - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, FormatValue, options); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (SynonymsValue is not null) - { - writer.WritePropertyName("synonyms"); - JsonSerializer.Serialize(writer, SynonymsValue, options); - } - - if (!string.IsNullOrEmpty(SynonymsPathValue)) - { - writer.WritePropertyName("synonyms_path"); - writer.WriteStringValue(SynonymsPathValue); - } - - if (!string.IsNullOrEmpty(SynonymsSetValue)) - { - writer.WritePropertyName("synonyms_set"); - writer.WriteStringValue(SynonymsSetValue); - } - - if (!string.IsNullOrEmpty(TokenizerValue)) - { - writer.WritePropertyName("tokenizer"); - writer.WriteStringValue(TokenizerValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("synonym"); - if (UpdateableValue.HasValue) - { - writer.WritePropertyName("updateable"); - writer.WriteBooleanValue(UpdateableValue.Value); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - SynonymTokenFilter IBuildableDescriptor.Build() => new() - { - Expand = ExpandValue, - Format = FormatValue, - Lenient = LenientValue, - Synonyms = SynonymsValue, - SynonymsPath = SynonymsPathValue, - SynonymsSet = SynonymsSetValue, - Tokenizer = TokenizerValue, - Updateable = UpdateableValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiAnalyzer.g.cs deleted file mode 100644 index bdf26a797f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiAnalyzer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ThaiAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "thai"; -} - -public sealed partial class ThaiAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ThaiAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public ThaiAnalyzerDescriptor() : base() - { - } - - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public ThaiAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public ThaiAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("thai"); - writer.WriteEndObject(); - } - - ThaiAnalyzer IBuildableDescriptor.Build() => new() - { - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs deleted file mode 100644 index 3d31fe4eadc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class ThaiTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "thai"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class ThaiTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ThaiTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public ThaiTokenizerDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public ThaiTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("thai"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - ThaiTokenizer IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TokenFilters.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TokenFilters.g.cs deleted file mode 100644 index 5d05ae0174c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TokenFilters.g.cs +++ /dev/null @@ -1,489 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public partial class TokenFilters : IsADictionary -{ - public TokenFilters() - { - } - - public TokenFilters(IDictionary container) : base(container) - { - } - - public void Add(string name, ITokenFilter tokenFilter) => BackingDictionary.Add(Sanitize(name), tokenFilter); - public bool TryGetTokenFilter(string name, [NotNullWhen(returnValue: true)] out ITokenFilter tokenFilter) => BackingDictionary.TryGetValue(Sanitize(name), out tokenFilter); - - public bool TryGetTokenFilter(string name, [NotNullWhen(returnValue: true)] out T? tokenFilter) where T : class, ITokenFilter - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - tokenFilter = finalValue; - return true; - } - - tokenFilter = null; - return false; - } -} - -public sealed partial class TokenFiltersDescriptor : IsADictionaryDescriptor -{ - public TokenFiltersDescriptor() : base(new TokenFilters()) - { - } - - public TokenFiltersDescriptor(TokenFilters tokenFilters) : base(tokenFilters ?? new TokenFilters()) - { - } - - public TokenFiltersDescriptor AsciiFolding(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor AsciiFolding(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor AsciiFolding(string tokenFilterName, AsciiFoldingTokenFilter asciiFoldingTokenFilter) => AssignVariant(tokenFilterName, asciiFoldingTokenFilter); - public TokenFiltersDescriptor CommonGrams(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor CommonGrams(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor CommonGrams(string tokenFilterName, CommonGramsTokenFilter commonGramsTokenFilter) => AssignVariant(tokenFilterName, commonGramsTokenFilter); - public TokenFiltersDescriptor Condition(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Condition(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Condition(string tokenFilterName, ConditionTokenFilter conditionTokenFilter) => AssignVariant(tokenFilterName, conditionTokenFilter); - public TokenFiltersDescriptor DelimitedPayload(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor DelimitedPayload(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor DelimitedPayload(string tokenFilterName, DelimitedPayloadTokenFilter delimitedPayloadTokenFilter) => AssignVariant(tokenFilterName, delimitedPayloadTokenFilter); - public TokenFiltersDescriptor DictionaryDecompounder(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor DictionaryDecompounder(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor DictionaryDecompounder(string tokenFilterName, DictionaryDecompounderTokenFilter dictionaryDecompounderTokenFilter) => AssignVariant(tokenFilterName, dictionaryDecompounderTokenFilter); - public TokenFiltersDescriptor EdgeNGram(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor EdgeNGram(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor EdgeNGram(string tokenFilterName, EdgeNGramTokenFilter edgeNGramTokenFilter) => AssignVariant(tokenFilterName, edgeNGramTokenFilter); - public TokenFiltersDescriptor Elision(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Elision(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Elision(string tokenFilterName, ElisionTokenFilter elisionTokenFilter) => AssignVariant(tokenFilterName, elisionTokenFilter); - public TokenFiltersDescriptor Fingerprint(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Fingerprint(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Fingerprint(string tokenFilterName, FingerprintTokenFilter fingerprintTokenFilter) => AssignVariant(tokenFilterName, fingerprintTokenFilter); - public TokenFiltersDescriptor Hunspell(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Hunspell(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Hunspell(string tokenFilterName, HunspellTokenFilter hunspellTokenFilter) => AssignVariant(tokenFilterName, hunspellTokenFilter); - public TokenFiltersDescriptor HyphenationDecompounder(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor HyphenationDecompounder(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor HyphenationDecompounder(string tokenFilterName, HyphenationDecompounderTokenFilter hyphenationDecompounderTokenFilter) => AssignVariant(tokenFilterName, hyphenationDecompounderTokenFilter); - public TokenFiltersDescriptor IcuCollation(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor IcuCollation(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor IcuCollation(string tokenFilterName, IcuCollationTokenFilter icuCollationTokenFilter) => AssignVariant(tokenFilterName, icuCollationTokenFilter); - public TokenFiltersDescriptor IcuFolding(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor IcuFolding(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor IcuFolding(string tokenFilterName, IcuFoldingTokenFilter icuFoldingTokenFilter) => AssignVariant(tokenFilterName, icuFoldingTokenFilter); - public TokenFiltersDescriptor IcuNormalization(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor IcuNormalization(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor IcuNormalization(string tokenFilterName, IcuNormalizationTokenFilter icuNormalizationTokenFilter) => AssignVariant(tokenFilterName, icuNormalizationTokenFilter); - public TokenFiltersDescriptor IcuTransform(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor IcuTransform(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor IcuTransform(string tokenFilterName, IcuTransformTokenFilter icuTransformTokenFilter) => AssignVariant(tokenFilterName, icuTransformTokenFilter); - public TokenFiltersDescriptor KeepTypes(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KeepTypes(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KeepTypes(string tokenFilterName, KeepTypesTokenFilter keepTypesTokenFilter) => AssignVariant(tokenFilterName, keepTypesTokenFilter); - public TokenFiltersDescriptor KeepWords(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KeepWords(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KeepWords(string tokenFilterName, KeepWordsTokenFilter keepWordsTokenFilter) => AssignVariant(tokenFilterName, keepWordsTokenFilter); - public TokenFiltersDescriptor KeywordMarker(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KeywordMarker(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KeywordMarker(string tokenFilterName, KeywordMarkerTokenFilter keywordMarkerTokenFilter) => AssignVariant(tokenFilterName, keywordMarkerTokenFilter); - public TokenFiltersDescriptor KStem(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KStem(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KStem(string tokenFilterName, KStemTokenFilter kStemTokenFilter) => AssignVariant(tokenFilterName, kStemTokenFilter); - public TokenFiltersDescriptor KuromojiPartOfSpeech(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KuromojiPartOfSpeech(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KuromojiPartOfSpeech(string tokenFilterName, KuromojiPartOfSpeechTokenFilter kuromojiPartOfSpeechTokenFilter) => AssignVariant(tokenFilterName, kuromojiPartOfSpeechTokenFilter); - public TokenFiltersDescriptor KuromojiReadingForm(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KuromojiReadingForm(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KuromojiReadingForm(string tokenFilterName, KuromojiReadingFormTokenFilter kuromojiReadingFormTokenFilter) => AssignVariant(tokenFilterName, kuromojiReadingFormTokenFilter); - public TokenFiltersDescriptor KuromojiStemmer(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor KuromojiStemmer(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor KuromojiStemmer(string tokenFilterName, KuromojiStemmerTokenFilter kuromojiStemmerTokenFilter) => AssignVariant(tokenFilterName, kuromojiStemmerTokenFilter); - public TokenFiltersDescriptor Length(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Length(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Length(string tokenFilterName, LengthTokenFilter lengthTokenFilter) => AssignVariant(tokenFilterName, lengthTokenFilter); - public TokenFiltersDescriptor LimitTokenCount(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor LimitTokenCount(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor LimitTokenCount(string tokenFilterName, LimitTokenCountTokenFilter limitTokenCountTokenFilter) => AssignVariant(tokenFilterName, limitTokenCountTokenFilter); - public TokenFiltersDescriptor Lowercase(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Lowercase(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Lowercase(string tokenFilterName, LowercaseTokenFilter lowercaseTokenFilter) => AssignVariant(tokenFilterName, lowercaseTokenFilter); - public TokenFiltersDescriptor Multiplexer(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Multiplexer(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Multiplexer(string tokenFilterName, MultiplexerTokenFilter multiplexerTokenFilter) => AssignVariant(tokenFilterName, multiplexerTokenFilter); - public TokenFiltersDescriptor NGram(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor NGram(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor NGram(string tokenFilterName, NGramTokenFilter nGramTokenFilter) => AssignVariant(tokenFilterName, nGramTokenFilter); - public TokenFiltersDescriptor NoriPartOfSpeech(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor NoriPartOfSpeech(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor NoriPartOfSpeech(string tokenFilterName, NoriPartOfSpeechTokenFilter noriPartOfSpeechTokenFilter) => AssignVariant(tokenFilterName, noriPartOfSpeechTokenFilter); - public TokenFiltersDescriptor PatternCapture(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor PatternCapture(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor PatternCapture(string tokenFilterName, PatternCaptureTokenFilter patternCaptureTokenFilter) => AssignVariant(tokenFilterName, patternCaptureTokenFilter); - public TokenFiltersDescriptor PatternReplace(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor PatternReplace(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor PatternReplace(string tokenFilterName, PatternReplaceTokenFilter patternReplaceTokenFilter) => AssignVariant(tokenFilterName, patternReplaceTokenFilter); - public TokenFiltersDescriptor Phonetic(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Phonetic(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Phonetic(string tokenFilterName, PhoneticTokenFilter phoneticTokenFilter) => AssignVariant(tokenFilterName, phoneticTokenFilter); - public TokenFiltersDescriptor PorterStem(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor PorterStem(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor PorterStem(string tokenFilterName, PorterStemTokenFilter porterStemTokenFilter) => AssignVariant(tokenFilterName, porterStemTokenFilter); - public TokenFiltersDescriptor Predicate(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Predicate(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Predicate(string tokenFilterName, PredicateTokenFilter predicateTokenFilter) => AssignVariant(tokenFilterName, predicateTokenFilter); - public TokenFiltersDescriptor RemoveDuplicates(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor RemoveDuplicates(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor RemoveDuplicates(string tokenFilterName, RemoveDuplicatesTokenFilter removeDuplicatesTokenFilter) => AssignVariant(tokenFilterName, removeDuplicatesTokenFilter); - public TokenFiltersDescriptor Reverse(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Reverse(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Reverse(string tokenFilterName, ReverseTokenFilter reverseTokenFilter) => AssignVariant(tokenFilterName, reverseTokenFilter); - public TokenFiltersDescriptor Shingle(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Shingle(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Shingle(string tokenFilterName, ShingleTokenFilter shingleTokenFilter) => AssignVariant(tokenFilterName, shingleTokenFilter); - public TokenFiltersDescriptor Snowball(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Snowball(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Snowball(string tokenFilterName, SnowballTokenFilter snowballTokenFilter) => AssignVariant(tokenFilterName, snowballTokenFilter); - public TokenFiltersDescriptor StemmerOverride(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor StemmerOverride(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor StemmerOverride(string tokenFilterName, StemmerOverrideTokenFilter stemmerOverrideTokenFilter) => AssignVariant(tokenFilterName, stemmerOverrideTokenFilter); - public TokenFiltersDescriptor Stemmer(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Stemmer(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Stemmer(string tokenFilterName, StemmerTokenFilter stemmerTokenFilter) => AssignVariant(tokenFilterName, stemmerTokenFilter); - public TokenFiltersDescriptor Stop(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Stop(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Stop(string tokenFilterName, StopTokenFilter stopTokenFilter) => AssignVariant(tokenFilterName, stopTokenFilter); - public TokenFiltersDescriptor SynonymGraph(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor SynonymGraph(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor SynonymGraph(string tokenFilterName, SynonymGraphTokenFilter synonymGraphTokenFilter) => AssignVariant(tokenFilterName, synonymGraphTokenFilter); - public TokenFiltersDescriptor Synonym(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Synonym(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Synonym(string tokenFilterName, SynonymTokenFilter synonymTokenFilter) => AssignVariant(tokenFilterName, synonymTokenFilter); - public TokenFiltersDescriptor Trim(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Trim(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Trim(string tokenFilterName, TrimTokenFilter trimTokenFilter) => AssignVariant(tokenFilterName, trimTokenFilter); - public TokenFiltersDescriptor Truncate(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Truncate(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Truncate(string tokenFilterName, TruncateTokenFilter truncateTokenFilter) => AssignVariant(tokenFilterName, truncateTokenFilter); - public TokenFiltersDescriptor Unique(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Unique(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Unique(string tokenFilterName, UniqueTokenFilter uniqueTokenFilter) => AssignVariant(tokenFilterName, uniqueTokenFilter); - public TokenFiltersDescriptor Uppercase(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor Uppercase(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor Uppercase(string tokenFilterName, UppercaseTokenFilter uppercaseTokenFilter) => AssignVariant(tokenFilterName, uppercaseTokenFilter); - public TokenFiltersDescriptor WordDelimiterGraph(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor WordDelimiterGraph(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor WordDelimiterGraph(string tokenFilterName, WordDelimiterGraphTokenFilter wordDelimiterGraphTokenFilter) => AssignVariant(tokenFilterName, wordDelimiterGraphTokenFilter); - public TokenFiltersDescriptor WordDelimiter(string tokenFilterName) => AssignVariant(tokenFilterName, null); - public TokenFiltersDescriptor WordDelimiter(string tokenFilterName, Action configure) => AssignVariant(tokenFilterName, configure); - public TokenFiltersDescriptor WordDelimiter(string tokenFilterName, WordDelimiterTokenFilter wordDelimiterTokenFilter) => AssignVariant(tokenFilterName, wordDelimiterTokenFilter); -} - -internal sealed partial class TokenFilterInterfaceConverter : JsonConverter -{ - public override ITokenFilter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "asciifolding": - return JsonSerializer.Deserialize(ref reader, options); - case "common_grams": - return JsonSerializer.Deserialize(ref reader, options); - case "condition": - return JsonSerializer.Deserialize(ref reader, options); - case "delimited_payload": - return JsonSerializer.Deserialize(ref reader, options); - case "dictionary_decompounder": - return JsonSerializer.Deserialize(ref reader, options); - case "edge_ngram": - return JsonSerializer.Deserialize(ref reader, options); - case "elision": - return JsonSerializer.Deserialize(ref reader, options); - case "fingerprint": - return JsonSerializer.Deserialize(ref reader, options); - case "hunspell": - return JsonSerializer.Deserialize(ref reader, options); - case "hyphenation_decompounder": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_collation": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_folding": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_normalizer": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_transform": - return JsonSerializer.Deserialize(ref reader, options); - case "keep_types": - return JsonSerializer.Deserialize(ref reader, options); - case "keep": - return JsonSerializer.Deserialize(ref reader, options); - case "keyword_marker": - return JsonSerializer.Deserialize(ref reader, options); - case "kstem": - return JsonSerializer.Deserialize(ref reader, options); - case "kuromoji_part_of_speech": - return JsonSerializer.Deserialize(ref reader, options); - case "kuromoji_readingform": - return JsonSerializer.Deserialize(ref reader, options); - case "kuromoji_stemmer": - return JsonSerializer.Deserialize(ref reader, options); - case "length": - return JsonSerializer.Deserialize(ref reader, options); - case "limit": - return JsonSerializer.Deserialize(ref reader, options); - case "lowercase": - return JsonSerializer.Deserialize(ref reader, options); - case "multiplexer": - return JsonSerializer.Deserialize(ref reader, options); - case "ngram": - return JsonSerializer.Deserialize(ref reader, options); - case "nori_part_of_speech": - return JsonSerializer.Deserialize(ref reader, options); - case "pattern_capture": - return JsonSerializer.Deserialize(ref reader, options); - case "pattern_replace": - return JsonSerializer.Deserialize(ref reader, options); - case "phonetic": - return JsonSerializer.Deserialize(ref reader, options); - case "porter_stem": - return JsonSerializer.Deserialize(ref reader, options); - case "predicate_token_filter": - return JsonSerializer.Deserialize(ref reader, options); - case "remove_duplicates": - return JsonSerializer.Deserialize(ref reader, options); - case "reverse": - return JsonSerializer.Deserialize(ref reader, options); - case "shingle": - return JsonSerializer.Deserialize(ref reader, options); - case "snowball": - return JsonSerializer.Deserialize(ref reader, options); - case "stemmer_override": - return JsonSerializer.Deserialize(ref reader, options); - case "stemmer": - return JsonSerializer.Deserialize(ref reader, options); - case "stop": - return JsonSerializer.Deserialize(ref reader, options); - case "synonym_graph": - return JsonSerializer.Deserialize(ref reader, options); - case "synonym": - return JsonSerializer.Deserialize(ref reader, options); - case "trim": - return JsonSerializer.Deserialize(ref reader, options); - case "truncate": - return JsonSerializer.Deserialize(ref reader, options); - case "unique": - return JsonSerializer.Deserialize(ref reader, options); - case "uppercase": - return JsonSerializer.Deserialize(ref reader, options); - case "word_delimiter_graph": - return JsonSerializer.Deserialize(ref reader, options); - case "word_delimiter": - return JsonSerializer.Deserialize(ref reader, options); - default: - ThrowHelper.ThrowUnknownTaggedUnionVariantJsonException(type, typeof(ITokenFilter)); - return null; - } - } - - public override void Write(Utf8JsonWriter writer, ITokenFilter value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "asciifolding": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.AsciiFoldingTokenFilter), options); - return; - case "common_grams": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CommonGramsTokenFilter), options); - return; - case "condition": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ConditionTokenFilter), options); - return; - case "delimited_payload": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.DelimitedPayloadTokenFilter), options); - return; - case "dictionary_decompounder": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.DictionaryDecompounderTokenFilter), options); - return; - case "edge_ngram": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EdgeNGramTokenFilter), options); - return; - case "elision": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ElisionTokenFilter), options); - return; - case "fingerprint": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintTokenFilter), options); - return; - case "hunspell": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HunspellTokenFilter), options); - return; - case "hyphenation_decompounder": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HyphenationDecompounderTokenFilter), options); - return; - case "icu_collation": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationTokenFilter), options); - return; - case "icu_folding": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuFoldingTokenFilter), options); - return; - case "icu_normalizer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuNormalizationTokenFilter), options); - return; - case "icu_transform": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuTransformTokenFilter), options); - return; - case "keep_types": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeepTypesTokenFilter), options); - return; - case "keep": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeepWordsTokenFilter), options); - return; - case "keyword_marker": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordMarkerTokenFilter), options); - return; - case "kstem": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KStemTokenFilter), options); - return; - case "kuromoji_part_of_speech": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiPartOfSpeechTokenFilter), options); - return; - case "kuromoji_readingform": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiReadingFormTokenFilter), options); - return; - case "kuromoji_stemmer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiStemmerTokenFilter), options); - return; - case "length": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LengthTokenFilter), options); - return; - case "limit": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LimitTokenCountTokenFilter), options); - return; - case "lowercase": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LowercaseTokenFilter), options); - return; - case "multiplexer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.MultiplexerTokenFilter), options); - return; - case "ngram": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NGramTokenFilter), options); - return; - case "nori_part_of_speech": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriPartOfSpeechTokenFilter), options); - return; - case "pattern_capture": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternCaptureTokenFilter), options); - return; - case "pattern_replace": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternReplaceTokenFilter), options); - return; - case "phonetic": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PhoneticTokenFilter), options); - return; - case "porter_stem": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PorterStemTokenFilter), options); - return; - case "predicate_token_filter": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PredicateTokenFilter), options); - return; - case "remove_duplicates": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.RemoveDuplicatesTokenFilter), options); - return; - case "reverse": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ReverseTokenFilter), options); - return; - case "shingle": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ShingleTokenFilter), options); - return; - case "snowball": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballTokenFilter), options); - return; - case "stemmer_override": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StemmerOverrideTokenFilter), options); - return; - case "stemmer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StemmerTokenFilter), options); - return; - case "stop": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StopTokenFilter), options); - return; - case "synonym_graph": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymGraphTokenFilter), options); - return; - case "synonym": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SynonymTokenFilter), options); - return; - case "trim": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.TrimTokenFilter), options); - return; - case "truncate": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.TruncateTokenFilter), options); - return; - case "unique": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.UniqueTokenFilter), options); - return; - case "uppercase": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.UppercaseTokenFilter), options); - return; - case "word_delimiter_graph": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.WordDelimiterGraphTokenFilter), options); - return; - case "word_delimiter": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.WordDelimiterTokenFilter), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(TokenFilterInterfaceConverter))] -public partial interface ITokenFilter -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs deleted file mode 100644 index 0e3c17b8211..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/Tokenizers.g.cs +++ /dev/null @@ -1,257 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public partial class Tokenizers : IsADictionary -{ - public Tokenizers() - { - } - - public Tokenizers(IDictionary container) : base(container) - { - } - - public void Add(string name, ITokenizer tokenizer) => BackingDictionary.Add(Sanitize(name), tokenizer); - public bool TryGetTokenizer(string name, [NotNullWhen(returnValue: true)] out ITokenizer tokenizer) => BackingDictionary.TryGetValue(Sanitize(name), out tokenizer); - - public bool TryGetTokenizer(string name, [NotNullWhen(returnValue: true)] out T? tokenizer) where T : class, ITokenizer - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - tokenizer = finalValue; - return true; - } - - tokenizer = null; - return false; - } -} - -public sealed partial class TokenizersDescriptor : IsADictionaryDescriptor -{ - public TokenizersDescriptor() : base(new Tokenizers()) - { - } - - public TokenizersDescriptor(Tokenizers tokenizers) : base(tokenizers ?? new Tokenizers()) - { - } - - public TokenizersDescriptor CharGroup(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor CharGroup(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor CharGroup(string tokenizerName, CharGroupTokenizer charGroupTokenizer) => AssignVariant(tokenizerName, charGroupTokenizer); - public TokenizersDescriptor Classic(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Classic(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Classic(string tokenizerName, ClassicTokenizer classicTokenizer) => AssignVariant(tokenizerName, classicTokenizer); - public TokenizersDescriptor EdgeNGram(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor EdgeNGram(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor EdgeNGram(string tokenizerName, EdgeNGramTokenizer edgeNGramTokenizer) => AssignVariant(tokenizerName, edgeNGramTokenizer); - public TokenizersDescriptor Icu(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Icu(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Icu(string tokenizerName, IcuTokenizer icuTokenizer) => AssignVariant(tokenizerName, icuTokenizer); - public TokenizersDescriptor Keyword(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Keyword(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Keyword(string tokenizerName, KeywordTokenizer keywordTokenizer) => AssignVariant(tokenizerName, keywordTokenizer); - public TokenizersDescriptor Kuromoji(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Kuromoji(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Kuromoji(string tokenizerName, KuromojiTokenizer kuromojiTokenizer) => AssignVariant(tokenizerName, kuromojiTokenizer); - public TokenizersDescriptor Letter(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Letter(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Letter(string tokenizerName, LetterTokenizer letterTokenizer) => AssignVariant(tokenizerName, letterTokenizer); - public TokenizersDescriptor Lowercase(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Lowercase(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Lowercase(string tokenizerName, LowercaseTokenizer lowercaseTokenizer) => AssignVariant(tokenizerName, lowercaseTokenizer); - public TokenizersDescriptor NGram(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor NGram(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor NGram(string tokenizerName, NGramTokenizer nGramTokenizer) => AssignVariant(tokenizerName, nGramTokenizer); - public TokenizersDescriptor Nori(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Nori(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Nori(string tokenizerName, NoriTokenizer noriTokenizer) => AssignVariant(tokenizerName, noriTokenizer); - public TokenizersDescriptor PathHierarchy(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor PathHierarchy(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor PathHierarchy(string tokenizerName, PathHierarchyTokenizer pathHierarchyTokenizer) => AssignVariant(tokenizerName, pathHierarchyTokenizer); - public TokenizersDescriptor Pattern(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Pattern(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Pattern(string tokenizerName, PatternTokenizer patternTokenizer) => AssignVariant(tokenizerName, patternTokenizer); - public TokenizersDescriptor SimplePatternSplit(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor SimplePatternSplit(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor SimplePatternSplit(string tokenizerName, SimplePatternSplitTokenizer simplePatternSplitTokenizer) => AssignVariant(tokenizerName, simplePatternSplitTokenizer); - public TokenizersDescriptor SimplePattern(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor SimplePattern(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor SimplePattern(string tokenizerName, SimplePatternTokenizer simplePatternTokenizer) => AssignVariant(tokenizerName, simplePatternTokenizer); - public TokenizersDescriptor Standard(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Standard(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Standard(string tokenizerName, StandardTokenizer standardTokenizer) => AssignVariant(tokenizerName, standardTokenizer); - public TokenizersDescriptor Thai(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Thai(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Thai(string tokenizerName, ThaiTokenizer thaiTokenizer) => AssignVariant(tokenizerName, thaiTokenizer); - public TokenizersDescriptor UaxEmailUrl(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor UaxEmailUrl(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor UaxEmailUrl(string tokenizerName, UaxEmailUrlTokenizer uaxEmailUrlTokenizer) => AssignVariant(tokenizerName, uaxEmailUrlTokenizer); - public TokenizersDescriptor Whitespace(string tokenizerName) => AssignVariant(tokenizerName, null); - public TokenizersDescriptor Whitespace(string tokenizerName, Action configure) => AssignVariant(tokenizerName, configure); - public TokenizersDescriptor Whitespace(string tokenizerName, WhitespaceTokenizer whitespaceTokenizer) => AssignVariant(tokenizerName, whitespaceTokenizer); -} - -internal sealed partial class TokenizerInterfaceConverter : JsonConverter -{ - public override ITokenizer Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "char_group": - return JsonSerializer.Deserialize(ref reader, options); - case "classic": - return JsonSerializer.Deserialize(ref reader, options); - case "edge_ngram": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_tokenizer": - return JsonSerializer.Deserialize(ref reader, options); - case "keyword": - return JsonSerializer.Deserialize(ref reader, options); - case "kuromoji_tokenizer": - return JsonSerializer.Deserialize(ref reader, options); - case "letter": - return JsonSerializer.Deserialize(ref reader, options); - case "lowercase": - return JsonSerializer.Deserialize(ref reader, options); - case "ngram": - return JsonSerializer.Deserialize(ref reader, options); - case "nori_tokenizer": - return JsonSerializer.Deserialize(ref reader, options); - case "path_hierarchy": - return JsonSerializer.Deserialize(ref reader, options); - case "pattern": - return JsonSerializer.Deserialize(ref reader, options); - case "simple_pattern_split": - return JsonSerializer.Deserialize(ref reader, options); - case "simple_pattern": - return JsonSerializer.Deserialize(ref reader, options); - case "standard": - return JsonSerializer.Deserialize(ref reader, options); - case "thai": - return JsonSerializer.Deserialize(ref reader, options); - case "uax_url_email": - return JsonSerializer.Deserialize(ref reader, options); - case "whitespace": - return JsonSerializer.Deserialize(ref reader, options); - default: - ThrowHelper.ThrowUnknownTaggedUnionVariantJsonException(type, typeof(ITokenizer)); - return null; - } - } - - public override void Write(Utf8JsonWriter writer, ITokenizer value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "char_group": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CharGroupTokenizer), options); - return; - case "classic": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ClassicTokenizer), options); - return; - case "edge_ngram": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EdgeNGramTokenizer), options); - return; - case "icu_tokenizer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuTokenizer), options); - return; - case "keyword": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordTokenizer), options); - return; - case "kuromoji_tokenizer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiTokenizer), options); - return; - case "letter": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LetterTokenizer), options); - return; - case "lowercase": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LowercaseTokenizer), options); - return; - case "ngram": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NGramTokenizer), options); - return; - case "nori_tokenizer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriTokenizer), options); - return; - case "path_hierarchy": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PathHierarchyTokenizer), options); - return; - case "pattern": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternTokenizer), options); - return; - case "simple_pattern_split": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SimplePatternSplitTokenizer), options); - return; - case "simple_pattern": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SimplePatternTokenizer), options); - return; - case "standard": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardTokenizer), options); - return; - case "thai": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiTokenizer), options); - return; - case "uax_url_email": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.UaxEmailUrlTokenizer), options); - return; - case "whitespace": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceTokenizer), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(TokenizerInterfaceConverter))] -public partial interface ITokenizer -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TrimTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TrimTokenFilter.g.cs deleted file mode 100644 index 6dcf0e81cdd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TrimTokenFilter.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class TrimTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "trim"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class TrimTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal TrimTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public TrimTokenFilterDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public TrimTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("trim"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - TrimTokenFilter IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TruncateTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TruncateTokenFilter.g.cs deleted file mode 100644 index 1c6d1627df0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TruncateTokenFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class TruncateTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("length")] - public int? Length { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "truncate"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class TruncateTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal TruncateTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public TruncateTokenFilterDescriptor() : base() - { - } - - private int? LengthValue { get; set; } - private string? VersionValue { get; set; } - - public TruncateTokenFilterDescriptor Length(int? length) - { - LengthValue = length; - return Self; - } - - public TruncateTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LengthValue.HasValue) - { - writer.WritePropertyName("length"); - writer.WriteNumberValue(LengthValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("truncate"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - TruncateTokenFilter IBuildableDescriptor.Build() => new() - { - Length = LengthValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TurkishAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TurkishAnalyzer.g.cs deleted file mode 100644 index d4a02ced9d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/TurkishAnalyzer.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class TurkishAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("stem_exclusion")] - public ICollection? StemExclusion { get; set; } - [JsonInclude, JsonPropertyName("stopwords")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Stopwords { get; set; } - [JsonInclude, JsonPropertyName("stopwords_path")] - public string? StopwordsPath { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "turkish"; -} - -public sealed partial class TurkishAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal TurkishAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public TurkishAnalyzerDescriptor() : base() - { - } - - private ICollection? StemExclusionValue { get; set; } - private ICollection? StopwordsValue { get; set; } - private string? StopwordsPathValue { get; set; } - - public TurkishAnalyzerDescriptor StemExclusion(ICollection? stemExclusion) - { - StemExclusionValue = stemExclusion; - return Self; - } - - public TurkishAnalyzerDescriptor Stopwords(ICollection? stopwords) - { - StopwordsValue = stopwords; - return Self; - } - - public TurkishAnalyzerDescriptor StopwordsPath(string? stopwordsPath) - { - StopwordsPathValue = stopwordsPath; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (StemExclusionValue is not null) - { - writer.WritePropertyName("stem_exclusion"); - JsonSerializer.Serialize(writer, StemExclusionValue, options); - } - - if (StopwordsValue is not null) - { - writer.WritePropertyName("stopwords"); - SingleOrManySerializationHelper.Serialize(StopwordsValue, writer, options); - } - - if (!string.IsNullOrEmpty(StopwordsPathValue)) - { - writer.WritePropertyName("stopwords_path"); - writer.WriteStringValue(StopwordsPathValue); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("turkish"); - writer.WriteEndObject(); - } - - TurkishAnalyzer IBuildableDescriptor.Build() => new() - { - StemExclusion = StemExclusionValue, - Stopwords = StopwordsValue, - StopwordsPath = StopwordsPathValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs deleted file mode 100644 index 7873031f600..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class UaxEmailUrlTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("max_token_length")] - public int? MaxTokenLength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "uax_url_email"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class UaxEmailUrlTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal UaxEmailUrlTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public UaxEmailUrlTokenizerDescriptor() : base() - { - } - - private int? MaxTokenLengthValue { get; set; } - private string? VersionValue { get; set; } - - public UaxEmailUrlTokenizerDescriptor MaxTokenLength(int? maxTokenLength) - { - MaxTokenLengthValue = maxTokenLength; - return Self; - } - - public UaxEmailUrlTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenLengthValue.HasValue) - { - writer.WritePropertyName("max_token_length"); - writer.WriteNumberValue(MaxTokenLengthValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("uax_url_email"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - UaxEmailUrlTokenizer IBuildableDescriptor.Build() => new() - { - MaxTokenLength = MaxTokenLengthValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UniqueTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UniqueTokenFilter.g.cs deleted file mode 100644 index 02cf7b00215..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UniqueTokenFilter.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class UniqueTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("only_on_same_position")] - public bool? OnlyOnSamePosition { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "unique"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class UniqueTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal UniqueTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public UniqueTokenFilterDescriptor() : base() - { - } - - private bool? OnlyOnSamePositionValue { get; set; } - private string? VersionValue { get; set; } - - public UniqueTokenFilterDescriptor OnlyOnSamePosition(bool? onlyOnSamePosition = true) - { - OnlyOnSamePositionValue = onlyOnSamePosition; - return Self; - } - - public UniqueTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (OnlyOnSamePositionValue.HasValue) - { - writer.WritePropertyName("only_on_same_position"); - writer.WriteBooleanValue(OnlyOnSamePositionValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("unique"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - UniqueTokenFilter IBuildableDescriptor.Build() => new() - { - OnlyOnSamePosition = OnlyOnSamePositionValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs deleted file mode 100644 index f319231f7e9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/UppercaseTokenFilter.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class UppercaseTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "uppercase"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class UppercaseTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal UppercaseTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public UppercaseTokenFilterDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public UppercaseTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("uppercase"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - UppercaseTokenFilter IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs deleted file mode 100644 index b92925e537e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class WhitespaceAnalyzer : IAnalyzer -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "whitespace"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class WhitespaceAnalyzerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal WhitespaceAnalyzerDescriptor(Action configure) => configure.Invoke(this); - - public WhitespaceAnalyzerDescriptor() : base() - { - } - - private string? VersionValue { get; set; } - - public WhitespaceAnalyzerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("whitespace"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - WhitespaceAnalyzer IBuildableDescriptor.Build() => new() - { - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs deleted file mode 100644 index 874180ee5ee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class WhitespaceTokenizer : ITokenizer -{ - [JsonInclude, JsonPropertyName("max_token_length")] - public int? MaxTokenLength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "whitespace"; - - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class WhitespaceTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal WhitespaceTokenizerDescriptor(Action configure) => configure.Invoke(this); - - public WhitespaceTokenizerDescriptor() : base() - { - } - - private int? MaxTokenLengthValue { get; set; } - private string? VersionValue { get; set; } - - public WhitespaceTokenizerDescriptor MaxTokenLength(int? maxTokenLength) - { - MaxTokenLengthValue = maxTokenLength; - return Self; - } - - public WhitespaceTokenizerDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenLengthValue.HasValue) - { - writer.WritePropertyName("max_token_length"); - writer.WriteNumberValue(MaxTokenLengthValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("whitespace"); - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - WhitespaceTokenizer IBuildableDescriptor.Build() => new() - { - MaxTokenLength = MaxTokenLengthValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs deleted file mode 100644 index 36ace00f071..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs +++ /dev/null @@ -1,314 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class WordDelimiterGraphTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("adjust_offsets")] - public bool? AdjustOffsets { get; set; } - [JsonInclude, JsonPropertyName("catenate_all")] - public bool? CatenateAll { get; set; } - [JsonInclude, JsonPropertyName("catenate_numbers")] - public bool? CatenateNumbers { get; set; } - [JsonInclude, JsonPropertyName("catenate_words")] - public bool? CatenateWords { get; set; } - [JsonInclude, JsonPropertyName("generate_number_parts")] - public bool? GenerateNumberParts { get; set; } - [JsonInclude, JsonPropertyName("generate_word_parts")] - public bool? GenerateWordParts { get; set; } - [JsonInclude, JsonPropertyName("ignore_keywords")] - public bool? IgnoreKeywords { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - [JsonInclude, JsonPropertyName("protected_words")] - public ICollection? ProtectedWords { get; set; } - [JsonInclude, JsonPropertyName("protected_words_path")] - public string? ProtectedWordsPath { get; set; } - [JsonInclude, JsonPropertyName("split_on_case_change")] - public bool? SplitOnCaseChange { get; set; } - [JsonInclude, JsonPropertyName("split_on_numerics")] - public bool? SplitOnNumerics { get; set; } - [JsonInclude, JsonPropertyName("stem_english_possessive")] - public bool? StemEnglishPossessive { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "word_delimiter_graph"; - - [JsonInclude, JsonPropertyName("type_table")] - public ICollection? TypeTable { get; set; } - [JsonInclude, JsonPropertyName("type_table_path")] - public string? TypeTablePath { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class WordDelimiterGraphTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal WordDelimiterGraphTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public WordDelimiterGraphTokenFilterDescriptor() : base() - { - } - - private bool? AdjustOffsetsValue { get; set; } - private bool? CatenateAllValue { get; set; } - private bool? CatenateNumbersValue { get; set; } - private bool? CatenateWordsValue { get; set; } - private bool? GenerateNumberPartsValue { get; set; } - private bool? GenerateWordPartsValue { get; set; } - private bool? IgnoreKeywordsValue { get; set; } - private bool? PreserveOriginalValue { get; set; } - private ICollection? ProtectedWordsValue { get; set; } - private string? ProtectedWordsPathValue { get; set; } - private bool? SplitOnCaseChangeValue { get; set; } - private bool? SplitOnNumericsValue { get; set; } - private bool? StemEnglishPossessiveValue { get; set; } - private ICollection? TypeTableValue { get; set; } - private string? TypeTablePathValue { get; set; } - private string? VersionValue { get; set; } - - public WordDelimiterGraphTokenFilterDescriptor AdjustOffsets(bool? adjustOffsets = true) - { - AdjustOffsetsValue = adjustOffsets; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor CatenateAll(bool? catenateAll = true) - { - CatenateAllValue = catenateAll; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor CatenateNumbers(bool? catenateNumbers = true) - { - CatenateNumbersValue = catenateNumbers; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor CatenateWords(bool? catenateWords = true) - { - CatenateWordsValue = catenateWords; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor GenerateNumberParts(bool? generateNumberParts = true) - { - GenerateNumberPartsValue = generateNumberParts; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor GenerateWordParts(bool? generateWordParts = true) - { - GenerateWordPartsValue = generateWordParts; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor IgnoreKeywords(bool? ignoreKeywords = true) - { - IgnoreKeywordsValue = ignoreKeywords; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor ProtectedWords(ICollection? protectedWords) - { - ProtectedWordsValue = protectedWords; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor ProtectedWordsPath(string? protectedWordsPath) - { - ProtectedWordsPathValue = protectedWordsPath; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor SplitOnCaseChange(bool? splitOnCaseChange = true) - { - SplitOnCaseChangeValue = splitOnCaseChange; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor SplitOnNumerics(bool? splitOnNumerics = true) - { - SplitOnNumericsValue = splitOnNumerics; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor StemEnglishPossessive(bool? stemEnglishPossessive = true) - { - StemEnglishPossessiveValue = stemEnglishPossessive; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor TypeTable(ICollection? typeTable) - { - TypeTableValue = typeTable; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor TypeTablePath(string? typeTablePath) - { - TypeTablePathValue = typeTablePath; - return Self; - } - - public WordDelimiterGraphTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AdjustOffsetsValue.HasValue) - { - writer.WritePropertyName("adjust_offsets"); - writer.WriteBooleanValue(AdjustOffsetsValue.Value); - } - - if (CatenateAllValue.HasValue) - { - writer.WritePropertyName("catenate_all"); - writer.WriteBooleanValue(CatenateAllValue.Value); - } - - if (CatenateNumbersValue.HasValue) - { - writer.WritePropertyName("catenate_numbers"); - writer.WriteBooleanValue(CatenateNumbersValue.Value); - } - - if (CatenateWordsValue.HasValue) - { - writer.WritePropertyName("catenate_words"); - writer.WriteBooleanValue(CatenateWordsValue.Value); - } - - if (GenerateNumberPartsValue.HasValue) - { - writer.WritePropertyName("generate_number_parts"); - writer.WriteBooleanValue(GenerateNumberPartsValue.Value); - } - - if (GenerateWordPartsValue.HasValue) - { - writer.WritePropertyName("generate_word_parts"); - writer.WriteBooleanValue(GenerateWordPartsValue.Value); - } - - if (IgnoreKeywordsValue.HasValue) - { - writer.WritePropertyName("ignore_keywords"); - writer.WriteBooleanValue(IgnoreKeywordsValue.Value); - } - - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - if (ProtectedWordsValue is not null) - { - writer.WritePropertyName("protected_words"); - JsonSerializer.Serialize(writer, ProtectedWordsValue, options); - } - - if (!string.IsNullOrEmpty(ProtectedWordsPathValue)) - { - writer.WritePropertyName("protected_words_path"); - writer.WriteStringValue(ProtectedWordsPathValue); - } - - if (SplitOnCaseChangeValue.HasValue) - { - writer.WritePropertyName("split_on_case_change"); - writer.WriteBooleanValue(SplitOnCaseChangeValue.Value); - } - - if (SplitOnNumericsValue.HasValue) - { - writer.WritePropertyName("split_on_numerics"); - writer.WriteBooleanValue(SplitOnNumericsValue.Value); - } - - if (StemEnglishPossessiveValue.HasValue) - { - writer.WritePropertyName("stem_english_possessive"); - writer.WriteBooleanValue(StemEnglishPossessiveValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("word_delimiter_graph"); - if (TypeTableValue is not null) - { - writer.WritePropertyName("type_table"); - JsonSerializer.Serialize(writer, TypeTableValue, options); - } - - if (!string.IsNullOrEmpty(TypeTablePathValue)) - { - writer.WritePropertyName("type_table_path"); - writer.WriteStringValue(TypeTablePathValue); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - WordDelimiterGraphTokenFilter IBuildableDescriptor.Build() => new() - { - AdjustOffsets = AdjustOffsetsValue, - CatenateAll = CatenateAllValue, - CatenateNumbers = CatenateNumbersValue, - CatenateWords = CatenateWordsValue, - GenerateNumberParts = GenerateNumberPartsValue, - GenerateWordParts = GenerateWordPartsValue, - IgnoreKeywords = IgnoreKeywordsValue, - PreserveOriginal = PreserveOriginalValue, - ProtectedWords = ProtectedWordsValue, - ProtectedWordsPath = ProtectedWordsPathValue, - SplitOnCaseChange = SplitOnCaseChangeValue, - SplitOnNumerics = SplitOnNumericsValue, - StemEnglishPossessive = StemEnglishPossessiveValue, - TypeTable = TypeTableValue, - TypeTablePath = TypeTablePathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs deleted file mode 100644 index ca6c53f0c88..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs +++ /dev/null @@ -1,282 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -public sealed partial class WordDelimiterTokenFilter : ITokenFilter -{ - [JsonInclude, JsonPropertyName("catenate_all")] - public bool? CatenateAll { get; set; } - [JsonInclude, JsonPropertyName("catenate_numbers")] - public bool? CatenateNumbers { get; set; } - [JsonInclude, JsonPropertyName("catenate_words")] - public bool? CatenateWords { get; set; } - [JsonInclude, JsonPropertyName("generate_number_parts")] - public bool? GenerateNumberParts { get; set; } - [JsonInclude, JsonPropertyName("generate_word_parts")] - public bool? GenerateWordParts { get; set; } - [JsonInclude, JsonPropertyName("preserve_original")] - public bool? PreserveOriginal { get; set; } - [JsonInclude, JsonPropertyName("protected_words")] - public ICollection? ProtectedWords { get; set; } - [JsonInclude, JsonPropertyName("protected_words_path")] - public string? ProtectedWordsPath { get; set; } - [JsonInclude, JsonPropertyName("split_on_case_change")] - public bool? SplitOnCaseChange { get; set; } - [JsonInclude, JsonPropertyName("split_on_numerics")] - public bool? SplitOnNumerics { get; set; } - [JsonInclude, JsonPropertyName("stem_english_possessive")] - public bool? StemEnglishPossessive { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "word_delimiter"; - - [JsonInclude, JsonPropertyName("type_table")] - public ICollection? TypeTable { get; set; } - [JsonInclude, JsonPropertyName("type_table_path")] - public string? TypeTablePath { get; set; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; set; } -} - -public sealed partial class WordDelimiterTokenFilterDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal WordDelimiterTokenFilterDescriptor(Action configure) => configure.Invoke(this); - - public WordDelimiterTokenFilterDescriptor() : base() - { - } - - private bool? CatenateAllValue { get; set; } - private bool? CatenateNumbersValue { get; set; } - private bool? CatenateWordsValue { get; set; } - private bool? GenerateNumberPartsValue { get; set; } - private bool? GenerateWordPartsValue { get; set; } - private bool? PreserveOriginalValue { get; set; } - private ICollection? ProtectedWordsValue { get; set; } - private string? ProtectedWordsPathValue { get; set; } - private bool? SplitOnCaseChangeValue { get; set; } - private bool? SplitOnNumericsValue { get; set; } - private bool? StemEnglishPossessiveValue { get; set; } - private ICollection? TypeTableValue { get; set; } - private string? TypeTablePathValue { get; set; } - private string? VersionValue { get; set; } - - public WordDelimiterTokenFilterDescriptor CatenateAll(bool? catenateAll = true) - { - CatenateAllValue = catenateAll; - return Self; - } - - public WordDelimiterTokenFilterDescriptor CatenateNumbers(bool? catenateNumbers = true) - { - CatenateNumbersValue = catenateNumbers; - return Self; - } - - public WordDelimiterTokenFilterDescriptor CatenateWords(bool? catenateWords = true) - { - CatenateWordsValue = catenateWords; - return Self; - } - - public WordDelimiterTokenFilterDescriptor GenerateNumberParts(bool? generateNumberParts = true) - { - GenerateNumberPartsValue = generateNumberParts; - return Self; - } - - public WordDelimiterTokenFilterDescriptor GenerateWordParts(bool? generateWordParts = true) - { - GenerateWordPartsValue = generateWordParts; - return Self; - } - - public WordDelimiterTokenFilterDescriptor PreserveOriginal(bool? preserveOriginal = true) - { - PreserveOriginalValue = preserveOriginal; - return Self; - } - - public WordDelimiterTokenFilterDescriptor ProtectedWords(ICollection? protectedWords) - { - ProtectedWordsValue = protectedWords; - return Self; - } - - public WordDelimiterTokenFilterDescriptor ProtectedWordsPath(string? protectedWordsPath) - { - ProtectedWordsPathValue = protectedWordsPath; - return Self; - } - - public WordDelimiterTokenFilterDescriptor SplitOnCaseChange(bool? splitOnCaseChange = true) - { - SplitOnCaseChangeValue = splitOnCaseChange; - return Self; - } - - public WordDelimiterTokenFilterDescriptor SplitOnNumerics(bool? splitOnNumerics = true) - { - SplitOnNumericsValue = splitOnNumerics; - return Self; - } - - public WordDelimiterTokenFilterDescriptor StemEnglishPossessive(bool? stemEnglishPossessive = true) - { - StemEnglishPossessiveValue = stemEnglishPossessive; - return Self; - } - - public WordDelimiterTokenFilterDescriptor TypeTable(ICollection? typeTable) - { - TypeTableValue = typeTable; - return Self; - } - - public WordDelimiterTokenFilterDescriptor TypeTablePath(string? typeTablePath) - { - TypeTablePathValue = typeTablePath; - return Self; - } - - public WordDelimiterTokenFilterDescriptor Version(string? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CatenateAllValue.HasValue) - { - writer.WritePropertyName("catenate_all"); - writer.WriteBooleanValue(CatenateAllValue.Value); - } - - if (CatenateNumbersValue.HasValue) - { - writer.WritePropertyName("catenate_numbers"); - writer.WriteBooleanValue(CatenateNumbersValue.Value); - } - - if (CatenateWordsValue.HasValue) - { - writer.WritePropertyName("catenate_words"); - writer.WriteBooleanValue(CatenateWordsValue.Value); - } - - if (GenerateNumberPartsValue.HasValue) - { - writer.WritePropertyName("generate_number_parts"); - writer.WriteBooleanValue(GenerateNumberPartsValue.Value); - } - - if (GenerateWordPartsValue.HasValue) - { - writer.WritePropertyName("generate_word_parts"); - writer.WriteBooleanValue(GenerateWordPartsValue.Value); - } - - if (PreserveOriginalValue.HasValue) - { - writer.WritePropertyName("preserve_original"); - writer.WriteBooleanValue(PreserveOriginalValue.Value); - } - - if (ProtectedWordsValue is not null) - { - writer.WritePropertyName("protected_words"); - JsonSerializer.Serialize(writer, ProtectedWordsValue, options); - } - - if (!string.IsNullOrEmpty(ProtectedWordsPathValue)) - { - writer.WritePropertyName("protected_words_path"); - writer.WriteStringValue(ProtectedWordsPathValue); - } - - if (SplitOnCaseChangeValue.HasValue) - { - writer.WritePropertyName("split_on_case_change"); - writer.WriteBooleanValue(SplitOnCaseChangeValue.Value); - } - - if (SplitOnNumericsValue.HasValue) - { - writer.WritePropertyName("split_on_numerics"); - writer.WriteBooleanValue(SplitOnNumericsValue.Value); - } - - if (StemEnglishPossessiveValue.HasValue) - { - writer.WritePropertyName("stem_english_possessive"); - writer.WriteBooleanValue(StemEnglishPossessiveValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("word_delimiter"); - if (TypeTableValue is not null) - { - writer.WritePropertyName("type_table"); - JsonSerializer.Serialize(writer, TypeTableValue, options); - } - - if (!string.IsNullOrEmpty(TypeTablePathValue)) - { - writer.WritePropertyName("type_table_path"); - writer.WriteStringValue(TypeTablePathValue); - } - - if (!string.IsNullOrEmpty(VersionValue)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(VersionValue); - } - - writer.WriteEndObject(); - } - - WordDelimiterTokenFilter IBuildableDescriptor.Build() => new() - { - CatenateAll = CatenateAllValue, - CatenateNumbers = CatenateNumbersValue, - CatenateWords = CatenateWordsValue, - GenerateNumberParts = GenerateNumberPartsValue, - GenerateWordParts = GenerateWordPartsValue, - PreserveOriginal = PreserveOriginalValue, - ProtectedWords = ProtectedWordsValue, - ProtectedWordsPath = ProtectedWordsPathValue, - SplitOnCaseChange = SplitOnCaseChangeValue, - SplitOnNumerics = SplitOnNumericsValue, - StemEnglishPossessive = StemEnglishPossessiveValue, - TypeTable = TypeTableValue, - TypeTablePath = TypeTablePathValue, - Version = VersionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/AsyncSearch/AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/AsyncSearch/AsyncSearch.g.cs deleted file mode 100644 index f9bde910d58..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/AsyncSearch/AsyncSearch.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; - -public sealed partial class AsyncSearch -{ - /// - /// - /// Partial aggregations results, coming from the shards that have already completed the execution of the query. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("_clusters")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterStatistics? Clusters { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata HitsMetadata { get; init; } - [JsonInclude, JsonPropertyName("max_score")] - public double? MaxScore { get; init; } - - /// - /// - /// Indicates how many reductions of the results have been performed. - /// If this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response. - /// - /// - [JsonInclude, JsonPropertyName("num_reduce_phases")] - public long? NumReducePhases { get; init; } - [JsonInclude, JsonPropertyName("pit_id")] - public string? PitId { get; init; } - [JsonInclude, JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Profile? Profile { get; init; } - [JsonInclude, JsonPropertyName("_scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollId? ScrollId { get; init; } - - /// - /// - /// Indicates how many shards have run the query. - /// Note that in order for shard results to be included in the search response, they need to be reduced first. - /// - /// - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestDictionary? Suggest { get; init; } - [JsonInclude, JsonPropertyName("terminated_early")] - public bool? TerminatedEarly { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkIndexByScrollFailure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkIndexByScrollFailure.g.cs deleted file mode 100644 index 28add2be38b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkIndexByScrollFailure.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class BulkIndexByScrollFailure -{ - [JsonInclude, JsonPropertyName("cause")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause Cause { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("status")] - public int Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkStats.g.cs deleted file mode 100644 index 3766a6beae2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/BulkStats.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class BulkStats -{ - [JsonInclude, JsonPropertyName("avg_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? AvgSize { get; init; } - [JsonInclude, JsonPropertyName("avg_size_in_bytes")] - public long AvgSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("avg_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? AvgTime { get; init; } - [JsonInclude, JsonPropertyName("avg_time_in_millis")] - public long AvgTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total_operations")] - public long TotalOperations { get; init; } - [JsonInclude, JsonPropertyName("total_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TotalSize { get; init; } - [JsonInclude, JsonPropertyName("total_size_in_bytes")] - public long TotalSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ByteSize.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ByteSize.g.cs deleted file mode 100644 index 1a8b867dea2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ByteSize.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class ByteSize : Union -{ - public ByteSize(long Bytesize) : base(Bytesize) - { - } - - public ByteSize(string Bytesize) : base(Bytesize) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationDecision.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationDecision.g.cs deleted file mode 100644 index c1d6a8c5cb7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationDecision.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class AllocationDecision -{ - [JsonInclude, JsonPropertyName("decider")] - public string Decider { get; init; } - [JsonInclude, JsonPropertyName("decision")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.AllocationExplainDecision Decision { get; init; } - [JsonInclude, JsonPropertyName("explanation")] - public string Explanation { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationStore.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationStore.g.cs deleted file mode 100644 index ad6ec5dddd6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/AllocationStore.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class AllocationStore -{ - [JsonInclude, JsonPropertyName("allocation_id")] - public string AllocationId { get; init; } - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } - [JsonInclude, JsonPropertyName("in_sync")] - public bool InSync { get; init; } - [JsonInclude, JsonPropertyName("matching_size_in_bytes")] - public long MatchingSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("matching_sync_id")] - public bool MatchingSyncId { get; init; } - [JsonInclude, JsonPropertyName("store_exception")] - public string StoreException { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CharFilterTypes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CharFilterTypes.g.cs deleted file mode 100644 index b7e4bc7978b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CharFilterTypes.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class CharFilterTypes -{ - /// - /// - /// Contains statistics about analyzer types used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("analyzer_types")] - public IReadOnlyCollection AnalyzerTypes { get; init; } - - /// - /// - /// Contains statistics about built-in analyzers used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("built_in_analyzers")] - public IReadOnlyCollection BuiltInAnalyzers { get; init; } - - /// - /// - /// Contains statistics about built-in character filters used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("built_in_char_filters")] - public IReadOnlyCollection BuiltInCharFilters { get; init; } - - /// - /// - /// Contains statistics about built-in token filters used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("built_in_filters")] - public IReadOnlyCollection BuiltInFilters { get; init; } - - /// - /// - /// Contains statistics about built-in tokenizers used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("built_in_tokenizers")] - public IReadOnlyCollection BuiltInTokenizers { get; init; } - - /// - /// - /// Contains statistics about character filter types used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("char_filter_types")] - public IReadOnlyCollection CharFilterTypes2 { get; init; } - - /// - /// - /// Contains statistics about token filter types used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("filter_types")] - public IReadOnlyCollection FilterTypes { get; init; } - - /// - /// - /// Contains statistics about tokenizer types used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("tokenizer_types")] - public IReadOnlyCollection TokenizerTypes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterFileSystem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterFileSystem.g.cs deleted file mode 100644 index d30cd548905..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterFileSystem.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterFileSystem -{ - /// - /// - /// Total number of bytes available to JVM in file stores across all selected nodes. - /// Depending on operating system or process-level restrictions, this number may be less than nodes.fs.free_in_byes. - /// This is the actual amount of free disk space the selected Elasticsearch nodes can use. - /// - /// - [JsonInclude, JsonPropertyName("available_in_bytes")] - public long AvailableInBytes { get; init; } - - /// - /// - /// Total number of unallocated bytes in file stores across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("free_in_bytes")] - public long FreeInBytes { get; init; } - - /// - /// - /// Total size, in bytes, of all file stores across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long TotalInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndices.g.cs deleted file mode 100644 index 3cfe0fc1c4d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndices.g.cs +++ /dev/null @@ -1,119 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterIndices -{ - /// - /// - /// Contains statistics about analyzers and analyzer components used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.CharFilterTypes Analysis { get; init; } - - /// - /// - /// Contains statistics about memory used for completion in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("completion")] - public Elastic.Clients.Elasticsearch.Serverless.CompletionStats Completion { get; init; } - - /// - /// - /// Total number of indices with shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// Contains counts for documents in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("docs")] - public Elastic.Clients.Elasticsearch.Serverless.DocStats Docs { get; init; } - - /// - /// - /// Contains statistics about the field data cache of selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("fielddata")] - public Elastic.Clients.Elasticsearch.Serverless.FielddataStats Fielddata { get; init; } - - /// - /// - /// Contains statistics about field mappings in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.FieldTypesMappings Mappings { get; init; } - - /// - /// - /// Contains statistics about the query cache of selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("query_cache")] - public Elastic.Clients.Elasticsearch.Serverless.QueryCacheStats QueryCache { get; init; } - - /// - /// - /// Contains statistics about segments in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("segments")] - public Elastic.Clients.Elasticsearch.Serverless.SegmentsStats Segments { get; init; } - - /// - /// - /// Contains statistics about indices with shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("shards")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterIndicesShards Shards { get; init; } - - /// - /// - /// Contains statistics about the size of shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("store")] - public Elastic.Clients.Elasticsearch.Serverless.StoreStats Store { get; init; } - - /// - /// - /// Contains statistics about analyzers and analyzer components used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("versions")] - public IReadOnlyCollection? Versions { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShards.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShards.g.cs deleted file mode 100644 index fd41d982203..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShards.g.cs +++ /dev/null @@ -1,68 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -/// -/// -/// Contains statistics about shards assigned to selected nodes. -/// -/// -public sealed partial class ClusterIndicesShards -{ - /// - /// - /// Contains statistics about shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterIndicesShardsIndex? Index { get; init; } - - /// - /// - /// Number of primary shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("primaries")] - public double? Primaries { get; init; } - - /// - /// - /// Ratio of replica shards to primary shards across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("replication")] - public double? Replication { get; init; } - - /// - /// - /// Total number of shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public double? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShardsIndex.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShardsIndex.g.cs deleted file mode 100644 index 1c84635282d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIndicesShardsIndex.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterIndicesShardsIndex -{ - /// - /// - /// Contains statistics about the number of primary shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("primaries")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterShardMetrics Primaries { get; init; } - - /// - /// - /// Contains statistics about the number of replication shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("replication")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterShardMetrics Replication { get; init; } - - /// - /// - /// Contains statistics about the number of shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("shards")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterShardMetrics Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterInfo.g.cs deleted file mode 100644 index 8c55dfd3e76..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterInfo.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterInfo -{ - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyDictionary Nodes { get; init; } - [JsonInclude, JsonPropertyName("reserved_sizes")] - public IReadOnlyCollection ReservedSizes { get; init; } - [JsonInclude, JsonPropertyName("shard_data_set_sizes")] - public IReadOnlyDictionary? ShardDataSetSizes { get; init; } - [JsonInclude, JsonPropertyName("shard_paths")] - public IReadOnlyDictionary ShardPaths { get; init; } - [JsonInclude, JsonPropertyName("shard_sizes")] - public IReadOnlyDictionary ShardSizes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIngest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIngest.g.cs deleted file mode 100644 index 9a5f7cbff91..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterIngest.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterIngest -{ - [JsonInclude, JsonPropertyName("number_of_pipelines")] - public int NumberOfPipelines { get; init; } - [JsonInclude, JsonPropertyName("processor_stats")] - public IReadOnlyDictionary ProcessorStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvm.g.cs deleted file mode 100644 index 0bb8bdd2d38..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvm.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterJvm -{ - /// - /// - /// Uptime duration, in milliseconds, since JVM last started. - /// - /// - [JsonInclude, JsonPropertyName("max_uptime_in_millis")] - public long MaxUptimeInMillis { get; init; } - - /// - /// - /// Contains statistics about memory used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterJvmMemory Mem { get; init; } - - /// - /// - /// Number of active threads in use by JVM across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("threads")] - public long Threads { get; init; } - - /// - /// - /// Contains statistics about the JVM versions used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("versions")] - public IReadOnlyCollection Versions { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmMemory.g.cs deleted file mode 100644 index 4852724d45f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmMemory.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterJvmMemory -{ - /// - /// - /// Maximum amount of memory, in bytes, available for use by the heap across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("heap_max_in_bytes")] - public long HeapMaxInBytes { get; init; } - - /// - /// - /// Memory, in bytes, currently in use by the heap across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("heap_used_in_bytes")] - public long HeapUsedInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmVersion.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmVersion.g.cs deleted file mode 100644 index cec8a46d2a5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterJvmVersion.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterJvmVersion -{ - /// - /// - /// Always true. All distributions come with a bundled Java Development Kit (JDK). - /// - /// - [JsonInclude, JsonPropertyName("bundled_jdk")] - public bool BundledJdk { get; init; } - - /// - /// - /// Total number of selected nodes using JVM. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// If true, a bundled JDK is in use by JVM. - /// - /// - [JsonInclude, JsonPropertyName("using_bundled_jdk")] - public bool UsingBundledJdk { get; init; } - - /// - /// - /// Version of JVM used by one or more selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } - - /// - /// - /// Name of the JVM. - /// - /// - [JsonInclude, JsonPropertyName("vm_name")] - public string VmName { get; init; } - - /// - /// - /// Vendor of the JVM. - /// - /// - [JsonInclude, JsonPropertyName("vm_vendor")] - public string VmVendor { get; init; } - - /// - /// - /// Full version number of JVM. - /// The full version number includes a plus sign (+) followed by the build number. - /// - /// - [JsonInclude, JsonPropertyName("vm_version")] - public string VmVersion { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNetworkTypes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNetworkTypes.g.cs deleted file mode 100644 index 42726c2770f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNetworkTypes.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterNetworkTypes -{ - /// - /// - /// Contains statistics about the HTTP network types used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("http_types")] - public IReadOnlyDictionary HttpTypes { get; init; } - - /// - /// - /// Contains statistics about the transport network types used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("transport_types")] - public IReadOnlyDictionary TransportTypes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodeCount.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodeCount.g.cs deleted file mode 100644 index 6d4180f2f52..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodeCount.g.cs +++ /dev/null @@ -1,60 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterNodeCount -{ - [JsonInclude, JsonPropertyName("coordinating_only")] - public int CoordinatingOnly { get; init; } - [JsonInclude, JsonPropertyName("data")] - public int Data { get; init; } - [JsonInclude, JsonPropertyName("data_cold")] - public int DataCold { get; init; } - [JsonInclude, JsonPropertyName("data_content")] - public int DataContent { get; init; } - [JsonInclude, JsonPropertyName("data_frozen")] - public int? DataFrozen { get; init; } - [JsonInclude, JsonPropertyName("data_hot")] - public int DataHot { get; init; } - [JsonInclude, JsonPropertyName("data_warm")] - public int DataWarm { get; init; } - [JsonInclude, JsonPropertyName("ingest")] - public int Ingest { get; init; } - [JsonInclude, JsonPropertyName("master")] - public int Master { get; init; } - [JsonInclude, JsonPropertyName("ml")] - public int Ml { get; init; } - [JsonInclude, JsonPropertyName("remote_cluster_client")] - public int RemoteClusterClient { get; init; } - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } - [JsonInclude, JsonPropertyName("transform")] - public int Transform { get; init; } - [JsonInclude, JsonPropertyName("voting_only")] - public int VotingOnly { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodes.g.cs deleted file mode 100644 index 729a29ce92c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterNodes.g.cs +++ /dev/null @@ -1,116 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterNodes -{ - /// - /// - /// Contains counts for nodes selected by the request’s node filters. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterNodeCount Count { get; init; } - - /// - /// - /// Contains statistics about the discovery types used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("discovery_types")] - public IReadOnlyDictionary DiscoveryTypes { get; init; } - - /// - /// - /// Contains statistics about file stores by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("fs")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterFileSystem Fs { get; init; } - [JsonInclude, JsonPropertyName("indexing_pressure")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.IndexingPressure IndexingPressure { get; init; } - [JsonInclude, JsonPropertyName("ingest")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterIngest Ingest { get; init; } - - /// - /// - /// Contains statistics about the Java Virtual Machines (JVMs) used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("jvm")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterJvm Jvm { get; init; } - - /// - /// - /// Contains statistics about the transport and HTTP networks used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("network_types")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterNetworkTypes NetworkTypes { get; init; } - - /// - /// - /// Contains statistics about the operating systems used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("os")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterOperatingSystem Os { get; init; } - - /// - /// - /// Contains statistics about Elasticsearch distributions installed on selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("packaging_types")] - public IReadOnlyCollection PackagingTypes { get; init; } - - /// - /// - /// Contains statistics about installed plugins and modules by selected nodes. - /// If no plugins or modules are installed, this array is empty. - /// - /// - [JsonInclude, JsonPropertyName("plugins")] - public IReadOnlyCollection Plugins { get; init; } - - /// - /// - /// Contains statistics about processes used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("process")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterProcess Process { get; init; } - - /// - /// - /// Array of Elasticsearch versions used on selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("versions")] - public IReadOnlyCollection Versions { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystem.g.cs deleted file mode 100644 index d222650835a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterOperatingSystem -{ - /// - /// - /// Number of processors used to calculate thread pool size across all selected nodes. - /// This number can be set with the processors setting of a node and defaults to the number of processors reported by the operating system. - /// In both cases, this number will never be larger than 32. - /// - /// - [JsonInclude, JsonPropertyName("allocated_processors")] - public int AllocatedProcessors { get; init; } - - /// - /// - /// Contains statistics about processor architectures (for example, x86_64 or aarch64) used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("architectures")] - public IReadOnlyCollection? Architectures { get; init; } - - /// - /// - /// Number of processors available to JVM across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("available_processors")] - public int AvailableProcessors { get; init; } - - /// - /// - /// Contains statistics about memory used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.OperatingSystemMemoryInfo Mem { get; init; } - - /// - /// - /// Contains statistics about operating systems used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("names")] - public IReadOnlyCollection Names { get; init; } - - /// - /// - /// Contains statistics about operating systems used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("pretty_names")] - public IReadOnlyCollection PrettyNames { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemArchitecture.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemArchitecture.g.cs deleted file mode 100644 index 61bdabcb62c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemArchitecture.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterOperatingSystemArchitecture -{ - /// - /// - /// Name of an architecture used by one or more selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("arch")] - public string Arch { get; init; } - - /// - /// - /// Number of selected nodes using the architecture. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemName.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemName.g.cs deleted file mode 100644 index 80c7fe442a1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemName.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterOperatingSystemName -{ - /// - /// - /// Number of selected nodes using the operating system. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Name of an operating system used by one or more selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemPrettyName.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemPrettyName.g.cs deleted file mode 100644 index d01cda664a6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterOperatingSystemPrettyName.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterOperatingSystemPrettyName -{ - /// - /// - /// Number of selected nodes using the operating system. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Human-readable name of an operating system used by one or more selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("pretty_name")] - public string PrettyName { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcess.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcess.g.cs deleted file mode 100644 index bb1f40f8d6a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcess.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterProcess -{ - /// - /// - /// Contains statistics about CPU used by selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("cpu")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterProcessCpu Cpu { get; init; } - - /// - /// - /// Contains statistics about open file descriptors in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("open_file_descriptors")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ClusterProcessOpenFileDescriptors OpenFileDescriptors { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessCpu.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessCpu.g.cs deleted file mode 100644 index 628af314ee5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessCpu.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterProcessCpu -{ - /// - /// - /// Percentage of CPU used across all selected nodes. - /// Returns -1 if not supported. - /// - /// - [JsonInclude, JsonPropertyName("percent")] - public int Percent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessOpenFileDescriptors.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessOpenFileDescriptors.g.cs deleted file mode 100644 index d83dbda5e67..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessOpenFileDescriptors.g.cs +++ /dev/null @@ -1,58 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterProcessOpenFileDescriptors -{ - /// - /// - /// Average number of concurrently open file descriptors. - /// Returns -1 if not supported. - /// - /// - [JsonInclude, JsonPropertyName("avg")] - public long Avg { get; init; } - - /// - /// - /// Maximum number of concurrently open file descriptors allowed across all selected nodes. - /// Returns -1 if not supported. - /// - /// - [JsonInclude, JsonPropertyName("max")] - public long Max { get; init; } - - /// - /// - /// Minimum number of concurrently open file descriptors across all selected nodes. - /// Returns -1 if not supported. - /// - /// - [JsonInclude, JsonPropertyName("min")] - public long Min { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessor.g.cs deleted file mode 100644 index fb7bcd0cb17..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterProcessor.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterProcessor -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("current")] - public long Current { get; init; } - [JsonInclude, JsonPropertyName("failed")] - public long Failed { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_millis")] - public long TimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterShardMetrics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterShardMetrics.g.cs deleted file mode 100644 index 1c37490ab83..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ClusterShardMetrics.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ClusterShardMetrics -{ - /// - /// - /// Mean number of shards in an index, counting only shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("avg")] - public double Avg { get; init; } - - /// - /// - /// Maximum number of shards in an index, counting only shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("max")] - public double Max { get; init; } - - /// - /// - /// Minimum number of shards in an index, counting only shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("min")] - public double Min { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplate.g.cs deleted file mode 100644 index 3ce87963c22..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplate.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ComponentTemplate -{ - [JsonInclude, JsonPropertyName("component_template")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ComponentTemplateNode ComponentTemplateNode { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateNode.g.cs deleted file mode 100644 index 2155bf8958f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateNode.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ComponentTemplateNode -{ - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.ComponentTemplateSummary Template { get; init; } - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs deleted file mode 100644 index fb48da5840f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ComponentTemplateSummary -{ - [JsonInclude, JsonPropertyName("aliases")] - public IReadOnlyDictionary? Aliases { get; init; } - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; init; } - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("settings")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings))] - public IReadOnlyDictionary? Settings { get; init; } - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.cs deleted file mode 100644 index 9ae6aadc90c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/CurrentNode.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class CurrentNode -{ - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary Attributes { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("transport_address")] - public string TransportAddress { get; init; } - [JsonInclude, JsonPropertyName("weight_ranking")] - public int WeightRanking { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/DiskUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/DiskUsage.g.cs deleted file mode 100644 index f930354f4a3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/DiskUsage.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class DiskUsage -{ - [JsonInclude, JsonPropertyName("free_bytes")] - public long FreeBytes { get; init; } - [JsonInclude, JsonPropertyName("free_disk_percent")] - public double FreeDiskPercent { get; init; } - [JsonInclude, JsonPropertyName("path")] - public string Path { get; init; } - [JsonInclude, JsonPropertyName("total_bytes")] - public long TotalBytes { get; init; } - [JsonInclude, JsonPropertyName("used_bytes")] - public long UsedBytes { get; init; } - [JsonInclude, JsonPropertyName("used_disk_percent")] - public double UsedDiskPercent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypes.g.cs deleted file mode 100644 index b0cec494d36..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypes.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class FieldTypes -{ - /// - /// - /// The number of occurrences of the field type in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// The number of indices containing the field type in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("index_count")] - public int IndexCount { get; init; } - - /// - /// - /// For dense_vector field types, number of indexed vector types in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("indexed_vector_count")] - public long? IndexedVectorCount { get; init; } - - /// - /// - /// For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("indexed_vector_dim_max")] - public long? IndexedVectorDimMax { get; init; } - - /// - /// - /// For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("indexed_vector_dim_min")] - public long? IndexedVectorDimMin { get; init; } - - /// - /// - /// The name for the field type in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// The number of fields that declare a script. - /// - /// - [JsonInclude, JsonPropertyName("script_count")] - public int? ScriptCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypesMappings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypesMappings.g.cs deleted file mode 100644 index a557cde8bbb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/FieldTypesMappings.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class FieldTypesMappings -{ - /// - /// - /// Contains statistics about field data types used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("field_types")] - public IReadOnlyCollection FieldTypes { get; init; } - - /// - /// - /// Contains statistics about runtime field data types used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("runtime_field_types")] - public IReadOnlyCollection? RuntimeFieldTypes { get; init; } - - /// - /// - /// Total number of fields in all non-system indices, accounting for mapping deduplication. - /// - /// - [JsonInclude, JsonPropertyName("total_deduplicated_field_count")] - public int? TotalDeduplicatedFieldCount { get; init; } - - /// - /// - /// Total size of all mappings after deduplication and compression. - /// - /// - [JsonInclude, JsonPropertyName("total_deduplicated_mapping_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TotalDeduplicatedMappingSize { get; init; } - - /// - /// - /// Total size of all mappings, in bytes, after deduplication and compression. - /// - /// - [JsonInclude, JsonPropertyName("total_deduplicated_mapping_size_in_bytes")] - public long? TotalDeduplicatedMappingSizeInBytes { get; init; } - - /// - /// - /// Total number of fields in all non-system indices. - /// - /// - [JsonInclude, JsonPropertyName("total_field_count")] - public int? TotalFieldCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs deleted file mode 100644 index 8731a5b847d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexHealthStats.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class IndexHealthStats -{ - [JsonInclude, JsonPropertyName("active_primary_shards")] - public int ActivePrimaryShards { get; init; } - [JsonInclude, JsonPropertyName("active_shards")] - public int ActiveShards { get; init; } - [JsonInclude, JsonPropertyName("initializing_shards")] - public int InitializingShards { get; init; } - [JsonInclude, JsonPropertyName("number_of_replicas")] - public int NumberOfReplicas { get; init; } - [JsonInclude, JsonPropertyName("number_of_shards")] - public int NumberOfShards { get; init; } - [JsonInclude, JsonPropertyName("relocating_shards")] - public int RelocatingShards { get; init; } - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyDictionary? Shards { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("unassigned_primary_shards")] - public int UnassignedPrimaryShards { get; init; } - [JsonInclude, JsonPropertyName("unassigned_shards")] - public int UnassignedShards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressure.g.cs deleted file mode 100644 index 04570263351..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressure.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class IndexingPressure -{ - [JsonInclude, JsonPropertyName("memory")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.IndexingPressureMemory Memory { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemory.g.cs deleted file mode 100644 index 522db76567f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemory.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class IndexingPressureMemory -{ - [JsonInclude, JsonPropertyName("current")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.IndexingPressureMemorySummary Current { get; init; } - [JsonInclude, JsonPropertyName("limit_in_bytes")] - public long LimitInBytes { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.IndexingPressureMemorySummary Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs deleted file mode 100644 index edb0e5c0743..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class IndexingPressureMemorySummary -{ - [JsonInclude, JsonPropertyName("all_in_bytes")] - public long AllInBytes { get; init; } - [JsonInclude, JsonPropertyName("combined_coordinating_and_primary_in_bytes")] - public long CombinedCoordinatingAndPrimaryInBytes { get; init; } - [JsonInclude, JsonPropertyName("coordinating_in_bytes")] - public long CoordinatingInBytes { get; init; } - [JsonInclude, JsonPropertyName("coordinating_rejections")] - public long? CoordinatingRejections { get; init; } - [JsonInclude, JsonPropertyName("primary_in_bytes")] - public long PrimaryInBytes { get; init; } - [JsonInclude, JsonPropertyName("primary_rejections")] - public long? PrimaryRejections { get; init; } - [JsonInclude, JsonPropertyName("replica_in_bytes")] - public long ReplicaInBytes { get; init; } - [JsonInclude, JsonPropertyName("replica_rejections")] - public long? ReplicaRejections { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndicesVersions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndicesVersions.g.cs deleted file mode 100644 index 76b70da60a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/IndicesVersions.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class IndicesVersions -{ - [JsonInclude, JsonPropertyName("index_count")] - public int IndexCount { get; init; } - [JsonInclude, JsonPropertyName("primary_shard_count")] - public int PrimaryShardCount { get; init; } - [JsonInclude, JsonPropertyName("total_primary_bytes")] - public long TotalPrimaryBytes { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs deleted file mode 100644 index 9eddb8404ad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class NodeAllocationExplanation -{ - [JsonInclude, JsonPropertyName("deciders")] - public IReadOnlyCollection Deciders { get; init; } - [JsonInclude, JsonPropertyName("node_attributes")] - public IReadOnlyDictionary NodeAttributes { get; init; } - [JsonInclude, JsonPropertyName("node_decision")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.Decision NodeDecision { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } - [JsonInclude, JsonPropertyName("node_name")] - public string NodeName { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("store")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.AllocationStore? Store { get; init; } - [JsonInclude, JsonPropertyName("transport_address")] - public string TransportAddress { get; init; } - [JsonInclude, JsonPropertyName("weight_ranking")] - public int WeightRanking { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeDiskUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeDiskUsage.g.cs deleted file mode 100644 index b7f97e64762..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodeDiskUsage.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class NodeDiskUsage -{ - [JsonInclude, JsonPropertyName("least_available")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.DiskUsage LeastAvailable { get; init; } - [JsonInclude, JsonPropertyName("most_available")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.DiskUsage MostAvailable { get; init; } - [JsonInclude, JsonPropertyName("node_name")] - public string NodeName { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodePackagingType.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodePackagingType.g.cs deleted file mode 100644 index acc6b91750e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/NodePackagingType.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class NodePackagingType -{ - /// - /// - /// Number of selected nodes using the distribution flavor and file type. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Type of Elasticsearch distribution. This is always default. - /// - /// - [JsonInclude, JsonPropertyName("flavor")] - public string Flavor { get; init; } - - /// - /// - /// File type (such as tar or zip) used for the distribution package. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs deleted file mode 100644 index bdde2e74f12..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class OperatingSystemMemoryInfo -{ - /// - /// - /// Total amount, in bytes, of memory across all selected nodes, but using the value specified using the es.total_memory_bytes system property instead of measured total memory for those nodes where that system property was set. - /// - /// - [JsonInclude, JsonPropertyName("adjusted_total_in_bytes")] - public long? AdjustedTotalInBytes { get; init; } - - /// - /// - /// Amount, in bytes, of free physical memory across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("free_in_bytes")] - public long FreeInBytes { get; init; } - - /// - /// - /// Percentage of free physical memory across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("free_percent")] - public int FreePercent { get; init; } - - /// - /// - /// Total amount, in bytes, of physical memory across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long TotalInBytes { get; init; } - - /// - /// - /// Amount, in bytes, of physical memory in use across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("used_in_bytes")] - public long UsedInBytes { get; init; } - - /// - /// - /// Percentage of physical memory in use across all selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("used_percent")] - public int UsedPercent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/PendingTask.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/PendingTask.g.cs deleted file mode 100644 index 0d08dd1d7f8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/PendingTask.g.cs +++ /dev/null @@ -1,80 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class PendingTask -{ - /// - /// - /// Indicates whether the pending tasks are currently executing or not. - /// - /// - [JsonInclude, JsonPropertyName("executing")] - public bool Executing { get; init; } - - /// - /// - /// The number that represents when the task has been inserted into the task queue. - /// - /// - [JsonInclude, JsonPropertyName("insert_order")] - public int InsertOrder { get; init; } - - /// - /// - /// The priority of the pending task. - /// The valid priorities in descending priority order are: IMMEDIATE > URGENT > HIGH > NORMAL > LOW > LANGUID. - /// - /// - [JsonInclude, JsonPropertyName("priority")] - public string Priority { get; init; } - - /// - /// - /// A general description of the cluster task that may include a reason and origin. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string Source { get; init; } - - /// - /// - /// The time since the task is waiting for being performed. - /// - /// - [JsonInclude, JsonPropertyName("time_in_queue")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TimeInQueue { get; init; } - - /// - /// - /// The time expressed in milliseconds since the task is waiting for being performed. - /// - /// - [JsonInclude, JsonPropertyName("time_in_queue_millis")] - public long TimeInQueueMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ReservedSize.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ReservedSize.g.cs deleted file mode 100644 index 8b173c6134f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ReservedSize.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ReservedSize -{ - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } - [JsonInclude, JsonPropertyName("path")] - public string Path { get; init; } - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyCollection Shards { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/RuntimeFieldTypes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/RuntimeFieldTypes.g.cs deleted file mode 100644 index 4f65523719a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/RuntimeFieldTypes.g.cs +++ /dev/null @@ -1,143 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class RuntimeFieldTypes -{ - /// - /// - /// Maximum number of characters for a single runtime field script. - /// - /// - [JsonInclude, JsonPropertyName("chars_max")] - public int CharsMax { get; init; } - - /// - /// - /// Total number of characters for the scripts that define the current runtime field data type. - /// - /// - [JsonInclude, JsonPropertyName("chars_total")] - public int CharsTotal { get; init; } - - /// - /// - /// Number of runtime fields mapped to the field data type in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Maximum number of accesses to doc_values for a single runtime field script - /// - /// - [JsonInclude, JsonPropertyName("doc_max")] - public int DocMax { get; init; } - - /// - /// - /// Total number of accesses to doc_values for the scripts that define the current runtime field data type. - /// - /// - [JsonInclude, JsonPropertyName("doc_total")] - public int DocTotal { get; init; } - - /// - /// - /// Number of indices containing a mapping of the runtime field data type in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("index_count")] - public int IndexCount { get; init; } - - /// - /// - /// Script languages used for the runtime fields scripts. - /// - /// - [JsonInclude, JsonPropertyName("lang")] - public IReadOnlyCollection Lang { get; init; } - - /// - /// - /// Maximum number of lines for a single runtime field script. - /// - /// - [JsonInclude, JsonPropertyName("lines_max")] - public int LinesMax { get; init; } - - /// - /// - /// Total number of lines for the scripts that define the current runtime field data type. - /// - /// - [JsonInclude, JsonPropertyName("lines_total")] - public int LinesTotal { get; init; } - - /// - /// - /// Field data type used in selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// Number of runtime fields that don’t declare a script. - /// - /// - [JsonInclude, JsonPropertyName("scriptless_count")] - public int ScriptlessCount { get; init; } - - /// - /// - /// Number of runtime fields that shadow an indexed field. - /// - /// - [JsonInclude, JsonPropertyName("shadowed_count")] - public int ShadowedCount { get; init; } - - /// - /// - /// Maximum number of accesses to _source for a single runtime field script. - /// - /// - [JsonInclude, JsonPropertyName("source_max")] - public int SourceMax { get; init; } - - /// - /// - /// Total number of accesses to _source for the scripts that define the current runtime field data type. - /// - /// - [JsonInclude, JsonPropertyName("source_total")] - public int SourceTotal { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs deleted file mode 100644 index 0c606274b01..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/ShardHealthStats.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class ShardHealthStats -{ - [JsonInclude, JsonPropertyName("active_shards")] - public int ActiveShards { get; init; } - [JsonInclude, JsonPropertyName("initializing_shards")] - public int InitializingShards { get; init; } - [JsonInclude, JsonPropertyName("primary_active")] - public bool PrimaryActive { get; init; } - [JsonInclude, JsonPropertyName("relocating_shards")] - public int RelocatingShards { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("unassigned_primary_shards")] - public int UnassignedPrimaryShards { get; init; } - [JsonInclude, JsonPropertyName("unassigned_shards")] - public int UnassignedShards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/UnassignedInformation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/UnassignedInformation.g.cs deleted file mode 100644 index cbd08538bb2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Cluster/UnassignedInformation.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -public sealed partial class UnassignedInformation -{ - [JsonInclude, JsonPropertyName("allocation_status")] - public string? AllocationStatus { get; init; } - [JsonInclude, JsonPropertyName("at")] - public DateTimeOffset At { get; init; } - [JsonInclude, JsonPropertyName("delayed")] - public bool? Delayed { get; init; } - [JsonInclude, JsonPropertyName("details")] - public string? Details { get; init; } - [JsonInclude, JsonPropertyName("failed_allocation_attempts")] - public int? FailedAllocationAttempts { get; init; } - [JsonInclude, JsonPropertyName("last_allocation_status")] - public string? LastAllocationStatus { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public Elastic.Clients.Elasticsearch.Serverless.Cluster.UnassignedInformationReason Reason { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterDetails.g.cs deleted file mode 100644 index e8bc2b3b0d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ClusterDetails -{ - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public string Indices { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterSearchStatus Status { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterStatistics.g.cs deleted file mode 100644 index 6c1e37d86e0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ClusterStatistics.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ClusterStatistics -{ - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyDictionary? Details { get; init; } - [JsonInclude, JsonPropertyName("failed")] - public int Failed { get; init; } - [JsonInclude, JsonPropertyName("partial")] - public int Partial { get; init; } - [JsonInclude, JsonPropertyName("running")] - public int Running { get; init; } - [JsonInclude, JsonPropertyName("skipped")] - public int Skipped { get; init; } - [JsonInclude, JsonPropertyName("successful")] - public int Successful { get; init; } - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CompletionStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CompletionStats.g.cs deleted file mode 100644 index 98ef24f22fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CompletionStats.g.cs +++ /dev/null @@ -1,51 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class CompletionStats -{ - [JsonInclude, JsonPropertyName("fields")] - [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.FieldSizeUsage))] - public IReadOnlyDictionary? Fields { get; init; } - - /// - /// - /// Total amount of memory used for completion across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Size { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CoordsGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CoordsGeoBounds.g.cs deleted file mode 100644 index 957212869db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/CoordsGeoBounds.g.cs +++ /dev/null @@ -1,92 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -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 : SerializableDescriptor -{ - 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.Serverless/_Generated/Types/Core/Bulk/ResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Bulk/ResponseItem.g.cs deleted file mode 100644 index 86ed9308f54..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Bulk/ResponseItem.g.cs +++ /dev/null @@ -1,112 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; - -public partial class ResponseItem -{ - /// - /// - /// Contains additional information about the failed operation. - /// The parameter is only returned for failed operations. - /// - /// - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? Error { get; init; } - [JsonInclude, JsonPropertyName("forced_refresh")] - public bool? ForcedRefresh { get; init; } - [JsonInclude, JsonPropertyName("get")] - public Elastic.Clients.Elasticsearch.Serverless.InlineGet>? Get { get; init; } - - /// - /// - /// The document ID associated with the operation. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public string? Id { get; init; } - - /// - /// - /// Name of the index associated with the operation. - /// If the operation targeted a data stream, this is the backing index into which the document was written. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - - /// - /// - /// The primary term assigned to the document for the operation. - /// - /// - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - - /// - /// - /// Result of the operation. - /// Successful values are created, deleted, and updated. - /// - /// - [JsonInclude, JsonPropertyName("result")] - public string? Result { get; init; } - - /// - /// - /// The sequence number assigned to the document for the operation. - /// Sequence numbers are used to ensure an older version of a document doesn’t overwrite a newer version. - /// - /// - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - - /// - /// - /// Contains shard information for the operation. - /// - /// - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } - - /// - /// - /// HTTP status code returned for the operation. - /// - /// - [JsonInclude, JsonPropertyName("status")] - public int Status { get; init; } - - /// - /// - /// The document version associated with the operation. - /// The document version is incremented each time the document is updated. - /// - /// - [JsonInclude, JsonPropertyName("_version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Context.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Context.g.cs deleted file mode 100644 index 4761d78cf9c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Context.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -/// -/// -/// Text or location that we want similar documents for or a lookup to a document's field for the text. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class Context : Union -{ - public Context(string Category) : base(Category) - { - } - - public Context(Elastic.Clients.Elasticsearch.Serverless.GeoLocation Location) : base(Location) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/Explanation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/Explanation.g.cs deleted file mode 100644 index 3f69857c215..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/Explanation.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Explain; - -public sealed partial class Explanation -{ - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyCollection Details { get; init; } - [JsonInclude, JsonPropertyName("value")] - public float Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/ExplanationDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/ExplanationDetail.g.cs deleted file mode 100644 index 0b9f1dd656d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Explain/ExplanationDetail.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Explain; - -public sealed partial class ExplanationDetail -{ - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyCollection? Details { get; init; } - [JsonInclude, JsonPropertyName("value")] - public float Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs deleted file mode 100644 index fb55120aeb0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs +++ /dev/null @@ -1,92 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.FieldCaps; - -public sealed partial class FieldCapability -{ - /// - /// - /// Whether this field can be aggregated on all indices. - /// - /// - [JsonInclude, JsonPropertyName("aggregatable")] - public bool Aggregatable { get; init; } - - /// - /// - /// The list of indices where this field has the same type family, or null if all indices have the same type family for the field. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? Indices { get; init; } - - /// - /// - /// Merged metadata across all indices as a map of string keys to arrays of values. A value length of 1 indicates that all indices had the same value for this key, while a length of 2 or more indicates that not all indices had the same value for this key. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// Whether this field is registered as a metadata field. - /// - /// - [JsonInclude, JsonPropertyName("metadata_field")] - public bool? MetadataField { get; init; } - - /// - /// - /// The list of indices where this field is not aggregatable, or null if all indices have the same definition for the field. - /// - /// - [JsonInclude, JsonPropertyName("non_aggregatable_indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? NonAggregatableIndices { get; init; } - - /// - /// - /// The list of indices where this field is not searchable, or null if all indices have the same definition for the field. - /// - /// - [JsonInclude, JsonPropertyName("non_searchable_indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? NonSearchableIndices { get; init; } - - /// - /// - /// Whether this field is indexed for search on all indices. - /// - /// - [JsonInclude, JsonPropertyName("searchable")] - public bool Searchable { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Get/GetResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Get/GetResult.g.cs deleted file mode 100644 index 10c904ab709..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Get/GetResult.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Get; - -public sealed partial class GetResult -{ - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValues? Fields { get; init; } - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_ignored")] - public IReadOnlyCollection? Ignored { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("_routing")] - public string? Routing { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_source")] - [SourceConverter] - public TDocument? Source { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleDetails.g.cs deleted file mode 100644 index 9a0fb2850cc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class DataStreamLifecycleDetails -{ - [JsonInclude, JsonPropertyName("stagnating_backing_indices")] - public IReadOnlyCollection? StagnatingBackingIndices { get; init; } - [JsonInclude, JsonPropertyName("stagnating_backing_indices_count")] - public int StagnatingBackingIndicesCount { get; init; } - [JsonInclude, JsonPropertyName("total_backing_indices_in_error")] - public int TotalBackingIndicesInError { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleIndicator.g.cs deleted file mode 100644 index e4414a96c0e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DataStreamLifecycleIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// DATA_STREAM_LIFECYCLE -/// -/// -public sealed partial class DataStreamLifecycleIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.DataStreamLifecycleDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Diagnosis.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Diagnosis.g.cs deleted file mode 100644 index b6c27c1cb46..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Diagnosis.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class Diagnosis -{ - [JsonInclude, JsonPropertyName("action")] - public string Action { get; init; } - [JsonInclude, JsonPropertyName("affected_resources")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.DiagnosisAffectedResources AffectedResources { get; init; } - [JsonInclude, JsonPropertyName("cause")] - public string Cause { get; init; } - [JsonInclude, JsonPropertyName("help_url")] - public string HelpUrl { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiagnosisAffectedResources.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiagnosisAffectedResources.g.cs deleted file mode 100644 index 89bfd2d4e2b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiagnosisAffectedResources.g.cs +++ /dev/null @@ -1,43 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class DiagnosisAffectedResources -{ - [JsonInclude, JsonPropertyName("feature_states")] - public IReadOnlyCollection? FeatureStates { get; init; } - [JsonInclude, JsonPropertyName("indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? Indices { get; init; } - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyCollection? Nodes { get; init; } - [JsonInclude, JsonPropertyName("slm_policies")] - public IReadOnlyCollection? SlmPolicies { get; init; } - [JsonInclude, JsonPropertyName("snapshot_repositories")] - public IReadOnlyCollection? SnapshotRepositories { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicator.g.cs deleted file mode 100644 index 93fc7429d59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// DISK -/// -/// -public sealed partial class DiskIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.DiskIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicatorDetails.g.cs deleted file mode 100644 index 3b4a5769fad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/DiskIndicatorDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class DiskIndicatorDetails -{ - [JsonInclude, JsonPropertyName("indices_with_readonly_block")] - public long IndicesWithReadonlyBlock { get; init; } - [JsonInclude, JsonPropertyName("nodes_over_flood_stage_watermark")] - public long NodesOverFloodStageWatermark { get; init; } - [JsonInclude, JsonPropertyName("nodes_over_high_watermark")] - public long NodesOverHighWatermark { get; init; } - [JsonInclude, JsonPropertyName("nodes_with_enough_disk_space")] - public long NodesWithEnoughDiskSpace { get; init; } - [JsonInclude, JsonPropertyName("nodes_with_unknown_disk_status")] - public long NodesWithUnknownDiskStatus { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs deleted file mode 100644 index 50e90d939ec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// FILE_SETTINGS -/// -/// -public sealed partial class FileSettingsIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.FileSettingsIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs deleted file mode 100644 index ee342d48d11..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class FileSettingsIndicatorDetails -{ - [JsonInclude, JsonPropertyName("failure_streak")] - public long FailureStreak { get; init; } - [JsonInclude, JsonPropertyName("most_recent_failure")] - public string MostRecentFailure { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicator.g.cs deleted file mode 100644 index 28272157f9a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// ILM -/// -/// -public sealed partial class IlmIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IlmIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicatorDetails.g.cs deleted file mode 100644 index 11d32512bf4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IlmIndicatorDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class IlmIndicatorDetails -{ - [JsonInclude, JsonPropertyName("ilm_status")] - public Elastic.Clients.Elasticsearch.Serverless.LifecycleOperationMode IlmStatus { get; init; } - [JsonInclude, JsonPropertyName("policies")] - public long Policies { get; init; } - [JsonInclude, JsonPropertyName("stagnating_indices")] - public int StagnatingIndices { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Impact.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Impact.g.cs deleted file mode 100644 index c14d45c54d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Impact.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class Impact -{ - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("impact_areas")] - public IReadOnlyCollection ImpactAreas { get; init; } - [JsonInclude, JsonPropertyName("severity")] - public int Severity { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IndicatorNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IndicatorNode.g.cs deleted file mode 100644 index 691ee52665d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/IndicatorNode.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class IndicatorNode -{ - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string? NodeId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Indicators.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Indicators.g.cs deleted file mode 100644 index 6e72eeae618..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/Indicators.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class Indicators -{ - [JsonInclude, JsonPropertyName("data_stream_lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.DataStreamLifecycleIndicator? DataStreamLifecycle { get; init; } - [JsonInclude, JsonPropertyName("disk")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.DiskIndicator? Disk { get; init; } - [JsonInclude, JsonPropertyName("file_settings")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.FileSettingsIndicator? FileSettings { get; init; } - [JsonInclude, JsonPropertyName("ilm")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IlmIndicator? Ilm { get; init; } - [JsonInclude, JsonPropertyName("master_is_stable")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.MasterIsStableIndicator? MasterIsStable { get; init; } - [JsonInclude, JsonPropertyName("repository_integrity")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.RepositoryIntegrityIndicator? RepositoryIntegrity { get; init; } - [JsonInclude, JsonPropertyName("shards_availability")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.ShardsAvailabilityIndicator? ShardsAvailability { get; init; } - [JsonInclude, JsonPropertyName("shards_capacity")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.ShardsCapacityIndicator? ShardsCapacity { get; init; } - [JsonInclude, JsonPropertyName("slm")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.SlmIndicator? Slm { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicator.g.cs deleted file mode 100644 index cfc3254debb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// MASTER_IS_STABLE -/// -/// -public sealed partial class MasterIsStableIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.MasterIsStableIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorClusterFormationNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorClusterFormationNode.g.cs deleted file mode 100644 index c8b80880e4b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorClusterFormationNode.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class MasterIsStableIndicatorClusterFormationNode -{ - [JsonInclude, JsonPropertyName("cluster_formation_message")] - public string ClusterFormationMessage { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorDetails.g.cs deleted file mode 100644 index 7865cdf466d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorDetails.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class MasterIsStableIndicatorDetails -{ - [JsonInclude, JsonPropertyName("cluster_formation")] - public IReadOnlyCollection? ClusterFormation { get; init; } - [JsonInclude, JsonPropertyName("current_master")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorNode CurrentMaster { get; init; } - [JsonInclude, JsonPropertyName("exception_fetching_history")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.MasterIsStableIndicatorExceptionFetchingHistory? ExceptionFetchingHistory { get; init; } - [JsonInclude, JsonPropertyName("recent_masters")] - public IReadOnlyCollection RecentMasters { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorExceptionFetchingHistory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorExceptionFetchingHistory.g.cs deleted file mode 100644 index 6c88148b004..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/MasterIsStableIndicatorExceptionFetchingHistory.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class MasterIsStableIndicatorExceptionFetchingHistory -{ - [JsonInclude, JsonPropertyName("message")] - public string Message { get; init; } - [JsonInclude, JsonPropertyName("stack_trace")] - public string StackTrace { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicator.g.cs deleted file mode 100644 index 338974b61d8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// REPOSITORY_INTEGRITY -/// -/// -public sealed partial class RepositoryIntegrityIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.RepositoryIntegrityIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs deleted file mode 100644 index 561d895cefe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class RepositoryIntegrityIndicatorDetails -{ - [JsonInclude, JsonPropertyName("corrupted")] - public IReadOnlyCollection? Corrupted { get; init; } - [JsonInclude, JsonPropertyName("corrupted_repositories")] - public long? CorruptedRepositories { get; init; } - [JsonInclude, JsonPropertyName("total_repositories")] - public long? TotalRepositories { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicator.g.cs deleted file mode 100644 index b6f74ef1f63..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// SHARDS_AVAILABILITY -/// -/// -public sealed partial class ShardsAvailabilityIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.ShardsAvailabilityIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicatorDetails.g.cs deleted file mode 100644 index d2b3121a56b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsAvailabilityIndicatorDetails.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class ShardsAvailabilityIndicatorDetails -{ - [JsonInclude, JsonPropertyName("creating_primaries")] - public long CreatingPrimaries { get; init; } - [JsonInclude, JsonPropertyName("creating_replicas")] - public long CreatingReplicas { get; init; } - [JsonInclude, JsonPropertyName("initializing_primaries")] - public long InitializingPrimaries { get; init; } - [JsonInclude, JsonPropertyName("initializing_replicas")] - public long InitializingReplicas { get; init; } - [JsonInclude, JsonPropertyName("restarting_primaries")] - public long RestartingPrimaries { get; init; } - [JsonInclude, JsonPropertyName("restarting_replicas")] - public long RestartingReplicas { get; init; } - [JsonInclude, JsonPropertyName("started_primaries")] - public long StartedPrimaries { get; init; } - [JsonInclude, JsonPropertyName("started_replicas")] - public long StartedReplicas { get; init; } - [JsonInclude, JsonPropertyName("unassigned_primaries")] - public long UnassignedPrimaries { get; init; } - [JsonInclude, JsonPropertyName("unassigned_replicas")] - public long UnassignedReplicas { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicator.g.cs deleted file mode 100644 index acfe6ed691a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// SHARDS_CAPACITY -/// -/// -public sealed partial class ShardsCapacityIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.ShardsCapacityIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorDetails.g.cs deleted file mode 100644 index 79d7f3f48a6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorDetails.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class ShardsCapacityIndicatorDetails -{ - [JsonInclude, JsonPropertyName("data")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.ShardsCapacityIndicatorTierDetail Data { get; init; } - [JsonInclude, JsonPropertyName("frozen")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.ShardsCapacityIndicatorTierDetail Frozen { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs deleted file mode 100644 index 4ae5675421f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class ShardsCapacityIndicatorTierDetail -{ - [JsonInclude, JsonPropertyName("current_used_shards")] - public int? CurrentUsedShards { get; init; } - [JsonInclude, JsonPropertyName("max_shards_in_cluster")] - public int MaxShardsInCluster { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicator.g.cs deleted file mode 100644 index 7583430b1dc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicator.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -/// -/// -/// SLM -/// -/// -public sealed partial class SlmIndicator -{ - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.SlmIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorDetails.g.cs deleted file mode 100644 index 1e98efc9541..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class SlmIndicatorDetails -{ - [JsonInclude, JsonPropertyName("policies")] - public long Policies { get; init; } - [JsonInclude, JsonPropertyName("slm_status")] - public Elastic.Clients.Elasticsearch.Serverless.LifecycleOperationMode SlmStatus { get; init; } - [JsonInclude, JsonPropertyName("unhealthy_policies")] - public Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport.SlmIndicatorUnhealthyPolicies? UnhealthyPolicies { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorUnhealthyPolicies.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorUnhealthyPolicies.g.cs deleted file mode 100644 index a8b55e73909..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/SlmIndicatorUnhealthyPolicies.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class SlmIndicatorUnhealthyPolicies -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("invocations_since_last_success")] - public IReadOnlyDictionary? InvocationsSinceLastSuccess { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/StagnatingBackingIndices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/StagnatingBackingIndices.g.cs deleted file mode 100644 index 1762c30d430..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/HealthReport/StagnatingBackingIndices.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -public sealed partial class StagnatingBackingIndices -{ - [JsonInclude, JsonPropertyName("first_occurrence_timestamp")] - public long FirstOccurrenceTimestamp { get; init; } - [JsonInclude, JsonPropertyName("index_name")] - public string IndexName { get; init; } - [JsonInclude, JsonPropertyName("retry_count")] - public int RetryCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetError.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetError.g.cs deleted file mode 100644 index af5c6088203..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetError.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MGet; - -public sealed partial class MultiGetError -{ - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause Error { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs deleted file mode 100644 index 6621f1f9ef0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs +++ /dev/null @@ -1,332 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MGet; - -public sealed partial class MultiGetOperation -{ - /// - /// - /// The unique document ID. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - - /// - /// - /// The index that contains the document. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// The key for the primary shard the document resides on. Required if routing is used during indexing. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// If false, excludes all _source fields. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - - /// - /// - /// The stored fields you want to retrieve. - /// - /// - [JsonInclude, JsonPropertyName("stored_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } - [JsonInclude, JsonPropertyName("version_type")] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get; set; } -} - -public sealed partial class MultiGetOperationDescriptor : SerializableDescriptor> -{ - internal MultiGetOperationDescriptor(Action> configure) => configure.Invoke(this); - - public MultiGetOperationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// The unique document ID. - /// - /// - public MultiGetOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index that contains the document. - /// - /// - public MultiGetOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// The key for the primary shard the document resides on. Required if routing is used during indexing. - /// - /// - public MultiGetOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// If false, excludes all _source fields. - /// - /// - public MultiGetOperationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// The stored fields you want to retrieve. - /// - /// - public MultiGetOperationDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public MultiGetOperationDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - public MultiGetOperationDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MultiGetOperationDescriptor : SerializableDescriptor -{ - internal MultiGetOperationDescriptor(Action configure) => configure.Invoke(this); - - public MultiGetOperationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// The unique document ID. - /// - /// - public MultiGetOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index that contains the document. - /// - /// - public MultiGetOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// The key for the primary shard the document resides on. Required if routing is used during indexing. - /// - /// - public MultiGetOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// If false, excludes all _source fields. - /// - /// - public MultiGetOperationDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// The stored fields you want to retrieve. - /// - /// - public MultiGetOperationDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public MultiGetOperationDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - public MultiGetOperationDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs deleted file mode 100644 index 5b48b7b456f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultiSearchItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; - -public sealed partial class MultiSearchItem -{ - [JsonInclude, JsonPropertyName("aggregations")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregateDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("_clusters")] - public Elastic.Clients.Elasticsearch.Serverless.ClusterStatistics? Clusters { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata HitsMetadata { get; init; } - [JsonInclude, JsonPropertyName("max_score")] - public double? MaxScore { get; init; } - [JsonInclude, JsonPropertyName("num_reduce_phases")] - public long? NumReducePhases { get; init; } - [JsonInclude, JsonPropertyName("pit_id")] - public string? PitId { get; init; } - [JsonInclude, JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Profile? Profile { get; init; } - [JsonInclude, JsonPropertyName("_scroll_id")] - public Elastic.Clients.Elasticsearch.Serverless.ScrollId? ScrollId { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("status")] - public int? Status { get; init; } - [JsonInclude, JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestDictionary? Suggest { get; init; } - [JsonInclude, JsonPropertyName("terminated_early")] - public bool? TerminatedEarly { get; init; } - [JsonInclude, JsonPropertyName("timed_out")] - public bool TimedOut { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long Took { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs deleted file mode 100644 index e3593c503c5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ /dev/null @@ -1,2648 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; - -internal sealed partial class MultisearchBodyConverter : JsonConverter -{ - public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new MultisearchBody(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "collapse") - { - variant.Collapse = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "docvalue_fields") - { - variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "explain") - { - variant.Explain = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ext") - { - variant.Ext = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "fields") - { - variant.Fields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "from") - { - variant.From = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "highlight") - { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices_boost") - { - variant.IndicesBoost = JsonSerializer.Deserialize>?>(ref reader, options); - continue; - } - - if (property == "knn") - { - variant.Knn = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (property == "min_score") - { - variant.MinScore = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "pit") - { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "post_filter") - { - variant.PostFilter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "profile") - { - variant.Profile = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rescore") - { - variant.Rescore = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "search_after") - { - variant.SearchAfter = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "seq_no_primary_term") - { - variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "size") - { - variant.Size = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "sort") - { - variant.Sort = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (property == "_source") - { - variant.Source = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "stats") - { - variant.Stats = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "stored_fields") - { - reader.Read(); - variant.StoredFields = new FieldsConverter().Read(ref reader, typeToConvert, options); - continue; - } - - if (property == "suggest") - { - variant.Suggest = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "terminate_after") - { - variant.TerminateAfter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "timeout") - { - variant.Timeout = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "track_scores") - { - variant.TrackScores = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "track_total_hits") - { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, MultisearchBody value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.Collapse is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, value.Collapse, options); - } - - if (value.DocvalueFields is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, value.DocvalueFields, options); - } - - if (value.Explain.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(value.Explain.Value); - } - - if (value.Ext is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, value.Ext, options); - } - - if (value.Fields is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, value.Fields, options); - } - - if (value.From.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(value.From.Value); - } - - if (value.Highlight is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, value.Highlight, options); - } - - if (value.IndicesBoost is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, value.IndicesBoost, options); - } - - if (value.Knn is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, value.Knn, options); - } - - if (value.MinScore.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(value.MinScore.Value); - } - - if (value.Pit is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, value.Pit, options); - } - - if (value.PostFilter is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, value.PostFilter, options); - } - - if (value.Profile.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(value.Profile.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.Rescore is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, value.Rescore, options); - } - - if (value.RuntimeMappings is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); - } - - if (value.ScriptFields is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, value.ScriptFields, options); - } - - if (value.SearchAfter is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, value.SearchAfter, options); - } - - if (value.SeqNoPrimaryTerm.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value); - } - - if (value.Size.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(value.Size.Value); - } - - if (value.Sort is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, value.Sort, options); - } - - if (value.Source is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, value.Source, options); - } - - if (value.Stats is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, value.Stats, options); - } - - if (value.StoredFields is not null) - { - writer.WritePropertyName("stored_fields"); - new FieldsConverter().Write(writer, value.StoredFields, options); - } - - if (value.Suggest is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, value.Suggest, options); - } - - if (value.TerminateAfter.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(value.TerminateAfter.Value); - } - - if (!string.IsNullOrEmpty(value.Timeout)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(value.Timeout); - } - - if (value.TrackScores.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(value.TrackScores.Value); - } - - if (value.TrackTotalHits is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, value.TrackTotalHits, options); - } - - if (value.Version.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(value.Version.Value); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(MultisearchBodyConverter))] -public sealed partial class MultisearchBody -{ - public IDictionary? Aggregations { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. The request returns doc values for field - /// names matching these patterns in the hits.fields property of the response. - /// - /// - public ICollection? DocvalueFields { get; set; } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public bool? Explain { get; set; } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public IDictionary? Ext { get; set; } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public ICollection? Fields { get; set; } - - /// - /// - /// Starting document offset. By default, you cannot page through more than 10,000 - /// hits using the from and size parameters. To page through more hits, use the - /// search_after parameter. - /// - /// - public int? From { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public ICollection>? IndicesBoost { get; set; } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public ICollection? Knn { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are - /// not included in the search results. - /// - /// - public double? MinScore { get; set; } - - /// - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you - /// cannot specify an <index> in the request path. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilter { get; set; } - public bool? Profile { get; set; } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - public ICollection? Rescore { get; set; } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public IDictionary? ScriptFields { get; set; } - public ICollection? SearchAfter { get; set; } - - /// - /// - /// If true, returns sequence number and primary term of the last modification - /// of each hit. See Optimistic concurrency control. - /// - /// - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// - /// The number of hits to return. By default, you cannot page through more - /// than 10,000 hits using the from and size parameters. To page through more - /// hits, use the search_after parameter. - /// - /// - public int? Size { get; set; } - public ICollection? Sort { get; set; } - - /// - /// - /// Indicates which source fields are returned for matching documents. These - /// fields are returned in the hits._source property of the search response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - - /// - /// - /// Stats groups to associate with the search. Each group maintains a statistics - /// aggregation for its associated searches. You can retrieve these stats using - /// the indices stats API. - /// - /// - public ICollection? Stats { get; set; } - - /// - /// - /// List of stored fields to return as part of a hit. If no fields are specified, - /// no stored fields are included in the response. If this field is specified, the _source - /// parameter defaults to false. You can pass _source: true to return both source fields - /// and stored fields in the search response. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? Suggest { get; set; } - - /// - /// - /// Maximum number of documents to collect for each shard. If a query reaches this - /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents - /// before sorting. Defaults to 0, which does not terminate query execution early. - /// - /// - public long? TerminateAfter { get; set; } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. If no response - /// is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public string? Timeout { get; set; } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public bool? TrackScores { get; set; } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact - /// number of hits is returned at the cost of some performance. If false, the - /// response does not include the total number of hits matching the query. - /// Defaults to 10,000 hits. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public bool? Version { get; set; } -} - -public sealed partial class MultisearchBodyDescriptor : SerializableDescriptor> -{ - internal MultisearchBodyDescriptor(Action> configure) => configure.Invoke(this); - - public MultisearchBodyDescriptor() : base() - { - } - - private IDictionary> AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action> DocvalueFieldsDescriptorAction { get; set; } - private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action> FieldsDescriptorAction { get; set; } - private Action>[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } - private Action> PostFilterDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? RescoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action> RescoreDescriptorAction { get; set; } - private Action>[] RescoreDescriptorActions { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private ICollection? StatsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action> SuggestDescriptorAction { get; set; } - private long? TerminateAfterValue { get; set; } - private string? TimeoutValue { get; set; } - private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? VersionValue { get; set; } - - public MultisearchBodyDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Collapse(Action> configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns doc values for field - /// names matching these patterns in the hits.fields property of the response. - /// - /// - public MultisearchBodyDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public MultisearchBodyDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor DocvalueFields(Action> configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor DocvalueFields(params Action>[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public MultisearchBodyDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public MultisearchBodyDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public MultisearchBodyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Fields(Action> configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Fields(params Action>[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. By default, you cannot page through more than 10,000 - /// hits using the from and size parameters. To page through more hits, use the - /// search_after parameter. - /// - /// - public MultisearchBodyDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Highlight(Action> configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public MultisearchBodyDescriptor Knn(ICollection? knn) - { - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnValue = knn; - return Self; - } - - public MultisearchBodyDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) - { - KnnValue = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Knn(Action> configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorActions = null; - KnnDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Knn(params Action>[] configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are - /// not included in the search results. - /// - /// - public MultisearchBodyDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you - /// cannot specify an <index> in the request path. - /// - /// - public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Action> configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Action> configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(params Action>[] configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public MultisearchBodyDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public MultisearchBodyDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public MultisearchBodyDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification - /// of each hit. See Optimistic concurrency control. - /// - /// - public MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The number of hits to return. By default, you cannot page through more - /// than 10,000 hits using the from and size parameters. To page through more - /// hits, use the search_after parameter. - /// - /// - public MultisearchBodyDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - public MultisearchBodyDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public MultisearchBodyDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Indicates which source fields are returned for matching documents. These - /// fields are returned in the hits._source property of the search response. - /// - /// - public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Stats groups to associate with the search. Each group maintains a statistics - /// aggregation for its associated searches. You can retrieve these stats using - /// the indices stats API. - /// - /// - public MultisearchBodyDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// - /// List of stored fields to return as part of a hit. If no fields are specified, - /// no stored fields are included in the response. If this field is specified, the _source - /// parameter defaults to false. You can pass _source: true to return both source fields - /// and stored fields in the search response. - /// - /// - public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Action> configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. If a query reaches this - /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents - /// before sorting. Defaults to 0, which does not terminate query execution early. - /// - /// - public MultisearchBodyDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. If no response - /// is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public MultisearchBodyDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact - /// number of hits is returned at the cost of some performance. If false, the - /// response does not include the total number of hits matching the query. - /// Defaults to 10,000 hits. - /// - /// - public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public MultisearchBodyDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (KnnDescriptor is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, KnnDescriptor, options); - } - else if (KnnDescriptorAction is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); - } - else if (KnnDescriptorActions is not null) - { - writer.WritePropertyName("knn"); - if (KnnDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in KnnDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); - } - - if (KnnDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (KnnValue is not null) - { - writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (PostFilterDescriptor is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); - } - else if (PostFilterDescriptorAction is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PostFilterDescriptorAction), options); - } - else if (PostFilterValue is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RescoreDescriptor is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, RescoreDescriptor, options); - } - else if (RescoreDescriptorAction is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); - } - else if (RescoreDescriptorActions is not null) - { - writer.WritePropertyName("rescore"); - if (RescoreDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RescoreDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(action), options); - } - - if (RescoreDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (RescoreValue is not null) - { - writer.WritePropertyName("rescore"); - SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (SuggestDescriptor is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestDescriptor, options); - } - else if (SuggestDescriptorAction is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); - } - else if (SuggestValue is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestValue, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - if (!string.IsNullOrEmpty(TimeoutValue)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(TimeoutValue); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MultisearchBodyDescriptor : SerializableDescriptor -{ - internal MultisearchBodyDescriptor(Action configure) => configure.Invoke(this); - - public MultisearchBodyDescriptor() : base() - { - } - - private IDictionary AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action DocvalueFieldsDescriptorAction { get; set; } - private Action[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private IDictionary? ExtValue { get; set; } - private ICollection? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; } - private Action FieldsDescriptorAction { get; set; } - private Action[] FieldsDescriptorActions { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; } - private Action PostFilterDescriptorAction { get; set; } - private bool? ProfileValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? RescoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action RescoreDescriptorAction { get; set; } - private Action[] RescoreDescriptorActions { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private ICollection? SearchAfterValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private ICollection? StatsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } - private long? TerminateAfterValue { get; set; } - private string? TimeoutValue { get; set; } - private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } - private bool? VersionValue { get; set; } - - public MultisearchBodyDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Collapse(Action configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns doc values for field - /// names matching these patterns in the hits.fields property of the response. - /// - /// - public MultisearchBodyDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public MultisearchBodyDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor DocvalueFields(Action configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor DocvalueFields(params Action[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, returns detailed information about score computation as part of a hit. - /// - /// - public MultisearchBodyDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - /// - /// - /// Configuration of search extensions defined by Elasticsearch plugins. - /// - /// - public MultisearchBodyDescriptor Ext(Func, FluentDictionary> selector) - { - ExtValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Array of wildcard (*) patterns. The request returns values for field names - /// matching these patterns in the hits.fields property of the response. - /// - /// - public MultisearchBodyDescriptor Fields(ICollection? fields) - { - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsValue = fields; - return Self; - } - - public MultisearchBodyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - FieldsValue = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = null; - FieldsDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Fields(Action configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorActions = null; - FieldsDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Fields(params Action[] configure) - { - FieldsValue = null; - FieldsDescriptor = null; - FieldsDescriptorAction = null; - FieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Starting document offset. By default, you cannot page through more than 10,000 - /// hits using the from and size parameters. To page through more hits, use the - /// search_after parameter. - /// - /// - public MultisearchBodyDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// Boosts the _score of documents from specified indices. - /// - /// - public MultisearchBodyDescriptor IndicesBoost(ICollection>? indicesBoost) - { - IndicesBoostValue = indicesBoost; - return Self; - } - - /// - /// - /// Defines the approximate kNN search to run. - /// - /// - public MultisearchBodyDescriptor Knn(ICollection? knn) - { - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnValue = knn; - return Self; - } - - public MultisearchBodyDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) - { - KnnValue = null; - KnnDescriptorAction = null; - KnnDescriptorActions = null; - KnnDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Knn(Action configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorActions = null; - KnnDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Knn(params Action[] configure) - { - KnnValue = null; - KnnDescriptor = null; - KnnDescriptorAction = null; - KnnDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are - /// not included in the search results. - /// - /// - public MultisearchBodyDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Limits the search to a point in time (PIT). If you provide a PIT, you - /// cannot specify an <index> in the request path. - /// - /// - public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit) - { - PitDescriptor = null; - PitDescriptorAction = null; - PitValue = pit; - return Self; - } - - public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor descriptor) - { - PitValue = null; - PitDescriptorAction = null; - PitDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Pit(Action configure) - { - PitValue = null; - PitDescriptor = null; - PitDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter) - { - PostFilterDescriptor = null; - PostFilterDescriptorAction = null; - PostFilterValue = postFilter; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PostFilterValue = null; - PostFilterDescriptorAction = null; - PostFilterDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor PostFilter(Action configure) - { - PostFilterValue = null; - PostFilterDescriptor = null; - PostFilterDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Profile(bool? profile = true) - { - ProfileValue = profile; - return Self; - } - - /// - /// - /// Defines the search definition using the Query DSL. - /// - /// - public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(ICollection? rescore) - { - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreValue = rescore; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor descriptor) - { - RescoreValue = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = null; - RescoreDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Rescore(Action configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorActions = null; - RescoreDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Rescore(params Action[] configure) - { - RescoreValue = null; - RescoreDescriptor = null; - RescoreDescriptorAction = null; - RescoreDescriptorActions = configure; - return Self; - } - - /// - /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. - /// - /// - public MultisearchBodyDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Retrieve a script evaluation (based on different fields) for each hit. - /// - /// - public MultisearchBodyDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public MultisearchBodyDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// If true, returns sequence number and primary term of the last modification - /// of each hit. See Optimistic concurrency control. - /// - /// - public MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The number of hits to return. By default, you cannot page through more - /// than 10,000 hits using the from and size parameters. To page through more - /// hits, use the search_after parameter. - /// - /// - public MultisearchBodyDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - public MultisearchBodyDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public MultisearchBodyDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public MultisearchBodyDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Indicates which source fields are returned for matching documents. These - /// fields are returned in the hits._source property of the search response. - /// - /// - public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Stats groups to associate with the search. Each group maintains a statistics - /// aggregation for its associated searches. You can retrieve these stats using - /// the indices stats API. - /// - /// - public MultisearchBodyDescriptor Stats(ICollection? stats) - { - StatsValue = stats; - return Self; - } - - /// - /// - /// List of stored fields to return as part of a hit. If no fields are specified, - /// no stored fields are included in the response. If this field is specified, the _source - /// parameter defaults to false. You can pass _source: true to return both source fields - /// and stored fields in the search response. - /// - /// - public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest) - { - SuggestDescriptor = null; - SuggestDescriptorAction = null; - SuggestValue = suggest; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor descriptor) - { - SuggestValue = null; - SuggestDescriptorAction = null; - SuggestDescriptor = descriptor; - return Self; - } - - public MultisearchBodyDescriptor Suggest(Action configure) - { - SuggestValue = null; - SuggestDescriptor = null; - SuggestDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. If a query reaches this - /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents - /// before sorting. Defaults to 0, which does not terminate query execution early. - /// - /// - public MultisearchBodyDescriptor TerminateAfter(long? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - /// - /// - /// Specifies the period of time to wait for a response from each shard. If no response - /// is received before the timeout expires, the request fails and returns an error. - /// Defaults to no timeout. - /// - /// - public MultisearchBodyDescriptor Timeout(string? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. - /// - /// - public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - /// - /// - /// Number of hits matching the query to count accurately. If true, the exact - /// number of hits is returned at the cost of some performance. If false, the - /// response does not include the total number of hits matching the query. - /// Defaults to 10,000 hits. - /// - /// - public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? trackTotalHits) - { - TrackTotalHitsValue = trackTotalHits; - return Self; - } - - /// - /// - /// If true, returns document version as part of a hit. - /// - /// - public MultisearchBodyDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (ExtValue is not null) - { - writer.WritePropertyName("ext"); - JsonSerializer.Serialize(writer, ExtValue, options); - } - - if (FieldsDescriptor is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorAction is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(FieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FieldsDescriptorActions is not null) - { - writer.WritePropertyName("fields"); - writer.WriteStartArray(); - foreach (var action in FieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndicesBoostValue is not null) - { - writer.WritePropertyName("indices_boost"); - JsonSerializer.Serialize(writer, IndicesBoostValue, options); - } - - if (KnnDescriptor is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, KnnDescriptor, options); - } - else if (KnnDescriptorAction is not null) - { - writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); - } - else if (KnnDescriptorActions is not null) - { - writer.WritePropertyName("knn"); - if (KnnDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in KnnDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); - } - - if (KnnDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (KnnValue is not null) - { - writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (PitDescriptor is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitDescriptor, options); - } - else if (PitDescriptorAction is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); - } - else if (PitValue is not null) - { - writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, PitValue, options); - } - - if (PostFilterDescriptor is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterDescriptor, options); - } - else if (PostFilterDescriptorAction is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PostFilterDescriptorAction), options); - } - else if (PostFilterValue is not null) - { - writer.WritePropertyName("post_filter"); - JsonSerializer.Serialize(writer, PostFilterValue, options); - } - - if (ProfileValue.HasValue) - { - writer.WritePropertyName("profile"); - writer.WriteBooleanValue(ProfileValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RescoreDescriptor is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, RescoreDescriptor, options); - } - else if (RescoreDescriptorAction is not null) - { - writer.WritePropertyName("rescore"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); - } - else if (RescoreDescriptorActions is not null) - { - writer.WritePropertyName("rescore"); - if (RescoreDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in RescoreDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor(action), options); - } - - if (RescoreDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (RescoreValue is not null) - { - writer.WritePropertyName("rescore"); - SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StatsValue is not null) - { - writer.WritePropertyName("stats"); - JsonSerializer.Serialize(writer, StatsValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (SuggestDescriptor is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestDescriptor, options); - } - else if (SuggestDescriptorAction is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); - } - else if (SuggestValue is not null) - { - writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, SuggestValue, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - if (!string.IsNullOrEmpty(TimeoutValue)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(TimeoutValue); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (TrackTotalHitsValue is not null) - { - writer.WritePropertyName("track_total_hits"); - JsonSerializer.Serialize(writer, TrackTotalHitsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs deleted file mode 100644 index dbff568ba1b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs +++ /dev/null @@ -1,224 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; - -/// -/// -/// Contains parameters used to limit or change the subsequent search body request. -/// -/// -public sealed partial class MultisearchHeader -{ - [JsonInclude, JsonPropertyName("allow_no_indices")] - public bool? AllowNoIndices { get; set; } - [JsonInclude, JsonPropertyName("allow_partial_search_results")] - public bool? AllowPartialSearchResults { get; set; } - [JsonInclude, JsonPropertyName("ccs_minimize_roundtrips")] - public bool? CcsMinimizeRoundtrips { get; set; } - [JsonInclude, JsonPropertyName("expand_wildcards")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard))] - public ICollection? ExpandWildcards { get; set; } - [JsonInclude, JsonPropertyName("ignore_throttled")] - public bool? IgnoreThrottled { get; set; } - [JsonInclude, JsonPropertyName("ignore_unavailable")] - public bool? IgnoreUnavailable { get; set; } - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - [JsonInclude, JsonPropertyName("preference")] - public string? Preference { get; set; } - [JsonInclude, JsonPropertyName("request_cache")] - public bool? RequestCache { get; set; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - [JsonInclude, JsonPropertyName("search_type")] - public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get; set; } -} - -/// -/// -/// Contains parameters used to limit or change the subsequent search body request. -/// -/// -public sealed partial class MultisearchHeaderDescriptor : SerializableDescriptor -{ - internal MultisearchHeaderDescriptor(Action configure) => configure.Invoke(this); - - public MultisearchHeaderDescriptor() : base() - { - } - - private bool? AllowNoIndicesValue { get; set; } - private bool? AllowPartialSearchResultsValue { get; set; } - private bool? CcsMinimizeRoundtripsValue { get; set; } - private ICollection? ExpandWildcardsValue { get; set; } - private bool? IgnoreThrottledValue { get; set; } - private bool? IgnoreUnavailableValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private string? PreferenceValue { get; set; } - private bool? RequestCacheValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchTypeValue { get; set; } - - public MultisearchHeaderDescriptor AllowNoIndices(bool? allowNoIndices = true) - { - AllowNoIndicesValue = allowNoIndices; - return Self; - } - - public MultisearchHeaderDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) - { - AllowPartialSearchResultsValue = allowPartialSearchResults; - return Self; - } - - public MultisearchHeaderDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) - { - CcsMinimizeRoundtripsValue = ccsMinimizeRoundtrips; - return Self; - } - - public MultisearchHeaderDescriptor ExpandWildcards(ICollection? expandWildcards) - { - ExpandWildcardsValue = expandWildcards; - return Self; - } - - public MultisearchHeaderDescriptor IgnoreThrottled(bool? ignoreThrottled = true) - { - IgnoreThrottledValue = ignoreThrottled; - return Self; - } - - public MultisearchHeaderDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) - { - IgnoreUnavailableValue = ignoreUnavailable; - return Self; - } - - public MultisearchHeaderDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - public MultisearchHeaderDescriptor Preference(string? preference) - { - PreferenceValue = preference; - return Self; - } - - public MultisearchHeaderDescriptor RequestCache(bool? requestCache = true) - { - RequestCacheValue = requestCache; - return Self; - } - - public MultisearchHeaderDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - public MultisearchHeaderDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) - { - SearchTypeValue = searchType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowNoIndicesValue.HasValue) - { - writer.WritePropertyName("allow_no_indices"); - writer.WriteBooleanValue(AllowNoIndicesValue.Value); - } - - if (AllowPartialSearchResultsValue.HasValue) - { - writer.WritePropertyName("allow_partial_search_results"); - writer.WriteBooleanValue(AllowPartialSearchResultsValue.Value); - } - - if (CcsMinimizeRoundtripsValue.HasValue) - { - writer.WritePropertyName("ccs_minimize_roundtrips"); - writer.WriteBooleanValue(CcsMinimizeRoundtripsValue.Value); - } - - if (ExpandWildcardsValue is not null) - { - writer.WritePropertyName("expand_wildcards"); - SingleOrManySerializationHelper.Serialize(ExpandWildcardsValue, writer, options); - } - - if (IgnoreThrottledValue.HasValue) - { - writer.WritePropertyName("ignore_throttled"); - writer.WriteBooleanValue(IgnoreThrottledValue.Value); - } - - if (IgnoreUnavailableValue.HasValue) - { - writer.WritePropertyName("ignore_unavailable"); - writer.WriteBooleanValue(IgnoreUnavailableValue.Value); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (!string.IsNullOrEmpty(PreferenceValue)) - { - writer.WritePropertyName("preference"); - writer.WriteStringValue(PreferenceValue); - } - - if (RequestCacheValue.HasValue) - { - writer.WritePropertyName("request_cache"); - writer.WriteBooleanValue(RequestCacheValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchTypeValue is not null) - { - writer.WritePropertyName("search_type"); - JsonSerializer.Serialize(writer, SearchTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs deleted file mode 100644 index cec2496d68a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearchTemplate; - -public sealed partial class TemplateConfig -{ - /// - /// - /// If true, returns detailed information about score calculation as part of each hit. - /// - /// - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; init; } - - /// - /// - /// ID of the search template to use. If no source is specified, - /// this parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; init; } - - /// - /// - /// Key-value pairs used to replace Mustache variables in the template. - /// The key is the variable name. - /// The value is the variable value. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IReadOnlyDictionary? Params { get; init; } - - /// - /// - /// If true, the query execution is profiled. - /// - /// - [JsonInclude, JsonPropertyName("profile")] - public bool? Profile { get; init; } - - /// - /// - /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this - /// parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string? Source { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs deleted file mode 100644 index 1a3667265ba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ /dev/null @@ -1,699 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors; - -public sealed partial class MultiTermVectorsOperation -{ - /// - /// - /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. - /// - /// - [JsonInclude, JsonPropertyName("doc")] - public object? Doc { get; set; } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - [JsonInclude, JsonPropertyName("field_statistics")] - public bool? FieldStatistics { get; set; } - - /// - /// - /// Filter terms based on their tf-idf scores. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? Filter { get; set; } - - /// - /// - /// The ID of the document. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// The index of the document. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - [JsonInclude, JsonPropertyName("offsets")] - public bool? Offsets { get; set; } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - [JsonInclude, JsonPropertyName("payloads")] - public bool? Payloads { get; set; } - - /// - /// - /// If true, the response includes term positions. - /// - /// - [JsonInclude, JsonPropertyName("positions")] - public bool? Positions { get; set; } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - [JsonInclude, JsonPropertyName("term_statistics")] - public bool? TermStatistics { get; set; } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } - - /// - /// - /// Specific version type. - /// - /// - [JsonInclude, JsonPropertyName("version_type")] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get; set; } -} - -public sealed partial class MultiTermVectorsOperationDescriptor : SerializableDescriptor> -{ - internal MultiTermVectorsOperationDescriptor(Action> configure) => configure.Invoke(this); - - public MultiTermVectorsOperationDescriptor() : base() - { - } - - private object? DocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private bool? FieldStatisticsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private bool? OffsetsValue { get; set; } - private bool? PayloadsValue { get; set; } - private bool? PositionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private bool? TermStatisticsValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. - /// - /// - public MultiTermVectorsOperationDescriptor Doc(object? doc) - { - DocValue = doc; - return Self; - } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) - { - FieldStatisticsValue = fieldStatistics; - return Self; - } - - /// - /// - /// Filter terms based on their tf-idf scores. - /// - /// - public MultiTermVectorsOperationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public MultiTermVectorsOperationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public MultiTermVectorsOperationDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ID of the document. - /// - /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index of the document. - /// - /// - public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - public MultiTermVectorsOperationDescriptor Offsets(bool? offsets = true) - { - OffsetsValue = offsets; - return Self; - } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - public MultiTermVectorsOperationDescriptor Payloads(bool? payloads = true) - { - PayloadsValue = payloads; - return Self; - } - - /// - /// - /// If true, the response includes term positions. - /// - /// - public MultiTermVectorsOperationDescriptor Positions(bool? positions = true) - { - PositionsValue = positions; - return Self; - } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public MultiTermVectorsOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - public MultiTermVectorsOperationDescriptor TermStatistics(bool? termStatistics = true) - { - TermStatisticsValue = termStatistics; - return Self; - } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - public MultiTermVectorsOperationDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - /// - /// - /// Specific version type. - /// - /// - public MultiTermVectorsOperationDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocValue is not null) - { - writer.WritePropertyName("doc"); - JsonSerializer.Serialize(writer, DocValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FieldStatisticsValue.HasValue) - { - writer.WritePropertyName("field_statistics"); - writer.WriteBooleanValue(FieldStatisticsValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (OffsetsValue.HasValue) - { - writer.WritePropertyName("offsets"); - writer.WriteBooleanValue(OffsetsValue.Value); - } - - if (PayloadsValue.HasValue) - { - writer.WritePropertyName("payloads"); - writer.WriteBooleanValue(PayloadsValue.Value); - } - - if (PositionsValue.HasValue) - { - writer.WritePropertyName("positions"); - writer.WriteBooleanValue(PositionsValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (TermStatisticsValue.HasValue) - { - writer.WritePropertyName("term_statistics"); - writer.WriteBooleanValue(TermStatisticsValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MultiTermVectorsOperationDescriptor : SerializableDescriptor -{ - internal MultiTermVectorsOperationDescriptor(Action configure) => configure.Invoke(this); - - public MultiTermVectorsOperationDescriptor() : base() - { - } - - private object? DocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private bool? FieldStatisticsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private bool? OffsetsValue { get; set; } - private bool? PayloadsValue { get; set; } - private bool? PositionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private bool? TermStatisticsValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// An artificial document (a document not present in the index) for which you want to retrieve term vectors. - /// - /// - public MultiTermVectorsOperationDescriptor Doc(object? doc) - { - DocValue = doc; - return Self; - } - - /// - /// - /// Comma-separated list or wildcard expressions of fields to include in the statistics. - /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters. - /// - /// - public MultiTermVectorsOperationDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - /// - /// - public MultiTermVectorsOperationDescriptor FieldStatistics(bool? fieldStatistics = true) - { - FieldStatisticsValue = fieldStatistics; - return Self; - } - - /// - /// - /// Filter terms based on their tf-idf scores. - /// - /// - public MultiTermVectorsOperationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.Filter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public MultiTermVectorsOperationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public MultiTermVectorsOperationDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ID of the document. - /// - /// - public MultiTermVectorsOperationDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index of the document. - /// - /// - public MultiTermVectorsOperationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// If true, the response includes term offsets. - /// - /// - public MultiTermVectorsOperationDescriptor Offsets(bool? offsets = true) - { - OffsetsValue = offsets; - return Self; - } - - /// - /// - /// If true, the response includes term payloads. - /// - /// - public MultiTermVectorsOperationDescriptor Payloads(bool? payloads = true) - { - PayloadsValue = payloads; - return Self; - } - - /// - /// - /// If true, the response includes term positions. - /// - /// - public MultiTermVectorsOperationDescriptor Positions(bool? positions = true) - { - PositionsValue = positions; - return Self; - } - - /// - /// - /// Custom value used to route operations to a specific shard. - /// - /// - public MultiTermVectorsOperationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// If true, the response includes term frequency and document frequency. - /// - /// - public MultiTermVectorsOperationDescriptor TermStatistics(bool? termStatistics = true) - { - TermStatisticsValue = termStatistics; - return Self; - } - - /// - /// - /// If true, returns the document version as part of a hit. - /// - /// - public MultiTermVectorsOperationDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - /// - /// - /// Specific version type. - /// - /// - public MultiTermVectorsOperationDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocValue is not null) - { - writer.WritePropertyName("doc"); - JsonSerializer.Serialize(writer, DocValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FieldStatisticsValue.HasValue) - { - writer.WritePropertyName("field_statistics"); - writer.WriteBooleanValue(FieldStatisticsValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (OffsetsValue.HasValue) - { - writer.WritePropertyName("offsets"); - writer.WriteBooleanValue(OffsetsValue.Value); - } - - if (PayloadsValue.HasValue) - { - writer.WritePropertyName("payloads"); - writer.WriteBooleanValue(PayloadsValue.Value); - } - - if (PositionsValue.HasValue) - { - writer.WritePropertyName("positions"); - writer.WriteBooleanValue(PositionsValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (TermStatisticsValue.HasValue) - { - writer.WritePropertyName("term_statistics"); - writer.WriteBooleanValue(TermStatisticsValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs deleted file mode 100644 index 4f06a813c46..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Mtermvectors; - -public sealed partial class MultiTermVectorsResult -{ - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? Error { get; init; } - [JsonInclude, JsonPropertyName("found")] - public bool? Found { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string? Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("term_vectors")] - [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.TermVector))] - public IReadOnlyDictionary? TermVectors { get; init; } - [JsonInclude, JsonPropertyName("took")] - public long? Took { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiGetResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiGetResponseItem.g.cs deleted file mode 100644 index 9ff09f18602..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiGetResponseItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MGet; - -public sealed partial class MultiGetResponseItem : Union, Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetError> -{ - public MultiGetResponseItem(Elastic.Clients.Elasticsearch.Serverless.Core.Get.GetResult Result) : base(Result) - { - } - - public MultiGetResponseItem(Elastic.Clients.Elasticsearch.Serverless.Core.MGet.MultiGetError Failure) : base(Failure) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiSearchResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiSearchResponseItem.g.cs deleted file mode 100644 index cc143a4d923..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MultiSearchResponseItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; - -public sealed partial class MultiSearchResponseItem : Union, Elastic.Clients.Elasticsearch.Serverless.ErrorResponseBase> -{ - public MultiSearchResponseItem(Elastic.Clients.Elasticsearch.Serverless.Core.MSearch.MultiSearchItem Result) : base(Result) - { - } - - public MultiSearchResponseItem(Elastic.Clients.Elasticsearch.Serverless.ErrorResponseBase Failure) : base(Failure) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/DocumentRating.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/DocumentRating.g.cs deleted file mode 100644 index 4a2e1755791..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/DocumentRating.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class DocumentRating -{ - /// - /// - /// The document ID. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - - /// - /// - /// The document’s index. For data streams, this should be the document’s backing index. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } - - /// - /// - /// The document’s relevance with regard to this search request. - /// - /// - [JsonInclude, JsonPropertyName("rating")] - public int Rating { get; set; } -} - -public sealed partial class DocumentRatingDescriptor : SerializableDescriptor -{ - internal DocumentRatingDescriptor(Action configure) => configure.Invoke(this); - - public DocumentRatingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private int RatingValue { get; set; } - - /// - /// - /// The document ID. - /// - /// - public DocumentRatingDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The document’s index. For data streams, this should be the document’s backing index. - /// - /// - public DocumentRatingDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// The document’s relevance with regard to this search request. - /// - /// - public DocumentRatingDescriptor Rating(int rating) - { - RatingValue = rating; - 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.WritePropertyName("rating"); - writer.WriteNumberValue(RatingValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHit.g.cs deleted file mode 100644 index ae87096d60b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHit.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class RankEvalHit -{ - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("_score")] - public double Score { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs deleted file mode 100644 index 2df8dccb8a5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class RankEvalHitItem -{ - [JsonInclude, JsonPropertyName("hit")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalHit Hit { get; init; } - [JsonInclude, JsonPropertyName("rating")] - public double? Rating { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetric.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetric.g.cs deleted file mode 100644 index 72bb4258aa3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetric.g.cs +++ /dev/null @@ -1,273 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class RankEvalMetric -{ - [JsonInclude, JsonPropertyName("dcg")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDiscountedCumulativeGain? Dcg { get; set; } - [JsonInclude, JsonPropertyName("expected_reciprocal_rank")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRank { get; set; } - [JsonInclude, JsonPropertyName("mean_reciprocal_rank")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricMeanReciprocalRank? MeanReciprocalRank { get; set; } - [JsonInclude, JsonPropertyName("precision")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricPrecision? Precision { get; set; } - [JsonInclude, JsonPropertyName("recall")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricRecall? Recall { get; set; } -} - -public sealed partial class RankEvalMetricDescriptor : SerializableDescriptor -{ - internal RankEvalMetricDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalMetricDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDiscountedCumulativeGain? DcgValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDiscountedCumulativeGainDescriptor DcgDescriptor { get; set; } - private Action DcgDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRankValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricExpectedReciprocalRankDescriptor ExpectedReciprocalRankDescriptor { get; set; } - private Action ExpectedReciprocalRankDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricMeanReciprocalRank? MeanReciprocalRankValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricMeanReciprocalRankDescriptor MeanReciprocalRankDescriptor { get; set; } - private Action MeanReciprocalRankDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricPrecision? PrecisionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricPrecisionDescriptor PrecisionDescriptor { get; set; } - private Action PrecisionDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricRecall? RecallValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricRecallDescriptor RecallDescriptor { get; set; } - private Action RecallDescriptorAction { get; set; } - - public RankEvalMetricDescriptor Dcg(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDiscountedCumulativeGain? dcg) - { - DcgDescriptor = null; - DcgDescriptorAction = null; - DcgValue = dcg; - return Self; - } - - public RankEvalMetricDescriptor Dcg(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDiscountedCumulativeGainDescriptor descriptor) - { - DcgValue = null; - DcgDescriptorAction = null; - DcgDescriptor = descriptor; - return Self; - } - - public RankEvalMetricDescriptor Dcg(Action configure) - { - DcgValue = null; - DcgDescriptor = null; - DcgDescriptorAction = configure; - return Self; - } - - public RankEvalMetricDescriptor ExpectedReciprocalRank(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricExpectedReciprocalRank? expectedReciprocalRank) - { - ExpectedReciprocalRankDescriptor = null; - ExpectedReciprocalRankDescriptorAction = null; - ExpectedReciprocalRankValue = expectedReciprocalRank; - return Self; - } - - public RankEvalMetricDescriptor ExpectedReciprocalRank(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricExpectedReciprocalRankDescriptor descriptor) - { - ExpectedReciprocalRankValue = null; - ExpectedReciprocalRankDescriptorAction = null; - ExpectedReciprocalRankDescriptor = descriptor; - return Self; - } - - public RankEvalMetricDescriptor ExpectedReciprocalRank(Action configure) - { - ExpectedReciprocalRankValue = null; - ExpectedReciprocalRankDescriptor = null; - ExpectedReciprocalRankDescriptorAction = configure; - return Self; - } - - public RankEvalMetricDescriptor MeanReciprocalRank(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricMeanReciprocalRank? meanReciprocalRank) - { - MeanReciprocalRankDescriptor = null; - MeanReciprocalRankDescriptorAction = null; - MeanReciprocalRankValue = meanReciprocalRank; - return Self; - } - - public RankEvalMetricDescriptor MeanReciprocalRank(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricMeanReciprocalRankDescriptor descriptor) - { - MeanReciprocalRankValue = null; - MeanReciprocalRankDescriptorAction = null; - MeanReciprocalRankDescriptor = descriptor; - return Self; - } - - public RankEvalMetricDescriptor MeanReciprocalRank(Action configure) - { - MeanReciprocalRankValue = null; - MeanReciprocalRankDescriptor = null; - MeanReciprocalRankDescriptorAction = configure; - return Self; - } - - public RankEvalMetricDescriptor Precision(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricPrecision? precision) - { - PrecisionDescriptor = null; - PrecisionDescriptorAction = null; - PrecisionValue = precision; - return Self; - } - - public RankEvalMetricDescriptor Precision(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricPrecisionDescriptor descriptor) - { - PrecisionValue = null; - PrecisionDescriptorAction = null; - PrecisionDescriptor = descriptor; - return Self; - } - - public RankEvalMetricDescriptor Precision(Action configure) - { - PrecisionValue = null; - PrecisionDescriptor = null; - PrecisionDescriptorAction = configure; - return Self; - } - - public RankEvalMetricDescriptor Recall(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricRecall? recall) - { - RecallDescriptor = null; - RecallDescriptorAction = null; - RecallValue = recall; - return Self; - } - - public RankEvalMetricDescriptor Recall(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricRecallDescriptor descriptor) - { - RecallValue = null; - RecallDescriptorAction = null; - RecallDescriptor = descriptor; - return Self; - } - - public RankEvalMetricDescriptor Recall(Action configure) - { - RecallValue = null; - RecallDescriptor = null; - RecallDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DcgDescriptor is not null) - { - writer.WritePropertyName("dcg"); - JsonSerializer.Serialize(writer, DcgDescriptor, options); - } - else if (DcgDescriptorAction is not null) - { - writer.WritePropertyName("dcg"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricDiscountedCumulativeGainDescriptor(DcgDescriptorAction), options); - } - else if (DcgValue is not null) - { - writer.WritePropertyName("dcg"); - JsonSerializer.Serialize(writer, DcgValue, options); - } - - if (ExpectedReciprocalRankDescriptor is not null) - { - writer.WritePropertyName("expected_reciprocal_rank"); - JsonSerializer.Serialize(writer, ExpectedReciprocalRankDescriptor, options); - } - else if (ExpectedReciprocalRankDescriptorAction is not null) - { - writer.WritePropertyName("expected_reciprocal_rank"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricExpectedReciprocalRankDescriptor(ExpectedReciprocalRankDescriptorAction), options); - } - else if (ExpectedReciprocalRankValue is not null) - { - writer.WritePropertyName("expected_reciprocal_rank"); - JsonSerializer.Serialize(writer, ExpectedReciprocalRankValue, options); - } - - if (MeanReciprocalRankDescriptor is not null) - { - writer.WritePropertyName("mean_reciprocal_rank"); - JsonSerializer.Serialize(writer, MeanReciprocalRankDescriptor, options); - } - else if (MeanReciprocalRankDescriptorAction is not null) - { - writer.WritePropertyName("mean_reciprocal_rank"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricMeanReciprocalRankDescriptor(MeanReciprocalRankDescriptorAction), options); - } - else if (MeanReciprocalRankValue is not null) - { - writer.WritePropertyName("mean_reciprocal_rank"); - JsonSerializer.Serialize(writer, MeanReciprocalRankValue, options); - } - - if (PrecisionDescriptor is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionDescriptor, options); - } - else if (PrecisionDescriptorAction is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricPrecisionDescriptor(PrecisionDescriptorAction), options); - } - else if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - if (RecallDescriptor is not null) - { - writer.WritePropertyName("recall"); - JsonSerializer.Serialize(writer, RecallDescriptor, options); - } - else if (RecallDescriptorAction is not null) - { - writer.WritePropertyName("recall"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalMetricRecallDescriptor(RecallDescriptorAction), options); - } - else if (RecallValue is not null) - { - writer.WritePropertyName("recall"); - JsonSerializer.Serialize(writer, RecallValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.cs deleted file mode 100644 index 3934d3a62ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDetail.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class RankEvalMetricDetail -{ - /// - /// - /// The hits section shows a grouping of the search results with their supplied ratings - /// - /// - [JsonInclude, JsonPropertyName("hits")] - public IReadOnlyCollection Hits { get; init; } - - /// - /// - /// The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results - /// - /// - [JsonInclude, JsonPropertyName("metric_details")] - public IReadOnlyDictionary> MetricDetails { get; init; } - - /// - /// - /// The metric_score in the details section shows the contribution of this query to the global quality metric score - /// - /// - [JsonInclude, JsonPropertyName("metric_score")] - public double MetricScore { get; init; } - - /// - /// - /// The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents - /// - /// - [JsonInclude, JsonPropertyName("unrated_docs")] - public IReadOnlyCollection UnratedDocs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs deleted file mode 100644 index f53eb2505da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -/// -/// -/// Discounted cumulative gain (DCG) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricDiscountedCumulativeGain -{ - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// If set to true, this metric will calculate the Normalized DCG. - /// - /// - [JsonInclude, JsonPropertyName("normalize")] - public bool? Normalize { get; set; } -} - -/// -/// -/// Discounted cumulative gain (DCG) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricDiscountedCumulativeGainDescriptor : SerializableDescriptor -{ - internal RankEvalMetricDiscountedCumulativeGainDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalMetricDiscountedCumulativeGainDescriptor() : base() - { - } - - private int? kValue { get; set; } - private bool? NormalizeValue { get; set; } - - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - public RankEvalMetricDiscountedCumulativeGainDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// If set to true, this metric will calculate the Normalized DCG. - /// - /// - public RankEvalMetricDiscountedCumulativeGainDescriptor Normalize(bool? normalize = true) - { - NormalizeValue = normalize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (NormalizeValue.HasValue) - { - writer.WritePropertyName("normalize"); - writer.WriteBooleanValue(NormalizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs deleted file mode 100644 index acf5fb54ea7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs +++ /dev/null @@ -1,107 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -/// -/// -/// Expected Reciprocal Rank (ERR) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricExpectedReciprocalRank -{ - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// The highest relevance grade used in the user-supplied relevance judgments. - /// - /// - [JsonInclude, JsonPropertyName("maximum_relevance")] - public int MaximumRelevance { get; set; } -} - -/// -/// -/// Expected Reciprocal Rank (ERR) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricExpectedReciprocalRankDescriptor : SerializableDescriptor -{ - internal RankEvalMetricExpectedReciprocalRankDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalMetricExpectedReciprocalRankDescriptor() : base() - { - } - - private int? kValue { get; set; } - private int MaximumRelevanceValue { get; set; } - - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - public RankEvalMetricExpectedReciprocalRankDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// The highest relevance grade used in the user-supplied relevance judgments. - /// - /// - public RankEvalMetricExpectedReciprocalRankDescriptor MaximumRelevance(int maximumRelevance) - { - MaximumRelevanceValue = maximumRelevance; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - writer.WritePropertyName("maximum_relevance"); - writer.WriteNumberValue(MaximumRelevanceValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs deleted file mode 100644 index eba098f5694..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -/// -/// -/// Mean Reciprocal Rank -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricMeanReciprocalRank -{ - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// Sets the rating threshold above which documents are considered to be "relevant". - /// - /// - [JsonInclude, JsonPropertyName("relevant_rating_threshold")] - public int? RelevantRatingThreshold { get; set; } -} - -/// -/// -/// Mean Reciprocal Rank -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricMeanReciprocalRankDescriptor : SerializableDescriptor -{ - internal RankEvalMetricMeanReciprocalRankDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalMetricMeanReciprocalRankDescriptor() : base() - { - } - - private int? kValue { get; set; } - private int? RelevantRatingThresholdValue { get; set; } - - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - public RankEvalMetricMeanReciprocalRankDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// Sets the rating threshold above which documents are considered to be "relevant". - /// - /// - public RankEvalMetricMeanReciprocalRankDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) - { - RelevantRatingThresholdValue = relevantRatingThreshold; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (RelevantRatingThresholdValue.HasValue) - { - writer.WritePropertyName("relevant_rating_threshold"); - writer.WriteNumberValue(RelevantRatingThresholdValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs deleted file mode 100644 index fdade2d12af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs +++ /dev/null @@ -1,137 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -/// -/// -/// Precision at K (P@k) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricPrecision -{ - /// - /// - /// Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unlabeled")] - public bool? IgnoreUnlabeled { get; set; } - - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// Sets the rating threshold above which documents are considered to be "relevant". - /// - /// - [JsonInclude, JsonPropertyName("relevant_rating_threshold")] - public int? RelevantRatingThreshold { get; set; } -} - -/// -/// -/// Precision at K (P@k) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricPrecisionDescriptor : SerializableDescriptor -{ - internal RankEvalMetricPrecisionDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalMetricPrecisionDescriptor() : base() - { - } - - private bool? IgnoreUnlabeledValue { get; set; } - private int? kValue { get; set; } - private int? RelevantRatingThresholdValue { get; set; } - - /// - /// - /// Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant. - /// - /// - public RankEvalMetricPrecisionDescriptor IgnoreUnlabeled(bool? ignoreUnlabeled = true) - { - IgnoreUnlabeledValue = ignoreUnlabeled; - return Self; - } - - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - public RankEvalMetricPrecisionDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// Sets the rating threshold above which documents are considered to be "relevant". - /// - /// - public RankEvalMetricPrecisionDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) - { - RelevantRatingThresholdValue = relevantRatingThreshold; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IgnoreUnlabeledValue.HasValue) - { - writer.WritePropertyName("ignore_unlabeled"); - writer.WriteBooleanValue(IgnoreUnlabeledValue.Value); - } - - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (RelevantRatingThresholdValue.HasValue) - { - writer.WritePropertyName("relevant_rating_threshold"); - writer.WriteNumberValue(RelevantRatingThresholdValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs deleted file mode 100644 index e8e65353032..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -/// -/// -/// Recall at K (R@k) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricRecall -{ - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// Sets the rating threshold above which documents are considered to be "relevant". - /// - /// - [JsonInclude, JsonPropertyName("relevant_rating_threshold")] - public int? RelevantRatingThreshold { get; set; } -} - -/// -/// -/// Recall at K (R@k) -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class RankEvalMetricRecallDescriptor : SerializableDescriptor -{ - internal RankEvalMetricRecallDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalMetricRecallDescriptor() : base() - { - } - - private int? kValue { get; set; } - private int? RelevantRatingThresholdValue { get; set; } - - /// - /// - /// Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query. - /// - /// - public RankEvalMetricRecallDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// Sets the rating threshold above which documents are considered to be "relevant". - /// - /// - public RankEvalMetricRecallDescriptor RelevantRatingThreshold(int? relevantRatingThreshold) - { - RelevantRatingThresholdValue = relevantRatingThreshold; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (RelevantRatingThresholdValue.HasValue) - { - writer.WritePropertyName("relevant_rating_threshold"); - writer.WriteNumberValue(RelevantRatingThresholdValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs deleted file mode 100644 index d3a94bc1579..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs +++ /dev/null @@ -1,180 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class RankEvalQuery -{ - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } -} - -public sealed partial class RankEvalQueryDescriptor : SerializableDescriptor> -{ - internal RankEvalQueryDescriptor(Action> configure) => configure.Invoke(this); - - public RankEvalQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private int? SizeValue { get; set; } - - public RankEvalQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public RankEvalQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public RankEvalQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public RankEvalQueryDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RankEvalQueryDescriptor : SerializableDescriptor -{ - internal RankEvalQueryDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private int? SizeValue { get; set; } - - public RankEvalQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public RankEvalQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public RankEvalQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public RankEvalQueryDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs deleted file mode 100644 index 70203af12a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/RankEvalRequestItem.g.cs +++ /dev/null @@ -1,451 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class RankEvalRequestItem -{ - /// - /// - /// The search request’s ID, used to group result details later. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - - /// - /// - /// The search template parameters. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// List of document ratings - /// - /// - [JsonInclude, JsonPropertyName("ratings")] - public ICollection Ratings { get; set; } - - /// - /// - /// The query being evaluated. - /// - /// - [JsonInclude, JsonPropertyName("request")] - public Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? Request { get; set; } - - /// - /// - /// The search template Id - /// - /// - [JsonInclude, JsonPropertyName("template_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? TemplateId { get; set; } -} - -public sealed partial class RankEvalRequestItemDescriptor : SerializableDescriptor> -{ - internal RankEvalRequestItemDescriptor(Action> configure) => configure.Invoke(this); - - public RankEvalRequestItemDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private ICollection RatingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor RatingsDescriptor { get; set; } - private Action RatingsDescriptorAction { get; set; } - private Action[] RatingsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? RequestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQueryDescriptor RequestDescriptor { get; set; } - private Action> RequestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? TemplateIdValue { get; set; } - - /// - /// - /// The search request’s ID, used to group result details later. - /// - /// - public RankEvalRequestItemDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The search template parameters. - /// - /// - public RankEvalRequestItemDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// List of document ratings - /// - /// - public RankEvalRequestItemDescriptor Ratings(ICollection ratings) - { - RatingsDescriptor = null; - RatingsDescriptorAction = null; - RatingsDescriptorActions = null; - RatingsValue = ratings; - return Self; - } - - public RankEvalRequestItemDescriptor Ratings(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor descriptor) - { - RatingsValue = null; - RatingsDescriptorAction = null; - RatingsDescriptorActions = null; - RatingsDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Ratings(Action configure) - { - RatingsValue = null; - RatingsDescriptor = null; - RatingsDescriptorActions = null; - RatingsDescriptorAction = configure; - return Self; - } - - public RankEvalRequestItemDescriptor Ratings(params Action[] configure) - { - RatingsValue = null; - RatingsDescriptor = null; - RatingsDescriptorAction = null; - RatingsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The query being evaluated. - /// - /// - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? request) - { - RequestDescriptor = null; - RequestDescriptorAction = null; - RequestValue = request; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQueryDescriptor descriptor) - { - RequestValue = null; - RequestDescriptorAction = null; - RequestDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Action> configure) - { - RequestValue = null; - RequestDescriptor = null; - RequestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The search template Id - /// - /// - public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elasticsearch.Serverless.Id? templateId) - { - TemplateIdValue = templateId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (RatingsDescriptor is not null) - { - writer.WritePropertyName("ratings"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RatingsDescriptor, options); - writer.WriteEndArray(); - } - else if (RatingsDescriptorAction is not null) - { - writer.WritePropertyName("ratings"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor(RatingsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RatingsDescriptorActions is not null) - { - writer.WritePropertyName("ratings"); - writer.WriteStartArray(); - foreach (var action in RatingsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("ratings"); - JsonSerializer.Serialize(writer, RatingsValue, options); - } - - if (RequestDescriptor is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestDescriptor, options); - } - else if (RequestDescriptorAction is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQueryDescriptor(RequestDescriptorAction), options); - } - else if (RequestValue is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestValue, options); - } - - if (TemplateIdValue is not null) - { - writer.WritePropertyName("template_id"); - JsonSerializer.Serialize(writer, TemplateIdValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RankEvalRequestItemDescriptor : SerializableDescriptor -{ - internal RankEvalRequestItemDescriptor(Action configure) => configure.Invoke(this); - - public RankEvalRequestItemDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private ICollection RatingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor RatingsDescriptor { get; set; } - private Action RatingsDescriptorAction { get; set; } - private Action[] RatingsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? RequestValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQueryDescriptor RequestDescriptor { get; set; } - private Action RequestDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? TemplateIdValue { get; set; } - - /// - /// - /// The search request’s ID, used to group result details later. - /// - /// - public RankEvalRequestItemDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The search template parameters. - /// - /// - public RankEvalRequestItemDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// List of document ratings - /// - /// - public RankEvalRequestItemDescriptor Ratings(ICollection ratings) - { - RatingsDescriptor = null; - RatingsDescriptorAction = null; - RatingsDescriptorActions = null; - RatingsValue = ratings; - return Self; - } - - public RankEvalRequestItemDescriptor Ratings(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor descriptor) - { - RatingsValue = null; - RatingsDescriptorAction = null; - RatingsDescriptorActions = null; - RatingsDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Ratings(Action configure) - { - RatingsValue = null; - RatingsDescriptor = null; - RatingsDescriptorActions = null; - RatingsDescriptorAction = configure; - return Self; - } - - public RankEvalRequestItemDescriptor Ratings(params Action[] configure) - { - RatingsValue = null; - RatingsDescriptor = null; - RatingsDescriptorAction = null; - RatingsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The query being evaluated. - /// - /// - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQuery? request) - { - RequestDescriptor = null; - RequestDescriptorAction = null; - RequestValue = request; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQueryDescriptor descriptor) - { - RequestValue = null; - RequestDescriptorAction = null; - RequestDescriptor = descriptor; - return Self; - } - - public RankEvalRequestItemDescriptor Request(Action configure) - { - RequestValue = null; - RequestDescriptor = null; - RequestDescriptorAction = configure; - return Self; - } - - /// - /// - /// The search template Id - /// - /// - public RankEvalRequestItemDescriptor TemplateId(Elastic.Clients.Elasticsearch.Serverless.Id? templateId) - { - TemplateIdValue = templateId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (RatingsDescriptor is not null) - { - writer.WritePropertyName("ratings"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RatingsDescriptor, options); - writer.WriteEndArray(); - } - else if (RatingsDescriptorAction is not null) - { - writer.WritePropertyName("ratings"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor(RatingsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RatingsDescriptorActions is not null) - { - writer.WritePropertyName("ratings"); - writer.WriteStartArray(); - foreach (var action in RatingsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.DocumentRatingDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("ratings"); - JsonSerializer.Serialize(writer, RatingsValue, options); - } - - if (RequestDescriptor is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestDescriptor, options); - } - else if (RequestDescriptorAction is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.RankEval.RankEvalQueryDescriptor(RequestDescriptorAction), options); - } - else if (RequestValue is not null) - { - writer.WritePropertyName("request"); - JsonSerializer.Serialize(writer, RequestValue, options); - } - - if (TemplateIdValue is not null) - { - writer.WritePropertyName("template_id"); - JsonSerializer.Serialize(writer, TemplateIdValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/UnratedDocument.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/UnratedDocument.g.cs deleted file mode 100644 index b7c4bc85690..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/RankEval/UnratedDocument.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.RankEval; - -public sealed partial class UnratedDocument -{ - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Destination.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Destination.g.cs deleted file mode 100644 index 0cc263940d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Destination.g.cs +++ /dev/null @@ -1,177 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Reindex; - -public sealed partial class Destination -{ - /// - /// - /// The name of the data stream, index, or index alias you are copying to. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } - - /// - /// - /// Set to create to only index documents that do not already exist. - /// Important: To reindex to a data stream destination, this argument must be create. - /// - /// - [JsonInclude, JsonPropertyName("op_type")] - public Elastic.Clients.Elasticsearch.Serverless.OpType? OpType { get; set; } - - /// - /// - /// The name of the pipeline to use. - /// - /// - [JsonInclude, JsonPropertyName("pipeline")] - public string? Pipeline { get; set; } - - /// - /// - /// By default, a document's routing is preserved unless it’s changed by the script. - /// Set to discard to set routing to null, or =value to route using the specified value. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// The versioning to use for the indexing operation. - /// - /// - [JsonInclude, JsonPropertyName("version_type")] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get; set; } -} - -public sealed partial class DestinationDescriptor : SerializableDescriptor -{ - internal DestinationDescriptor(Action configure) => configure.Invoke(this); - - public DestinationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.OpType? OpTypeValue { get; set; } - private string? PipelineValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// The name of the data stream, index, or index alias you are copying to. - /// - /// - public DestinationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Set to create to only index documents that do not already exist. - /// Important: To reindex to a data stream destination, this argument must be create. - /// - /// - public DestinationDescriptor OpType(Elastic.Clients.Elasticsearch.Serverless.OpType? opType) - { - OpTypeValue = opType; - return Self; - } - - /// - /// - /// The name of the pipeline to use. - /// - /// - public DestinationDescriptor Pipeline(string? pipeline) - { - PipelineValue = pipeline; - return Self; - } - - /// - /// - /// By default, a document's routing is preserved unless it’s changed by the script. - /// Set to discard to set routing to null, or =value to route using the specified value. - /// - /// - public DestinationDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// The versioning to use for the indexing operation. - /// - /// - public DestinationDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (OpTypeValue is not null) - { - writer.WritePropertyName("op_type"); - JsonSerializer.Serialize(writer, OpTypeValue, options); - } - - if (!string.IsNullOrEmpty(PipelineValue)) - { - writer.WritePropertyName("pipeline"); - writer.WriteStringValue(PipelineValue); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/RemoteSource.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/RemoteSource.g.cs deleted file mode 100644 index 8977541e4cd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/RemoteSource.g.cs +++ /dev/null @@ -1,201 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Reindex; - -public sealed partial class RemoteSource -{ - /// - /// - /// The remote connection timeout. - /// Defaults to 30 seconds. - /// - /// - [JsonInclude, JsonPropertyName("connect_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ConnectTimeout { get; set; } - - /// - /// - /// An object containing the headers of the request. - /// - /// - [JsonInclude, JsonPropertyName("headers")] - public IDictionary? Headers { get; set; } - - /// - /// - /// The URL for the remote instance of Elasticsearch that you want to index from. - /// - /// - [JsonInclude, JsonPropertyName("host")] - public string Host { get; set; } - - /// - /// - /// The password to use for authentication with the remote host. - /// - /// - [JsonInclude, JsonPropertyName("password")] - public string? Password { get; set; } - - /// - /// - /// The remote socket read timeout. Defaults to 30 seconds. - /// - /// - [JsonInclude, JsonPropertyName("socket_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? SocketTimeout { get; set; } - - /// - /// - /// The username to use for authentication with the remote host. - /// - /// - [JsonInclude, JsonPropertyName("username")] - public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; } -} - -public sealed partial class RemoteSourceDescriptor : SerializableDescriptor -{ - internal RemoteSourceDescriptor(Action configure) => configure.Invoke(this); - - public RemoteSourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? ConnectTimeoutValue { get; set; } - private IDictionary? HeadersValue { get; set; } - private string HostValue { get; set; } - private string? PasswordValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? SocketTimeoutValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; } - - /// - /// - /// The remote connection timeout. - /// Defaults to 30 seconds. - /// - /// - public RemoteSourceDescriptor ConnectTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? connectTimeout) - { - ConnectTimeoutValue = connectTimeout; - return Self; - } - - /// - /// - /// An object containing the headers of the request. - /// - /// - public RemoteSourceDescriptor Headers(Func, FluentDictionary> selector) - { - HeadersValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The URL for the remote instance of Elasticsearch that you want to index from. - /// - /// - public RemoteSourceDescriptor Host(string host) - { - HostValue = host; - return Self; - } - - /// - /// - /// The password to use for authentication with the remote host. - /// - /// - public RemoteSourceDescriptor Password(string? password) - { - PasswordValue = password; - return Self; - } - - /// - /// - /// The remote socket read timeout. Defaults to 30 seconds. - /// - /// - public RemoteSourceDescriptor SocketTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? socketTimeout) - { - SocketTimeoutValue = socketTimeout; - return Self; - } - - /// - /// - /// The username to use for authentication with the remote host. - /// - /// - public RemoteSourceDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) - { - UsernameValue = username; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConnectTimeoutValue is not null) - { - writer.WritePropertyName("connect_timeout"); - JsonSerializer.Serialize(writer, ConnectTimeoutValue, options); - } - - if (HeadersValue is not null) - { - writer.WritePropertyName("headers"); - JsonSerializer.Serialize(writer, HeadersValue, options); - } - - writer.WritePropertyName("host"); - writer.WriteStringValue(HostValue); - if (!string.IsNullOrEmpty(PasswordValue)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(PasswordValue); - } - - if (SocketTimeoutValue is not null) - { - writer.WritePropertyName("socket_timeout"); - JsonSerializer.Serialize(writer, SocketTimeoutValue, options); - } - - if (UsernameValue is not null) - { - writer.WritePropertyName("username"); - JsonSerializer.Serialize(writer, UsernameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs deleted file mode 100644 index 7da14332827..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs +++ /dev/null @@ -1,678 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Reindex; - -public sealed partial class Source -{ - /// - /// - /// The name of the data stream, index, or alias you are copying from. - /// Accepts a comma-separated list to reindex from multiple sources. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.Indices Indices { get; set; } - - /// - /// - /// Specifies the documents to reindex using the Query DSL. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - /// - [JsonInclude, JsonPropertyName("remote")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? Remote { get; set; } - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// The number of documents to index per batch. - /// Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Slice the reindex request manually using the provided slice ID and total number of slices. - /// - /// - [JsonInclude, JsonPropertyName("slice")] - public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - /// - /// - /// If true reindexes all source fields. - /// Set to a list to reindex select fields. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFields { get; set; } -} - -public sealed partial class SourceDescriptor : SerializableDescriptor> -{ - internal SourceDescriptor(Action> configure) => configure.Invoke(this); - - public SourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? RemoteValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSourceDescriptor RemoteDescriptor { get; set; } - private Action RemoteDescriptorAction { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action> SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFieldsValue { get; set; } - - /// - /// - /// The name of the data stream, index, or alias you are copying from. - /// Accepts a comma-separated list to reindex from multiple sources. - /// - /// - public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies the documents to reindex using the Query DSL. - /// - /// - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - /// - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? remote) - { - RemoteDescriptor = null; - RemoteDescriptorAction = null; - RemoteValue = remote; - return Self; - } - - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSourceDescriptor descriptor) - { - RemoteValue = null; - RemoteDescriptorAction = null; - RemoteDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Remote(Action configure) - { - RemoteValue = null; - RemoteDescriptor = null; - RemoteDescriptorAction = configure; - return Self; - } - - public SourceDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// The number of documents to index per batch. - /// Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. - /// - /// - public SourceDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Slice the reindex request manually using the provided slice ID and total number of slices. - /// - /// - public SourceDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SourceDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Slice(Action> configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - public SourceDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SourceDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SourceDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true reindexes all source fields. - /// Set to a list to reindex select fields. - /// - /// - public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceFields) - { - SourceFieldsValue = sourceFields; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RemoteDescriptor is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteDescriptor, options); - } - else if (RemoteDescriptorAction is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSourceDescriptor(RemoteDescriptorAction), options); - } - else if (RemoteValue is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceFieldsValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceFieldsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SourceDescriptor : SerializableDescriptor -{ - internal SourceDescriptor(Action configure) => configure.Invoke(this); - - public SourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? RemoteValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSourceDescriptor RemoteDescriptor { get; set; } - private Action RemoteDescriptorAction { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor SliceDescriptor { get; set; } - private Action SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFieldsValue { get; set; } - - /// - /// - /// The name of the data stream, index, or alias you are copying from. - /// Accepts a comma-separated list to reindex from multiple sources. - /// - /// - public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies the documents to reindex using the Query DSL. - /// - /// - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// A remote instance of Elasticsearch that you want to index from. - /// - /// - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSource? remote) - { - RemoteDescriptor = null; - RemoteDescriptorAction = null; - RemoteValue = remote; - return Self; - } - - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSourceDescriptor descriptor) - { - RemoteValue = null; - RemoteDescriptorAction = null; - RemoteDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Remote(Action configure) - { - RemoteValue = null; - RemoteDescriptor = null; - RemoteDescriptorAction = configure; - return Self; - } - - public SourceDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The number of documents to index per batch. - /// Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. - /// - /// - public SourceDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Slice the reindex request manually using the provided slice ID and total number of slices. - /// - /// - public SourceDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice) - { - SliceDescriptor = null; - SliceDescriptorAction = null; - SliceValue = slice; - return Self; - } - - public SourceDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor descriptor) - { - SliceValue = null; - SliceDescriptorAction = null; - SliceDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Slice(Action configure) - { - SliceValue = null; - SliceDescriptor = null; - SliceDescriptorAction = configure; - return Self; - } - - public SourceDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SourceDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SourceDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true reindexes all source fields. - /// Set to a list to reindex select fields. - /// - /// - public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceFields) - { - SourceFieldsValue = sourceFields; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RemoteDescriptor is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteDescriptor, options); - } - else if (RemoteDescriptorAction is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.RemoteSourceDescriptor(RemoteDescriptorAction), options); - } - else if (RemoteValue is not null) - { - writer.WritePropertyName("remote"); - JsonSerializer.Serialize(writer, RemoteValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SliceDescriptor is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceDescriptor, options); - } - else if (SliceDescriptorAction is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SlicedScrollDescriptor(SliceDescriptorAction), options); - } - else if (SliceValue is not null) - { - writer.WritePropertyName("slice"); - JsonSerializer.Serialize(writer, SliceValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceFieldsValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceFieldsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs deleted file mode 100644 index 3590e39355d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexNode.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.ReindexRethrottle; - -public sealed partial class ReindexNode -{ - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary Attributes { get; init; } - [JsonInclude, JsonPropertyName("host")] - public string Host { get; init; } - [JsonInclude, JsonPropertyName("ip")] - public string Ip { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - [JsonInclude, JsonPropertyName("tasks")] - public IReadOnlyDictionary Tasks { get; init; } - [JsonInclude, JsonPropertyName("transport_address")] - public string TransportAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexStatus.g.cs deleted file mode 100644 index d3d73bde17c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexStatus.g.cs +++ /dev/null @@ -1,124 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.ReindexRethrottle; - -public sealed partial class ReindexStatus -{ - /// - /// - /// The number of scroll responses pulled back by the reindex. - /// - /// - [JsonInclude, JsonPropertyName("batches")] - public long Batches { get; init; } - - /// - /// - /// The number of documents that were successfully created. - /// - /// - [JsonInclude, JsonPropertyName("created")] - public long Created { get; init; } - - /// - /// - /// The number of documents that were successfully deleted. - /// - /// - [JsonInclude, JsonPropertyName("deleted")] - public long Deleted { get; init; } - - /// - /// - /// The number of documents that were ignored because the script used for the reindex returned a noop value for ctx.op. - /// - /// - [JsonInclude, JsonPropertyName("noops")] - public long Noops { get; init; } - - /// - /// - /// The number of requests per second effectively executed during the reindex. - /// - /// - [JsonInclude, JsonPropertyName("requests_per_second")] - public float RequestsPerSecond { get; init; } - - /// - /// - /// The number of retries attempted by reindex. bulk is the number of bulk actions retried and search is the number of search actions retried. - /// - /// - [JsonInclude, JsonPropertyName("retries")] - public Elastic.Clients.Elasticsearch.Serverless.Retries Retries { get; init; } - [JsonInclude, JsonPropertyName("throttled")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Throttled { get; init; } - - /// - /// - /// Number of milliseconds the request slept to conform to requests_per_second. - /// - /// - [JsonInclude, JsonPropertyName("throttled_millis")] - public long ThrottledMillis { get; init; } - [JsonInclude, JsonPropertyName("throttled_until")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ThrottledUntil { get; init; } - - /// - /// - /// This field should always be equal to zero in a _reindex response. - /// It only has meaning when using the Task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be executed again in order to conform to requests_per_second. - /// - /// - [JsonInclude, JsonPropertyName("throttled_until_millis")] - public long ThrottledUntilMillis { get; init; } - - /// - /// - /// The number of documents that were successfully processed. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } - - /// - /// - /// The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it. - /// - /// - [JsonInclude, JsonPropertyName("updated")] - public long Updated { get; init; } - - /// - /// - /// The number of version conflicts that reindex hits. - /// - /// - [JsonInclude, JsonPropertyName("version_conflicts")] - public long VersionConflicts { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs deleted file mode 100644 index cd14b9a0ec6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/ReindexRethrottle/ReindexTask.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.ReindexRethrottle; - -public sealed partial class ReindexTask -{ - [JsonInclude, JsonPropertyName("action")] - public string Action { get; init; } - [JsonInclude, JsonPropertyName("cancellable")] - public bool Cancellable { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("headers")] - public IReadOnlyDictionary>> Headers { get; init; } - [JsonInclude, JsonPropertyName("id")] - public long Id { get; init; } - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } - [JsonInclude, JsonPropertyName("running_time_in_nanos")] - public long RunningTimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Core.ReindexRethrottle.ReindexStatus Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationBreakdown.g.cs deleted file mode 100644 index 107bf6b83d6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationBreakdown.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class AggregationBreakdown -{ - [JsonInclude, JsonPropertyName("build_aggregation")] - public long BuildAggregation { get; init; } - [JsonInclude, JsonPropertyName("build_aggregation_count")] - public long BuildAggregationCount { get; init; } - [JsonInclude, JsonPropertyName("build_leaf_collector")] - public long BuildLeafCollector { get; init; } - [JsonInclude, JsonPropertyName("build_leaf_collector_count")] - public long BuildLeafCollectorCount { get; init; } - [JsonInclude, JsonPropertyName("collect")] - public long Collect { get; init; } - [JsonInclude, JsonPropertyName("collect_count")] - public long CollectCount { get; init; } - [JsonInclude, JsonPropertyName("initialize")] - public long Initialize { get; init; } - [JsonInclude, JsonPropertyName("initialize_count")] - public long InitializeCount { get; init; } - [JsonInclude, JsonPropertyName("post_collection")] - public long? PostCollection { get; init; } - [JsonInclude, JsonPropertyName("post_collection_count")] - public long? PostCollectionCount { get; init; } - [JsonInclude, JsonPropertyName("reduce")] - public long Reduce { get; init; } - [JsonInclude, JsonPropertyName("reduce_count")] - public long ReduceCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfile.g.cs deleted file mode 100644 index 059def04a40..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfile.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class AggregationProfile -{ - [JsonInclude, JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.AggregationBreakdown Breakdown { get; init; } - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("debug")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.AggregationProfileDebug? Debug { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs deleted file mode 100644 index b37d0f1d624..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs +++ /dev/null @@ -1,96 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class AggregationProfileDebug -{ - [JsonInclude, JsonPropertyName("brute_force_used")] - public int? BruteForceUsed { get; init; } - [JsonInclude, JsonPropertyName("built_buckets")] - public int? BuiltBuckets { get; init; } - [JsonInclude, JsonPropertyName("chars_fetched")] - public int? CharsFetched { get; init; } - [JsonInclude, JsonPropertyName("collect_analyzed_count")] - public int? CollectAnalyzedCount { get; init; } - [JsonInclude, JsonPropertyName("collect_analyzed_ns")] - public int? CollectAnalyzedNs { get; init; } - [JsonInclude, JsonPropertyName("collection_strategy")] - public string? CollectionStrategy { get; init; } - [JsonInclude, JsonPropertyName("deferred_aggregators")] - public IReadOnlyCollection? DeferredAggregators { get; init; } - [JsonInclude, JsonPropertyName("delegate")] - public string? Delegate { get; init; } - [JsonInclude, JsonPropertyName("delegate_debug")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.AggregationProfileDebug? DelegateDebug { get; init; } - [JsonInclude, JsonPropertyName("dynamic_pruning_attempted")] - public int? DynamicPruningAttempted { get; init; } - [JsonInclude, JsonPropertyName("dynamic_pruning_used")] - public int? DynamicPruningUsed { get; init; } - [JsonInclude, JsonPropertyName("empty_collectors_used")] - public int? EmptyCollectorsUsed { get; init; } - [JsonInclude, JsonPropertyName("extract_count")] - public int? ExtractCount { get; init; } - [JsonInclude, JsonPropertyName("extract_ns")] - public int? ExtractNs { get; init; } - [JsonInclude, JsonPropertyName("filters")] - public IReadOnlyCollection? Filters { get; init; } - [JsonInclude, JsonPropertyName("has_filter")] - public bool? HasFilter { get; init; } - [JsonInclude, JsonPropertyName("map_reducer")] - public string? MapReducer { get; init; } - [JsonInclude, JsonPropertyName("numeric_collectors_used")] - public int? NumericCollectorsUsed { get; init; } - [JsonInclude, JsonPropertyName("ordinals_collectors_overhead_too_high")] - public int? OrdinalsCollectorsOverheadTooHigh { get; init; } - [JsonInclude, JsonPropertyName("ordinals_collectors_used")] - public int? OrdinalsCollectorsUsed { get; init; } - [JsonInclude, JsonPropertyName("result_strategy")] - public string? ResultStrategy { get; init; } - [JsonInclude, JsonPropertyName("segments_collected")] - public int? SegmentsCollected { get; init; } - [JsonInclude, JsonPropertyName("segments_counted")] - public int? SegmentsCounted { get; init; } - [JsonInclude, JsonPropertyName("segments_with_deleted_docs")] - public int? SegmentsWithDeletedDocs { get; init; } - [JsonInclude, JsonPropertyName("segments_with_doc_count_field")] - public int? SegmentsWithDocCountField { get; init; } - [JsonInclude, JsonPropertyName("segments_with_multi_valued_ords")] - public int? SegmentsWithMultiValuedOrds { get; init; } - [JsonInclude, JsonPropertyName("segments_with_single_valued_ords")] - public int? SegmentsWithSingleValuedOrds { get; init; } - [JsonInclude, JsonPropertyName("skipped_due_to_no_data")] - public int? SkippedDueToNoData { get; init; } - [JsonInclude, JsonPropertyName("string_hashing_collectors_used")] - public int? StringHashingCollectorsUsed { get; init; } - [JsonInclude, JsonPropertyName("surviving_buckets")] - public int? SurvivingBuckets { get; init; } - [JsonInclude, JsonPropertyName("total_buckets")] - public int? TotalBuckets { get; init; } - [JsonInclude, JsonPropertyName("values_fetched")] - public int? ValuesFetched { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs deleted file mode 100644 index 8aa572d5f82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class AggregationProfileDelegateDebugFilter -{ - [JsonInclude, JsonPropertyName("query")] - public string? Query { get; init; } - [JsonInclude, JsonPropertyName("results_from_metadata")] - public int? ResultsFromMetadata { get; init; } - [JsonInclude, JsonPropertyName("segments_counted_in_constant_time")] - public int? SegmentsCountedInConstantTime { get; init; } - [JsonInclude, JsonPropertyName("specialized_for")] - public string? SpecializedFor { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Collector.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Collector.g.cs deleted file mode 100644 index ff5d14a7392..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Collector.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class Collector -{ - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public string Reason { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionContext.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionContext.g.cs deleted file mode 100644 index 735e528d441..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionContext.g.cs +++ /dev/null @@ -1,183 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class CompletionContext -{ - /// - /// - /// The factor by which the score of the suggestion should be boosted. - /// The score is computed by multiplying the boost with the suggestion weight. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - - /// - /// - /// The value of the category to filter/boost on. - /// - /// - [JsonInclude, JsonPropertyName("context")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Context Context { get; set; } - - /// - /// - /// An array of precision values at which neighboring geohashes should be taken into account. - /// Precision value can be a distance value (5m, 10km, etc.) or a raw geohash precision (1..12). - /// Defaults to generating neighbors for index time precision level. - /// - /// - [JsonInclude, JsonPropertyName("neighbours")] - public ICollection? Neighbours { get; set; } - - /// - /// - /// The precision of the geohash to encode the query geo point. - /// Can be specified as a distance value (5m, 10km, etc.), or as a raw geohash precision (1..12). - /// Defaults to index time precision level. - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? Precision { get; set; } - - /// - /// - /// Whether the category value should be treated as a prefix or not. - /// - /// - [JsonInclude, JsonPropertyName("prefix")] - public bool? Prefix { get; set; } -} - -public sealed partial class CompletionContextDescriptor : SerializableDescriptor -{ - internal CompletionContextDescriptor(Action configure) => configure.Invoke(this); - - public CompletionContextDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Context ContextValue { get; set; } - private ICollection? NeighboursValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? PrecisionValue { get; set; } - private bool? PrefixValue { get; set; } - - /// - /// - /// The factor by which the score of the suggestion should be boosted. - /// The score is computed by multiplying the boost with the suggestion weight. - /// - /// - public CompletionContextDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The value of the category to filter/boost on. - /// - /// - public CompletionContextDescriptor Context(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Context context) - { - ContextValue = context; - return Self; - } - - /// - /// - /// An array of precision values at which neighboring geohashes should be taken into account. - /// Precision value can be a distance value (5m, 10km, etc.) or a raw geohash precision (1..12). - /// Defaults to generating neighbors for index time precision level. - /// - /// - public CompletionContextDescriptor Neighbours(ICollection? neighbours) - { - NeighboursValue = neighbours; - return Self; - } - - /// - /// - /// The precision of the geohash to encode the query geo point. - /// Can be specified as a distance value (5m, 10km, etc.), or as a raw geohash precision (1..12). - /// Defaults to index time precision level. - /// - /// - public CompletionContextDescriptor Precision(Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? precision) - { - PrecisionValue = precision; - return Self; - } - - /// - /// - /// Whether the category value should be treated as a prefix or not. - /// - /// - public CompletionContextDescriptor Prefix(bool? prefix = true) - { - PrefixValue = prefix; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("context"); - JsonSerializer.Serialize(writer, ContextValue, options); - if (NeighboursValue is not null) - { - writer.WritePropertyName("neighbours"); - JsonSerializer.Serialize(writer, NeighboursValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - if (PrefixValue.HasValue) - { - writer.WritePropertyName("prefix"); - writer.WriteBooleanValue(PrefixValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggest.g.cs deleted file mode 100644 index 2f3b7b91e4c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggest.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class CompletionSuggest : ISuggest -{ - [JsonInclude, JsonPropertyName("length")] - public int Length { get; init; } - [JsonInclude, JsonPropertyName("offset")] - public int Offset { get; init; } - [JsonInclude, JsonPropertyName("options")] - [GenericConverter(typeof(SingleOrManyCollectionConverter<>), unwrap: true)] - public IReadOnlyCollection> Options { get; init; } - [JsonInclude, JsonPropertyName("text")] - public string Text { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs deleted file mode 100644 index 822c13b2570..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggestOption.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class CompletionSuggestOption -{ - [JsonInclude, JsonPropertyName("collate_match")] - public bool? CollateMatch { get; init; } - [JsonInclude, JsonPropertyName("contexts")] - public IReadOnlyDictionary>? Contexts { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string? Id { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string? Index { get; init; } - [JsonInclude, JsonPropertyName("_routing")] - public string? Routing { get; init; } - [JsonInclude, JsonPropertyName("score")] - public double? Score { get; init; } - [JsonInclude, JsonPropertyName("_score")] - public double? Score0 { get; init; } - [JsonInclude, JsonPropertyName("_source")] - [SourceConverter] - public TDocument? Source { get; init; } - [JsonInclude, JsonPropertyName("text")] - public string Text { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggester.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggester.g.cs deleted file mode 100644 index 3a121eb0a95..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/CompletionSuggester.g.cs +++ /dev/null @@ -1,539 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class CompletionSuggester -{ - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// A value, geo point object, or a geo hash string to filter or boost the suggestion on. - /// - /// - [JsonInclude, JsonPropertyName("contexts")] - public IDictionary>>? Contexts { get; set; } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Enables fuzziness, meaning you can have a typo in your search and still get results back. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzziness? Fuzzy { get; set; } - - /// - /// - /// A regex query that expresses a prefix as a regular expression. - /// - /// - [JsonInclude, JsonPropertyName("regex")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptions? Regex { get; set; } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Whether duplicate suggestions should be filtered out. - /// - /// - [JsonInclude, JsonPropertyName("skip_duplicates")] - public bool? SkipDuplicates { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldSuggester(CompletionSuggester completionSuggester) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldSuggester.Completion(completionSuggester); -} - -public sealed partial class CompletionSuggesterDescriptor : SerializableDescriptor> -{ - internal CompletionSuggesterDescriptor(Action> configure) => configure.Invoke(this); - - public CompletionSuggesterDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private IDictionary>>? ContextsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzziness? FuzzyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzzinessDescriptor FuzzyDescriptor { get; set; } - private Action FuzzyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptions? RegexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptionsDescriptor RegexDescriptor { get; set; } - private Action RegexDescriptorAction { get; set; } - private int? SizeValue { get; set; } - private bool? SkipDuplicatesValue { get; set; } - - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - public CompletionSuggesterDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// A value, geo point object, or a geo hash string to filter or boost the suggestion on. - /// - /// - public CompletionSuggesterDescriptor Contexts(Func>>, FluentDictionary>>> selector) - { - ContextsValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public CompletionSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public CompletionSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public CompletionSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Enables fuzziness, meaning you can have a typo in your search and still get results back. - /// - /// - public CompletionSuggesterDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzziness? fuzzy) - { - FuzzyDescriptor = null; - FuzzyDescriptorAction = null; - FuzzyValue = fuzzy; - return Self; - } - - public CompletionSuggesterDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzzinessDescriptor descriptor) - { - FuzzyValue = null; - FuzzyDescriptorAction = null; - FuzzyDescriptor = descriptor; - return Self; - } - - public CompletionSuggesterDescriptor Fuzzy(Action configure) - { - FuzzyValue = null; - FuzzyDescriptor = null; - FuzzyDescriptorAction = configure; - return Self; - } - - /// - /// - /// A regex query that expresses a prefix as a regular expression. - /// - /// - public CompletionSuggesterDescriptor Regex(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptions? regex) - { - RegexDescriptor = null; - RegexDescriptorAction = null; - RegexValue = regex; - return Self; - } - - public CompletionSuggesterDescriptor Regex(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptionsDescriptor descriptor) - { - RegexValue = null; - RegexDescriptorAction = null; - RegexDescriptor = descriptor; - return Self; - } - - public CompletionSuggesterDescriptor Regex(Action configure) - { - RegexValue = null; - RegexDescriptor = null; - RegexDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public CompletionSuggesterDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Whether duplicate suggestions should be filtered out. - /// - /// - public CompletionSuggesterDescriptor SkipDuplicates(bool? skipDuplicates = true) - { - SkipDuplicatesValue = skipDuplicates; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (ContextsValue is not null) - { - writer.WritePropertyName("contexts"); - JsonSerializer.Serialize(writer, ContextsValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FuzzyDescriptor is not null) - { - writer.WritePropertyName("fuzzy"); - JsonSerializer.Serialize(writer, FuzzyDescriptor, options); - } - else if (FuzzyDescriptorAction is not null) - { - writer.WritePropertyName("fuzzy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzzinessDescriptor(FuzzyDescriptorAction), options); - } - else if (FuzzyValue is not null) - { - writer.WritePropertyName("fuzzy"); - JsonSerializer.Serialize(writer, FuzzyValue, options); - } - - if (RegexDescriptor is not null) - { - writer.WritePropertyName("regex"); - JsonSerializer.Serialize(writer, RegexDescriptor, options); - } - else if (RegexDescriptorAction is not null) - { - writer.WritePropertyName("regex"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptionsDescriptor(RegexDescriptorAction), options); - } - else if (RegexValue is not null) - { - writer.WritePropertyName("regex"); - JsonSerializer.Serialize(writer, RegexValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SkipDuplicatesValue.HasValue) - { - writer.WritePropertyName("skip_duplicates"); - writer.WriteBooleanValue(SkipDuplicatesValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CompletionSuggesterDescriptor : SerializableDescriptor -{ - internal CompletionSuggesterDescriptor(Action configure) => configure.Invoke(this); - - public CompletionSuggesterDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private IDictionary>>? ContextsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzziness? FuzzyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzzinessDescriptor FuzzyDescriptor { get; set; } - private Action FuzzyDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptions? RegexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptionsDescriptor RegexDescriptor { get; set; } - private Action RegexDescriptorAction { get; set; } - private int? SizeValue { get; set; } - private bool? SkipDuplicatesValue { get; set; } - - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - public CompletionSuggesterDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// A value, geo point object, or a geo hash string to filter or boost the suggestion on. - /// - /// - public CompletionSuggesterDescriptor Contexts(Func>>, FluentDictionary>>> selector) - { - ContextsValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public CompletionSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public CompletionSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public CompletionSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Enables fuzziness, meaning you can have a typo in your search and still get results back. - /// - /// - public CompletionSuggesterDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzziness? fuzzy) - { - FuzzyDescriptor = null; - FuzzyDescriptorAction = null; - FuzzyValue = fuzzy; - return Self; - } - - public CompletionSuggesterDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzzinessDescriptor descriptor) - { - FuzzyValue = null; - FuzzyDescriptorAction = null; - FuzzyDescriptor = descriptor; - return Self; - } - - public CompletionSuggesterDescriptor Fuzzy(Action configure) - { - FuzzyValue = null; - FuzzyDescriptor = null; - FuzzyDescriptorAction = configure; - return Self; - } - - /// - /// - /// A regex query that expresses a prefix as a regular expression. - /// - /// - public CompletionSuggesterDescriptor Regex(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptions? regex) - { - RegexDescriptor = null; - RegexDescriptorAction = null; - RegexValue = regex; - return Self; - } - - public CompletionSuggesterDescriptor Regex(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptionsDescriptor descriptor) - { - RegexValue = null; - RegexDescriptorAction = null; - RegexDescriptor = descriptor; - return Self; - } - - public CompletionSuggesterDescriptor Regex(Action configure) - { - RegexValue = null; - RegexDescriptor = null; - RegexDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public CompletionSuggesterDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Whether duplicate suggestions should be filtered out. - /// - /// - public CompletionSuggesterDescriptor SkipDuplicates(bool? skipDuplicates = true) - { - SkipDuplicatesValue = skipDuplicates; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (ContextsValue is not null) - { - writer.WritePropertyName("contexts"); - JsonSerializer.Serialize(writer, ContextsValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FuzzyDescriptor is not null) - { - writer.WritePropertyName("fuzzy"); - JsonSerializer.Serialize(writer, FuzzyDescriptor, options); - } - else if (FuzzyDescriptorAction is not null) - { - writer.WritePropertyName("fuzzy"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestFuzzinessDescriptor(FuzzyDescriptorAction), options); - } - else if (FuzzyValue is not null) - { - writer.WritePropertyName("fuzzy"); - JsonSerializer.Serialize(writer, FuzzyValue, options); - } - - if (RegexDescriptor is not null) - { - writer.WritePropertyName("regex"); - JsonSerializer.Serialize(writer, RegexDescriptor, options); - } - else if (RegexDescriptorAction is not null) - { - writer.WritePropertyName("regex"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RegexOptionsDescriptor(RegexDescriptorAction), options); - } - else if (RegexValue is not null) - { - writer.WritePropertyName("regex"); - JsonSerializer.Serialize(writer, RegexValue, options); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SkipDuplicatesValue.HasValue) - { - writer.WritePropertyName("skip_duplicates"); - writer.WriteBooleanValue(SkipDuplicatesValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs deleted file mode 100644 index e530248121d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class DfsKnnProfile -{ - [JsonInclude, JsonPropertyName("collector")] - public IReadOnlyCollection Collector { get; init; } - [JsonInclude, JsonPropertyName("query")] - public IReadOnlyCollection Query { get; init; } - [JsonInclude, JsonPropertyName("rewrite_time")] - public long RewriteTime { get; init; } - [JsonInclude, JsonPropertyName("vector_operations_count")] - public long? VectorOperationsCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs deleted file mode 100644 index 9382b2458b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class DfsProfile -{ - [JsonInclude, JsonPropertyName("knn")] - public IReadOnlyCollection? Knn { get; init; } - [JsonInclude, JsonPropertyName("statistics")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsStatisticsProfile? Statistics { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs deleted file mode 100644 index c1e450ddf09..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class DfsStatisticsBreakdown -{ - [JsonInclude, JsonPropertyName("collection_statistics")] - public long CollectionStatistics { get; init; } - [JsonInclude, JsonPropertyName("collection_statistics_count")] - public long CollectionStatisticsCount { get; init; } - [JsonInclude, JsonPropertyName("create_weight")] - public long CreateWeight { get; init; } - [JsonInclude, JsonPropertyName("create_weight_count")] - public long CreateWeightCount { get; init; } - [JsonInclude, JsonPropertyName("rewrite")] - public long Rewrite { get; init; } - [JsonInclude, JsonPropertyName("rewrite_count")] - public long RewriteCount { get; init; } - [JsonInclude, JsonPropertyName("term_statistics")] - public long TermStatistics { get; init; } - [JsonInclude, JsonPropertyName("term_statistics_count")] - public long TermStatisticsCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs deleted file mode 100644 index 45ca7daa2a6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class DfsStatisticsProfile -{ - [JsonInclude, JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsStatisticsBreakdown Breakdown { get; init; } - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("debug")] - public IReadOnlyDictionary? Debug { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DirectGenerator.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DirectGenerator.g.cs deleted file mode 100644 index 404c811fbb5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DirectGenerator.g.cs +++ /dev/null @@ -1,620 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class DirectGenerator -{ - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. - /// Can only be 1 or 2. - /// - /// - [JsonInclude, JsonPropertyName("max_edits")] - public int? MaxEdits { get; set; } - - /// - /// - /// A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. - /// Can improve accuracy at the cost of performance. - /// - /// - [JsonInclude, JsonPropertyName("max_inspections")] - public float? MaxInspections { get; set; } - - /// - /// - /// The maximum threshold in number of documents in which a suggest text token can exist in order to be included. - /// This can be used to exclude high frequency terms — which are usually spelled correctly — from being spellchecked. - /// Can be a relative percentage number (for example 0.4) or an absolute number to represent document frequencies. - /// If a value higher than 1 is specified, then fractional can not be specified. - /// - /// - [JsonInclude, JsonPropertyName("max_term_freq")] - public float? MaxTermFreq { get; set; } - - /// - /// - /// The minimal threshold in number of documents a suggestion should appear in. - /// This can improve quality by only suggesting high frequency terms. - /// Can be specified as an absolute number or as a relative percentage of number of documents. - /// If a value higher than 1 is specified, the number cannot be fractional. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_freq")] - public float? MinDocFreq { get; set; } - - /// - /// - /// The minimum length a suggest text term must have in order to be included. - /// - /// - [JsonInclude, JsonPropertyName("min_word_length")] - public int? MinWordLength { get; set; } - - /// - /// - /// A filter (analyzer) that is applied to each of the generated tokens before they are passed to the actual phrase scorer. - /// - /// - [JsonInclude, JsonPropertyName("post_filter")] - public string? PostFilter { get; set; } - - /// - /// - /// A filter (analyzer) that is applied to each of the tokens passed to this candidate generator. - /// This filter is applied to the original token before candidates are generated. - /// - /// - [JsonInclude, JsonPropertyName("pre_filter")] - public string? PreFilter { get; set; } - - /// - /// - /// The number of minimal prefix characters that must match in order be a candidate suggestions. - /// Increasing this number improves spellcheck performance. - /// - /// - [JsonInclude, JsonPropertyName("prefix_length")] - public int? PrefixLength { get; set; } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Controls what suggestions are included on the suggestions generated on each shard. - /// - /// - [JsonInclude, JsonPropertyName("suggest_mode")] - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get; set; } -} - -public sealed partial class DirectGeneratorDescriptor : SerializableDescriptor> -{ - internal DirectGeneratorDescriptor(Action> configure) => configure.Invoke(this); - - public DirectGeneratorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? MaxEditsValue { get; set; } - private float? MaxInspectionsValue { get; set; } - private float? MaxTermFreqValue { get; set; } - private float? MinDocFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - private string? PostFilterValue { get; set; } - private string? PreFilterValue { get; set; } - private int? PrefixLengthValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestModeValue { get; set; } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public DirectGeneratorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public DirectGeneratorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public DirectGeneratorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. - /// Can only be 1 or 2. - /// - /// - public DirectGeneratorDescriptor MaxEdits(int? maxEdits) - { - MaxEditsValue = maxEdits; - return Self; - } - - /// - /// - /// A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. - /// Can improve accuracy at the cost of performance. - /// - /// - public DirectGeneratorDescriptor MaxInspections(float? maxInspections) - { - MaxInspectionsValue = maxInspections; - return Self; - } - - /// - /// - /// The maximum threshold in number of documents in which a suggest text token can exist in order to be included. - /// This can be used to exclude high frequency terms — which are usually spelled correctly — from being spellchecked. - /// Can be a relative percentage number (for example 0.4) or an absolute number to represent document frequencies. - /// If a value higher than 1 is specified, then fractional can not be specified. - /// - /// - public DirectGeneratorDescriptor MaxTermFreq(float? maxTermFreq) - { - MaxTermFreqValue = maxTermFreq; - return Self; - } - - /// - /// - /// The minimal threshold in number of documents a suggestion should appear in. - /// This can improve quality by only suggesting high frequency terms. - /// Can be specified as an absolute number or as a relative percentage of number of documents. - /// If a value higher than 1 is specified, the number cannot be fractional. - /// - /// - public DirectGeneratorDescriptor MinDocFreq(float? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// The minimum length a suggest text term must have in order to be included. - /// - /// - public DirectGeneratorDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - /// - /// - /// A filter (analyzer) that is applied to each of the generated tokens before they are passed to the actual phrase scorer. - /// - /// - public DirectGeneratorDescriptor PostFilter(string? postFilter) - { - PostFilterValue = postFilter; - return Self; - } - - /// - /// - /// A filter (analyzer) that is applied to each of the tokens passed to this candidate generator. - /// This filter is applied to the original token before candidates are generated. - /// - /// - public DirectGeneratorDescriptor PreFilter(string? preFilter) - { - PreFilterValue = preFilter; - return Self; - } - - /// - /// - /// The number of minimal prefix characters that must match in order be a candidate suggestions. - /// Increasing this number improves spellcheck performance. - /// - /// - public DirectGeneratorDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public DirectGeneratorDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Controls what suggestions are included on the suggestions generated on each shard. - /// - /// - public DirectGeneratorDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) - { - SuggestModeValue = suggestMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (MaxEditsValue.HasValue) - { - writer.WritePropertyName("max_edits"); - writer.WriteNumberValue(MaxEditsValue.Value); - } - - if (MaxInspectionsValue.HasValue) - { - writer.WritePropertyName("max_inspections"); - writer.WriteNumberValue(MaxInspectionsValue.Value); - } - - if (MaxTermFreqValue.HasValue) - { - writer.WritePropertyName("max_term_freq"); - writer.WriteNumberValue(MaxTermFreqValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - if (!string.IsNullOrEmpty(PostFilterValue)) - { - writer.WritePropertyName("post_filter"); - writer.WriteStringValue(PostFilterValue); - } - - if (!string.IsNullOrEmpty(PreFilterValue)) - { - writer.WritePropertyName("pre_filter"); - writer.WriteStringValue(PreFilterValue); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SuggestModeValue is not null) - { - writer.WritePropertyName("suggest_mode"); - JsonSerializer.Serialize(writer, SuggestModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DirectGeneratorDescriptor : SerializableDescriptor -{ - internal DirectGeneratorDescriptor(Action configure) => configure.Invoke(this); - - public DirectGeneratorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? MaxEditsValue { get; set; } - private float? MaxInspectionsValue { get; set; } - private float? MaxTermFreqValue { get; set; } - private float? MinDocFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - private string? PostFilterValue { get; set; } - private string? PreFilterValue { get; set; } - private int? PrefixLengthValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestModeValue { get; set; } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public DirectGeneratorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public DirectGeneratorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public DirectGeneratorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. - /// Can only be 1 or 2. - /// - /// - public DirectGeneratorDescriptor MaxEdits(int? maxEdits) - { - MaxEditsValue = maxEdits; - return Self; - } - - /// - /// - /// A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. - /// Can improve accuracy at the cost of performance. - /// - /// - public DirectGeneratorDescriptor MaxInspections(float? maxInspections) - { - MaxInspectionsValue = maxInspections; - return Self; - } - - /// - /// - /// The maximum threshold in number of documents in which a suggest text token can exist in order to be included. - /// This can be used to exclude high frequency terms — which are usually spelled correctly — from being spellchecked. - /// Can be a relative percentage number (for example 0.4) or an absolute number to represent document frequencies. - /// If a value higher than 1 is specified, then fractional can not be specified. - /// - /// - public DirectGeneratorDescriptor MaxTermFreq(float? maxTermFreq) - { - MaxTermFreqValue = maxTermFreq; - return Self; - } - - /// - /// - /// The minimal threshold in number of documents a suggestion should appear in. - /// This can improve quality by only suggesting high frequency terms. - /// Can be specified as an absolute number or as a relative percentage of number of documents. - /// If a value higher than 1 is specified, the number cannot be fractional. - /// - /// - public DirectGeneratorDescriptor MinDocFreq(float? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// The minimum length a suggest text term must have in order to be included. - /// - /// - public DirectGeneratorDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - /// - /// - /// A filter (analyzer) that is applied to each of the generated tokens before they are passed to the actual phrase scorer. - /// - /// - public DirectGeneratorDescriptor PostFilter(string? postFilter) - { - PostFilterValue = postFilter; - return Self; - } - - /// - /// - /// A filter (analyzer) that is applied to each of the tokens passed to this candidate generator. - /// This filter is applied to the original token before candidates are generated. - /// - /// - public DirectGeneratorDescriptor PreFilter(string? preFilter) - { - PreFilterValue = preFilter; - return Self; - } - - /// - /// - /// The number of minimal prefix characters that must match in order be a candidate suggestions. - /// Increasing this number improves spellcheck performance. - /// - /// - public DirectGeneratorDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public DirectGeneratorDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Controls what suggestions are included on the suggestions generated on each shard. - /// - /// - public DirectGeneratorDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) - { - SuggestModeValue = suggestMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (MaxEditsValue.HasValue) - { - writer.WritePropertyName("max_edits"); - writer.WriteNumberValue(MaxEditsValue.Value); - } - - if (MaxInspectionsValue.HasValue) - { - writer.WritePropertyName("max_inspections"); - writer.WriteNumberValue(MaxInspectionsValue.Value); - } - - if (MaxTermFreqValue.HasValue) - { - writer.WritePropertyName("max_term_freq"); - writer.WriteNumberValue(MaxTermFreqValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - if (!string.IsNullOrEmpty(PostFilterValue)) - { - writer.WritePropertyName("post_filter"); - writer.WriteStringValue(PostFilterValue); - } - - if (!string.IsNullOrEmpty(PreFilterValue)) - { - writer.WritePropertyName("pre_filter"); - writer.WriteStringValue(PreFilterValue); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SuggestModeValue is not null) - { - writer.WritePropertyName("suggest_mode"); - JsonSerializer.Serialize(writer, SuggestModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfile.g.cs deleted file mode 100644 index 087f0625db9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfile.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class FetchProfile -{ - [JsonInclude, JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FetchProfileBreakdown Breakdown { get; init; } - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("debug")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FetchProfileDebug? Debug { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs deleted file mode 100644 index 4242883cc7d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class FetchProfileBreakdown -{ - [JsonInclude, JsonPropertyName("load_source")] - public int? LoadSource { get; init; } - [JsonInclude, JsonPropertyName("load_source_count")] - public int? LoadSourceCount { get; init; } - [JsonInclude, JsonPropertyName("load_stored_fields")] - public int? LoadStoredFields { get; init; } - [JsonInclude, JsonPropertyName("load_stored_fields_count")] - public int? LoadStoredFieldsCount { get; init; } - [JsonInclude, JsonPropertyName("next_reader")] - public int? NextReader { get; init; } - [JsonInclude, JsonPropertyName("next_reader_count")] - public int? NextReaderCount { get; init; } - [JsonInclude, JsonPropertyName("process")] - public int? Process { get; init; } - [JsonInclude, JsonPropertyName("process_count")] - public int? ProcessCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileDebug.g.cs deleted file mode 100644 index d41b30420cb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FetchProfileDebug.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class FetchProfileDebug -{ - [JsonInclude, JsonPropertyName("fast_path")] - public int? FastPath { get; init; } - [JsonInclude, JsonPropertyName("stored_fields")] - public IReadOnlyCollection? StoredFields { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs deleted file mode 100644 index a37f32afbc0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldCollapse.g.cs +++ /dev/null @@ -1,433 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class FieldCollapse -{ - [JsonInclude, JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } - - /// - /// - /// The field to collapse the result set on - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The number of inner hits and their sort order - /// - /// - [JsonInclude, JsonPropertyName("inner_hits")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits))] - public ICollection? InnerHits { get; set; } - - /// - /// - /// The number of concurrent requests allowed to retrieve the inner_hits per group - /// - /// - [JsonInclude, JsonPropertyName("max_concurrent_group_searches")] - public int? MaxConcurrentGroupSearches { get; set; } -} - -public sealed partial class FieldCollapseDescriptor : SerializableDescriptor> -{ - internal FieldCollapseDescriptor(Action> configure) => configure.Invoke(this); - - public FieldCollapseDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private Action>[] InnerHitsDescriptorActions { get; set; } - private int? MaxConcurrentGroupSearchesValue { get; set; } - - public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public FieldCollapseDescriptor Collapse(Action> configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field to collapse the result set on - /// - /// - public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to collapse the result set on - /// - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to collapse the result set on - /// - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The number of inner hits and their sort order - /// - /// - public FieldCollapseDescriptor InnerHits(ICollection? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptorActions = null; - InnerHitsValue = innerHits; - return Self; - } - - public FieldCollapseDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptorActions = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public FieldCollapseDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorActions = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - public FieldCollapseDescriptor InnerHits(params Action>[] configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The number of concurrent requests allowed to retrieve the inner_hits per group - /// - /// - public FieldCollapseDescriptor MaxConcurrentGroupSearches(int? maxConcurrentGroupSearches) - { - MaxConcurrentGroupSearchesValue = maxConcurrentGroupSearches; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsDescriptorActions is not null) - { - writer.WritePropertyName("inner_hits"); - if (InnerHitsDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in InnerHitsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(action), options); - } - - if (InnerHitsDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - SingleOrManySerializationHelper.Serialize(InnerHitsValue, writer, options); - } - - if (MaxConcurrentGroupSearchesValue.HasValue) - { - writer.WritePropertyName("max_concurrent_group_searches"); - writer.WriteNumberValue(MaxConcurrentGroupSearchesValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldCollapseDescriptor : SerializableDescriptor -{ - internal FieldCollapseDescriptor(Action configure) => configure.Invoke(this); - - public FieldCollapseDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private Action[] InnerHitsDescriptorActions { get; set; } - private int? MaxConcurrentGroupSearchesValue { get; set; } - - public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public FieldCollapseDescriptor Collapse(Action configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field to collapse the result set on - /// - /// - public FieldCollapseDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to collapse the result set on - /// - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to collapse the result set on - /// - /// - public FieldCollapseDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The number of inner hits and their sort order - /// - /// - public FieldCollapseDescriptor InnerHits(ICollection? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptorActions = null; - InnerHitsValue = innerHits; - return Self; - } - - public FieldCollapseDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptorActions = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public FieldCollapseDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorActions = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - public FieldCollapseDescriptor InnerHits(params Action[] configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The number of concurrent requests allowed to retrieve the inner_hits per group - /// - /// - public FieldCollapseDescriptor MaxConcurrentGroupSearches(int? maxConcurrentGroupSearches) - { - MaxConcurrentGroupSearchesValue = maxConcurrentGroupSearches; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsDescriptorActions is not null) - { - writer.WritePropertyName("inner_hits"); - if (InnerHitsDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in InnerHitsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(action), options); - } - - if (InnerHitsDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - SingleOrManySerializationHelper.Serialize(InnerHitsValue, writer, options); - } - - if (MaxConcurrentGroupSearchesValue.HasValue) - { - writer.WritePropertyName("max_concurrent_group_searches"); - writer.WriteNumberValue(MaxConcurrentGroupSearchesValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldSuggester.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldSuggester.g.cs deleted file mode 100644 index c717dbd72ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/FieldSuggester.g.cs +++ /dev/null @@ -1,436 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -[JsonConverter(typeof(FieldSuggesterConverter))] -public sealed partial class FieldSuggester -{ - internal FieldSuggester(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 FieldSuggester Completion(Elastic.Clients.Elasticsearch.Serverless.Core.Search.CompletionSuggester completionSuggester) => new FieldSuggester("completion", completionSuggester); - public static FieldSuggester Phrase(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggester phraseSuggester) => new FieldSuggester("phrase", phraseSuggester); - public static FieldSuggester Term(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TermSuggester termSuggester) => new FieldSuggester("term", termSuggester); - - /// - /// - /// Prefix used to search for suggestions. - /// - /// - [JsonInclude, JsonPropertyName("prefix")] - public string? Prefix { get; set; } - - /// - /// - /// A prefix expressed as a regular expression. - /// - /// - [JsonInclude, JsonPropertyName("regex")] - public string? Regex { get; set; } - - /// - /// - /// The text to use as input for the suggester. - /// Needs to be set globally or per suggestion. - /// - /// - [JsonInclude, JsonPropertyName("text")] - public string? Text { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class FieldSuggesterConverter : JsonConverter -{ - public override FieldSuggester 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? prefixValue = default; - string? regexValue = default; - string? textValue = 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 == "prefix") - { - prefixValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "regex") - { - regexValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "text") - { - textValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "completion") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "phrase") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'FieldSuggester' from the response."); - } - - var result = new FieldSuggester(variantNameValue, variantValue); - result.Prefix = prefixValue; - result.Regex = regexValue; - result.Text = textValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, FieldSuggester value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Prefix)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(value.Prefix); - } - - if (!string.IsNullOrEmpty(value.Regex)) - { - writer.WritePropertyName("regex"); - writer.WriteStringValue(value.Regex); - } - - if (!string.IsNullOrEmpty(value.Text)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(value.Text); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "completion": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.CompletionSuggester)value.Variant, options); - break; - case "phrase": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggester)value.Variant, options); - break; - case "term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.TermSuggester)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldSuggesterDescriptor : SerializableDescriptor> -{ - internal FieldSuggesterDescriptor(Action> configure) => configure.Invoke(this); - - public FieldSuggesterDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private FieldSuggesterDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private FieldSuggesterDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private string? PrefixValue { get; set; } - private string? RegexValue { get; set; } - private string? TextValue { get; set; } - - /// - /// - /// Prefix used to search for suggestions. - /// - /// - public FieldSuggesterDescriptor Prefix(string? prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// A prefix expressed as a regular expression. - /// - /// - public FieldSuggesterDescriptor Regex(string? regex) - { - RegexValue = regex; - return Self; - } - - /// - /// - /// The text to use as input for the suggester. - /// Needs to be set globally or per suggestion. - /// - /// - public FieldSuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - public FieldSuggesterDescriptor Completion(Elastic.Clients.Elasticsearch.Serverless.Core.Search.CompletionSuggester completionSuggester) => Set(completionSuggester, "completion"); - public FieldSuggesterDescriptor Completion(Action> configure) => Set(configure, "completion"); - public FieldSuggesterDescriptor Phrase(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggester phraseSuggester) => Set(phraseSuggester, "phrase"); - public FieldSuggesterDescriptor Phrase(Action> configure) => Set(configure, "phrase"); - public FieldSuggesterDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TermSuggester termSuggester) => Set(termSuggester, "term"); - public FieldSuggesterDescriptor Term(Action> configure) => Set(configure, "term"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(PrefixValue)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - } - - if (!string.IsNullOrEmpty(RegexValue)) - { - writer.WritePropertyName("regex"); - writer.WriteStringValue(RegexValue); - } - - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldSuggesterDescriptor : SerializableDescriptor -{ - internal FieldSuggesterDescriptor(Action configure) => configure.Invoke(this); - - public FieldSuggesterDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private FieldSuggesterDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private FieldSuggesterDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private string? PrefixValue { get; set; } - private string? RegexValue { get; set; } - private string? TextValue { get; set; } - - /// - /// - /// Prefix used to search for suggestions. - /// - /// - public FieldSuggesterDescriptor Prefix(string? prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// A prefix expressed as a regular expression. - /// - /// - public FieldSuggesterDescriptor Regex(string? regex) - { - RegexValue = regex; - return Self; - } - - /// - /// - /// The text to use as input for the suggester. - /// Needs to be set globally or per suggestion. - /// - /// - public FieldSuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - public FieldSuggesterDescriptor Completion(Elastic.Clients.Elasticsearch.Serverless.Core.Search.CompletionSuggester completionSuggester) => Set(completionSuggester, "completion"); - public FieldSuggesterDescriptor Completion(Action configure) => Set(configure, "completion"); - public FieldSuggesterDescriptor Phrase(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggester phraseSuggester) => Set(phraseSuggester, "phrase"); - public FieldSuggesterDescriptor Phrase(Action configure) => Set(configure, "phrase"); - public FieldSuggesterDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TermSuggester termSuggester) => Set(termSuggester, "term"); - public FieldSuggesterDescriptor Term(Action configure) => Set(configure, "term"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(PrefixValue)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - } - - if (!string.IsNullOrEmpty(RegexValue)) - { - writer.WritePropertyName("regex"); - writer.WriteStringValue(RegexValue); - } - - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs deleted file mode 100644 index d2ec32f9516..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Highlight.g.cs +++ /dev/null @@ -1,1047 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class Highlight -{ - /// - /// - /// A string that contains each boundary character. - /// - /// - [JsonInclude, JsonPropertyName("boundary_chars")] - public string? BoundaryChars { get; set; } - - /// - /// - /// How far to scan for boundary characters. - /// - /// - [JsonInclude, JsonPropertyName("boundary_max_scan")] - public int? BoundaryMaxScan { get; set; } - - /// - /// - /// Specifies how to break the highlighted fragments: chars, sentence, or word. - /// Only valid for the unified and fvh highlighters. - /// Defaults to sentence for the unified highlighter. Defaults to chars for the fvh highlighter. - /// - /// - [JsonInclude, JsonPropertyName("boundary_scanner")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScanner { get; set; } - - /// - /// - /// Controls which locale is used to search for sentence and word boundaries. - /// This parameter takes a form of a language tag, for example: "en-US", "fr-FR", "ja-JP". - /// - /// - [JsonInclude, JsonPropertyName("boundary_scanner_locale")] - public string? BoundaryScannerLocale { get; set; } - [JsonInclude, JsonPropertyName("encoder")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? Encoder { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public IDictionary Fields { get; set; } - - /// - /// - /// Specifies how text should be broken up in highlight snippets: simple or span. - /// Only valid for the plain highlighter. - /// - /// - [JsonInclude, JsonPropertyName("fragmenter")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? Fragmenter { get; set; } - - /// - /// - /// The size of the highlighted fragment in characters. - /// - /// - [JsonInclude, JsonPropertyName("fragment_size")] - public int? FragmentSize { get; set; } - [JsonInclude, JsonPropertyName("highlight_filter")] - public bool? HighlightFilter { get; set; } - - /// - /// - /// Highlight matches for a query other than the search query. - /// This is especially useful if you use a rescore query because those are not taken into account by highlighting by default. - /// - /// - [JsonInclude, JsonPropertyName("highlight_query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQuery { get; set; } - - /// - /// - /// If set to a non-negative value, highlighting stops at this defined maximum limit. - /// The rest of the text is not processed, thus not highlighted and no error is returned - /// The max_analyzed_offset query setting does not override the index.highlight.max_analyzed_offset setting, which prevails when it’s set to lower value than the query setting. - /// - /// - [JsonInclude, JsonPropertyName("max_analyzed_offset")] - public int? MaxAnalyzedOffset { get; set; } - [JsonInclude, JsonPropertyName("max_fragment_length")] - public int? MaxFragmentLength { get; set; } - - /// - /// - /// The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. - /// - /// - [JsonInclude, JsonPropertyName("no_match_size")] - public int? NoMatchSize { get; set; } - - /// - /// - /// The maximum number of fragments to return. - /// If the number of fragments is set to 0, no fragments are returned. - /// Instead, the entire field contents are highlighted and returned. - /// This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. - /// If number_of_fragments is 0, fragment_size is ignored. - /// - /// - [JsonInclude, JsonPropertyName("number_of_fragments")] - public int? NumberOfFragments { get; set; } - [JsonInclude, JsonPropertyName("options")] - public IDictionary? Options { get; set; } - - /// - /// - /// Sorts highlighted fragments by score when set to score. - /// By default, fragments will be output in the order they appear in the field (order: none). - /// Setting this option to score will output the most relevant fragments first. - /// Each highlighter applies its own logic to compute relevancy scores. - /// - /// - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? Order { get; set; } - - /// - /// - /// Controls the number of matching phrases in a document that are considered. - /// Prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. - /// When using matched_fields, phrase_limit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. - /// Only supported by the fvh highlighter. - /// - /// - [JsonInclude, JsonPropertyName("phrase_limit")] - public int? PhraseLimit { get; set; } - - /// - /// - /// Use in conjunction with pre_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - [JsonInclude, JsonPropertyName("post_tags")] - public ICollection? PostTags { get; set; } - - /// - /// - /// Use in conjunction with post_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - [JsonInclude, JsonPropertyName("pre_tags")] - public ICollection? PreTags { get; set; } - - /// - /// - /// By default, only fields that contains a query match are highlighted. - /// Set to false to highlight all fields. - /// - /// - [JsonInclude, JsonPropertyName("require_field_match")] - public bool? RequireFieldMatch { get; set; } - - /// - /// - /// Set to styled to use the built-in tag schema. - /// - /// - [JsonInclude, JsonPropertyName("tags_schema")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchema { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? Type { get; set; } -} - -public sealed partial class HighlightDescriptor : SerializableDescriptor> -{ - internal HighlightDescriptor(Action> configure) => configure.Invoke(this); - - public HighlightDescriptor() : base() - { - } - - private string? BoundaryCharsValue { get; set; } - private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } - private string? BoundaryScannerLocaleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? EncoderValue { get; set; } - private IDictionary> FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } - private int? FragmentSizeValue { get; set; } - private bool? HighlightFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action> HighlightQueryDescriptorAction { get; set; } - private int? MaxAnalyzedOffsetValue { get; set; } - private int? MaxFragmentLengthValue { get; set; } - private int? NoMatchSizeValue { get; set; } - private int? NumberOfFragmentsValue { get; set; } - private IDictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? OrderValue { get; set; } - private int? PhraseLimitValue { get; set; } - private ICollection? PostTagsValue { get; set; } - private ICollection? PreTagsValue { get; set; } - private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - - /// - /// - /// A string that contains each boundary character. - /// - /// - public HighlightDescriptor BoundaryChars(string? boundaryChars) - { - BoundaryCharsValue = boundaryChars; - return Self; - } - - /// - /// - /// How far to scan for boundary characters. - /// - /// - public HighlightDescriptor BoundaryMaxScan(int? boundaryMaxScan) - { - BoundaryMaxScanValue = boundaryMaxScan; - return Self; - } - - /// - /// - /// Specifies how to break the highlighted fragments: chars, sentence, or word. - /// Only valid for the unified and fvh highlighters. - /// Defaults to sentence for the unified highlighter. Defaults to chars for the fvh highlighter. - /// - /// - public HighlightDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? boundaryScanner) - { - BoundaryScannerValue = boundaryScanner; - return Self; - } - - /// - /// - /// Controls which locale is used to search for sentence and word boundaries. - /// This parameter takes a form of a language tag, for example: "en-US", "fr-FR", "ja-JP". - /// - /// - public HighlightDescriptor BoundaryScannerLocale(string? boundaryScannerLocale) - { - BoundaryScannerLocaleValue = boundaryScannerLocale; - return Self; - } - - public HighlightDescriptor Encoder(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? encoder) - { - EncoderValue = encoder; - return Self; - } - - public HighlightDescriptor Fields(Func>, FluentDescriptorDictionary>> selector) - { - FieldsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Specifies how text should be broken up in highlight snippets: simple or span. - /// Only valid for the plain highlighter. - /// - /// - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) - { - FragmenterValue = fragmenter; - return Self; - } - - /// - /// - /// The size of the highlighted fragment in characters. - /// - /// - public HighlightDescriptor FragmentSize(int? fragmentSize) - { - FragmentSizeValue = fragmentSize; - return Self; - } - - public HighlightDescriptor HighlightFilter(bool? highlightFilter = true) - { - HighlightFilterValue = highlightFilter; - return Self; - } - - /// - /// - /// Highlight matches for a query other than the search query. - /// This is especially useful if you use a rescore query because those are not taken into account by highlighting by default. - /// - /// - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightDescriptor HighlightQuery(Action> configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// If set to a non-negative value, highlighting stops at this defined maximum limit. - /// The rest of the text is not processed, thus not highlighted and no error is returned - /// The max_analyzed_offset query setting does not override the index.highlight.max_analyzed_offset setting, which prevails when it’s set to lower value than the query setting. - /// - /// - public HighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) - { - MaxAnalyzedOffsetValue = maxAnalyzedOffset; - return Self; - } - - public HighlightDescriptor MaxFragmentLength(int? maxFragmentLength) - { - MaxFragmentLengthValue = maxFragmentLength; - return Self; - } - - /// - /// - /// The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. - /// - /// - public HighlightDescriptor NoMatchSize(int? noMatchSize) - { - NoMatchSizeValue = noMatchSize; - return Self; - } - - /// - /// - /// The maximum number of fragments to return. - /// If the number of fragments is set to 0, no fragments are returned. - /// Instead, the entire field contents are highlighted and returned. - /// This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. - /// If number_of_fragments is 0, fragment_size is ignored. - /// - /// - public HighlightDescriptor NumberOfFragments(int? numberOfFragments) - { - NumberOfFragmentsValue = numberOfFragments; - return Self; - } - - public HighlightDescriptor Options(Func, FluentDictionary> selector) - { - OptionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Sorts highlighted fragments by score when set to score. - /// By default, fragments will be output in the order they appear in the field (order: none). - /// Setting this option to score will output the most relevant fragments first. - /// Each highlighter applies its own logic to compute relevancy scores. - /// - /// - public HighlightDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Controls the number of matching phrases in a document that are considered. - /// Prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. - /// When using matched_fields, phrase_limit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. - /// Only supported by the fvh highlighter. - /// - /// - public HighlightDescriptor PhraseLimit(int? phraseLimit) - { - PhraseLimitValue = phraseLimit; - return Self; - } - - /// - /// - /// Use in conjunction with pre_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightDescriptor PostTags(ICollection? postTags) - { - PostTagsValue = postTags; - return Self; - } - - /// - /// - /// Use in conjunction with post_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightDescriptor PreTags(ICollection? preTags) - { - PreTagsValue = preTags; - return Self; - } - - /// - /// - /// By default, only fields that contains a query match are highlighted. - /// Set to false to highlight all fields. - /// - /// - public HighlightDescriptor RequireFieldMatch(bool? requireFieldMatch = true) - { - RequireFieldMatchValue = requireFieldMatch; - return Self; - } - - /// - /// - /// Set to styled to use the built-in tag schema. - /// - /// - public HighlightDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? tagsSchema) - { - TagsSchemaValue = tagsSchema; - return Self; - } - - public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(BoundaryCharsValue)) - { - writer.WritePropertyName("boundary_chars"); - writer.WriteStringValue(BoundaryCharsValue); - } - - if (BoundaryMaxScanValue.HasValue) - { - writer.WritePropertyName("boundary_max_scan"); - writer.WriteNumberValue(BoundaryMaxScanValue.Value); - } - - if (BoundaryScannerValue is not null) - { - writer.WritePropertyName("boundary_scanner"); - JsonSerializer.Serialize(writer, BoundaryScannerValue, options); - } - - if (!string.IsNullOrEmpty(BoundaryScannerLocaleValue)) - { - writer.WritePropertyName("boundary_scanner_locale"); - writer.WriteStringValue(BoundaryScannerLocaleValue); - } - - if (EncoderValue is not null) - { - writer.WritePropertyName("encoder"); - JsonSerializer.Serialize(writer, EncoderValue, options); - } - - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - - if (HighlightFilterValue.HasValue) - { - writer.WritePropertyName("highlight_filter"); - writer.WriteBooleanValue(HighlightFilterValue.Value); - } - - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - - if (MaxAnalyzedOffsetValue.HasValue) - { - writer.WritePropertyName("max_analyzed_offset"); - writer.WriteNumberValue(MaxAnalyzedOffsetValue.Value); - } - - if (MaxFragmentLengthValue.HasValue) - { - writer.WritePropertyName("max_fragment_length"); - writer.WriteNumberValue(MaxFragmentLengthValue.Value); - } - - if (NoMatchSizeValue.HasValue) - { - writer.WritePropertyName("no_match_size"); - writer.WriteNumberValue(NoMatchSizeValue.Value); - } - - if (NumberOfFragmentsValue.HasValue) - { - writer.WritePropertyName("number_of_fragments"); - writer.WriteNumberValue(NumberOfFragmentsValue.Value); - } - - if (OptionsValue is not null) - { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (PhraseLimitValue.HasValue) - { - writer.WritePropertyName("phrase_limit"); - writer.WriteNumberValue(PhraseLimitValue.Value); - } - - if (PostTagsValue is not null) - { - writer.WritePropertyName("post_tags"); - JsonSerializer.Serialize(writer, PostTagsValue, options); - } - - if (PreTagsValue is not null) - { - writer.WritePropertyName("pre_tags"); - JsonSerializer.Serialize(writer, PreTagsValue, options); - } - - if (RequireFieldMatchValue.HasValue) - { - writer.WritePropertyName("require_field_match"); - writer.WriteBooleanValue(RequireFieldMatchValue.Value); - } - - if (TagsSchemaValue is not null) - { - writer.WritePropertyName("tags_schema"); - JsonSerializer.Serialize(writer, TagsSchemaValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class HighlightDescriptor : SerializableDescriptor -{ - internal HighlightDescriptor(Action configure) => configure.Invoke(this); - - public HighlightDescriptor() : base() - { - } - - private string? BoundaryCharsValue { get; set; } - private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } - private string? BoundaryScannerLocaleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? EncoderValue { get; set; } - private IDictionary FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } - private int? FragmentSizeValue { get; set; } - private bool? HighlightFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action HighlightQueryDescriptorAction { get; set; } - private int? MaxAnalyzedOffsetValue { get; set; } - private int? MaxFragmentLengthValue { get; set; } - private int? NoMatchSizeValue { get; set; } - private int? NumberOfFragmentsValue { get; set; } - private IDictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? OrderValue { get; set; } - private int? PhraseLimitValue { get; set; } - private ICollection? PostTagsValue { get; set; } - private ICollection? PreTagsValue { get; set; } - private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - - /// - /// - /// A string that contains each boundary character. - /// - /// - public HighlightDescriptor BoundaryChars(string? boundaryChars) - { - BoundaryCharsValue = boundaryChars; - return Self; - } - - /// - /// - /// How far to scan for boundary characters. - /// - /// - public HighlightDescriptor BoundaryMaxScan(int? boundaryMaxScan) - { - BoundaryMaxScanValue = boundaryMaxScan; - return Self; - } - - /// - /// - /// Specifies how to break the highlighted fragments: chars, sentence, or word. - /// Only valid for the unified and fvh highlighters. - /// Defaults to sentence for the unified highlighter. Defaults to chars for the fvh highlighter. - /// - /// - public HighlightDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? boundaryScanner) - { - BoundaryScannerValue = boundaryScanner; - return Self; - } - - /// - /// - /// Controls which locale is used to search for sentence and word boundaries. - /// This parameter takes a form of a language tag, for example: "en-US", "fr-FR", "ja-JP". - /// - /// - public HighlightDescriptor BoundaryScannerLocale(string? boundaryScannerLocale) - { - BoundaryScannerLocaleValue = boundaryScannerLocale; - return Self; - } - - public HighlightDescriptor Encoder(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterEncoder? encoder) - { - EncoderValue = encoder; - return Self; - } - - public HighlightDescriptor Fields(Func, FluentDescriptorDictionary> selector) - { - FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Specifies how text should be broken up in highlight snippets: simple or span. - /// Only valid for the plain highlighter. - /// - /// - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) - { - FragmenterValue = fragmenter; - return Self; - } - - /// - /// - /// The size of the highlighted fragment in characters. - /// - /// - public HighlightDescriptor FragmentSize(int? fragmentSize) - { - FragmentSizeValue = fragmentSize; - return Self; - } - - public HighlightDescriptor HighlightFilter(bool? highlightFilter = true) - { - HighlightFilterValue = highlightFilter; - return Self; - } - - /// - /// - /// Highlight matches for a query other than the search query. - /// This is especially useful if you use a rescore query because those are not taken into account by highlighting by default. - /// - /// - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightDescriptor HighlightQuery(Action configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// If set to a non-negative value, highlighting stops at this defined maximum limit. - /// The rest of the text is not processed, thus not highlighted and no error is returned - /// The max_analyzed_offset query setting does not override the index.highlight.max_analyzed_offset setting, which prevails when it’s set to lower value than the query setting. - /// - /// - public HighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) - { - MaxAnalyzedOffsetValue = maxAnalyzedOffset; - return Self; - } - - public HighlightDescriptor MaxFragmentLength(int? maxFragmentLength) - { - MaxFragmentLengthValue = maxFragmentLength; - return Self; - } - - /// - /// - /// The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. - /// - /// - public HighlightDescriptor NoMatchSize(int? noMatchSize) - { - NoMatchSizeValue = noMatchSize; - return Self; - } - - /// - /// - /// The maximum number of fragments to return. - /// If the number of fragments is set to 0, no fragments are returned. - /// Instead, the entire field contents are highlighted and returned. - /// This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. - /// If number_of_fragments is 0, fragment_size is ignored. - /// - /// - public HighlightDescriptor NumberOfFragments(int? numberOfFragments) - { - NumberOfFragmentsValue = numberOfFragments; - return Self; - } - - public HighlightDescriptor Options(Func, FluentDictionary> selector) - { - OptionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Sorts highlighted fragments by score when set to score. - /// By default, fragments will be output in the order they appear in the field (order: none). - /// Setting this option to score will output the most relevant fragments first. - /// Each highlighter applies its own logic to compute relevancy scores. - /// - /// - public HighlightDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Controls the number of matching phrases in a document that are considered. - /// Prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. - /// When using matched_fields, phrase_limit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. - /// Only supported by the fvh highlighter. - /// - /// - public HighlightDescriptor PhraseLimit(int? phraseLimit) - { - PhraseLimitValue = phraseLimit; - return Self; - } - - /// - /// - /// Use in conjunction with pre_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightDescriptor PostTags(ICollection? postTags) - { - PostTagsValue = postTags; - return Self; - } - - /// - /// - /// Use in conjunction with post_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightDescriptor PreTags(ICollection? preTags) - { - PreTagsValue = preTags; - return Self; - } - - /// - /// - /// By default, only fields that contains a query match are highlighted. - /// Set to false to highlight all fields. - /// - /// - public HighlightDescriptor RequireFieldMatch(bool? requireFieldMatch = true) - { - RequireFieldMatchValue = requireFieldMatch; - return Self; - } - - /// - /// - /// Set to styled to use the built-in tag schema. - /// - /// - public HighlightDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? tagsSchema) - { - TagsSchemaValue = tagsSchema; - return Self; - } - - public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(BoundaryCharsValue)) - { - writer.WritePropertyName("boundary_chars"); - writer.WriteStringValue(BoundaryCharsValue); - } - - if (BoundaryMaxScanValue.HasValue) - { - writer.WritePropertyName("boundary_max_scan"); - writer.WriteNumberValue(BoundaryMaxScanValue.Value); - } - - if (BoundaryScannerValue is not null) - { - writer.WritePropertyName("boundary_scanner"); - JsonSerializer.Serialize(writer, BoundaryScannerValue, options); - } - - if (!string.IsNullOrEmpty(BoundaryScannerLocaleValue)) - { - writer.WritePropertyName("boundary_scanner_locale"); - writer.WriteStringValue(BoundaryScannerLocaleValue); - } - - if (EncoderValue is not null) - { - writer.WritePropertyName("encoder"); - JsonSerializer.Serialize(writer, EncoderValue, options); - } - - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - - if (HighlightFilterValue.HasValue) - { - writer.WritePropertyName("highlight_filter"); - writer.WriteBooleanValue(HighlightFilterValue.Value); - } - - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - - if (MaxAnalyzedOffsetValue.HasValue) - { - writer.WritePropertyName("max_analyzed_offset"); - writer.WriteNumberValue(MaxAnalyzedOffsetValue.Value); - } - - if (MaxFragmentLengthValue.HasValue) - { - writer.WritePropertyName("max_fragment_length"); - writer.WriteNumberValue(MaxFragmentLengthValue.Value); - } - - if (NoMatchSizeValue.HasValue) - { - writer.WritePropertyName("no_match_size"); - writer.WriteNumberValue(NoMatchSizeValue.Value); - } - - if (NumberOfFragmentsValue.HasValue) - { - writer.WritePropertyName("number_of_fragments"); - writer.WriteNumberValue(NumberOfFragmentsValue.Value); - } - - if (OptionsValue is not null) - { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (PhraseLimitValue.HasValue) - { - writer.WritePropertyName("phrase_limit"); - writer.WriteNumberValue(PhraseLimitValue.Value); - } - - if (PostTagsValue is not null) - { - writer.WritePropertyName("post_tags"); - JsonSerializer.Serialize(writer, PostTagsValue, options); - } - - if (PreTagsValue is not null) - { - writer.WritePropertyName("pre_tags"); - JsonSerializer.Serialize(writer, PreTagsValue, options); - } - - if (RequireFieldMatchValue.HasValue) - { - writer.WritePropertyName("require_field_match"); - writer.WriteBooleanValue(RequireFieldMatchValue.Value); - } - - if (TagsSchemaValue is not null) - { - writer.WritePropertyName("tags_schema"); - JsonSerializer.Serialize(writer, TagsSchemaValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs deleted file mode 100644 index 7d5a7e8b08c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HighlightField.g.cs +++ /dev/null @@ -1,1056 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class HighlightField -{ - /// - /// - /// A string that contains each boundary character. - /// - /// - [JsonInclude, JsonPropertyName("boundary_chars")] - public string? BoundaryChars { get; set; } - - /// - /// - /// How far to scan for boundary characters. - /// - /// - [JsonInclude, JsonPropertyName("boundary_max_scan")] - public int? BoundaryMaxScan { get; set; } - - /// - /// - /// Specifies how to break the highlighted fragments: chars, sentence, or word. - /// Only valid for the unified and fvh highlighters. - /// Defaults to sentence for the unified highlighter. Defaults to chars for the fvh highlighter. - /// - /// - [JsonInclude, JsonPropertyName("boundary_scanner")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScanner { get; set; } - - /// - /// - /// Controls which locale is used to search for sentence and word boundaries. - /// This parameter takes a form of a language tag, for example: "en-US", "fr-FR", "ja-JP". - /// - /// - [JsonInclude, JsonPropertyName("boundary_scanner_locale")] - public string? BoundaryScannerLocale { get; set; } - - /// - /// - /// Specifies how text should be broken up in highlight snippets: simple or span. - /// Only valid for the plain highlighter. - /// - /// - [JsonInclude, JsonPropertyName("fragmenter")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? Fragmenter { get; set; } - [JsonInclude, JsonPropertyName("fragment_offset")] - public int? FragmentOffset { get; set; } - - /// - /// - /// The size of the highlighted fragment in characters. - /// - /// - [JsonInclude, JsonPropertyName("fragment_size")] - public int? FragmentSize { get; set; } - [JsonInclude, JsonPropertyName("highlight_filter")] - public bool? HighlightFilter { get; set; } - - /// - /// - /// Highlight matches for a query other than the search query. - /// This is especially useful if you use a rescore query because those are not taken into account by highlighting by default. - /// - /// - [JsonInclude, JsonPropertyName("highlight_query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQuery { get; set; } - [JsonInclude, JsonPropertyName("matched_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? MatchedFields { get; set; } - - /// - /// - /// If set to a non-negative value, highlighting stops at this defined maximum limit. - /// The rest of the text is not processed, thus not highlighted and no error is returned - /// The max_analyzed_offset query setting does not override the index.highlight.max_analyzed_offset setting, which prevails when it’s set to lower value than the query setting. - /// - /// - [JsonInclude, JsonPropertyName("max_analyzed_offset")] - public int? MaxAnalyzedOffset { get; set; } - [JsonInclude, JsonPropertyName("max_fragment_length")] - public int? MaxFragmentLength { get; set; } - - /// - /// - /// The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. - /// - /// - [JsonInclude, JsonPropertyName("no_match_size")] - public int? NoMatchSize { get; set; } - - /// - /// - /// The maximum number of fragments to return. - /// If the number of fragments is set to 0, no fragments are returned. - /// Instead, the entire field contents are highlighted and returned. - /// This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. - /// If number_of_fragments is 0, fragment_size is ignored. - /// - /// - [JsonInclude, JsonPropertyName("number_of_fragments")] - public int? NumberOfFragments { get; set; } - [JsonInclude, JsonPropertyName("options")] - public IDictionary? Options { get; set; } - - /// - /// - /// Sorts highlighted fragments by score when set to score. - /// By default, fragments will be output in the order they appear in the field (order: none). - /// Setting this option to score will output the most relevant fragments first. - /// Each highlighter applies its own logic to compute relevancy scores. - /// - /// - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? Order { get; set; } - - /// - /// - /// Controls the number of matching phrases in a document that are considered. - /// Prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. - /// When using matched_fields, phrase_limit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. - /// Only supported by the fvh highlighter. - /// - /// - [JsonInclude, JsonPropertyName("phrase_limit")] - public int? PhraseLimit { get; set; } - - /// - /// - /// Use in conjunction with pre_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - [JsonInclude, JsonPropertyName("post_tags")] - public ICollection? PostTags { get; set; } - - /// - /// - /// Use in conjunction with post_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - [JsonInclude, JsonPropertyName("pre_tags")] - public ICollection? PreTags { get; set; } - - /// - /// - /// By default, only fields that contains a query match are highlighted. - /// Set to false to highlight all fields. - /// - /// - [JsonInclude, JsonPropertyName("require_field_match")] - public bool? RequireFieldMatch { get; set; } - - /// - /// - /// Set to styled to use the built-in tag schema. - /// - /// - [JsonInclude, JsonPropertyName("tags_schema")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchema { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? Type { get; set; } -} - -public sealed partial class HighlightFieldDescriptor : SerializableDescriptor> -{ - internal HighlightFieldDescriptor(Action> configure) => configure.Invoke(this); - - public HighlightFieldDescriptor() : base() - { - } - - private string? BoundaryCharsValue { get; set; } - private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } - private string? BoundaryScannerLocaleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } - private int? FragmentOffsetValue { get; set; } - private int? FragmentSizeValue { get; set; } - private bool? HighlightFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action> HighlightQueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? MatchedFieldsValue { get; set; } - private int? MaxAnalyzedOffsetValue { get; set; } - private int? MaxFragmentLengthValue { get; set; } - private int? NoMatchSizeValue { get; set; } - private int? NumberOfFragmentsValue { get; set; } - private IDictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? OrderValue { get; set; } - private int? PhraseLimitValue { get; set; } - private ICollection? PostTagsValue { get; set; } - private ICollection? PreTagsValue { get; set; } - private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - - /// - /// - /// A string that contains each boundary character. - /// - /// - public HighlightFieldDescriptor BoundaryChars(string? boundaryChars) - { - BoundaryCharsValue = boundaryChars; - return Self; - } - - /// - /// - /// How far to scan for boundary characters. - /// - /// - public HighlightFieldDescriptor BoundaryMaxScan(int? boundaryMaxScan) - { - BoundaryMaxScanValue = boundaryMaxScan; - return Self; - } - - /// - /// - /// Specifies how to break the highlighted fragments: chars, sentence, or word. - /// Only valid for the unified and fvh highlighters. - /// Defaults to sentence for the unified highlighter. Defaults to chars for the fvh highlighter. - /// - /// - public HighlightFieldDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? boundaryScanner) - { - BoundaryScannerValue = boundaryScanner; - return Self; - } - - /// - /// - /// Controls which locale is used to search for sentence and word boundaries. - /// This parameter takes a form of a language tag, for example: "en-US", "fr-FR", "ja-JP". - /// - /// - public HighlightFieldDescriptor BoundaryScannerLocale(string? boundaryScannerLocale) - { - BoundaryScannerLocaleValue = boundaryScannerLocale; - return Self; - } - - /// - /// - /// Specifies how text should be broken up in highlight snippets: simple or span. - /// Only valid for the plain highlighter. - /// - /// - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) - { - FragmenterValue = fragmenter; - return Self; - } - - public HighlightFieldDescriptor FragmentOffset(int? fragmentOffset) - { - FragmentOffsetValue = fragmentOffset; - return Self; - } - - /// - /// - /// The size of the highlighted fragment in characters. - /// - /// - public HighlightFieldDescriptor FragmentSize(int? fragmentSize) - { - FragmentSizeValue = fragmentSize; - return Self; - } - - public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) - { - HighlightFilterValue = highlightFilter; - return Self; - } - - /// - /// - /// Highlight matches for a query other than the search query. - /// This is especially useful if you use a rescore query because those are not taken into account by highlighting by default. - /// - /// - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Action> configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - - public HighlightFieldDescriptor MatchedFields(Elastic.Clients.Elasticsearch.Serverless.Fields? matchedFields) - { - MatchedFieldsValue = matchedFields; - return Self; - } - - /// - /// - /// If set to a non-negative value, highlighting stops at this defined maximum limit. - /// The rest of the text is not processed, thus not highlighted and no error is returned - /// The max_analyzed_offset query setting does not override the index.highlight.max_analyzed_offset setting, which prevails when it’s set to lower value than the query setting. - /// - /// - public HighlightFieldDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) - { - MaxAnalyzedOffsetValue = maxAnalyzedOffset; - return Self; - } - - public HighlightFieldDescriptor MaxFragmentLength(int? maxFragmentLength) - { - MaxFragmentLengthValue = maxFragmentLength; - return Self; - } - - /// - /// - /// The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. - /// - /// - public HighlightFieldDescriptor NoMatchSize(int? noMatchSize) - { - NoMatchSizeValue = noMatchSize; - return Self; - } - - /// - /// - /// The maximum number of fragments to return. - /// If the number of fragments is set to 0, no fragments are returned. - /// Instead, the entire field contents are highlighted and returned. - /// This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. - /// If number_of_fragments is 0, fragment_size is ignored. - /// - /// - public HighlightFieldDescriptor NumberOfFragments(int? numberOfFragments) - { - NumberOfFragmentsValue = numberOfFragments; - return Self; - } - - public HighlightFieldDescriptor Options(Func, FluentDictionary> selector) - { - OptionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Sorts highlighted fragments by score when set to score. - /// By default, fragments will be output in the order they appear in the field (order: none). - /// Setting this option to score will output the most relevant fragments first. - /// Each highlighter applies its own logic to compute relevancy scores. - /// - /// - public HighlightFieldDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Controls the number of matching phrases in a document that are considered. - /// Prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. - /// When using matched_fields, phrase_limit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. - /// Only supported by the fvh highlighter. - /// - /// - public HighlightFieldDescriptor PhraseLimit(int? phraseLimit) - { - PhraseLimitValue = phraseLimit; - return Self; - } - - /// - /// - /// Use in conjunction with pre_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightFieldDescriptor PostTags(ICollection? postTags) - { - PostTagsValue = postTags; - return Self; - } - - /// - /// - /// Use in conjunction with post_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightFieldDescriptor PreTags(ICollection? preTags) - { - PreTagsValue = preTags; - return Self; - } - - /// - /// - /// By default, only fields that contains a query match are highlighted. - /// Set to false to highlight all fields. - /// - /// - public HighlightFieldDescriptor RequireFieldMatch(bool? requireFieldMatch = true) - { - RequireFieldMatchValue = requireFieldMatch; - return Self; - } - - /// - /// - /// Set to styled to use the built-in tag schema. - /// - /// - public HighlightFieldDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? tagsSchema) - { - TagsSchemaValue = tagsSchema; - return Self; - } - - public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(BoundaryCharsValue)) - { - writer.WritePropertyName("boundary_chars"); - writer.WriteStringValue(BoundaryCharsValue); - } - - if (BoundaryMaxScanValue.HasValue) - { - writer.WritePropertyName("boundary_max_scan"); - writer.WriteNumberValue(BoundaryMaxScanValue.Value); - } - - if (BoundaryScannerValue is not null) - { - writer.WritePropertyName("boundary_scanner"); - JsonSerializer.Serialize(writer, BoundaryScannerValue, options); - } - - if (!string.IsNullOrEmpty(BoundaryScannerLocaleValue)) - { - writer.WritePropertyName("boundary_scanner_locale"); - writer.WriteStringValue(BoundaryScannerLocaleValue); - } - - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - - if (FragmentOffsetValue.HasValue) - { - writer.WritePropertyName("fragment_offset"); - writer.WriteNumberValue(FragmentOffsetValue.Value); - } - - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - - if (HighlightFilterValue.HasValue) - { - writer.WritePropertyName("highlight_filter"); - writer.WriteBooleanValue(HighlightFilterValue.Value); - } - - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - - if (MatchedFieldsValue is not null) - { - writer.WritePropertyName("matched_fields"); - JsonSerializer.Serialize(writer, MatchedFieldsValue, options); - } - - if (MaxAnalyzedOffsetValue.HasValue) - { - writer.WritePropertyName("max_analyzed_offset"); - writer.WriteNumberValue(MaxAnalyzedOffsetValue.Value); - } - - if (MaxFragmentLengthValue.HasValue) - { - writer.WritePropertyName("max_fragment_length"); - writer.WriteNumberValue(MaxFragmentLengthValue.Value); - } - - if (NoMatchSizeValue.HasValue) - { - writer.WritePropertyName("no_match_size"); - writer.WriteNumberValue(NoMatchSizeValue.Value); - } - - if (NumberOfFragmentsValue.HasValue) - { - writer.WritePropertyName("number_of_fragments"); - writer.WriteNumberValue(NumberOfFragmentsValue.Value); - } - - if (OptionsValue is not null) - { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (PhraseLimitValue.HasValue) - { - writer.WritePropertyName("phrase_limit"); - writer.WriteNumberValue(PhraseLimitValue.Value); - } - - if (PostTagsValue is not null) - { - writer.WritePropertyName("post_tags"); - JsonSerializer.Serialize(writer, PostTagsValue, options); - } - - if (PreTagsValue is not null) - { - writer.WritePropertyName("pre_tags"); - JsonSerializer.Serialize(writer, PreTagsValue, options); - } - - if (RequireFieldMatchValue.HasValue) - { - writer.WritePropertyName("require_field_match"); - writer.WriteBooleanValue(RequireFieldMatchValue.Value); - } - - if (TagsSchemaValue is not null) - { - writer.WritePropertyName("tags_schema"); - JsonSerializer.Serialize(writer, TagsSchemaValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class HighlightFieldDescriptor : SerializableDescriptor -{ - internal HighlightFieldDescriptor(Action configure) => configure.Invoke(this); - - public HighlightFieldDescriptor() : base() - { - } - - private string? BoundaryCharsValue { get; set; } - private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } - private string? BoundaryScannerLocaleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } - private int? FragmentOffsetValue { get; set; } - private int? FragmentSizeValue { get; set; } - private bool? HighlightFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? HighlightQueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor HighlightQueryDescriptor { get; set; } - private Action HighlightQueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? MatchedFieldsValue { get; set; } - private int? MaxAnalyzedOffsetValue { get; set; } - private int? MaxFragmentLengthValue { get; set; } - private int? NoMatchSizeValue { get; set; } - private int? NumberOfFragmentsValue { get; set; } - private IDictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? OrderValue { get; set; } - private int? PhraseLimitValue { get; set; } - private ICollection? PostTagsValue { get; set; } - private ICollection? PreTagsValue { get; set; } - private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? TypeValue { get; set; } - - /// - /// - /// A string that contains each boundary character. - /// - /// - public HighlightFieldDescriptor BoundaryChars(string? boundaryChars) - { - BoundaryCharsValue = boundaryChars; - return Self; - } - - /// - /// - /// How far to scan for boundary characters. - /// - /// - public HighlightFieldDescriptor BoundaryMaxScan(int? boundaryMaxScan) - { - BoundaryMaxScanValue = boundaryMaxScan; - return Self; - } - - /// - /// - /// Specifies how to break the highlighted fragments: chars, sentence, or word. - /// Only valid for the unified and fvh highlighters. - /// Defaults to sentence for the unified highlighter. Defaults to chars for the fvh highlighter. - /// - /// - public HighlightFieldDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Serverless.Core.Search.BoundaryScanner? boundaryScanner) - { - BoundaryScannerValue = boundaryScanner; - return Self; - } - - /// - /// - /// Controls which locale is used to search for sentence and word boundaries. - /// This parameter takes a form of a language tag, for example: "en-US", "fr-FR", "ja-JP". - /// - /// - public HighlightFieldDescriptor BoundaryScannerLocale(string? boundaryScannerLocale) - { - BoundaryScannerLocaleValue = boundaryScannerLocale; - return Self; - } - - /// - /// - /// Specifies how text should be broken up in highlight snippets: simple or span. - /// Only valid for the plain highlighter. - /// - /// - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterFragmenter? fragmenter) - { - FragmenterValue = fragmenter; - return Self; - } - - public HighlightFieldDescriptor FragmentOffset(int? fragmentOffset) - { - FragmentOffsetValue = fragmentOffset; - return Self; - } - - /// - /// - /// The size of the highlighted fragment in characters. - /// - /// - public HighlightFieldDescriptor FragmentSize(int? fragmentSize) - { - FragmentSizeValue = fragmentSize; - return Self; - } - - public HighlightFieldDescriptor HighlightFilter(bool? highlightFilter = true) - { - HighlightFilterValue = highlightFilter; - return Self; - } - - /// - /// - /// Highlight matches for a query other than the search query. - /// This is especially useful if you use a rescore query because those are not taken into account by highlighting by default. - /// - /// - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? highlightQuery) - { - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = null; - HighlightQueryValue = highlightQuery; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - HighlightQueryValue = null; - HighlightQueryDescriptorAction = null; - HighlightQueryDescriptor = descriptor; - return Self; - } - - public HighlightFieldDescriptor HighlightQuery(Action configure) - { - HighlightQueryValue = null; - HighlightQueryDescriptor = null; - HighlightQueryDescriptorAction = configure; - return Self; - } - - public HighlightFieldDescriptor MatchedFields(Elastic.Clients.Elasticsearch.Serverless.Fields? matchedFields) - { - MatchedFieldsValue = matchedFields; - return Self; - } - - /// - /// - /// If set to a non-negative value, highlighting stops at this defined maximum limit. - /// The rest of the text is not processed, thus not highlighted and no error is returned - /// The max_analyzed_offset query setting does not override the index.highlight.max_analyzed_offset setting, which prevails when it’s set to lower value than the query setting. - /// - /// - public HighlightFieldDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) - { - MaxAnalyzedOffsetValue = maxAnalyzedOffset; - return Self; - } - - public HighlightFieldDescriptor MaxFragmentLength(int? maxFragmentLength) - { - MaxFragmentLengthValue = maxFragmentLength; - return Self; - } - - /// - /// - /// The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight. - /// - /// - public HighlightFieldDescriptor NoMatchSize(int? noMatchSize) - { - NoMatchSizeValue = noMatchSize; - return Self; - } - - /// - /// - /// The maximum number of fragments to return. - /// If the number of fragments is set to 0, no fragments are returned. - /// Instead, the entire field contents are highlighted and returned. - /// This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. - /// If number_of_fragments is 0, fragment_size is ignored. - /// - /// - public HighlightFieldDescriptor NumberOfFragments(int? numberOfFragments) - { - NumberOfFragmentsValue = numberOfFragments; - return Self; - } - - public HighlightFieldDescriptor Options(Func, FluentDictionary> selector) - { - OptionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Sorts highlighted fragments by score when set to score. - /// By default, fragments will be output in the order they appear in the field (order: none). - /// Setting this option to score will output the most relevant fragments first. - /// Each highlighter applies its own logic to compute relevancy scores. - /// - /// - public HighlightFieldDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Controls the number of matching phrases in a document that are considered. - /// Prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. - /// When using matched_fields, phrase_limit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. - /// Only supported by the fvh highlighter. - /// - /// - public HighlightFieldDescriptor PhraseLimit(int? phraseLimit) - { - PhraseLimitValue = phraseLimit; - return Self; - } - - /// - /// - /// Use in conjunction with pre_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightFieldDescriptor PostTags(ICollection? postTags) - { - PostTagsValue = postTags; - return Self; - } - - /// - /// - /// Use in conjunction with post_tags to define the HTML tags to use for the highlighted text. - /// By default, highlighted text is wrapped in <em> and </em> tags. - /// - /// - public HighlightFieldDescriptor PreTags(ICollection? preTags) - { - PreTagsValue = preTags; - return Self; - } - - /// - /// - /// By default, only fields that contains a query match are highlighted. - /// Set to false to highlight all fields. - /// - /// - public HighlightFieldDescriptor RequireFieldMatch(bool? requireFieldMatch = true) - { - RequireFieldMatchValue = requireFieldMatch; - return Self; - } - - /// - /// - /// Set to styled to use the built-in tag schema. - /// - /// - public HighlightFieldDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterTagsSchema? tagsSchema) - { - TagsSchemaValue = tagsSchema; - return Self; - } - - public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlighterType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(BoundaryCharsValue)) - { - writer.WritePropertyName("boundary_chars"); - writer.WriteStringValue(BoundaryCharsValue); - } - - if (BoundaryMaxScanValue.HasValue) - { - writer.WritePropertyName("boundary_max_scan"); - writer.WriteNumberValue(BoundaryMaxScanValue.Value); - } - - if (BoundaryScannerValue is not null) - { - writer.WritePropertyName("boundary_scanner"); - JsonSerializer.Serialize(writer, BoundaryScannerValue, options); - } - - if (!string.IsNullOrEmpty(BoundaryScannerLocaleValue)) - { - writer.WritePropertyName("boundary_scanner_locale"); - writer.WriteStringValue(BoundaryScannerLocaleValue); - } - - if (FragmenterValue is not null) - { - writer.WritePropertyName("fragmenter"); - JsonSerializer.Serialize(writer, FragmenterValue, options); - } - - if (FragmentOffsetValue.HasValue) - { - writer.WritePropertyName("fragment_offset"); - writer.WriteNumberValue(FragmentOffsetValue.Value); - } - - if (FragmentSizeValue.HasValue) - { - writer.WritePropertyName("fragment_size"); - writer.WriteNumberValue(FragmentSizeValue.Value); - } - - if (HighlightFilterValue.HasValue) - { - writer.WritePropertyName("highlight_filter"); - writer.WriteBooleanValue(HighlightFilterValue.Value); - } - - if (HighlightQueryDescriptor is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryDescriptor, options); - } - else if (HighlightQueryDescriptorAction is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(HighlightQueryDescriptorAction), options); - } - else if (HighlightQueryValue is not null) - { - writer.WritePropertyName("highlight_query"); - JsonSerializer.Serialize(writer, HighlightQueryValue, options); - } - - if (MatchedFieldsValue is not null) - { - writer.WritePropertyName("matched_fields"); - JsonSerializer.Serialize(writer, MatchedFieldsValue, options); - } - - if (MaxAnalyzedOffsetValue.HasValue) - { - writer.WritePropertyName("max_analyzed_offset"); - writer.WriteNumberValue(MaxAnalyzedOffsetValue.Value); - } - - if (MaxFragmentLengthValue.HasValue) - { - writer.WritePropertyName("max_fragment_length"); - writer.WriteNumberValue(MaxFragmentLengthValue.Value); - } - - if (NoMatchSizeValue.HasValue) - { - writer.WritePropertyName("no_match_size"); - writer.WriteNumberValue(NoMatchSizeValue.Value); - } - - if (NumberOfFragmentsValue.HasValue) - { - writer.WritePropertyName("number_of_fragments"); - writer.WriteNumberValue(NumberOfFragmentsValue.Value); - } - - if (OptionsValue is not null) - { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (PhraseLimitValue.HasValue) - { - writer.WritePropertyName("phrase_limit"); - writer.WriteNumberValue(PhraseLimitValue.Value); - } - - if (PostTagsValue is not null) - { - writer.WritePropertyName("post_tags"); - JsonSerializer.Serialize(writer, PostTagsValue, options); - } - - if (PreTagsValue is not null) - { - writer.WritePropertyName("pre_tags"); - JsonSerializer.Serialize(writer, PreTagsValue, options); - } - - if (RequireFieldMatchValue.HasValue) - { - writer.WritePropertyName("require_field_match"); - writer.WriteBooleanValue(RequireFieldMatchValue.Value); - } - - if (TagsSchemaValue is not null) - { - writer.WritePropertyName("tags_schema"); - JsonSerializer.Serialize(writer, TagsSchemaValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs deleted file mode 100644 index 4950958526d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Hit.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class Hit -{ - [JsonInclude, JsonPropertyName("_explanation")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Explain.Explanation? Explanation { get; init; } - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("highlight")] - public IReadOnlyDictionary>? Highlight { get; init; } - [JsonInclude, JsonPropertyName("_id")] - public string? Id { get; init; } - [JsonInclude, JsonPropertyName("_ignored")] - public IReadOnlyCollection? Ignored { get; init; } - [JsonInclude, JsonPropertyName("ignored_field_values")] - public IReadOnlyDictionary>? IgnoredFieldValues { get; init; } - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("inner_hits")] - public IReadOnlyDictionary? InnerHits { get; init; } - [JsonInclude, JsonPropertyName("matched_queries")] - public IReadOnlyCollection? MatchedQueries { get; init; } - [JsonInclude, JsonPropertyName("_nested")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.NestedIdentity? Nested { get; init; } - [JsonInclude, JsonPropertyName("_node")] - public string? Node { get; init; } - [JsonInclude, JsonPropertyName("_primary_term")] - public long? PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("_rank")] - public int? Rank { get; init; } - [JsonInclude, JsonPropertyName("_routing")] - public string? Routing { get; init; } - [JsonInclude, JsonPropertyName("_score")] - public double? Score { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("_shard")] - public string? Shard { get; init; } - [JsonInclude, JsonPropertyName("sort")] - public IReadOnlyCollection? Sort { get; init; } - [JsonInclude, JsonPropertyName("_source")] - [SourceConverter] - public TDocument? Source { get; init; } - [JsonInclude, JsonPropertyName("_version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HitsMetadata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HitsMetadata.g.cs deleted file mode 100644 index badae00d49b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/HitsMetadata.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class HitsMetadata -{ - [JsonInclude, JsonPropertyName("hits")] - public IReadOnlyCollection> Hits { get; init; } - [JsonInclude, JsonPropertyName("max_score")] - public double? MaxScore { get; init; } - - /// - /// - /// Total hit count information, present only if track_total_hits wasn't false in the search request. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Union? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs deleted file mode 100644 index 614deb15cec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHits.g.cs +++ /dev/null @@ -1,933 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class InnerHits -{ - [JsonInclude, JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } - [JsonInclude, JsonPropertyName("docvalue_fields")] - public ICollection? DocvalueFields { get; set; } - [JsonInclude, JsonPropertyName("explain")] - public bool? Explain { get; set; } - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// Inner hit starting document offset. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - [JsonInclude, JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; } - [JsonInclude, JsonPropertyName("ignore_unmapped")] - public bool? IgnoreUnmapped { get; set; } - - /// - /// - /// The name for the particular inner hit definition in the response. - /// Useful when a search request contains multiple inner hits. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } - [JsonInclude, JsonPropertyName("script_fields")] - public IDictionary? ScriptFields { get; set; } - [JsonInclude, JsonPropertyName("seq_no_primary_term")] - public bool? SeqNoPrimaryTerm { get; set; } - - /// - /// - /// The maximum number of hits to return per inner_hits. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// How the inner hits should be sorted per inner_hits. - /// By default, inner hits are sorted by score. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; } - [JsonInclude, JsonPropertyName("stored_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; } - [JsonInclude, JsonPropertyName("track_scores")] - public bool? TrackScores { get; set; } - [JsonInclude, JsonPropertyName("version")] - public bool? Version { get; set; } -} - -public sealed partial class InnerHitsDescriptor : SerializableDescriptor> -{ - internal InnerHitsDescriptor(Action> configure) => configure.Invoke(this); - - public InnerHitsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action> DocvalueFieldsDescriptorAction { get; set; } - private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private bool? TrackScoresValue { get; set; } - private bool? VersionValue { get; set; } - - public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor Collapse(Action> configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(Action> configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(params Action>[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - public InnerHitsDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Inner hit starting document offset. - /// - /// - public InnerHitsDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor Highlight(Action> configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// The name for the particular inner hit definition in the response. - /// Useful when a search request contains multiple inner hits. - /// - /// - public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - public InnerHitsDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The maximum number of hits to return per inner_hits. - /// - /// - public InnerHitsDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// How the inner hits should be sorted per inner_hits. - /// By default, inner hits are sorted by score. - /// - /// - public InnerHitsDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public InnerHitsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - public InnerHitsDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public InnerHitsDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - public InnerHitsDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InnerHitsDescriptor : SerializableDescriptor -{ - internal InnerHitsDescriptor(Action configure) => configure.Invoke(this); - - public InnerHitsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } - private ICollection? DocvalueFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; } - private Action DocvalueFieldsDescriptorAction { get; set; } - private Action[] DocvalueFieldsDescriptorActions { get; set; } - private bool? ExplainValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private int? FromValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private bool? SeqNoPrimaryTermValue { get; set; } - private int? SizeValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; } - private bool? TrackScoresValue { get; set; } - private bool? VersionValue { get; set; } - - public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor Collapse(Action configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(ICollection? docvalueFields) - { - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsValue = docvalueFields; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor descriptor) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(Action configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorActions = null; - DocvalueFieldsDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor DocvalueFields(params Action[] configure) - { - DocvalueFieldsValue = null; - DocvalueFieldsDescriptor = null; - DocvalueFieldsDescriptorAction = null; - DocvalueFieldsDescriptorActions = configure; - return Self; - } - - public InnerHitsDescriptor Explain(bool? explain = true) - { - ExplainValue = explain; - return Self; - } - - public InnerHitsDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Inner hit starting document offset. - /// - /// - public InnerHitsDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// The name for the particular inner hit definition in the response. - /// Useful when a search request contains multiple inner hits. - /// - /// - public InnerHitsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - public InnerHitsDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public InnerHitsDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) - { - SeqNoPrimaryTermValue = seqNoPrimaryTerm; - return Self; - } - - /// - /// - /// The maximum number of hits to return per inner_hits. - /// - /// - public InnerHitsDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// How the inner hits should be sorted per inner_hits. - /// By default, inner hits are sorted by score. - /// - /// - public InnerHitsDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public InnerHitsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public InnerHitsDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public InnerHitsDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? source) - { - SourceValue = source; - return Self; - } - - public InnerHitsDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields) - { - StoredFieldsValue = storedFields; - return Self; - } - - public InnerHitsDescriptor TrackScores(bool? trackScores = true) - { - TrackScoresValue = trackScores; - return Self; - } - - public InnerHitsDescriptor Version(bool? version = true) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (DocvalueFieldsDescriptor is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocvalueFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorAction is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(DocvalueFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocvalueFieldsDescriptorActions is not null) - { - writer.WritePropertyName("docvalue_fields"); - writer.WriteStartArray(); - foreach (var action in DocvalueFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormatDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocvalueFieldsValue is not null) - { - writer.WritePropertyName("docvalue_fields"); - JsonSerializer.Serialize(writer, DocvalueFieldsValue, options); - } - - if (ExplainValue.HasValue) - { - writer.WritePropertyName("explain"); - writer.WriteBooleanValue(ExplainValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (SeqNoPrimaryTermValue.HasValue) - { - writer.WritePropertyName("seq_no_primary_term"); - writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (StoredFieldsValue is not null) - { - writer.WritePropertyName("stored_fields"); - JsonSerializer.Serialize(writer, StoredFieldsValue, options); - } - - if (TrackScoresValue.HasValue) - { - writer.WritePropertyName("track_scores"); - writer.WriteBooleanValue(TrackScoresValue.Value); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteBooleanValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHitsResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHitsResult.g.cs deleted file mode 100644 index 44a0a03f1b3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/InnerHitsResult.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class InnerHitsResult -{ - [JsonInclude, JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.HitsMetadata Hits { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs deleted file mode 100644 index d75e41dce07..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class KnnCollectorResult -{ - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public string Reason { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs deleted file mode 100644 index 1cd52e5c480..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class KnnQueryProfileBreakdown -{ - [JsonInclude, JsonPropertyName("advance")] - public long Advance { get; init; } - [JsonInclude, JsonPropertyName("advance_count")] - public long AdvanceCount { get; init; } - [JsonInclude, JsonPropertyName("build_scorer")] - public long BuildScorer { get; init; } - [JsonInclude, JsonPropertyName("build_scorer_count")] - public long BuildScorerCount { get; init; } - [JsonInclude, JsonPropertyName("compute_max_score")] - public long ComputeMaxScore { get; init; } - [JsonInclude, JsonPropertyName("compute_max_score_count")] - public long ComputeMaxScoreCount { get; init; } - [JsonInclude, JsonPropertyName("count_weight")] - public long CountWeight { get; init; } - [JsonInclude, JsonPropertyName("count_weight_count")] - public long CountWeightCount { get; init; } - [JsonInclude, JsonPropertyName("create_weight")] - public long CreateWeight { get; init; } - [JsonInclude, JsonPropertyName("create_weight_count")] - public long CreateWeightCount { get; init; } - [JsonInclude, JsonPropertyName("match")] - public long Match { get; init; } - [JsonInclude, JsonPropertyName("match_count")] - public long MatchCount { get; init; } - [JsonInclude, JsonPropertyName("next_doc")] - public long NextDoc { get; init; } - [JsonInclude, JsonPropertyName("next_doc_count")] - public long NextDocCount { get; init; } - [JsonInclude, JsonPropertyName("score")] - public long Score { get; init; } - [JsonInclude, JsonPropertyName("score_count")] - public long ScoreCount { get; init; } - [JsonInclude, JsonPropertyName("set_min_competitive_score")] - public long SetMinCompetitiveScore { get; init; } - [JsonInclude, JsonPropertyName("set_min_competitive_score_count")] - public long SetMinCompetitiveScoreCount { get; init; } - [JsonInclude, JsonPropertyName("shallow_advance")] - public long ShallowAdvance { get; init; } - [JsonInclude, JsonPropertyName("shallow_advance_count")] - public long ShallowAdvanceCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs deleted file mode 100644 index cc0b60423d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class KnnQueryProfileResult -{ - [JsonInclude, JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.KnnQueryProfileBreakdown Breakdown { get; init; } - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("debug")] - public IReadOnlyDictionary? Debug { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LaplaceSmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LaplaceSmoothingModel.g.cs deleted file mode 100644 index c89fbee6e53..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LaplaceSmoothingModel.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class LaplaceSmoothingModel -{ - /// - /// - /// A constant that is added to all counts to balance weights. - /// - /// - [JsonInclude, JsonPropertyName("alpha")] - public double Alpha { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel(LaplaceSmoothingModel laplaceSmoothingModel) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel.Laplace(laplaceSmoothingModel); -} - -public sealed partial class LaplaceSmoothingModelDescriptor : SerializableDescriptor -{ - internal LaplaceSmoothingModelDescriptor(Action configure) => configure.Invoke(this); - - public LaplaceSmoothingModelDescriptor() : base() - { - } - - private double AlphaValue { get; set; } - - /// - /// - /// A constant that is added to all counts to balance weights. - /// - /// - public LaplaceSmoothingModelDescriptor Alpha(double alpha) - { - AlphaValue = alpha; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(AlphaValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs deleted file mode 100644 index 154c9261fe6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs +++ /dev/null @@ -1,97 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class LearningToRank -{ - /// - /// - /// The unique identifier of the trained model uploaded to Elasticsearch - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; set; } - - /// - /// - /// Named parameters to be passed to the query templates used for feature - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore(LearningToRank learningToRank) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore.LearningToRank(learningToRank); -} - -public sealed partial class LearningToRankDescriptor : SerializableDescriptor -{ - internal LearningToRankDescriptor(Action configure) => configure.Invoke(this); - - public LearningToRankDescriptor() : base() - { - } - - private string ModelIdValue { get; set; } - private IDictionary? ParamsValue { get; set; } - - /// - /// - /// The unique identifier of the trained model uploaded to Elasticsearch - /// - /// - public LearningToRankDescriptor ModelId(string modelId) - { - ModelIdValue = modelId; - return Self; - } - - /// - /// - /// Named parameters to be passed to the query templates used for feature - /// - /// - public LearningToRankDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("model_id"); - writer.WriteStringValue(ModelIdValue); - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LinearInterpolationSmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LinearInterpolationSmoothingModel.g.cs deleted file mode 100644 index 359489661a5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LinearInterpolationSmoothingModel.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class LinearInterpolationSmoothingModel -{ - [JsonInclude, JsonPropertyName("bigram_lambda")] - public double BigramLambda { get; set; } - [JsonInclude, JsonPropertyName("trigram_lambda")] - public double TrigramLambda { get; set; } - [JsonInclude, JsonPropertyName("unigram_lambda")] - public double UnigramLambda { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel(LinearInterpolationSmoothingModel linearInterpolationSmoothingModel) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel.LinearInterpolation(linearInterpolationSmoothingModel); -} - -public sealed partial class LinearInterpolationSmoothingModelDescriptor : SerializableDescriptor -{ - internal LinearInterpolationSmoothingModelDescriptor(Action configure) => configure.Invoke(this); - - public LinearInterpolationSmoothingModelDescriptor() : base() - { - } - - private double BigramLambdaValue { get; set; } - private double TrigramLambdaValue { get; set; } - private double UnigramLambdaValue { get; set; } - - public LinearInterpolationSmoothingModelDescriptor BigramLambda(double bigramLambda) - { - BigramLambdaValue = bigramLambda; - return Self; - } - - public LinearInterpolationSmoothingModelDescriptor TrigramLambda(double trigramLambda) - { - TrigramLambdaValue = trigramLambda; - return Self; - } - - public LinearInterpolationSmoothingModelDescriptor UnigramLambda(double unigramLambda) - { - UnigramLambdaValue = unigramLambda; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("bigram_lambda"); - writer.WriteNumberValue(BigramLambdaValue); - writer.WritePropertyName("trigram_lambda"); - writer.WriteNumberValue(TrigramLambdaValue); - writer.WritePropertyName("unigram_lambda"); - writer.WriteNumberValue(UnigramLambdaValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/NestedIdentity.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/NestedIdentity.g.cs deleted file mode 100644 index 14a9258be92..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/NestedIdentity.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class NestedIdentity -{ - [JsonInclude, JsonPropertyName("field")] - public string Field { get; init; } - [JsonInclude, JsonPropertyName("_nested")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.NestedIdentity? Nested { get; init; } - [JsonInclude, JsonPropertyName("offset")] - public int Offset { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggest.g.cs deleted file mode 100644 index 766f2caf43b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggest.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PhraseSuggest : ISuggest -{ - [JsonInclude, JsonPropertyName("length")] - public int Length { get; init; } - [JsonInclude, JsonPropertyName("offset")] - public int Offset { get; init; } - [JsonInclude, JsonPropertyName("options")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestOption))] - public IReadOnlyCollection Options { get; init; } - [JsonInclude, JsonPropertyName("text")] - public string Text { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs deleted file mode 100644 index bb29dcc85cb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PhraseSuggestCollate -{ - /// - /// - /// Parameters to use if the query is templated. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// Returns all suggestions with an extra collate_match option indicating whether the generated phrase matched any document. - /// - /// - [JsonInclude, JsonPropertyName("prune")] - public bool? Prune { get; set; } - - /// - /// - /// A collate query that is run once for every suggestion. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateQuery Query { get; set; } -} - -public sealed partial class PhraseSuggestCollateDescriptor : SerializableDescriptor -{ - internal PhraseSuggestCollateDescriptor(Action configure) => configure.Invoke(this); - - public PhraseSuggestCollateDescriptor() : base() - { - } - - private IDictionary? ParamsValue { get; set; } - private bool? PruneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - /// - /// - /// Parameters to use if the query is templated. - /// - /// - public PhraseSuggestCollateDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Returns all suggestions with an extra collate_match option indicating whether the generated phrase matched any document. - /// - /// - public PhraseSuggestCollateDescriptor Prune(bool? prune = true) - { - PruneValue = prune; - return Self; - } - - /// - /// - /// A collate query that is run once for every suggestion. - /// - /// - public PhraseSuggestCollateDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateQuery query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public PhraseSuggestCollateDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public PhraseSuggestCollateDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (PruneValue.HasValue) - { - writer.WritePropertyName("prune"); - writer.WriteBooleanValue(PruneValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollateQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollateQuery.g.cs deleted file mode 100644 index 1599d255669..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestCollateQuery.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PhraseSuggestCollateQuery -{ - /// - /// - /// The search template ID. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// The query source. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string? Source { get; set; } -} - -public sealed partial class PhraseSuggestCollateQueryDescriptor : SerializableDescriptor -{ - internal PhraseSuggestCollateQueryDescriptor(Action configure) => configure.Invoke(this); - - public PhraseSuggestCollateQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private string? SourceValue { get; set; } - - /// - /// - /// The search template ID. - /// - /// - public PhraseSuggestCollateQueryDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The query source. - /// - /// - public PhraseSuggestCollateQueryDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestHighlight.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestHighlight.g.cs deleted file mode 100644 index 5ef60bc95f0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestHighlight.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PhraseSuggestHighlight -{ - /// - /// - /// Use in conjunction with pre_tag to define the HTML tags to use for the highlighted text. - /// - /// - [JsonInclude, JsonPropertyName("post_tag")] - public string PostTag { get; set; } - - /// - /// - /// Use in conjunction with post_tag to define the HTML tags to use for the highlighted text. - /// - /// - [JsonInclude, JsonPropertyName("pre_tag")] - public string PreTag { get; set; } -} - -public sealed partial class PhraseSuggestHighlightDescriptor : SerializableDescriptor -{ - internal PhraseSuggestHighlightDescriptor(Action configure) => configure.Invoke(this); - - public PhraseSuggestHighlightDescriptor() : base() - { - } - - private string PostTagValue { get; set; } - private string PreTagValue { get; set; } - - /// - /// - /// Use in conjunction with pre_tag to define the HTML tags to use for the highlighted text. - /// - /// - public PhraseSuggestHighlightDescriptor PostTag(string postTag) - { - PostTagValue = postTag; - return Self; - } - - /// - /// - /// Use in conjunction with post_tag to define the HTML tags to use for the highlighted text. - /// - /// - public PhraseSuggestHighlightDescriptor PreTag(string preTag) - { - PreTagValue = preTag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("post_tag"); - writer.WriteStringValue(PostTagValue); - writer.WritePropertyName("pre_tag"); - writer.WriteStringValue(PreTagValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs deleted file mode 100644 index db25b4f2c07..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PhraseSuggestOption -{ - [JsonInclude, JsonPropertyName("collate_match")] - public bool? CollateMatch { get; init; } - [JsonInclude, JsonPropertyName("highlighted")] - public string? Highlighted { get; init; } - [JsonInclude, JsonPropertyName("score")] - public double Score { get; init; } - [JsonInclude, JsonPropertyName("text")] - public string Text { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs deleted file mode 100644 index b00426bafee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PhraseSuggester.g.cs +++ /dev/null @@ -1,1100 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PhraseSuggester -{ - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// Checks each suggestion against the specified query to prune suggestions for which no matching docs exist in the index. - /// - /// - [JsonInclude, JsonPropertyName("collate")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? Collate { get; set; } - - /// - /// - /// Defines a factor applied to the input phrases score, which is used as a threshold for other suggest candidates. - /// Only candidates that score higher than the threshold will be included in the result. - /// - /// - [JsonInclude, JsonPropertyName("confidence")] - public double? Confidence { get; set; } - - /// - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - /// - [JsonInclude, JsonPropertyName("direct_generator")] - public ICollection? DirectGenerator { get; set; } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("force_unigrams")] - public bool? ForceUnigrams { get; set; } - - /// - /// - /// Sets max size of the n-grams (shingles) in the field. - /// If the field doesn’t contain n-grams (shingles), this should be omitted or set to 1. - /// If the field uses a shingle filter, the gram_size is set to the max_shingle_size if not explicitly set. - /// - /// - [JsonInclude, JsonPropertyName("gram_size")] - public int? GramSize { get; set; } - - /// - /// - /// Sets up suggestion highlighting. - /// If not provided, no highlighted field is returned. - /// - /// - [JsonInclude, JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlight? Highlight { get; set; } - - /// - /// - /// The maximum percentage of the terms considered to be misspellings in order to form a correction. - /// This method accepts a float value in the range [0..1) as a fraction of the actual query terms or a number >=1 as an absolute number of query terms. - /// - /// - [JsonInclude, JsonPropertyName("max_errors")] - public double? MaxErrors { get; set; } - - /// - /// - /// The likelihood of a term being misspelled even if the term exists in the dictionary. - /// - /// - [JsonInclude, JsonPropertyName("real_word_error_likelihood")] - public double? RealWordErrorLikelihood { get; set; } - - /// - /// - /// The separator that is used to separate terms in the bigram field. - /// If not set, the whitespace character is used as a separator. - /// - /// - [JsonInclude, JsonPropertyName("separator")] - public string? Separator { get; set; } - - /// - /// - /// Sets the maximum number of suggested terms to be retrieved from each individual shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// The smoothing model used to balance weight between infrequent grams (grams (shingles) are not existing in the index) and frequent grams (appear at least once in the index). - /// The default model is Stupid Backoff. - /// - /// - [JsonInclude, JsonPropertyName("smoothing")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel? Smoothing { get; set; } - - /// - /// - /// The text/query to provide suggestions for. - /// - /// - [JsonInclude, JsonPropertyName("text")] - public string? Text { get; set; } - [JsonInclude, JsonPropertyName("token_limit")] - public int? TokenLimit { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldSuggester(PhraseSuggester phraseSuggester) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldSuggester.Phrase(phraseSuggester); -} - -public sealed partial class PhraseSuggesterDescriptor : SerializableDescriptor> -{ - internal PhraseSuggesterDescriptor(Action> configure) => configure.Invoke(this); - - public PhraseSuggesterDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } - private Action CollateDescriptorAction { get; set; } - private double? ConfidenceValue { get; set; } - private ICollection? DirectGeneratorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } - private Action> DirectGeneratorDescriptorAction { get; set; } - private Action>[] DirectGeneratorDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? ForceUnigramsValue { get; set; } - private int? GramSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private double? MaxErrorsValue { get; set; } - private double? RealWordErrorLikelihoodValue { get; set; } - private string? SeparatorValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel? SmoothingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModelDescriptor SmoothingDescriptor { get; set; } - private Action SmoothingDescriptorAction { get; set; } - private string? TextValue { get; set; } - private int? TokenLimitValue { get; set; } - - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - public PhraseSuggesterDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Checks each suggestion against the specified query to prune suggestions for which no matching docs exist in the index. - /// - /// - public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? collate) - { - CollateDescriptor = null; - CollateDescriptorAction = null; - CollateValue = collate; - return Self; - } - - public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateDescriptor descriptor) - { - CollateValue = null; - CollateDescriptorAction = null; - CollateDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor Collate(Action configure) - { - CollateValue = null; - CollateDescriptor = null; - CollateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a factor applied to the input phrases score, which is used as a threshold for other suggest candidates. - /// Only candidates that score higher than the threshold will be included in the result. - /// - /// - public PhraseSuggesterDescriptor Confidence(double? confidence) - { - ConfidenceValue = confidence; - return Self; - } - - /// - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - /// - public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) - { - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorValue = directGenerator; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor descriptor) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Action> configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptorAction = configure; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(params Action>[] configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = configure; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public PhraseSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public PhraseSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public PhraseSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PhraseSuggesterDescriptor ForceUnigrams(bool? forceUnigrams = true) - { - ForceUnigramsValue = forceUnigrams; - return Self; - } - - /// - /// - /// Sets max size of the n-grams (shingles) in the field. - /// If the field doesn’t contain n-grams (shingles), this should be omitted or set to 1. - /// If the field uses a shingle filter, the gram_size is set to the max_shingle_size if not explicitly set. - /// - /// - public PhraseSuggesterDescriptor GramSize(int? gramSize) - { - GramSizeValue = gramSize; - return Self; - } - - /// - /// - /// Sets up suggestion highlighting. - /// If not provided, no highlighted field is returned. - /// - /// - public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum percentage of the terms considered to be misspellings in order to form a correction. - /// This method accepts a float value in the range [0..1) as a fraction of the actual query terms or a number >=1 as an absolute number of query terms. - /// - /// - public PhraseSuggesterDescriptor MaxErrors(double? maxErrors) - { - MaxErrorsValue = maxErrors; - return Self; - } - - /// - /// - /// The likelihood of a term being misspelled even if the term exists in the dictionary. - /// - /// - public PhraseSuggesterDescriptor RealWordErrorLikelihood(double? realWordErrorLikelihood) - { - RealWordErrorLikelihoodValue = realWordErrorLikelihood; - return Self; - } - - /// - /// - /// The separator that is used to separate terms in the bigram field. - /// If not set, the whitespace character is used as a separator. - /// - /// - public PhraseSuggesterDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Sets the maximum number of suggested terms to be retrieved from each individual shard. - /// - /// - public PhraseSuggesterDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public PhraseSuggesterDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The smoothing model used to balance weight between infrequent grams (grams (shingles) are not existing in the index) and frequent grams (appear at least once in the index). - /// The default model is Stupid Backoff. - /// - /// - public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel? smoothing) - { - SmoothingDescriptor = null; - SmoothingDescriptorAction = null; - SmoothingValue = smoothing; - return Self; - } - - public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModelDescriptor descriptor) - { - SmoothingValue = null; - SmoothingDescriptorAction = null; - SmoothingDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor Smoothing(Action configure) - { - SmoothingValue = null; - SmoothingDescriptor = null; - SmoothingDescriptorAction = configure; - return Self; - } - - /// - /// - /// The text/query to provide suggestions for. - /// - /// - public PhraseSuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - public PhraseSuggesterDescriptor TokenLimit(int? tokenLimit) - { - TokenLimitValue = tokenLimit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CollateDescriptor is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateDescriptor, options); - } - else if (CollateDescriptorAction is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); - } - else if (CollateValue is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateValue, options); - } - - if (ConfidenceValue.HasValue) - { - writer.WritePropertyName("confidence"); - writer.WriteNumberValue(ConfidenceValue.Value); - } - - if (DirectGeneratorDescriptor is not null) - { - writer.WritePropertyName("direct_generator"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DirectGeneratorDescriptor, options); - writer.WriteEndArray(); - } - else if (DirectGeneratorDescriptorAction is not null) - { - writer.WritePropertyName("direct_generator"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor(DirectGeneratorDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DirectGeneratorDescriptorActions is not null) - { - writer.WritePropertyName("direct_generator"); - writer.WriteStartArray(); - foreach (var action in DirectGeneratorDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DirectGeneratorValue is not null) - { - writer.WritePropertyName("direct_generator"); - JsonSerializer.Serialize(writer, DirectGeneratorValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (ForceUnigramsValue.HasValue) - { - writer.WritePropertyName("force_unigrams"); - writer.WriteBooleanValue(ForceUnigramsValue.Value); - } - - if (GramSizeValue.HasValue) - { - writer.WritePropertyName("gram_size"); - writer.WriteNumberValue(GramSizeValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (MaxErrorsValue.HasValue) - { - writer.WritePropertyName("max_errors"); - writer.WriteNumberValue(MaxErrorsValue.Value); - } - - if (RealWordErrorLikelihoodValue.HasValue) - { - writer.WritePropertyName("real_word_error_likelihood"); - writer.WriteNumberValue(RealWordErrorLikelihoodValue.Value); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SmoothingDescriptor is not null) - { - writer.WritePropertyName("smoothing"); - JsonSerializer.Serialize(writer, SmoothingDescriptor, options); - } - else if (SmoothingDescriptorAction is not null) - { - writer.WritePropertyName("smoothing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModelDescriptor(SmoothingDescriptorAction), options); - } - else if (SmoothingValue is not null) - { - writer.WritePropertyName("smoothing"); - JsonSerializer.Serialize(writer, SmoothingValue, options); - } - - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - if (TokenLimitValue.HasValue) - { - writer.WritePropertyName("token_limit"); - writer.WriteNumberValue(TokenLimitValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PhraseSuggesterDescriptor : SerializableDescriptor -{ - internal PhraseSuggesterDescriptor(Action configure) => configure.Invoke(this); - - public PhraseSuggesterDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } - private Action CollateDescriptorAction { get; set; } - private double? ConfidenceValue { get; set; } - private ICollection? DirectGeneratorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } - private Action DirectGeneratorDescriptorAction { get; set; } - private Action[] DirectGeneratorDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? ForceUnigramsValue { get; set; } - private int? GramSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private double? MaxErrorsValue { get; set; } - private double? RealWordErrorLikelihoodValue { get; set; } - private string? SeparatorValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel? SmoothingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModelDescriptor SmoothingDescriptor { get; set; } - private Action SmoothingDescriptorAction { get; set; } - private string? TextValue { get; set; } - private int? TokenLimitValue { get; set; } - - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - public PhraseSuggesterDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Checks each suggestion against the specified query to prune suggestions for which no matching docs exist in the index. - /// - /// - public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollate? collate) - { - CollateDescriptor = null; - CollateDescriptorAction = null; - CollateValue = collate; - return Self; - } - - public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateDescriptor descriptor) - { - CollateValue = null; - CollateDescriptorAction = null; - CollateDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor Collate(Action configure) - { - CollateValue = null; - CollateDescriptor = null; - CollateDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a factor applied to the input phrases score, which is used as a threshold for other suggest candidates. - /// Only candidates that score higher than the threshold will be included in the result. - /// - /// - public PhraseSuggesterDescriptor Confidence(double? confidence) - { - ConfidenceValue = confidence; - return Self; - } - - /// - /// - /// A list of candidate generators that produce a list of possible terms per term in the given text. - /// - /// - public PhraseSuggesterDescriptor DirectGenerator(ICollection? directGenerator) - { - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorValue = directGenerator; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor descriptor) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(Action configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorActions = null; - DirectGeneratorDescriptorAction = configure; - return Self; - } - - public PhraseSuggesterDescriptor DirectGenerator(params Action[] configure) - { - DirectGeneratorValue = null; - DirectGeneratorDescriptor = null; - DirectGeneratorDescriptorAction = null; - DirectGeneratorDescriptorActions = configure; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public PhraseSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public PhraseSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public PhraseSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PhraseSuggesterDescriptor ForceUnigrams(bool? forceUnigrams = true) - { - ForceUnigramsValue = forceUnigrams; - return Self; - } - - /// - /// - /// Sets max size of the n-grams (shingles) in the field. - /// If the field doesn’t contain n-grams (shingles), this should be omitted or set to 1. - /// If the field uses a shingle filter, the gram_size is set to the max_shingle_size if not explicitly set. - /// - /// - public PhraseSuggesterDescriptor GramSize(int? gramSize) - { - GramSizeValue = gramSize; - return Self; - } - - /// - /// - /// Sets up suggestion highlighting. - /// If not provided, no highlighted field is returned. - /// - /// - public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - /// - /// - /// The maximum percentage of the terms considered to be misspellings in order to form a correction. - /// This method accepts a float value in the range [0..1) as a fraction of the actual query terms or a number >=1 as an absolute number of query terms. - /// - /// - public PhraseSuggesterDescriptor MaxErrors(double? maxErrors) - { - MaxErrorsValue = maxErrors; - return Self; - } - - /// - /// - /// The likelihood of a term being misspelled even if the term exists in the dictionary. - /// - /// - public PhraseSuggesterDescriptor RealWordErrorLikelihood(double? realWordErrorLikelihood) - { - RealWordErrorLikelihoodValue = realWordErrorLikelihood; - return Self; - } - - /// - /// - /// The separator that is used to separate terms in the bigram field. - /// If not set, the whitespace character is used as a separator. - /// - /// - public PhraseSuggesterDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Sets the maximum number of suggested terms to be retrieved from each individual shard. - /// - /// - public PhraseSuggesterDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public PhraseSuggesterDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// The smoothing model used to balance weight between infrequent grams (grams (shingles) are not existing in the index) and frequent grams (appear at least once in the index). - /// The default model is Stupid Backoff. - /// - /// - public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel? smoothing) - { - SmoothingDescriptor = null; - SmoothingDescriptorAction = null; - SmoothingValue = smoothing; - return Self; - } - - public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModelDescriptor descriptor) - { - SmoothingValue = null; - SmoothingDescriptorAction = null; - SmoothingDescriptor = descriptor; - return Self; - } - - public PhraseSuggesterDescriptor Smoothing(Action configure) - { - SmoothingValue = null; - SmoothingDescriptor = null; - SmoothingDescriptorAction = configure; - return Self; - } - - /// - /// - /// The text/query to provide suggestions for. - /// - /// - public PhraseSuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - public PhraseSuggesterDescriptor TokenLimit(int? tokenLimit) - { - TokenLimitValue = tokenLimit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CollateDescriptor is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateDescriptor, options); - } - else if (CollateDescriptorAction is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestCollateDescriptor(CollateDescriptorAction), options); - } - else if (CollateValue is not null) - { - writer.WritePropertyName("collate"); - JsonSerializer.Serialize(writer, CollateValue, options); - } - - if (ConfidenceValue.HasValue) - { - writer.WritePropertyName("confidence"); - writer.WriteNumberValue(ConfidenceValue.Value); - } - - if (DirectGeneratorDescriptor is not null) - { - writer.WritePropertyName("direct_generator"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DirectGeneratorDescriptor, options); - writer.WriteEndArray(); - } - else if (DirectGeneratorDescriptorAction is not null) - { - writer.WritePropertyName("direct_generator"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor(DirectGeneratorDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DirectGeneratorDescriptorActions is not null) - { - writer.WritePropertyName("direct_generator"); - writer.WriteStartArray(); - foreach (var action in DirectGeneratorDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.DirectGeneratorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DirectGeneratorValue is not null) - { - writer.WritePropertyName("direct_generator"); - JsonSerializer.Serialize(writer, DirectGeneratorValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (ForceUnigramsValue.HasValue) - { - writer.WritePropertyName("force_unigrams"); - writer.WriteBooleanValue(ForceUnigramsValue.Value); - } - - if (GramSizeValue.HasValue) - { - writer.WritePropertyName("gram_size"); - writer.WriteNumberValue(GramSizeValue.Value); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.PhraseSuggestHighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (MaxErrorsValue.HasValue) - { - writer.WritePropertyName("max_errors"); - writer.WriteNumberValue(MaxErrorsValue.Value); - } - - if (RealWordErrorLikelihoodValue.HasValue) - { - writer.WritePropertyName("real_word_error_likelihood"); - writer.WriteNumberValue(RealWordErrorLikelihoodValue.Value); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SmoothingDescriptor is not null) - { - writer.WritePropertyName("smoothing"); - JsonSerializer.Serialize(writer, SmoothingDescriptor, options); - } - else if (SmoothingDescriptorAction is not null) - { - writer.WritePropertyName("smoothing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModelDescriptor(SmoothingDescriptorAction), options); - } - else if (SmoothingValue is not null) - { - writer.WritePropertyName("smoothing"); - JsonSerializer.Serialize(writer, SmoothingValue, options); - } - - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - if (TokenLimitValue.HasValue) - { - writer.WritePropertyName("token_limit"); - writer.WriteNumberValue(TokenLimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PointInTimeReference.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PointInTimeReference.g.cs deleted file mode 100644 index e3e908674ad..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/PointInTimeReference.g.cs +++ /dev/null @@ -1,74 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class PointInTimeReference -{ - [JsonInclude, JsonPropertyName("id")] - public string Id { get; set; } - [JsonInclude, JsonPropertyName("keep_alive")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; } -} - -public sealed partial class PointInTimeReferenceDescriptor : SerializableDescriptor -{ - internal PointInTimeReferenceDescriptor(Action configure) => configure.Invoke(this); - - public PointInTimeReferenceDescriptor() : base() - { - } - - private string IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; } - - public PointInTimeReferenceDescriptor Id(string id) - { - IdValue = id; - return Self; - } - - public PointInTimeReferenceDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive) - { - KeepAliveValue = keepAlive; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - writer.WriteStringValue(IdValue); - if (KeepAliveValue is not null) - { - writer.WritePropertyName("keep_alive"); - JsonSerializer.Serialize(writer, KeepAliveValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Profile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Profile.g.cs deleted file mode 100644 index 401e400c998..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Profile.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class Profile -{ - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyCollection Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs deleted file mode 100644 index d1437731867..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryBreakdown.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class QueryBreakdown -{ - [JsonInclude, JsonPropertyName("advance")] - public long Advance { get; init; } - [JsonInclude, JsonPropertyName("advance_count")] - public long AdvanceCount { get; init; } - [JsonInclude, JsonPropertyName("build_scorer")] - public long BuildScorer { get; init; } - [JsonInclude, JsonPropertyName("build_scorer_count")] - public long BuildScorerCount { get; init; } - [JsonInclude, JsonPropertyName("compute_max_score")] - public long ComputeMaxScore { get; init; } - [JsonInclude, JsonPropertyName("compute_max_score_count")] - public long ComputeMaxScoreCount { get; init; } - [JsonInclude, JsonPropertyName("count_weight")] - public long CountWeight { get; init; } - [JsonInclude, JsonPropertyName("count_weight_count")] - public long CountWeightCount { get; init; } - [JsonInclude, JsonPropertyName("create_weight")] - public long CreateWeight { get; init; } - [JsonInclude, JsonPropertyName("create_weight_count")] - public long CreateWeightCount { get; init; } - [JsonInclude, JsonPropertyName("match")] - public long Match { get; init; } - [JsonInclude, JsonPropertyName("match_count")] - public long MatchCount { get; init; } - [JsonInclude, JsonPropertyName("next_doc")] - public long NextDoc { get; init; } - [JsonInclude, JsonPropertyName("next_doc_count")] - public long NextDocCount { get; init; } - [JsonInclude, JsonPropertyName("score")] - public long Score { get; init; } - [JsonInclude, JsonPropertyName("score_count")] - public long ScoreCount { get; init; } - [JsonInclude, JsonPropertyName("set_min_competitive_score")] - public long SetMinCompetitiveScore { get; init; } - [JsonInclude, JsonPropertyName("set_min_competitive_score_count")] - public long SetMinCompetitiveScoreCount { get; init; } - [JsonInclude, JsonPropertyName("shallow_advance")] - public long ShallowAdvance { get; init; } - [JsonInclude, JsonPropertyName("shallow_advance_count")] - public long ShallowAdvanceCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryProfile.g.cs deleted file mode 100644 index c26e6e606dd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/QueryProfile.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class QueryProfile -{ - [JsonInclude, JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.QueryBreakdown Breakdown { get; init; } - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("time_in_nanos")] - public long TimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RegexOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RegexOptions.g.cs deleted file mode 100644 index f6dd5f60fef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RegexOptions.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class RegexOptions -{ - /// - /// - /// Optional operators for the regular expression. - /// - /// - [JsonInclude, JsonPropertyName("flags")] - public object? Flags { get; set; } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - [JsonInclude, JsonPropertyName("max_determinized_states")] - public int? MaxDeterminizedStates { get; set; } -} - -public sealed partial class RegexOptionsDescriptor : SerializableDescriptor -{ - internal RegexOptionsDescriptor(Action configure) => configure.Invoke(this); - - public RegexOptionsDescriptor() : base() - { - } - - private object? FlagsValue { get; set; } - private int? MaxDeterminizedStatesValue { get; set; } - - /// - /// - /// Optional operators for the regular expression. - /// - /// - public RegexOptionsDescriptor Flags(object? flags) - { - FlagsValue = flags; - return Self; - } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - public RegexOptionsDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) - { - MaxDeterminizedStatesValue = maxDeterminizedStates; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FlagsValue is not null) - { - writer.WritePropertyName("flags"); - JsonSerializer.Serialize(writer, FlagsValue, options); - } - - if (MaxDeterminizedStatesValue.HasValue) - { - writer.WritePropertyName("max_determinized_states"); - writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs deleted file mode 100644 index a05d61b1266..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs +++ /dev/null @@ -1,287 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -[JsonConverter(typeof(RescoreConverter))] -public sealed partial class Rescore -{ - internal Rescore(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 Rescore LearningToRank(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank learningToRank) => new Rescore("learning_to_rank", learningToRank); - public static Rescore Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery rescoreQuery) => new Rescore("query", rescoreQuery); - - [JsonInclude, JsonPropertyName("window_size")] - public int? WindowSize { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class RescoreConverter : JsonConverter -{ - public override Rescore 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; - int? windowSizeValue = 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 == "window_size") - { - windowSizeValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "learning_to_rank") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "query") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Rescore' from the response."); - } - - var result = new Rescore(variantNameValue, variantValue); - result.WindowSize = windowSizeValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, Rescore value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.WindowSize.HasValue) - { - writer.WritePropertyName("window_size"); - writer.WriteNumberValue(value.WindowSize.Value); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "learning_to_rank": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank)value.Variant, options); - break; - case "query": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RescoreDescriptor : SerializableDescriptor> -{ - internal RescoreDescriptor(Action> configure) => configure.Invoke(this); - - public RescoreDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RescoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RescoreDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private int? WindowSizeValue { get; set; } - - public RescoreDescriptor WindowSize(int? windowSize) - { - WindowSizeValue = windowSize; - return Self; - } - - public RescoreDescriptor LearningToRank(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank learningToRank) => Set(learningToRank, "learning_to_rank"); - public RescoreDescriptor LearningToRank(Action configure) => Set(configure, "learning_to_rank"); - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery rescoreQuery) => Set(rescoreQuery, "query"); - public RescoreDescriptor Query(Action> configure) => Set(configure, "query"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (WindowSizeValue.HasValue) - { - writer.WritePropertyName("window_size"); - writer.WriteNumberValue(WindowSizeValue.Value); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RescoreDescriptor : SerializableDescriptor -{ - internal RescoreDescriptor(Action configure) => configure.Invoke(this); - - public RescoreDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RescoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RescoreDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private int? WindowSizeValue { get; set; } - - public RescoreDescriptor WindowSize(int? windowSize) - { - WindowSizeValue = windowSize; - return Self; - } - - public RescoreDescriptor LearningToRank(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank learningToRank) => Set(learningToRank, "learning_to_rank"); - public RescoreDescriptor LearningToRank(Action configure) => Set(configure, "learning_to_rank"); - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery rescoreQuery) => Set(rescoreQuery, "query"); - public RescoreDescriptor Query(Action configure) => Set(configure, "query"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (WindowSizeValue.HasValue) - { - writer.WritePropertyName("window_size"); - writer.WriteNumberValue(WindowSizeValue.Value); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs deleted file mode 100644 index a25a82997ec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs +++ /dev/null @@ -1,304 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class RescoreQuery -{ - /// - /// - /// The query to use for rescoring. - /// This query is only run on the Top-K results returned by the query and post_filter phases. - /// - /// - [JsonInclude, JsonPropertyName("rescore_query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - - /// - /// - /// Relative importance of the original query versus the rescore query. - /// - /// - [JsonInclude, JsonPropertyName("query_weight")] - public double? QueryWeight { get; set; } - - /// - /// - /// Relative importance of the rescore query versus the original query. - /// - /// - [JsonInclude, JsonPropertyName("rescore_query_weight")] - public double? RescoreQueryWeight { get; set; } - - /// - /// - /// Determines how scores are combined. - /// - /// - [JsonInclude, JsonPropertyName("score_mode")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.ScoreMode? ScoreMode { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore(RescoreQuery rescoreQuery) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore.Query(rescoreQuery); -} - -public sealed partial class RescoreQueryDescriptor : SerializableDescriptor> -{ - internal RescoreQueryDescriptor(Action> configure) => configure.Invoke(this); - - public RescoreQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private double? QueryWeightValue { get; set; } - private double? RescoreQueryWeightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.ScoreMode? ScoreModeValue { get; set; } - - /// - /// - /// The query to use for rescoring. - /// This query is only run on the Top-K results returned by the query and post_filter phases. - /// - /// - public RescoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public RescoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public RescoreQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Relative importance of the original query versus the rescore query. - /// - /// - public RescoreQueryDescriptor QueryWeight(double? queryWeight) - { - QueryWeightValue = queryWeight; - return Self; - } - - /// - /// - /// Relative importance of the rescore query versus the original query. - /// - /// - public RescoreQueryDescriptor RescoreQueryWeight(double? rescoreQueryWeight) - { - RescoreQueryWeightValue = rescoreQueryWeight; - return Self; - } - - /// - /// - /// Determines how scores are combined. - /// - /// - public RescoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.Core.Search.ScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("rescore_query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("rescore_query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("rescore_query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryWeightValue.HasValue) - { - writer.WritePropertyName("query_weight"); - writer.WriteNumberValue(QueryWeightValue.Value); - } - - if (RescoreQueryWeightValue.HasValue) - { - writer.WritePropertyName("rescore_query_weight"); - writer.WriteNumberValue(RescoreQueryWeightValue.Value); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RescoreQueryDescriptor : SerializableDescriptor -{ - internal RescoreQueryDescriptor(Action configure) => configure.Invoke(this); - - public RescoreQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private double? QueryWeightValue { get; set; } - private double? RescoreQueryWeightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.ScoreMode? ScoreModeValue { get; set; } - - /// - /// - /// The query to use for rescoring. - /// This query is only run on the Top-K results returned by the query and post_filter phases. - /// - /// - public RescoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public RescoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public RescoreQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Relative importance of the original query versus the rescore query. - /// - /// - public RescoreQueryDescriptor QueryWeight(double? queryWeight) - { - QueryWeightValue = queryWeight; - return Self; - } - - /// - /// - /// Relative importance of the rescore query versus the original query. - /// - /// - public RescoreQueryDescriptor RescoreQueryWeight(double? rescoreQueryWeight) - { - RescoreQueryWeightValue = rescoreQueryWeight; - return Self; - } - - /// - /// - /// Determines how scores are combined. - /// - /// - public RescoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.Core.Search.ScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("rescore_query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("rescore_query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("rescore_query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryWeightValue.HasValue) - { - writer.WritePropertyName("query_weight"); - writer.WriteNumberValue(QueryWeightValue.Value); - } - - if (RescoreQueryWeightValue.HasValue) - { - writer.WritePropertyName("rescore_query_weight"); - writer.WriteNumberValue(RescoreQueryWeightValue.Value); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SearchProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SearchProfile.g.cs deleted file mode 100644 index deca3beb491..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SearchProfile.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class SearchProfile -{ - [JsonInclude, JsonPropertyName("collector")] - public IReadOnlyCollection Collector { get; init; } - [JsonInclude, JsonPropertyName("query")] - public IReadOnlyCollection Query { get; init; } - [JsonInclude, JsonPropertyName("rewrite_time")] - public long RewriteTime { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs deleted file mode 100644 index f06dd7d80c0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/ShardProfile.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class ShardProfile -{ - [JsonInclude, JsonPropertyName("aggregations")] - public IReadOnlyCollection Aggregations { get; init; } - [JsonInclude, JsonPropertyName("cluster")] - public string Cluster { get; init; } - [JsonInclude, JsonPropertyName("dfs")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsProfile? Dfs { get; init; } - [JsonInclude, JsonPropertyName("fetch")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FetchProfile? Fetch { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } - [JsonInclude, JsonPropertyName("searches")] - public IReadOnlyCollection Searches { get; init; } - [JsonInclude, JsonPropertyName("shard_id")] - public long ShardId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SmoothingModel.g.cs deleted file mode 100644 index f41ccfe7207..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SmoothingModel.g.cs +++ /dev/null @@ -1,257 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -[JsonConverter(typeof(SmoothingModelConverter))] -public sealed partial class SmoothingModel -{ - internal SmoothingModel(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 SmoothingModel Laplace(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LaplaceSmoothingModel laplaceSmoothingModel) => new SmoothingModel("laplace", laplaceSmoothingModel); - public static SmoothingModel LinearInterpolation(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LinearInterpolationSmoothingModel linearInterpolationSmoothingModel) => new SmoothingModel("linear_interpolation", linearInterpolationSmoothingModel); - public static SmoothingModel StupidBackoff(Elastic.Clients.Elasticsearch.Serverless.Core.Search.StupidBackoffSmoothingModel stupidBackoffSmoothingModel) => new SmoothingModel("stupid_backoff", stupidBackoffSmoothingModel); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class SmoothingModelConverter : JsonConverter -{ - public override SmoothingModel 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; - 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 == "laplace") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "linear_interpolation") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "stupid_backoff") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'SmoothingModel' from the response."); - } - - var result = new SmoothingModel(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, SmoothingModel value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "laplace": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.LaplaceSmoothingModel)value.Variant, options); - break; - case "linear_interpolation": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.LinearInterpolationSmoothingModel)value.Variant, options); - break; - case "stupid_backoff": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.StupidBackoffSmoothingModel)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SmoothingModelDescriptor : SerializableDescriptor> -{ - internal SmoothingModelDescriptor(Action> configure) => configure.Invoke(this); - - public SmoothingModelDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SmoothingModelDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SmoothingModelDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public SmoothingModelDescriptor Laplace(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LaplaceSmoothingModel laplaceSmoothingModel) => Set(laplaceSmoothingModel, "laplace"); - public SmoothingModelDescriptor Laplace(Action configure) => Set(configure, "laplace"); - public SmoothingModelDescriptor LinearInterpolation(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LinearInterpolationSmoothingModel linearInterpolationSmoothingModel) => Set(linearInterpolationSmoothingModel, "linear_interpolation"); - public SmoothingModelDescriptor LinearInterpolation(Action configure) => Set(configure, "linear_interpolation"); - public SmoothingModelDescriptor StupidBackoff(Elastic.Clients.Elasticsearch.Serverless.Core.Search.StupidBackoffSmoothingModel stupidBackoffSmoothingModel) => Set(stupidBackoffSmoothingModel, "stupid_backoff"); - public SmoothingModelDescriptor StupidBackoff(Action configure) => Set(configure, "stupid_backoff"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SmoothingModelDescriptor : SerializableDescriptor -{ - internal SmoothingModelDescriptor(Action configure) => configure.Invoke(this); - - public SmoothingModelDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SmoothingModelDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SmoothingModelDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public SmoothingModelDescriptor Laplace(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LaplaceSmoothingModel laplaceSmoothingModel) => Set(laplaceSmoothingModel, "laplace"); - public SmoothingModelDescriptor Laplace(Action configure) => Set(configure, "laplace"); - public SmoothingModelDescriptor LinearInterpolation(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LinearInterpolationSmoothingModel linearInterpolationSmoothingModel) => Set(linearInterpolationSmoothingModel, "linear_interpolation"); - public SmoothingModelDescriptor LinearInterpolation(Action configure) => Set(configure, "linear_interpolation"); - public SmoothingModelDescriptor StupidBackoff(Elastic.Clients.Elasticsearch.Serverless.Core.Search.StupidBackoffSmoothingModel stupidBackoffSmoothingModel) => Set(stupidBackoffSmoothingModel, "stupid_backoff"); - public SmoothingModelDescriptor StupidBackoff(Action configure) => Set(configure, "stupid_backoff"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SourceFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SourceFilter.g.cs deleted file mode 100644 index 476fc65d917..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SourceFilter.g.cs +++ /dev/null @@ -1,169 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -internal sealed partial class SourceFilterConverter : JsonConverter -{ - public override SourceFilter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new SourceFilter(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "excludes" || property == "exclude") - { - reader.Read(); - variant.Excludes = new FieldsConverter().Read(ref reader, typeToConvert, options); - continue; - } - - if (property == "includes" || property == "include") - { - reader.Read(); - variant.Includes = new FieldsConverter().Read(ref reader, typeToConvert, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, SourceFilter value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Excludes is not null) - { - writer.WritePropertyName("excludes"); - new FieldsConverter().Write(writer, value.Excludes, options); - } - - if (value.Includes is not null) - { - writer.WritePropertyName("includes"); - new FieldsConverter().Write(writer, value.Includes, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(SourceFilterConverter))] -public sealed partial class SourceFilter -{ - public Elastic.Clients.Elasticsearch.Serverless.Fields? Excludes { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Fields? Includes { get; set; } -} - -public sealed partial class SourceFilterDescriptor : SerializableDescriptor> -{ - internal SourceFilterDescriptor(Action> configure) => configure.Invoke(this); - - public SourceFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? ExcludesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? IncludesValue { get; set; } - - public SourceFilterDescriptor Excludes(Elastic.Clients.Elasticsearch.Serverless.Fields? excludes) - { - ExcludesValue = excludes; - return Self; - } - - public SourceFilterDescriptor Includes(Elastic.Clients.Elasticsearch.Serverless.Fields? includes) - { - IncludesValue = includes; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludesValue is not null) - { - writer.WritePropertyName("excludes"); - JsonSerializer.Serialize(writer, ExcludesValue, options); - } - - if (IncludesValue is not null) - { - writer.WritePropertyName("includes"); - JsonSerializer.Serialize(writer, IncludesValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SourceFilterDescriptor : SerializableDescriptor -{ - internal SourceFilterDescriptor(Action configure) => configure.Invoke(this); - - public SourceFilterDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? ExcludesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? IncludesValue { get; set; } - - public SourceFilterDescriptor Excludes(Elastic.Clients.Elasticsearch.Serverless.Fields? excludes) - { - ExcludesValue = excludes; - return Self; - } - - public SourceFilterDescriptor Includes(Elastic.Clients.Elasticsearch.Serverless.Fields? includes) - { - IncludesValue = includes; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludesValue is not null) - { - writer.WritePropertyName("excludes"); - JsonSerializer.Serialize(writer, ExcludesValue, options); - } - - if (IncludesValue is not null) - { - writer.WritePropertyName("includes"); - JsonSerializer.Serialize(writer, IncludesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/StupidBackoffSmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/StupidBackoffSmoothingModel.g.cs deleted file mode 100644 index d3a323a4d29..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/StupidBackoffSmoothingModel.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class StupidBackoffSmoothingModel -{ - /// - /// - /// A constant factor that the lower order n-gram model is discounted by. - /// - /// - [JsonInclude, JsonPropertyName("discount")] - public double Discount { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel(StupidBackoffSmoothingModel stupidBackoffSmoothingModel) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.SmoothingModel.StupidBackoff(stupidBackoffSmoothingModel); -} - -public sealed partial class StupidBackoffSmoothingModelDescriptor : SerializableDescriptor -{ - internal StupidBackoffSmoothingModelDescriptor(Action configure) => configure.Invoke(this); - - public StupidBackoffSmoothingModelDescriptor() : base() - { - } - - private double DiscountValue { get; set; } - - /// - /// - /// A constant factor that the lower order n-gram model is discounted by. - /// - /// - public StupidBackoffSmoothingModelDescriptor Discount(double discount) - { - DiscountValue = discount; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("discount"); - writer.WriteNumberValue(DiscountValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestDictionary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestDictionary.g.cs deleted file mode 100644 index fce42046b43..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestDictionary.g.cs +++ /dev/null @@ -1,108 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public partial interface ISuggest -{ -} - -[GenericConverter(typeof(SuggestDictionaryConverter<>), unwrap: true)] -public partial class SuggestDictionary : IsAReadOnlyDictionary> -{ - public SuggestDictionary(IReadOnlyDictionary> backingDictionary) : base(backingDictionary) - { - } - - public IReadOnlyCollection>? GetCompletion(string key) => TryGet>(key); - public IReadOnlyCollection? GetPhrase(string key) => TryGet(key); - public IReadOnlyCollection? GetTerm(string key) => TryGet(key); - private IReadOnlyCollection? TryGet(string key) where T : class, ISuggest => BackingDictionary.TryGetValue(key, out var value) ? value.Cast().ToArray() : null; -} - -internal sealed partial class SuggestDictionaryConverter : JsonConverter> -{ - public override SuggestDictionary Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var dictionary = new Dictionary>(); - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException($"Expected {JsonTokenType.StartObject} but read {reader.TokenType}."); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException($"Expected {JsonTokenType.PropertyName} but read {reader.TokenType}."); - var name = reader.GetString(); - reader.Read(); - ReadItem(ref reader, options, dictionary, name); - } - - return new SuggestDictionary(dictionary); - } - - public override void Write(Utf8JsonWriter writer, SuggestDictionary value, JsonSerializerOptions options) - { - throw new NotImplementedException("'SuggestDictionary' is a readonly type, used only on responses and does not support being written to JSON."); - } - - public static void ReadItem(ref Utf8JsonReader reader, JsonSerializerOptions options, Dictionary> dictionary, string name) - { - var nameParts = name.Split('#'); - if (nameParts.Length != 2) - throw new JsonException($"Unable to parse typed-key '{name}'."); - var type = nameParts[0]; - switch (type) - { - case "completion": - { - var item = JsonSerializer.Deserialize>>(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "phrase": - { - var item = JsonSerializer.Deserialize>(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - case "term": - { - var item = JsonSerializer.Deserialize>(ref reader, options); - dictionary.Add(nameParts[1], item); - break; - } - - default: - throw new NotSupportedException($"The tagged variant '{type}' is currently not supported."); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestFuzziness.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestFuzziness.g.cs deleted file mode 100644 index d898822c690..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/SuggestFuzziness.g.cs +++ /dev/null @@ -1,179 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class SuggestFuzziness -{ - /// - /// - /// The fuzziness factor. - /// - /// - [JsonInclude, JsonPropertyName("fuzziness")] - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Minimum length of the input before fuzzy suggestions are returned. - /// - /// - [JsonInclude, JsonPropertyName("min_length")] - public int? MinLength { get; set; } - - /// - /// - /// Minimum length of the input, which is not checked for fuzzy alternatives. - /// - /// - [JsonInclude, JsonPropertyName("prefix_length")] - public int? PrefixLength { get; set; } - - /// - /// - /// If set to true, transpositions are counted as one change instead of two. - /// - /// - [JsonInclude, JsonPropertyName("transpositions")] - public bool? Transpositions { get; set; } - - /// - /// - /// If true, all measurements (like fuzzy edit distance, transpositions, and lengths) are measured in Unicode code points instead of in bytes. - /// This is slightly slower than raw bytes. - /// - /// - [JsonInclude, JsonPropertyName("unicode_aware")] - public bool? UnicodeAware { get; set; } -} - -public sealed partial class SuggestFuzzinessDescriptor : SerializableDescriptor -{ - internal SuggestFuzzinessDescriptor(Action configure) => configure.Invoke(this); - - public SuggestFuzzinessDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? MinLengthValue { get; set; } - private int? PrefixLengthValue { get; set; } - private bool? TranspositionsValue { get; set; } - private bool? UnicodeAwareValue { get; set; } - - /// - /// - /// The fuzziness factor. - /// - /// - public SuggestFuzzinessDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Minimum length of the input before fuzzy suggestions are returned. - /// - /// - public SuggestFuzzinessDescriptor MinLength(int? minLength) - { - MinLengthValue = minLength; - return Self; - } - - /// - /// - /// Minimum length of the input, which is not checked for fuzzy alternatives. - /// - /// - public SuggestFuzzinessDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// If set to true, transpositions are counted as one change instead of two. - /// - /// - public SuggestFuzzinessDescriptor Transpositions(bool? transpositions = true) - { - TranspositionsValue = transpositions; - return Self; - } - - /// - /// - /// If true, all measurements (like fuzzy edit distance, transpositions, and lengths) are measured in Unicode code points instead of in bytes. - /// This is slightly slower than raw bytes. - /// - /// - public SuggestFuzzinessDescriptor UnicodeAware(bool? unicodeAware = true) - { - UnicodeAwareValue = unicodeAware; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (MinLengthValue.HasValue) - { - writer.WritePropertyName("min_length"); - writer.WriteNumberValue(MinLengthValue.Value); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (TranspositionsValue.HasValue) - { - writer.WritePropertyName("transpositions"); - writer.WriteBooleanValue(TranspositionsValue.Value); - } - - if (UnicodeAwareValue.HasValue) - { - writer.WritePropertyName("unicode_aware"); - writer.WriteBooleanValue(UnicodeAwareValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Suggester.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Suggester.g.cs deleted file mode 100644 index 7f1dbc2d2f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Suggester.g.cs +++ /dev/null @@ -1,207 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -internal sealed partial class SuggesterConverter : JsonConverter -{ - public override Suggester Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new Suggester(); - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "text") - { - variant.Text = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - variant.Suggesters = additionalProperties; - return variant; - } - - public override void Write(Utf8JsonWriter writer, Suggester value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Suggesters is not null) - { - foreach (var additionalProperty in value.Suggesters) - { - writer.WritePropertyName(additionalProperty.Key); - JsonSerializer.Serialize(writer, additionalProperty.Value, options); - } - } - - if (!string.IsNullOrEmpty(value.Text)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(value.Text); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(SuggesterConverter))] -public sealed partial class Suggester -{ - /// - /// - /// The named suggesters - /// - /// - public IDictionary Suggesters { get; set; } - - /// - /// - /// Global suggest text, to avoid repetition when the same text is used in several suggesters - /// - /// - public string? Text { get; set; } -} - -public sealed partial class SuggesterDescriptor : SerializableDescriptor> -{ - internal SuggesterDescriptor(Action> configure) => configure.Invoke(this); - - public SuggesterDescriptor() : base() - { - } - - private IDictionary> SuggestersValue { get; set; } - private string? TextValue { get; set; } - - /// - /// - /// The named suggesters - /// - /// - public SuggesterDescriptor Suggesters(Func>, FluentDescriptorDictionary>> selector) - { - SuggestersValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Global suggest text, to avoid repetition when the same text is used in several suggesters - /// - /// - public SuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - if (SuggestersValue is not null) - { - foreach (var additionalProperty in SuggestersValue) - { - writer.WritePropertyName(additionalProperty.Key); - JsonSerializer.Serialize(writer, additionalProperty.Value, options); - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SuggesterDescriptor : SerializableDescriptor -{ - internal SuggesterDescriptor(Action configure) => configure.Invoke(this); - - public SuggesterDescriptor() : base() - { - } - - private IDictionary SuggestersValue { get; set; } - private string? TextValue { get; set; } - - /// - /// - /// The named suggesters - /// - /// - public SuggesterDescriptor Suggesters(Func, FluentDescriptorDictionary> selector) - { - SuggestersValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Global suggest text, to avoid repetition when the same text is used in several suggesters - /// - /// - public SuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - if (SuggestersValue is not null) - { - foreach (var additionalProperty in SuggestersValue) - { - writer.WritePropertyName(additionalProperty.Key); - JsonSerializer.Serialize(writer, additionalProperty.Value, options); - } - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggest.g.cs deleted file mode 100644 index 3f8e3ff522c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggest.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class TermSuggest : ISuggest -{ - [JsonInclude, JsonPropertyName("length")] - public int Length { get; init; } - [JsonInclude, JsonPropertyName("offset")] - public int Offset { get; init; } - [JsonInclude, JsonPropertyName("options")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.TermSuggestOption))] - public IReadOnlyCollection Options { get; init; } - [JsonInclude, JsonPropertyName("text")] - public string Text { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggestOption.g.cs deleted file mode 100644 index 13b6497ef80..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggestOption.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class TermSuggestOption -{ - [JsonInclude, JsonPropertyName("collate_match")] - public bool? CollateMatch { get; init; } - [JsonInclude, JsonPropertyName("freq")] - public long Freq { get; init; } - [JsonInclude, JsonPropertyName("highlighted")] - public string? Highlighted { get; init; } - [JsonInclude, JsonPropertyName("score")] - public double Score { get; init; } - [JsonInclude, JsonPropertyName("text")] - public string Text { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggester.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggester.g.cs deleted file mode 100644 index d3961ae4718..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TermSuggester.g.cs +++ /dev/null @@ -1,782 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class TermSuggester -{ - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("lowercase_terms")] - public bool? LowercaseTerms { get; set; } - - /// - /// - /// The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. - /// Can only be 1 or 2. - /// - /// - [JsonInclude, JsonPropertyName("max_edits")] - public int? MaxEdits { get; set; } - - /// - /// - /// A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. - /// Can improve accuracy at the cost of performance. - /// - /// - [JsonInclude, JsonPropertyName("max_inspections")] - public int? MaxInspections { get; set; } - - /// - /// - /// The maximum threshold in number of documents in which a suggest text token can exist in order to be included. - /// Can be a relative percentage number (for example 0.4) or an absolute number to represent document frequencies. - /// If a value higher than 1 is specified, then fractional can not be specified. - /// - /// - [JsonInclude, JsonPropertyName("max_term_freq")] - public float? MaxTermFreq { get; set; } - - /// - /// - /// The minimal threshold in number of documents a suggestion should appear in. - /// This can improve quality by only suggesting high frequency terms. - /// Can be specified as an absolute number or as a relative percentage of number of documents. - /// If a value higher than 1 is specified, then the number cannot be fractional. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_freq")] - public float? MinDocFreq { get; set; } - - /// - /// - /// The minimum length a suggest text term must have in order to be included. - /// - /// - [JsonInclude, JsonPropertyName("min_word_length")] - public int? MinWordLength { get; set; } - - /// - /// - /// The number of minimal prefix characters that must match in order be a candidate for suggestions. - /// Increasing this number improves spellcheck performance. - /// - /// - [JsonInclude, JsonPropertyName("prefix_length")] - public int? PrefixLength { get; set; } - - /// - /// - /// Sets the maximum number of suggestions to be retrieved from each individual shard. - /// - /// - [JsonInclude, JsonPropertyName("shard_size")] - public int? ShardSize { get; set; } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } - - /// - /// - /// Defines how suggestions should be sorted per suggest text term. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestSort? Sort { get; set; } - - /// - /// - /// The string distance implementation to use for comparing how similar suggested terms are. - /// - /// - [JsonInclude, JsonPropertyName("string_distance")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.StringDistance? StringDistance { get; set; } - - /// - /// - /// Controls what suggestions are included or controls for what suggest text terms, suggestions should be suggested. - /// - /// - [JsonInclude, JsonPropertyName("suggest_mode")] - public Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestMode { get; set; } - - /// - /// - /// The suggest text. - /// Needs to be set globally or per suggestion. - /// - /// - [JsonInclude, JsonPropertyName("text")] - public string? Text { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldSuggester(TermSuggester termSuggester) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldSuggester.Term(termSuggester); -} - -public sealed partial class TermSuggesterDescriptor : SerializableDescriptor> -{ - internal TermSuggesterDescriptor(Action> configure) => configure.Invoke(this); - - public TermSuggesterDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? LowercaseTermsValue { get; set; } - private int? MaxEditsValue { get; set; } - private int? MaxInspectionsValue { get; set; } - private float? MaxTermFreqValue { get; set; } - private float? MinDocFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - private int? PrefixLengthValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestSort? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.StringDistance? StringDistanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestModeValue { get; set; } - private string? TextValue { get; set; } - - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - public TermSuggesterDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermSuggesterDescriptor LowercaseTerms(bool? lowercaseTerms = true) - { - LowercaseTermsValue = lowercaseTerms; - return Self; - } - - /// - /// - /// The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. - /// Can only be 1 or 2. - /// - /// - public TermSuggesterDescriptor MaxEdits(int? maxEdits) - { - MaxEditsValue = maxEdits; - return Self; - } - - /// - /// - /// A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. - /// Can improve accuracy at the cost of performance. - /// - /// - public TermSuggesterDescriptor MaxInspections(int? maxInspections) - { - MaxInspectionsValue = maxInspections; - return Self; - } - - /// - /// - /// The maximum threshold in number of documents in which a suggest text token can exist in order to be included. - /// Can be a relative percentage number (for example 0.4) or an absolute number to represent document frequencies. - /// If a value higher than 1 is specified, then fractional can not be specified. - /// - /// - public TermSuggesterDescriptor MaxTermFreq(float? maxTermFreq) - { - MaxTermFreqValue = maxTermFreq; - return Self; - } - - /// - /// - /// The minimal threshold in number of documents a suggestion should appear in. - /// This can improve quality by only suggesting high frequency terms. - /// Can be specified as an absolute number or as a relative percentage of number of documents. - /// If a value higher than 1 is specified, then the number cannot be fractional. - /// - /// - public TermSuggesterDescriptor MinDocFreq(float? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// The minimum length a suggest text term must have in order to be included. - /// - /// - public TermSuggesterDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - /// - /// - /// The number of minimal prefix characters that must match in order be a candidate for suggestions. - /// Increasing this number improves spellcheck performance. - /// - /// - public TermSuggesterDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Sets the maximum number of suggestions to be retrieved from each individual shard. - /// - /// - public TermSuggesterDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public TermSuggesterDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Defines how suggestions should be sorted per suggest text term. - /// - /// - public TermSuggesterDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestSort? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// The string distance implementation to use for comparing how similar suggested terms are. - /// - /// - public TermSuggesterDescriptor StringDistance(Elastic.Clients.Elasticsearch.Serverless.Core.Search.StringDistance? stringDistance) - { - StringDistanceValue = stringDistance; - return Self; - } - - /// - /// - /// Controls what suggestions are included or controls for what suggest text terms, suggestions should be suggested. - /// - /// - public TermSuggesterDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) - { - SuggestModeValue = suggestMode; - return Self; - } - - /// - /// - /// The suggest text. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (LowercaseTermsValue.HasValue) - { - writer.WritePropertyName("lowercase_terms"); - writer.WriteBooleanValue(LowercaseTermsValue.Value); - } - - if (MaxEditsValue.HasValue) - { - writer.WritePropertyName("max_edits"); - writer.WriteNumberValue(MaxEditsValue.Value); - } - - if (MaxInspectionsValue.HasValue) - { - writer.WritePropertyName("max_inspections"); - writer.WriteNumberValue(MaxInspectionsValue.Value); - } - - if (MaxTermFreqValue.HasValue) - { - writer.WritePropertyName("max_term_freq"); - writer.WriteNumberValue(MaxTermFreqValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StringDistanceValue is not null) - { - writer.WritePropertyName("string_distance"); - JsonSerializer.Serialize(writer, StringDistanceValue, options); - } - - if (SuggestModeValue is not null) - { - writer.WritePropertyName("suggest_mode"); - JsonSerializer.Serialize(writer, SuggestModeValue, options); - } - - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TermSuggesterDescriptor : SerializableDescriptor -{ - internal TermSuggesterDescriptor(Action configure) => configure.Invoke(this); - - public TermSuggesterDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? LowercaseTermsValue { get; set; } - private int? MaxEditsValue { get; set; } - private int? MaxInspectionsValue { get; set; } - private float? MaxTermFreqValue { get; set; } - private float? MinDocFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - private int? PrefixLengthValue { get; set; } - private int? ShardSizeValue { get; set; } - private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestSort? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.StringDistance? StringDistanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SuggestMode? SuggestModeValue { get; set; } - private string? TextValue { get; set; } - - /// - /// - /// The analyzer to analyze the suggest text with. - /// Defaults to the search analyzer of the suggest field. - /// - /// - public TermSuggesterDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to fetch the candidate suggestions from. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermSuggesterDescriptor LowercaseTerms(bool? lowercaseTerms = true) - { - LowercaseTermsValue = lowercaseTerms; - return Self; - } - - /// - /// - /// The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. - /// Can only be 1 or 2. - /// - /// - public TermSuggesterDescriptor MaxEdits(int? maxEdits) - { - MaxEditsValue = maxEdits; - return Self; - } - - /// - /// - /// A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. - /// Can improve accuracy at the cost of performance. - /// - /// - public TermSuggesterDescriptor MaxInspections(int? maxInspections) - { - MaxInspectionsValue = maxInspections; - return Self; - } - - /// - /// - /// The maximum threshold in number of documents in which a suggest text token can exist in order to be included. - /// Can be a relative percentage number (for example 0.4) or an absolute number to represent document frequencies. - /// If a value higher than 1 is specified, then fractional can not be specified. - /// - /// - public TermSuggesterDescriptor MaxTermFreq(float? maxTermFreq) - { - MaxTermFreqValue = maxTermFreq; - return Self; - } - - /// - /// - /// The minimal threshold in number of documents a suggestion should appear in. - /// This can improve quality by only suggesting high frequency terms. - /// Can be specified as an absolute number or as a relative percentage of number of documents. - /// If a value higher than 1 is specified, then the number cannot be fractional. - /// - /// - public TermSuggesterDescriptor MinDocFreq(float? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// The minimum length a suggest text term must have in order to be included. - /// - /// - public TermSuggesterDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - /// - /// - /// The number of minimal prefix characters that must match in order be a candidate for suggestions. - /// Increasing this number improves spellcheck performance. - /// - /// - public TermSuggesterDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Sets the maximum number of suggestions to be retrieved from each individual shard. - /// - /// - public TermSuggesterDescriptor ShardSize(int? shardSize) - { - ShardSizeValue = shardSize; - return Self; - } - - /// - /// - /// The maximum corrections to be returned per suggest text token. - /// - /// - public TermSuggesterDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - /// - /// - /// Defines how suggestions should be sorted per suggest text term. - /// - /// - public TermSuggesterDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SuggestSort? sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// The string distance implementation to use for comparing how similar suggested terms are. - /// - /// - public TermSuggesterDescriptor StringDistance(Elastic.Clients.Elasticsearch.Serverless.Core.Search.StringDistance? stringDistance) - { - StringDistanceValue = stringDistance; - return Self; - } - - /// - /// - /// Controls what suggestions are included or controls for what suggest text terms, suggestions should be suggested. - /// - /// - public TermSuggesterDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) - { - SuggestModeValue = suggestMode; - return Self; - } - - /// - /// - /// The suggest text. - /// Needs to be set globally or per suggestion. - /// - /// - public TermSuggesterDescriptor Text(string? text) - { - TextValue = text; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (LowercaseTermsValue.HasValue) - { - writer.WritePropertyName("lowercase_terms"); - writer.WriteBooleanValue(LowercaseTermsValue.Value); - } - - if (MaxEditsValue.HasValue) - { - writer.WritePropertyName("max_edits"); - writer.WriteNumberValue(MaxEditsValue.Value); - } - - if (MaxInspectionsValue.HasValue) - { - writer.WritePropertyName("max_inspections"); - writer.WriteNumberValue(MaxInspectionsValue.Value); - } - - if (MaxTermFreqValue.HasValue) - { - writer.WritePropertyName("max_term_freq"); - writer.WriteNumberValue(MaxTermFreqValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (ShardSizeValue.HasValue) - { - writer.WritePropertyName("shard_size"); - writer.WriteNumberValue(ShardSizeValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StringDistanceValue is not null) - { - writer.WritePropertyName("string_distance"); - JsonSerializer.Serialize(writer, StringDistanceValue, options); - } - - if (SuggestModeValue is not null) - { - writer.WritePropertyName("suggest_mode"); - JsonSerializer.Serialize(writer, SuggestModeValue, options); - } - - if (!string.IsNullOrEmpty(TextValue)) - { - writer.WritePropertyName("text"); - writer.WriteStringValue(TextValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TotalHits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TotalHits.g.cs deleted file mode 100644 index 38d3ab3e4a1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/TotalHits.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -public sealed partial class TotalHits -{ - [JsonInclude, JsonPropertyName("relation")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TotalHitsRelation Relation { get; init; } - [JsonInclude, JsonPropertyName("value")] - public long Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfig.g.cs deleted file mode 100644 index f790c8e2665..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfig.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -/// -/// -/// Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered. -/// -/// -public sealed partial class SourceConfig : Union -{ - public SourceConfig(bool Fetch) : base(Fetch) - { - } - - public SourceConfig(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceFilter Filter) : base(Filter) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfigParam.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfigParam.g.cs deleted file mode 100644 index 762d51fe35e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/SourceConfigParam.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -/// -/// -/// Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered. -/// Used as a query parameter along with the _source_includes and _source_excludes parameters. -/// -/// -public sealed partial class SourceConfigParam : Union -{ - public SourceConfigParam(bool Fetch) : base(Fetch) - { - } - - public SourceConfigParam(Elastic.Clients.Elasticsearch.Serverless.Fields Fields) : base(Fields) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/FieldStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/FieldStatistics.g.cs deleted file mode 100644 index a8b2719db6b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/FieldStatistics.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors; - -public sealed partial class FieldStatistics -{ - [JsonInclude, JsonPropertyName("doc_count")] - public int DocCount { get; init; } - [JsonInclude, JsonPropertyName("sum_doc_freq")] - public long SumDocFreq { get; init; } - [JsonInclude, JsonPropertyName("sum_ttf")] - public long SumTtf { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Filter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Filter.g.cs deleted file mode 100644 index 29950c455ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Filter.g.cs +++ /dev/null @@ -1,235 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors; - -public sealed partial class Filter -{ - /// - /// - /// Ignore words which occur in more than this many docs. - /// Defaults to unbounded. - /// - /// - [JsonInclude, JsonPropertyName("max_doc_freq")] - public int? MaxDocFreq { get; set; } - - /// - /// - /// Maximum number of terms that must be returned per field. - /// - /// - [JsonInclude, JsonPropertyName("max_num_terms")] - public int? MaxNumTerms { get; set; } - - /// - /// - /// Ignore words with more than this frequency in the source doc. - /// Defaults to unbounded. - /// - /// - [JsonInclude, JsonPropertyName("max_term_freq")] - public int? MaxTermFreq { get; set; } - - /// - /// - /// The maximum word length above which words will be ignored. - /// Defaults to unbounded. - /// - /// - [JsonInclude, JsonPropertyName("max_word_length")] - public int? MaxWordLength { get; set; } - - /// - /// - /// Ignore terms which do not occur in at least this many docs. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_freq")] - public int? MinDocFreq { get; set; } - - /// - /// - /// Ignore words with less than this frequency in the source doc. - /// - /// - [JsonInclude, JsonPropertyName("min_term_freq")] - public int? MinTermFreq { get; set; } - - /// - /// - /// The minimum word length below which words will be ignored. - /// - /// - [JsonInclude, JsonPropertyName("min_word_length")] - public int? MinWordLength { get; set; } -} - -public sealed partial class FilterDescriptor : SerializableDescriptor -{ - internal FilterDescriptor(Action configure) => configure.Invoke(this); - - public FilterDescriptor() : base() - { - } - - private int? MaxDocFreqValue { get; set; } - private int? MaxNumTermsValue { get; set; } - private int? MaxTermFreqValue { get; set; } - private int? MaxWordLengthValue { get; set; } - private int? MinDocFreqValue { get; set; } - private int? MinTermFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - - /// - /// - /// Ignore words which occur in more than this many docs. - /// Defaults to unbounded. - /// - /// - public FilterDescriptor MaxDocFreq(int? maxDocFreq) - { - MaxDocFreqValue = maxDocFreq; - return Self; - } - - /// - /// - /// Maximum number of terms that must be returned per field. - /// - /// - public FilterDescriptor MaxNumTerms(int? maxNumTerms) - { - MaxNumTermsValue = maxNumTerms; - return Self; - } - - /// - /// - /// Ignore words with more than this frequency in the source doc. - /// Defaults to unbounded. - /// - /// - public FilterDescriptor MaxTermFreq(int? maxTermFreq) - { - MaxTermFreqValue = maxTermFreq; - return Self; - } - - /// - /// - /// The maximum word length above which words will be ignored. - /// Defaults to unbounded. - /// - /// - public FilterDescriptor MaxWordLength(int? maxWordLength) - { - MaxWordLengthValue = maxWordLength; - return Self; - } - - /// - /// - /// Ignore terms which do not occur in at least this many docs. - /// - /// - public FilterDescriptor MinDocFreq(int? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// Ignore words with less than this frequency in the source doc. - /// - /// - public FilterDescriptor MinTermFreq(int? minTermFreq) - { - MinTermFreqValue = minTermFreq; - return Self; - } - - /// - /// - /// The minimum word length below which words will be ignored. - /// - /// - public FilterDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxDocFreqValue.HasValue) - { - writer.WritePropertyName("max_doc_freq"); - writer.WriteNumberValue(MaxDocFreqValue.Value); - } - - if (MaxNumTermsValue.HasValue) - { - writer.WritePropertyName("max_num_terms"); - writer.WriteNumberValue(MaxNumTermsValue.Value); - } - - if (MaxTermFreqValue.HasValue) - { - writer.WritePropertyName("max_term_freq"); - writer.WriteNumberValue(MaxTermFreqValue.Value); - } - - if (MaxWordLengthValue.HasValue) - { - writer.WritePropertyName("max_word_length"); - writer.WriteNumberValue(MaxWordLengthValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinTermFreqValue.HasValue) - { - writer.WritePropertyName("min_term_freq"); - writer.WriteNumberValue(MinTermFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Term.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Term.g.cs deleted file mode 100644 index 9c60187ed6c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Term.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors; - -public sealed partial class Term -{ - [JsonInclude, JsonPropertyName("doc_freq")] - public int? DocFreq { get; init; } - [JsonInclude, JsonPropertyName("score")] - public double? Score { get; init; } - [JsonInclude, JsonPropertyName("term_freq")] - public int TermFreq { get; init; } - [JsonInclude, JsonPropertyName("tokens")] - public IReadOnlyCollection? Tokens { get; init; } - [JsonInclude, JsonPropertyName("ttf")] - public int? Ttf { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/TermVector.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/TermVector.g.cs deleted file mode 100644 index 46823cb9faa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/TermVector.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors; - -public sealed partial class TermVector -{ - [JsonInclude, JsonPropertyName("field_statistics")] - public Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors.FieldStatistics? FieldStatistics { get; init; } - [JsonInclude, JsonPropertyName("terms")] - public IReadOnlyDictionary Terms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Token.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Token.g.cs deleted file mode 100644 index fdcff79c408..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TermVectors/Token.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.TermVectors; - -public sealed partial class Token -{ - [JsonInclude, JsonPropertyName("end_offset")] - public int? EndOffset { get; init; } - [JsonInclude, JsonPropertyName("payload")] - public string? Payload { get; init; } - [JsonInclude, JsonPropertyName("position")] - public int Position { get; init; } - [JsonInclude, JsonPropertyName("start_offset")] - public int? StartOffset { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TrackHits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TrackHits.g.cs deleted file mode 100644 index 58cf0283a76..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/TrackHits.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -/// -/// -/// Number of hits matching the query to count accurately. If true, the exact -/// number of hits is returned at the cost of some performance. If false, the -/// response does not include the total number of hits matching the query. -/// Defaults to 10,000 hits. -/// -/// -public sealed partial class TrackHits : Union -{ - public TrackHits(bool Enabled) : base(Enabled) - { - } - - public TrackHits(int Count) : base(Count) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs deleted file mode 100644 index 1585b66f55a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/UpdateByQueryRethrottle/UpdateByQueryRethrottleNode.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.UpdateByQueryRethrottle; - -public sealed partial class UpdateByQueryRethrottleNode -{ - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary Attributes { get; init; } - [JsonInclude, JsonPropertyName("host")] - public string Host { get; init; } - [JsonInclude, JsonPropertyName("ip")] - public string Ip { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - [JsonInclude, JsonPropertyName("tasks")] - public IReadOnlyDictionary Tasks { get; init; } - [JsonInclude, JsonPropertyName("transport_address")] - public string TransportAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/DocStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/DocStats.g.cs deleted file mode 100644 index dd91a5446a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/DocStats.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class DocStats -{ - /// - /// - /// Total number of non-deleted documents across all primary shards assigned to selected nodes. - /// This number is based on documents in Lucene segments and may include documents from nested fields. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// Total number of deleted documents across all primary shards assigned to selected nodes. - /// This number is based on documents in Lucene segments. - /// Elasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged. - /// - /// - [JsonInclude, JsonPropertyName("deleted")] - public long? Deleted { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ElasticsearchVersionInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ElasticsearchVersionInfo.g.cs deleted file mode 100644 index c596d5737c4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ElasticsearchVersionInfo.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ElasticsearchVersionInfo -{ - [JsonInclude, JsonPropertyName("build_date")] - public DateTimeOffset BuildDate { get; init; } - [JsonInclude, JsonPropertyName("build_flavor")] - public string BuildFlavor { get; init; } - [JsonInclude, JsonPropertyName("build_hash")] - public string BuildHash { get; init; } - [JsonInclude, JsonPropertyName("build_snapshot")] - public bool BuildSnapshot { get; init; } - [JsonInclude, JsonPropertyName("build_type")] - public string BuildType { get; init; } - [JsonInclude, JsonPropertyName("lucene_version")] - public string LuceneVersion { get; init; } - [JsonInclude, JsonPropertyName("minimum_index_compatibility_version")] - public string MinimumIndexCompatibilityVersion { get; init; } - [JsonInclude, JsonPropertyName("minimum_wire_compatibility_version")] - public string MinimumWireCompatibilityVersion { get; init; } - [JsonInclude, JsonPropertyName("number")] - public string Number { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/EmptyObject.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/EmptyObject.g.cs deleted file mode 100644 index aea9c1b1871..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/EmptyObject.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// For empty Class assignments -/// -/// -public sealed partial class EmptyObject -{ -} - -/// -/// -/// For empty Class assignments -/// -/// -public sealed partial class EmptyObjectDescriptor : SerializableDescriptor -{ - internal EmptyObjectDescriptor(Action configure) => configure.Invoke(this); - - public EmptyObjectDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs deleted file mode 100644 index 333b77ee818..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CacheStats.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class CacheStats -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("evictions")] - public int Evictions { get; init; } - [JsonInclude, JsonPropertyName("hits")] - public int Hits { get; init; } - [JsonInclude, JsonPropertyName("hits_time_in_millis")] - public long HitsTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("misses")] - public int Misses { get; init; } - [JsonInclude, JsonPropertyName("misses_time_in_millis")] - public long MissesTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CoordinatorStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CoordinatorStats.g.cs deleted file mode 100644 index 5c7cbf47fe9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/CoordinatorStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class CoordinatorStats -{ - [JsonInclude, JsonPropertyName("executed_searches_total")] - public long ExecutedSearchesTotal { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } - [JsonInclude, JsonPropertyName("queue_size")] - public int QueueSize { get; init; } - [JsonInclude, JsonPropertyName("remote_requests_current")] - public int RemoteRequestsCurrent { get; init; } - [JsonInclude, JsonPropertyName("remote_requests_total")] - public long RemoteRequestsTotal { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichPolicy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichPolicy.g.cs deleted file mode 100644 index fdac64dac40..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichPolicy.g.cs +++ /dev/null @@ -1,293 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class EnrichPolicy -{ - [JsonInclude, JsonPropertyName("elasticsearch_version")] - public string? ElasticsearchVersion { get; set; } - [JsonInclude, JsonPropertyName("enrich_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields EnrichFields { get; set; } - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices Indices { get; set; } - [JsonInclude, JsonPropertyName("match_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field MatchField { get; set; } - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } -} - -public sealed partial class EnrichPolicyDescriptor : SerializableDescriptor> -{ - internal EnrichPolicyDescriptor(Action> configure) => configure.Invoke(this); - - public EnrichPolicyDescriptor() : base() - { - } - - private string? ElasticsearchVersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields EnrichFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field MatchFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - - public EnrichPolicyDescriptor ElasticsearchVersion(string? elasticsearchVersion) - { - ElasticsearchVersionValue = elasticsearchVersion; - return Self; - } - - public EnrichPolicyDescriptor EnrichFields(Elastic.Clients.Elasticsearch.Serverless.Fields enrichFields) - { - EnrichFieldsValue = enrichFields; - return Self; - } - - public EnrichPolicyDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - public EnrichPolicyDescriptor MatchField(Elastic.Clients.Elasticsearch.Serverless.Field matchField) - { - MatchFieldValue = matchField; - return Self; - } - - public EnrichPolicyDescriptor MatchField(Expression> matchField) - { - MatchFieldValue = matchField; - return Self; - } - - public EnrichPolicyDescriptor MatchField(Expression> matchField) - { - MatchFieldValue = matchField; - return Self; - } - - public EnrichPolicyDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - public EnrichPolicyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public EnrichPolicyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public EnrichPolicyDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ElasticsearchVersionValue)) - { - writer.WritePropertyName("elasticsearch_version"); - writer.WriteStringValue(ElasticsearchVersionValue); - } - - writer.WritePropertyName("enrich_fields"); - JsonSerializer.Serialize(writer, EnrichFieldsValue, options); - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - writer.WritePropertyName("match_field"); - JsonSerializer.Serialize(writer, MatchFieldValue, options); - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class EnrichPolicyDescriptor : SerializableDescriptor -{ - internal EnrichPolicyDescriptor(Action configure) => configure.Invoke(this); - - public EnrichPolicyDescriptor() : base() - { - } - - private string? ElasticsearchVersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields EnrichFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field MatchFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - public EnrichPolicyDescriptor ElasticsearchVersion(string? elasticsearchVersion) - { - ElasticsearchVersionValue = elasticsearchVersion; - return Self; - } - - public EnrichPolicyDescriptor EnrichFields(Elastic.Clients.Elasticsearch.Serverless.Fields enrichFields) - { - EnrichFieldsValue = enrichFields; - return Self; - } - - public EnrichPolicyDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - public EnrichPolicyDescriptor MatchField(Elastic.Clients.Elasticsearch.Serverless.Field matchField) - { - MatchFieldValue = matchField; - return Self; - } - - public EnrichPolicyDescriptor MatchField(Expression> matchField) - { - MatchFieldValue = matchField; - return Self; - } - - public EnrichPolicyDescriptor MatchField(Expression> matchField) - { - MatchFieldValue = matchField; - return Self; - } - - public EnrichPolicyDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - public EnrichPolicyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public EnrichPolicyDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public EnrichPolicyDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ElasticsearchVersionValue)) - { - writer.WritePropertyName("elasticsearch_version"); - writer.WriteStringValue(ElasticsearchVersionValue); - } - - writer.WritePropertyName("enrich_fields"); - JsonSerializer.Serialize(writer, EnrichFieldsValue, options); - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - writer.WritePropertyName("match_field"); - JsonSerializer.Serialize(writer, MatchFieldValue, options); - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichSummary.g.cs deleted file mode 100644 index 2c54b1e3465..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/EnrichSummary.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class EnrichSummary -{ - [JsonInclude, JsonPropertyName("config")] - public KeyValuePair Config { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecuteEnrichPolicyStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecuteEnrichPolicyStatus.g.cs deleted file mode 100644 index 9f956d48fd5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecuteEnrichPolicyStatus.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class ExecuteEnrichPolicyStatus -{ - [JsonInclude, JsonPropertyName("phase")] - public Elastic.Clients.Elasticsearch.Serverless.Enrich.EnrichPolicyPhase Phase { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecutingPolicy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecutingPolicy.g.cs deleted file mode 100644 index 84cfab7076b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enrich/ExecutingPolicy.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -public sealed partial class ExecutingPolicy -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("task")] - public Elastic.Clients.Elasticsearch.Serverless.Tasks.TaskInfo Task { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Aggregations.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Aggregations.g.cs deleted file mode 100644 index a60560bba8e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Aggregations.g.cs +++ /dev/null @@ -1,880 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; - -[JsonConverter(typeof(CalendarIntervalConverter))] -public enum CalendarInterval -{ - [EnumMember(Value = "year")] - Year, - [EnumMember(Value = "week")] - Week, - [EnumMember(Value = "second")] - Second, - [EnumMember(Value = "quarter")] - Quarter, - [EnumMember(Value = "month")] - Month, - [EnumMember(Value = "minute")] - Minute, - [EnumMember(Value = "hour")] - Hour, - [EnumMember(Value = "day")] - Day -} - -internal sealed class CalendarIntervalConverter : JsonConverter -{ - public override CalendarInterval Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "year": - case "1y": - return CalendarInterval.Year; - case "week": - case "1w": - return CalendarInterval.Week; - case "second": - case "1s": - return CalendarInterval.Second; - case "quarter": - case "1q": - return CalendarInterval.Quarter; - case "month": - case "1M": - return CalendarInterval.Month; - case "minute": - case "1m": - return CalendarInterval.Minute; - case "hour": - case "1h": - return CalendarInterval.Hour; - case "day": - case "1d": - return CalendarInterval.Day; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, CalendarInterval value, JsonSerializerOptions options) - { - switch (value) - { - case CalendarInterval.Year: - writer.WriteStringValue("year"); - return; - case CalendarInterval.Week: - writer.WriteStringValue("week"); - return; - case CalendarInterval.Second: - writer.WriteStringValue("second"); - return; - case CalendarInterval.Quarter: - writer.WriteStringValue("quarter"); - return; - case CalendarInterval.Month: - writer.WriteStringValue("month"); - return; - case CalendarInterval.Minute: - writer.WriteStringValue("minute"); - return; - case CalendarInterval.Hour: - writer.WriteStringValue("hour"); - return; - case CalendarInterval.Day: - writer.WriteStringValue("day"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(CardinalityExecutionModeConverter))] -public enum CardinalityExecutionMode -{ - /// - /// - /// Run the aggregation by using segment ordinal values and resolving those values after each segment. - /// - /// - [EnumMember(Value = "segment_ordinals")] - SegmentOrdinals, - /// - /// - /// Heuristic-based mode, default in Elasticsearch 8.4 and later. - /// - /// - [EnumMember(Value = "save_time_heuristic")] - SaveTimeHeuristic, - /// - /// - /// Heuristic-based mode, default in Elasticsearch 8.3 and earlier. - /// - /// - [EnumMember(Value = "save_memory_heuristic")] - SaveMemoryHeuristic, - /// - /// - /// Run the aggregation by using global ordinals of the field and resolving those values after finishing a shard. - /// - /// - [EnumMember(Value = "global_ordinals")] - GlobalOrdinals, - /// - /// - /// Run the aggregation by using field values directly. - /// - /// - [EnumMember(Value = "direct")] - Direct -} - -internal sealed class CardinalityExecutionModeConverter : JsonConverter -{ - public override CardinalityExecutionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "segment_ordinals": - return CardinalityExecutionMode.SegmentOrdinals; - case "save_time_heuristic": - return CardinalityExecutionMode.SaveTimeHeuristic; - case "save_memory_heuristic": - return CardinalityExecutionMode.SaveMemoryHeuristic; - case "global_ordinals": - return CardinalityExecutionMode.GlobalOrdinals; - case "direct": - return CardinalityExecutionMode.Direct; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, CardinalityExecutionMode value, JsonSerializerOptions options) - { - switch (value) - { - case CardinalityExecutionMode.SegmentOrdinals: - writer.WriteStringValue("segment_ordinals"); - return; - case CardinalityExecutionMode.SaveTimeHeuristic: - writer.WriteStringValue("save_time_heuristic"); - return; - case CardinalityExecutionMode.SaveMemoryHeuristic: - writer.WriteStringValue("save_memory_heuristic"); - return; - case CardinalityExecutionMode.GlobalOrdinals: - writer.WriteStringValue("global_ordinals"); - return; - case CardinalityExecutionMode.Direct: - writer.WriteStringValue("direct"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GapPolicyConverter))] -public enum GapPolicy -{ - /// - /// - /// Treats missing data as if the bucket does not exist. It will skip the bucket and - /// continue calculating using the next available value. - /// - /// - [EnumMember(Value = "skip")] - Skip, - /// - /// - /// Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, - /// otherwise the empty bucket is skipped. - /// - /// - [EnumMember(Value = "keep_values")] - KeepValues, - /// - /// - /// Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal. - /// - /// - [EnumMember(Value = "insert_zeros")] - InsertZeros -} - -internal sealed class GapPolicyConverter : JsonConverter -{ - public override GapPolicy Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "skip": - return GapPolicy.Skip; - case "keep_values": - return GapPolicy.KeepValues; - case "insert_zeros": - return GapPolicy.InsertZeros; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GapPolicy value, JsonSerializerOptions options) - { - switch (value) - { - case GapPolicy.Skip: - writer.WriteStringValue("skip"); - return; - case GapPolicy.KeepValues: - writer.WriteStringValue("keep_values"); - return; - case GapPolicy.InsertZeros: - writer.WriteStringValue("insert_zeros"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(MinimumIntervalConverter))] -public enum MinimumInterval -{ - [EnumMember(Value = "year")] - Year, - [EnumMember(Value = "second")] - Second, - [EnumMember(Value = "month")] - Month, - [EnumMember(Value = "minute")] - Minute, - [EnumMember(Value = "hour")] - Hour, - [EnumMember(Value = "day")] - Day -} - -internal sealed class MinimumIntervalConverter : JsonConverter -{ - public override MinimumInterval Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "year": - return MinimumInterval.Year; - case "second": - return MinimumInterval.Second; - case "month": - return MinimumInterval.Month; - case "minute": - return MinimumInterval.Minute; - case "hour": - return MinimumInterval.Hour; - case "day": - return MinimumInterval.Day; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, MinimumInterval value, JsonSerializerOptions options) - { - switch (value) - { - case MinimumInterval.Year: - writer.WriteStringValue("year"); - return; - case MinimumInterval.Second: - writer.WriteStringValue("second"); - return; - case MinimumInterval.Month: - writer.WriteStringValue("month"); - return; - case MinimumInterval.Minute: - writer.WriteStringValue("minute"); - return; - case MinimumInterval.Hour: - writer.WriteStringValue("hour"); - return; - case MinimumInterval.Day: - writer.WriteStringValue("day"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(MissingOrderConverter))] -public enum MissingOrder -{ - [EnumMember(Value = "last")] - Last, - [EnumMember(Value = "first")] - First, - [EnumMember(Value = "default")] - Default -} - -internal sealed class MissingOrderConverter : JsonConverter -{ - public override MissingOrder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "last": - return MissingOrder.Last; - case "first": - return MissingOrder.First; - case "default": - return MissingOrder.Default; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, MissingOrder value, JsonSerializerOptions options) - { - switch (value) - { - case MissingOrder.Last: - writer.WriteStringValue("last"); - return; - case MissingOrder.First: - writer.WriteStringValue("first"); - return; - case MissingOrder.Default: - writer.WriteStringValue("default"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(NormalizeMethodConverter))] -public enum NormalizeMethod -{ - /// - /// - /// This method normalizes such that each value represents how far it is from the mean relative to the standard deviation. - /// - /// - [EnumMember(Value = "z-score")] - ZScore, - /// - /// - /// This method normalizes such that each value is exponentiated and relative to the sum of the exponents of the original values. - /// - /// - [EnumMember(Value = "softmax")] - Softmax, - /// - /// - /// This method rescales the data such that the minimum number is 0, and the maximum number is 100, with the rest normalized linearly in-between. - /// - /// - [EnumMember(Value = "rescale_0_100")] - Rescale0100, - /// - /// - /// This method rescales the data such that the minimum number is 0, and the maximum number is 1, with the rest normalized linearly in-between. - /// - /// - [EnumMember(Value = "rescale_0_1")] - Rescale01, - /// - /// - /// This method normalizes each value so that it represents a percentage of the total sum it attributes to. - /// - /// - [EnumMember(Value = "percent_of_sum")] - PercentOfSum, - /// - /// - /// This method normalizes such that each value is normalized by how much it differs from the average. - /// - /// - [EnumMember(Value = "mean")] - Mean -} - -internal sealed class NormalizeMethodConverter : JsonConverter -{ - public override NormalizeMethod Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "z-score": - return NormalizeMethod.ZScore; - case "softmax": - return NormalizeMethod.Softmax; - case "rescale_0_100": - return NormalizeMethod.Rescale0100; - case "rescale_0_1": - return NormalizeMethod.Rescale01; - case "percent_of_sum": - return NormalizeMethod.PercentOfSum; - case "mean": - return NormalizeMethod.Mean; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, NormalizeMethod value, JsonSerializerOptions options) - { - switch (value) - { - case NormalizeMethod.ZScore: - writer.WriteStringValue("z-score"); - return; - case NormalizeMethod.Softmax: - writer.WriteStringValue("softmax"); - return; - case NormalizeMethod.Rescale0100: - writer.WriteStringValue("rescale_0_100"); - return; - case NormalizeMethod.Rescale01: - writer.WriteStringValue("rescale_0_1"); - return; - case NormalizeMethod.PercentOfSum: - writer.WriteStringValue("percent_of_sum"); - return; - case NormalizeMethod.Mean: - writer.WriteStringValue("mean"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(RateModeConverter))] -public enum RateMode -{ - /// - /// - /// Uses the number of values of the field. - /// - /// - [EnumMember(Value = "value_count")] - ValueCount, - /// - /// - /// Calculates the sum of all values of the field. - /// - /// - [EnumMember(Value = "sum")] - Sum -} - -internal sealed class RateModeConverter : JsonConverter -{ - public override RateMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "value_count": - return RateMode.ValueCount; - case "sum": - return RateMode.Sum; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, RateMode value, JsonSerializerOptions options) - { - switch (value) - { - case RateMode.ValueCount: - writer.WriteStringValue("value_count"); - return; - case RateMode.Sum: - writer.WriteStringValue("sum"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SamplerAggregationExecutionHintConverter))] -public enum SamplerAggregationExecutionHint -{ - /// - /// - /// Hold field values directly. - /// - /// - [EnumMember(Value = "map")] - Map, - /// - /// - /// Hold ordinals of the field as determined by the Lucene index. - /// - /// - [EnumMember(Value = "global_ordinals")] - GlobalOrdinals, - /// - /// - /// Hold hashes of the field values - with potential for hash collisions. - /// - /// - [EnumMember(Value = "bytes_hash")] - BytesHash -} - -internal sealed class SamplerAggregationExecutionHintConverter : JsonConverter -{ - public override SamplerAggregationExecutionHint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "map": - return SamplerAggregationExecutionHint.Map; - case "global_ordinals": - return SamplerAggregationExecutionHint.GlobalOrdinals; - case "bytes_hash": - return SamplerAggregationExecutionHint.BytesHash; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SamplerAggregationExecutionHint value, JsonSerializerOptions options) - { - switch (value) - { - case SamplerAggregationExecutionHint.Map: - writer.WriteStringValue("map"); - return; - case SamplerAggregationExecutionHint.GlobalOrdinals: - writer.WriteStringValue("global_ordinals"); - return; - case SamplerAggregationExecutionHint.BytesHash: - writer.WriteStringValue("bytes_hash"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TermsAggregationCollectModeConverter))] -public enum TermsAggregationCollectMode -{ - /// - /// - /// Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs. - /// - /// - [EnumMember(Value = "depth_first")] - DepthFirst, - /// - /// - /// Caches the set of documents that fall into the uppermost buckets for subsequent replay. - /// - /// - [EnumMember(Value = "breadth_first")] - BreadthFirst -} - -internal sealed class TermsAggregationCollectModeConverter : JsonConverter -{ - public override TermsAggregationCollectMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "depth_first": - return TermsAggregationCollectMode.DepthFirst; - case "breadth_first": - return TermsAggregationCollectMode.BreadthFirst; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TermsAggregationCollectMode value, JsonSerializerOptions options) - { - switch (value) - { - case TermsAggregationCollectMode.DepthFirst: - writer.WriteStringValue("depth_first"); - return; - case TermsAggregationCollectMode.BreadthFirst: - writer.WriteStringValue("breadth_first"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TermsAggregationExecutionHintConverter))] -public enum TermsAggregationExecutionHint -{ - [EnumMember(Value = "map")] - Map, - [EnumMember(Value = "global_ordinals_low_cardinality")] - GlobalOrdinalsLowCardinality, - [EnumMember(Value = "global_ordinals_hash")] - GlobalOrdinalsHash, - [EnumMember(Value = "global_ordinals")] - GlobalOrdinals -} - -internal sealed class TermsAggregationExecutionHintConverter : JsonConverter -{ - public override TermsAggregationExecutionHint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "map": - return TermsAggregationExecutionHint.Map; - case "global_ordinals_low_cardinality": - return TermsAggregationExecutionHint.GlobalOrdinalsLowCardinality; - case "global_ordinals_hash": - return TermsAggregationExecutionHint.GlobalOrdinalsHash; - case "global_ordinals": - return TermsAggregationExecutionHint.GlobalOrdinals; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TermsAggregationExecutionHint value, JsonSerializerOptions options) - { - switch (value) - { - case TermsAggregationExecutionHint.Map: - writer.WriteStringValue("map"); - return; - case TermsAggregationExecutionHint.GlobalOrdinalsLowCardinality: - writer.WriteStringValue("global_ordinals_low_cardinality"); - return; - case TermsAggregationExecutionHint.GlobalOrdinalsHash: - writer.WriteStringValue("global_ordinals_hash"); - return; - case TermsAggregationExecutionHint.GlobalOrdinals: - writer.WriteStringValue("global_ordinals"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TTestTypeConverter))] -public enum TTestType -{ - /// - /// - /// Performs paired t-test. - /// - /// - [EnumMember(Value = "paired")] - Paired, - /// - /// - /// Performs two-sample equal variance test. - /// - /// - [EnumMember(Value = "homoscedastic")] - Homoscedastic, - /// - /// - /// Performs two-sample unequal variance test. - /// - /// - [EnumMember(Value = "heteroscedastic")] - Heteroscedastic -} - -internal sealed class TTestTypeConverter : JsonConverter -{ - public override TTestType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "paired": - return TTestType.Paired; - case "homoscedastic": - return TTestType.Homoscedastic; - case "heteroscedastic": - return TTestType.Heteroscedastic; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TTestType value, JsonSerializerOptions options) - { - switch (value) - { - case TTestType.Paired: - writer.WriteStringValue("paired"); - return; - case TTestType.Homoscedastic: - writer.WriteStringValue("homoscedastic"); - return; - case TTestType.Heteroscedastic: - writer.WriteStringValue("heteroscedastic"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ValueTypeConverter))] -public enum ValueType -{ - [EnumMember(Value = "string")] - String, - [EnumMember(Value = "numeric")] - Numeric, - [EnumMember(Value = "number")] - Number, - [EnumMember(Value = "long")] - Long, - [EnumMember(Value = "ip")] - Ip, - [EnumMember(Value = "geo_point")] - GeoPoint, - [EnumMember(Value = "double")] - Double, - [EnumMember(Value = "date_nanos")] - DateNanos, - [EnumMember(Value = "date")] - Date, - [EnumMember(Value = "boolean")] - Boolean -} - -internal sealed class ValueTypeConverter : JsonConverter -{ - public override ValueType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "string": - return ValueType.String; - case "numeric": - return ValueType.Numeric; - case "number": - return ValueType.Number; - case "long": - return ValueType.Long; - case "ip": - return ValueType.Ip; - case "geo_point": - return ValueType.GeoPoint; - case "double": - return ValueType.Double; - case "date_nanos": - return ValueType.DateNanos; - case "date": - return ValueType.Date; - case "boolean": - return ValueType.Boolean; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ValueType value, JsonSerializerOptions options) - { - switch (value) - { - case ValueType.String: - writer.WriteStringValue("string"); - return; - case ValueType.Numeric: - writer.WriteStringValue("numeric"); - return; - case ValueType.Number: - writer.WriteStringValue("number"); - return; - case ValueType.Long: - writer.WriteStringValue("long"); - return; - case ValueType.Ip: - writer.WriteStringValue("ip"); - return; - case ValueType.GeoPoint: - writer.WriteStringValue("geo_point"); - return; - case ValueType.Double: - writer.WriteStringValue("double"); - return; - case ValueType.DateNanos: - writer.WriteStringValue("date_nanos"); - return; - case ValueType.Date: - writer.WriteStringValue("date"); - return; - case ValueType.Boolean: - writer.WriteStringValue("boolean"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Analysis.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Analysis.g.cs deleted file mode 100644 index 3cc97f3f7a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Analysis.g.cs +++ /dev/null @@ -1,1457 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; - -[JsonConverter(typeof(DelimitedPayloadEncodingConverter))] -public enum DelimitedPayloadEncoding -{ - [EnumMember(Value = "int")] - Integer, - [EnumMember(Value = "identity")] - Identity, - [EnumMember(Value = "float")] - Float -} - -internal sealed class DelimitedPayloadEncodingConverter : JsonConverter -{ - public override DelimitedPayloadEncoding Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "int": - return DelimitedPayloadEncoding.Integer; - case "identity": - return DelimitedPayloadEncoding.Identity; - case "float": - return DelimitedPayloadEncoding.Float; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DelimitedPayloadEncoding value, JsonSerializerOptions options) - { - switch (value) - { - case DelimitedPayloadEncoding.Integer: - writer.WriteStringValue("int"); - return; - case DelimitedPayloadEncoding.Identity: - writer.WriteStringValue("identity"); - return; - case DelimitedPayloadEncoding.Float: - writer.WriteStringValue("float"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(EdgeNGramSideConverter))] -public enum EdgeNGramSide -{ - [EnumMember(Value = "front")] - Front, - [EnumMember(Value = "back")] - Back -} - -internal sealed class EdgeNGramSideConverter : JsonConverter -{ - public override EdgeNGramSide Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "front": - return EdgeNGramSide.Front; - case "back": - return EdgeNGramSide.Back; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, EdgeNGramSide value, JsonSerializerOptions options) - { - switch (value) - { - case EdgeNGramSide.Front: - writer.WriteStringValue("front"); - return; - case EdgeNGramSide.Back: - writer.WriteStringValue("back"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuCollationAlternateConverter))] -public enum IcuCollationAlternate -{ - [EnumMember(Value = "shifted")] - Shifted, - [EnumMember(Value = "non-ignorable")] - NonIgnorable -} - -internal sealed class IcuCollationAlternateConverter : JsonConverter -{ - public override IcuCollationAlternate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "shifted": - return IcuCollationAlternate.Shifted; - case "non-ignorable": - return IcuCollationAlternate.NonIgnorable; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuCollationAlternate value, JsonSerializerOptions options) - { - switch (value) - { - case IcuCollationAlternate.Shifted: - writer.WriteStringValue("shifted"); - return; - case IcuCollationAlternate.NonIgnorable: - writer.WriteStringValue("non-ignorable"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuCollationCaseFirstConverter))] -public enum IcuCollationCaseFirst -{ - [EnumMember(Value = "upper")] - Upper, - [EnumMember(Value = "lower")] - Lower -} - -internal sealed class IcuCollationCaseFirstConverter : JsonConverter -{ - public override IcuCollationCaseFirst Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "upper": - return IcuCollationCaseFirst.Upper; - case "lower": - return IcuCollationCaseFirst.Lower; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuCollationCaseFirst value, JsonSerializerOptions options) - { - switch (value) - { - case IcuCollationCaseFirst.Upper: - writer.WriteStringValue("upper"); - return; - case IcuCollationCaseFirst.Lower: - writer.WriteStringValue("lower"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuCollationDecompositionConverter))] -public enum IcuCollationDecomposition -{ - [EnumMember(Value = "no")] - No, - [EnumMember(Value = "identical")] - Identical -} - -internal sealed class IcuCollationDecompositionConverter : JsonConverter -{ - public override IcuCollationDecomposition Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "no": - return IcuCollationDecomposition.No; - case "identical": - return IcuCollationDecomposition.Identical; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuCollationDecomposition value, JsonSerializerOptions options) - { - switch (value) - { - case IcuCollationDecomposition.No: - writer.WriteStringValue("no"); - return; - case IcuCollationDecomposition.Identical: - writer.WriteStringValue("identical"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuCollationStrengthConverter))] -public enum IcuCollationStrength -{ - [EnumMember(Value = "tertiary")] - Tertiary, - [EnumMember(Value = "secondary")] - Secondary, - [EnumMember(Value = "quaternary")] - Quaternary, - [EnumMember(Value = "primary")] - Primary, - [EnumMember(Value = "identical")] - Identical -} - -internal sealed class IcuCollationStrengthConverter : JsonConverter -{ - public override IcuCollationStrength Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "tertiary": - return IcuCollationStrength.Tertiary; - case "secondary": - return IcuCollationStrength.Secondary; - case "quaternary": - return IcuCollationStrength.Quaternary; - case "primary": - return IcuCollationStrength.Primary; - case "identical": - return IcuCollationStrength.Identical; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuCollationStrength value, JsonSerializerOptions options) - { - switch (value) - { - case IcuCollationStrength.Tertiary: - writer.WriteStringValue("tertiary"); - return; - case IcuCollationStrength.Secondary: - writer.WriteStringValue("secondary"); - return; - case IcuCollationStrength.Quaternary: - writer.WriteStringValue("quaternary"); - return; - case IcuCollationStrength.Primary: - writer.WriteStringValue("primary"); - return; - case IcuCollationStrength.Identical: - writer.WriteStringValue("identical"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuNormalizationModeConverter))] -public enum IcuNormalizationMode -{ - [EnumMember(Value = "decompose")] - Decompose, - [EnumMember(Value = "compose")] - Compose -} - -internal sealed class IcuNormalizationModeConverter : JsonConverter -{ - public override IcuNormalizationMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "decompose": - return IcuNormalizationMode.Decompose; - case "compose": - return IcuNormalizationMode.Compose; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuNormalizationMode value, JsonSerializerOptions options) - { - switch (value) - { - case IcuNormalizationMode.Decompose: - writer.WriteStringValue("decompose"); - return; - case IcuNormalizationMode.Compose: - writer.WriteStringValue("compose"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuNormalizationTypeConverter))] -public enum IcuNormalizationType -{ - [EnumMember(Value = "nfkc_cf")] - NfkcCf, - [EnumMember(Value = "nfkc")] - Nfkc, - [EnumMember(Value = "nfc")] - Nfc -} - -internal sealed class IcuNormalizationTypeConverter : JsonConverter -{ - public override IcuNormalizationType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "nfkc_cf": - return IcuNormalizationType.NfkcCf; - case "nfkc": - return IcuNormalizationType.Nfkc; - case "nfc": - return IcuNormalizationType.Nfc; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuNormalizationType value, JsonSerializerOptions options) - { - switch (value) - { - case IcuNormalizationType.NfkcCf: - writer.WriteStringValue("nfkc_cf"); - return; - case IcuNormalizationType.Nfkc: - writer.WriteStringValue("nfkc"); - return; - case IcuNormalizationType.Nfc: - writer.WriteStringValue("nfc"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IcuTransformDirectionConverter))] -public enum IcuTransformDirection -{ - [EnumMember(Value = "reverse")] - Reverse, - [EnumMember(Value = "forward")] - Forward -} - -internal sealed class IcuTransformDirectionConverter : JsonConverter -{ - public override IcuTransformDirection Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "reverse": - return IcuTransformDirection.Reverse; - case "forward": - return IcuTransformDirection.Forward; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IcuTransformDirection value, JsonSerializerOptions options) - { - switch (value) - { - case IcuTransformDirection.Reverse: - writer.WriteStringValue("reverse"); - return; - case IcuTransformDirection.Forward: - writer.WriteStringValue("forward"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(KeepTypesModeConverter))] -public enum KeepTypesMode -{ - [EnumMember(Value = "include")] - Include, - [EnumMember(Value = "exclude")] - Exclude -} - -internal sealed class KeepTypesModeConverter : JsonConverter -{ - public override KeepTypesMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "include": - return KeepTypesMode.Include; - case "exclude": - return KeepTypesMode.Exclude; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, KeepTypesMode value, JsonSerializerOptions options) - { - switch (value) - { - case KeepTypesMode.Include: - writer.WriteStringValue("include"); - return; - case KeepTypesMode.Exclude: - writer.WriteStringValue("exclude"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(KuromojiTokenizationModeConverter))] -public enum KuromojiTokenizationMode -{ - [EnumMember(Value = "search")] - Search, - [EnumMember(Value = "normal")] - Normal, - [EnumMember(Value = "extended")] - Extended -} - -internal sealed class KuromojiTokenizationModeConverter : JsonConverter -{ - public override KuromojiTokenizationMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "search": - return KuromojiTokenizationMode.Search; - case "normal": - return KuromojiTokenizationMode.Normal; - case "extended": - return KuromojiTokenizationMode.Extended; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, KuromojiTokenizationMode value, JsonSerializerOptions options) - { - switch (value) - { - case KuromojiTokenizationMode.Search: - writer.WriteStringValue("search"); - return; - case KuromojiTokenizationMode.Normal: - writer.WriteStringValue("normal"); - return; - case KuromojiTokenizationMode.Extended: - writer.WriteStringValue("extended"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(LanguageConverter))] -public enum Language -{ - [EnumMember(Value = "Turkish")] - Turkish, - [EnumMember(Value = "Thai")] - Thai, - [EnumMember(Value = "Swedish")] - Swedish, - [EnumMember(Value = "Spanish")] - Spanish, - [EnumMember(Value = "Sorani")] - Sorani, - [EnumMember(Value = "Russian")] - Russian, - [EnumMember(Value = "Romanian")] - Romanian, - [EnumMember(Value = "Portuguese")] - Portuguese, - [EnumMember(Value = "Persian")] - Persian, - [EnumMember(Value = "Norwegian")] - Norwegian, - [EnumMember(Value = "Latvian")] - Latvian, - [EnumMember(Value = "Italian")] - Italian, - [EnumMember(Value = "Irish")] - Irish, - [EnumMember(Value = "Indonesian")] - Indonesian, - [EnumMember(Value = "Hungarian")] - Hungarian, - [EnumMember(Value = "Hindi")] - Hindi, - [EnumMember(Value = "Greek")] - Greek, - [EnumMember(Value = "German")] - German, - [EnumMember(Value = "Galician")] - Galician, - [EnumMember(Value = "French")] - French, - [EnumMember(Value = "Finnish")] - Finnish, - [EnumMember(Value = "Estonian")] - Estonian, - [EnumMember(Value = "English")] - English, - [EnumMember(Value = "Dutch")] - Dutch, - [EnumMember(Value = "Danish")] - Danish, - [EnumMember(Value = "Czech")] - Czech, - [EnumMember(Value = "Cjk")] - Cjk, - [EnumMember(Value = "Chinese")] - Chinese, - [EnumMember(Value = "Catalan")] - Catalan, - [EnumMember(Value = "Bulgarian")] - Bulgarian, - [EnumMember(Value = "Brazilian")] - Brazilian, - [EnumMember(Value = "Basque")] - Basque, - [EnumMember(Value = "Armenian")] - Armenian, - [EnumMember(Value = "Arabic")] - Arabic -} - -internal sealed class LanguageConverter : JsonConverter -{ - public override Language Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "Turkish": - return Language.Turkish; - case "Thai": - return Language.Thai; - case "Swedish": - return Language.Swedish; - case "Spanish": - return Language.Spanish; - case "Sorani": - return Language.Sorani; - case "Russian": - return Language.Russian; - case "Romanian": - return Language.Romanian; - case "Portuguese": - return Language.Portuguese; - case "Persian": - return Language.Persian; - case "Norwegian": - return Language.Norwegian; - case "Latvian": - return Language.Latvian; - case "Italian": - return Language.Italian; - case "Irish": - return Language.Irish; - case "Indonesian": - return Language.Indonesian; - case "Hungarian": - return Language.Hungarian; - case "Hindi": - return Language.Hindi; - case "Greek": - return Language.Greek; - case "German": - return Language.German; - case "Galician": - return Language.Galician; - case "French": - return Language.French; - case "Finnish": - return Language.Finnish; - case "Estonian": - return Language.Estonian; - case "English": - return Language.English; - case "Dutch": - return Language.Dutch; - case "Danish": - return Language.Danish; - case "Czech": - return Language.Czech; - case "Cjk": - return Language.Cjk; - case "Chinese": - return Language.Chinese; - case "Catalan": - return Language.Catalan; - case "Bulgarian": - return Language.Bulgarian; - case "Brazilian": - return Language.Brazilian; - case "Basque": - return Language.Basque; - case "Armenian": - return Language.Armenian; - case "Arabic": - return Language.Arabic; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Language value, JsonSerializerOptions options) - { - switch (value) - { - case Language.Turkish: - writer.WriteStringValue("Turkish"); - return; - case Language.Thai: - writer.WriteStringValue("Thai"); - return; - case Language.Swedish: - writer.WriteStringValue("Swedish"); - return; - case Language.Spanish: - writer.WriteStringValue("Spanish"); - return; - case Language.Sorani: - writer.WriteStringValue("Sorani"); - return; - case Language.Russian: - writer.WriteStringValue("Russian"); - return; - case Language.Romanian: - writer.WriteStringValue("Romanian"); - return; - case Language.Portuguese: - writer.WriteStringValue("Portuguese"); - return; - case Language.Persian: - writer.WriteStringValue("Persian"); - return; - case Language.Norwegian: - writer.WriteStringValue("Norwegian"); - return; - case Language.Latvian: - writer.WriteStringValue("Latvian"); - return; - case Language.Italian: - writer.WriteStringValue("Italian"); - return; - case Language.Irish: - writer.WriteStringValue("Irish"); - return; - case Language.Indonesian: - writer.WriteStringValue("Indonesian"); - return; - case Language.Hungarian: - writer.WriteStringValue("Hungarian"); - return; - case Language.Hindi: - writer.WriteStringValue("Hindi"); - return; - case Language.Greek: - writer.WriteStringValue("Greek"); - return; - case Language.German: - writer.WriteStringValue("German"); - return; - case Language.Galician: - writer.WriteStringValue("Galician"); - return; - case Language.French: - writer.WriteStringValue("French"); - return; - case Language.Finnish: - writer.WriteStringValue("Finnish"); - return; - case Language.Estonian: - writer.WriteStringValue("Estonian"); - return; - case Language.English: - writer.WriteStringValue("English"); - return; - case Language.Dutch: - writer.WriteStringValue("Dutch"); - return; - case Language.Danish: - writer.WriteStringValue("Danish"); - return; - case Language.Czech: - writer.WriteStringValue("Czech"); - return; - case Language.Cjk: - writer.WriteStringValue("Cjk"); - return; - case Language.Chinese: - writer.WriteStringValue("Chinese"); - return; - case Language.Catalan: - writer.WriteStringValue("Catalan"); - return; - case Language.Bulgarian: - writer.WriteStringValue("Bulgarian"); - return; - case Language.Brazilian: - writer.WriteStringValue("Brazilian"); - return; - case Language.Basque: - writer.WriteStringValue("Basque"); - return; - case Language.Armenian: - writer.WriteStringValue("Armenian"); - return; - case Language.Arabic: - writer.WriteStringValue("Arabic"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(NoriDecompoundModeConverter))] -public enum NoriDecompoundMode -{ - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "mixed")] - Mixed, - [EnumMember(Value = "discard")] - Discard -} - -internal sealed class NoriDecompoundModeConverter : JsonConverter -{ - public override NoriDecompoundMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "none": - return NoriDecompoundMode.None; - case "mixed": - return NoriDecompoundMode.Mixed; - case "discard": - return NoriDecompoundMode.Discard; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, NoriDecompoundMode value, JsonSerializerOptions options) - { - switch (value) - { - case NoriDecompoundMode.None: - writer.WriteStringValue("none"); - return; - case NoriDecompoundMode.Mixed: - writer.WriteStringValue("mixed"); - return; - case NoriDecompoundMode.Discard: - writer.WriteStringValue("discard"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(PhoneticEncoderConverter))] -public enum PhoneticEncoder -{ - [EnumMember(Value = "soundex")] - Soundex, - [EnumMember(Value = "refined_soundex")] - RefinedSoundex, - [EnumMember(Value = "nysiis")] - Nysiis, - [EnumMember(Value = "metaphone")] - Metaphone, - [EnumMember(Value = "koelnerphonetik")] - Koelnerphonetik, - [EnumMember(Value = "haasephonetik")] - Haasephonetik, - [EnumMember(Value = "double_metaphone")] - DoubleMetaphone, - [EnumMember(Value = "daitch_mokotoff")] - DaitchMokotoff, - [EnumMember(Value = "cologne")] - Cologne, - [EnumMember(Value = "caverphone2")] - Caverphone2, - [EnumMember(Value = "caverphone1")] - Caverphone1, - [EnumMember(Value = "beider_morse")] - BeiderMorse -} - -internal sealed class PhoneticEncoderConverter : JsonConverter -{ - public override PhoneticEncoder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "soundex": - return PhoneticEncoder.Soundex; - case "refined_soundex": - return PhoneticEncoder.RefinedSoundex; - case "nysiis": - return PhoneticEncoder.Nysiis; - case "metaphone": - return PhoneticEncoder.Metaphone; - case "koelnerphonetik": - return PhoneticEncoder.Koelnerphonetik; - case "haasephonetik": - return PhoneticEncoder.Haasephonetik; - case "double_metaphone": - return PhoneticEncoder.DoubleMetaphone; - case "daitch_mokotoff": - return PhoneticEncoder.DaitchMokotoff; - case "cologne": - return PhoneticEncoder.Cologne; - case "caverphone2": - return PhoneticEncoder.Caverphone2; - case "caverphone1": - return PhoneticEncoder.Caverphone1; - case "beider_morse": - return PhoneticEncoder.BeiderMorse; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, PhoneticEncoder value, JsonSerializerOptions options) - { - switch (value) - { - case PhoneticEncoder.Soundex: - writer.WriteStringValue("soundex"); - return; - case PhoneticEncoder.RefinedSoundex: - writer.WriteStringValue("refined_soundex"); - return; - case PhoneticEncoder.Nysiis: - writer.WriteStringValue("nysiis"); - return; - case PhoneticEncoder.Metaphone: - writer.WriteStringValue("metaphone"); - return; - case PhoneticEncoder.Koelnerphonetik: - writer.WriteStringValue("koelnerphonetik"); - return; - case PhoneticEncoder.Haasephonetik: - writer.WriteStringValue("haasephonetik"); - return; - case PhoneticEncoder.DoubleMetaphone: - writer.WriteStringValue("double_metaphone"); - return; - case PhoneticEncoder.DaitchMokotoff: - writer.WriteStringValue("daitch_mokotoff"); - return; - case PhoneticEncoder.Cologne: - writer.WriteStringValue("cologne"); - return; - case PhoneticEncoder.Caverphone2: - writer.WriteStringValue("caverphone2"); - return; - case PhoneticEncoder.Caverphone1: - writer.WriteStringValue("caverphone1"); - return; - case PhoneticEncoder.BeiderMorse: - writer.WriteStringValue("beider_morse"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(PhoneticLanguageConverter))] -public enum PhoneticLanguage -{ - [EnumMember(Value = "spanish")] - Spanish, - [EnumMember(Value = "russian")] - Russian, - [EnumMember(Value = "romanian")] - Romanian, - [EnumMember(Value = "polish")] - Polish, - [EnumMember(Value = "hungarian")] - Hungarian, - [EnumMember(Value = "hebrew")] - Hebrew, - [EnumMember(Value = "german")] - German, - [EnumMember(Value = "french")] - French, - [EnumMember(Value = "english")] - English, - [EnumMember(Value = "cyrillic")] - Cyrillic, - [EnumMember(Value = "common")] - Common, - [EnumMember(Value = "any")] - Any -} - -internal sealed class PhoneticLanguageConverter : JsonConverter -{ - public override PhoneticLanguage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "spanish": - return PhoneticLanguage.Spanish; - case "russian": - return PhoneticLanguage.Russian; - case "romanian": - return PhoneticLanguage.Romanian; - case "polish": - return PhoneticLanguage.Polish; - case "hungarian": - return PhoneticLanguage.Hungarian; - case "hebrew": - return PhoneticLanguage.Hebrew; - case "german": - return PhoneticLanguage.German; - case "french": - return PhoneticLanguage.French; - case "english": - return PhoneticLanguage.English; - case "cyrillic": - return PhoneticLanguage.Cyrillic; - case "common": - return PhoneticLanguage.Common; - case "any": - return PhoneticLanguage.Any; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, PhoneticLanguage value, JsonSerializerOptions options) - { - switch (value) - { - case PhoneticLanguage.Spanish: - writer.WriteStringValue("spanish"); - return; - case PhoneticLanguage.Russian: - writer.WriteStringValue("russian"); - return; - case PhoneticLanguage.Romanian: - writer.WriteStringValue("romanian"); - return; - case PhoneticLanguage.Polish: - writer.WriteStringValue("polish"); - return; - case PhoneticLanguage.Hungarian: - writer.WriteStringValue("hungarian"); - return; - case PhoneticLanguage.Hebrew: - writer.WriteStringValue("hebrew"); - return; - case PhoneticLanguage.German: - writer.WriteStringValue("german"); - return; - case PhoneticLanguage.French: - writer.WriteStringValue("french"); - return; - case PhoneticLanguage.English: - writer.WriteStringValue("english"); - return; - case PhoneticLanguage.Cyrillic: - writer.WriteStringValue("cyrillic"); - return; - case PhoneticLanguage.Common: - writer.WriteStringValue("common"); - return; - case PhoneticLanguage.Any: - writer.WriteStringValue("any"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(PhoneticNameTypeConverter))] -public enum PhoneticNameType -{ - [EnumMember(Value = "sephardic")] - Sephardic, - [EnumMember(Value = "generic")] - Generic, - [EnumMember(Value = "ashkenazi")] - Ashkenazi -} - -internal sealed class PhoneticNameTypeConverter : JsonConverter -{ - public override PhoneticNameType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "sephardic": - return PhoneticNameType.Sephardic; - case "generic": - return PhoneticNameType.Generic; - case "ashkenazi": - return PhoneticNameType.Ashkenazi; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, PhoneticNameType value, JsonSerializerOptions options) - { - switch (value) - { - case PhoneticNameType.Sephardic: - writer.WriteStringValue("sephardic"); - return; - case PhoneticNameType.Generic: - writer.WriteStringValue("generic"); - return; - case PhoneticNameType.Ashkenazi: - writer.WriteStringValue("ashkenazi"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(PhoneticRuleTypeConverter))] -public enum PhoneticRuleType -{ - [EnumMember(Value = "exact")] - Exact, - [EnumMember(Value = "approx")] - Approx -} - -internal sealed class PhoneticRuleTypeConverter : JsonConverter -{ - public override PhoneticRuleType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "exact": - return PhoneticRuleType.Exact; - case "approx": - return PhoneticRuleType.Approx; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, PhoneticRuleType value, JsonSerializerOptions options) - { - switch (value) - { - case PhoneticRuleType.Exact: - writer.WriteStringValue("exact"); - return; - case PhoneticRuleType.Approx: - writer.WriteStringValue("approx"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SnowballLanguageConverter))] -public enum SnowballLanguage -{ - [EnumMember(Value = "Turkish")] - Turkish, - [EnumMember(Value = "Swedish")] - Swedish, - [EnumMember(Value = "Spanish")] - Spanish, - [EnumMember(Value = "Russian")] - Russian, - [EnumMember(Value = "Romanian")] - Romanian, - [EnumMember(Value = "Portuguese")] - Portuguese, - [EnumMember(Value = "Porter")] - Porter, - [EnumMember(Value = "Norwegian")] - Norwegian, - [EnumMember(Value = "Lovins")] - Lovins, - [EnumMember(Value = "Kp")] - Kp, - [EnumMember(Value = "Italian")] - Italian, - [EnumMember(Value = "Hungarian")] - Hungarian, - [EnumMember(Value = "German2")] - German2, - [EnumMember(Value = "German")] - German, - [EnumMember(Value = "French")] - French, - [EnumMember(Value = "Finnish")] - Finnish, - [EnumMember(Value = "English")] - English, - [EnumMember(Value = "Dutch")] - Dutch, - [EnumMember(Value = "Danish")] - Danish, - [EnumMember(Value = "Catalan")] - Catalan, - [EnumMember(Value = "Basque")] - Basque, - [EnumMember(Value = "Armenian")] - Armenian -} - -internal sealed class SnowballLanguageConverter : JsonConverter -{ - public override SnowballLanguage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "Turkish": - return SnowballLanguage.Turkish; - case "Swedish": - return SnowballLanguage.Swedish; - case "Spanish": - return SnowballLanguage.Spanish; - case "Russian": - return SnowballLanguage.Russian; - case "Romanian": - return SnowballLanguage.Romanian; - case "Portuguese": - return SnowballLanguage.Portuguese; - case "Porter": - return SnowballLanguage.Porter; - case "Norwegian": - return SnowballLanguage.Norwegian; - case "Lovins": - return SnowballLanguage.Lovins; - case "Kp": - return SnowballLanguage.Kp; - case "Italian": - return SnowballLanguage.Italian; - case "Hungarian": - return SnowballLanguage.Hungarian; - case "German2": - return SnowballLanguage.German2; - case "German": - return SnowballLanguage.German; - case "French": - return SnowballLanguage.French; - case "Finnish": - return SnowballLanguage.Finnish; - case "English": - return SnowballLanguage.English; - case "Dutch": - return SnowballLanguage.Dutch; - case "Danish": - return SnowballLanguage.Danish; - case "Catalan": - return SnowballLanguage.Catalan; - case "Basque": - return SnowballLanguage.Basque; - case "Armenian": - return SnowballLanguage.Armenian; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SnowballLanguage value, JsonSerializerOptions options) - { - switch (value) - { - case SnowballLanguage.Turkish: - writer.WriteStringValue("Turkish"); - return; - case SnowballLanguage.Swedish: - writer.WriteStringValue("Swedish"); - return; - case SnowballLanguage.Spanish: - writer.WriteStringValue("Spanish"); - return; - case SnowballLanguage.Russian: - writer.WriteStringValue("Russian"); - return; - case SnowballLanguage.Romanian: - writer.WriteStringValue("Romanian"); - return; - case SnowballLanguage.Portuguese: - writer.WriteStringValue("Portuguese"); - return; - case SnowballLanguage.Porter: - writer.WriteStringValue("Porter"); - return; - case SnowballLanguage.Norwegian: - writer.WriteStringValue("Norwegian"); - return; - case SnowballLanguage.Lovins: - writer.WriteStringValue("Lovins"); - return; - case SnowballLanguage.Kp: - writer.WriteStringValue("Kp"); - return; - case SnowballLanguage.Italian: - writer.WriteStringValue("Italian"); - return; - case SnowballLanguage.Hungarian: - writer.WriteStringValue("Hungarian"); - return; - case SnowballLanguage.German2: - writer.WriteStringValue("German2"); - return; - case SnowballLanguage.German: - writer.WriteStringValue("German"); - return; - case SnowballLanguage.French: - writer.WriteStringValue("French"); - return; - case SnowballLanguage.Finnish: - writer.WriteStringValue("Finnish"); - return; - case SnowballLanguage.English: - writer.WriteStringValue("English"); - return; - case SnowballLanguage.Dutch: - writer.WriteStringValue("Dutch"); - return; - case SnowballLanguage.Danish: - writer.WriteStringValue("Danish"); - return; - case SnowballLanguage.Catalan: - writer.WriteStringValue("Catalan"); - return; - case SnowballLanguage.Basque: - writer.WriteStringValue("Basque"); - return; - case SnowballLanguage.Armenian: - writer.WriteStringValue("Armenian"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SynonymFormatConverter))] -public enum SynonymFormat -{ - [EnumMember(Value = "wordnet")] - Wordnet, - [EnumMember(Value = "solr")] - Solr -} - -internal sealed class SynonymFormatConverter : JsonConverter -{ - public override SynonymFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "wordnet": - return SynonymFormat.Wordnet; - case "solr": - return SynonymFormat.Solr; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SynonymFormat value, JsonSerializerOptions options) - { - switch (value) - { - case SynonymFormat.Wordnet: - writer.WriteStringValue("wordnet"); - return; - case SynonymFormat.Solr: - writer.WriteStringValue("solr"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TokenCharConverter))] -public enum TokenChar -{ - [EnumMember(Value = "whitespace")] - Whitespace, - [EnumMember(Value = "symbol")] - Symbol, - [EnumMember(Value = "punctuation")] - Punctuation, - [EnumMember(Value = "letter")] - Letter, - [EnumMember(Value = "digit")] - Digit, - [EnumMember(Value = "custom")] - Custom -} - -internal sealed class TokenCharConverter : JsonConverter -{ - public override TokenChar Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "whitespace": - return TokenChar.Whitespace; - case "symbol": - return TokenChar.Symbol; - case "punctuation": - return TokenChar.Punctuation; - case "letter": - return TokenChar.Letter; - case "digit": - return TokenChar.Digit; - case "custom": - return TokenChar.Custom; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TokenChar value, JsonSerializerOptions options) - { - switch (value) - { - case TokenChar.Whitespace: - writer.WriteStringValue("whitespace"); - return; - case TokenChar.Symbol: - writer.WriteStringValue("symbol"); - return; - case TokenChar.Punctuation: - writer.WriteStringValue("punctuation"); - return; - case TokenChar.Letter: - writer.WriteStringValue("letter"); - return; - case TokenChar.Digit: - writer.WriteStringValue("digit"); - return; - case TokenChar.Custom: - writer.WriteStringValue("custom"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Cluster.g.cs deleted file mode 100644 index 3f580204a26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Cluster.g.cs +++ /dev/null @@ -1,302 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; - -[JsonConverter(typeof(AllocationExplainDecisionConverter))] -public enum AllocationExplainDecision -{ - [EnumMember(Value = "YES")] - Yes, - [EnumMember(Value = "THROTTLE")] - Throttle, - [EnumMember(Value = "NO")] - No, - [EnumMember(Value = "ALWAYS")] - Always -} - -internal sealed class AllocationExplainDecisionConverter : JsonConverter -{ - public override AllocationExplainDecision Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "YES": - return AllocationExplainDecision.Yes; - case "THROTTLE": - return AllocationExplainDecision.Throttle; - case "NO": - return AllocationExplainDecision.No; - case "ALWAYS": - return AllocationExplainDecision.Always; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, AllocationExplainDecision value, JsonSerializerOptions options) - { - switch (value) - { - case AllocationExplainDecision.Yes: - writer.WriteStringValue("YES"); - return; - case AllocationExplainDecision.Throttle: - writer.WriteStringValue("THROTTLE"); - return; - case AllocationExplainDecision.No: - writer.WriteStringValue("NO"); - return; - case AllocationExplainDecision.Always: - writer.WriteStringValue("ALWAYS"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DecisionConverter))] -public enum Decision -{ - [EnumMember(Value = "yes")] - Yes, - [EnumMember(Value = "worse_balance")] - WorseBalance, - [EnumMember(Value = "throttled")] - Throttled, - [EnumMember(Value = "no_valid_shard_copy")] - NoValidShardCopy, - [EnumMember(Value = "no_attempt")] - NoAttempt, - [EnumMember(Value = "no")] - No, - [EnumMember(Value = "awaiting_info")] - AwaitingInfo, - [EnumMember(Value = "allocation_delayed")] - AllocationDelayed -} - -internal sealed class DecisionConverter : JsonConverter -{ - public override Decision Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yes": - return Decision.Yes; - case "worse_balance": - return Decision.WorseBalance; - case "throttled": - return Decision.Throttled; - case "no_valid_shard_copy": - return Decision.NoValidShardCopy; - case "no_attempt": - return Decision.NoAttempt; - case "no": - return Decision.No; - case "awaiting_info": - return Decision.AwaitingInfo; - case "allocation_delayed": - return Decision.AllocationDelayed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Decision value, JsonSerializerOptions options) - { - switch (value) - { - case Decision.Yes: - writer.WriteStringValue("yes"); - return; - case Decision.WorseBalance: - writer.WriteStringValue("worse_balance"); - return; - case Decision.Throttled: - writer.WriteStringValue("throttled"); - return; - case Decision.NoValidShardCopy: - writer.WriteStringValue("no_valid_shard_copy"); - return; - case Decision.NoAttempt: - writer.WriteStringValue("no_attempt"); - return; - case Decision.No: - writer.WriteStringValue("no"); - return; - case Decision.AwaitingInfo: - writer.WriteStringValue("awaiting_info"); - return; - case Decision.AllocationDelayed: - writer.WriteStringValue("allocation_delayed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(UnassignedInformationReasonConverter))] -public enum UnassignedInformationReason -{ - [EnumMember(Value = "REROUTE_CANCELLED")] - RerouteCancelled, - [EnumMember(Value = "REPLICA_ADDED")] - ReplicaAdded, - [EnumMember(Value = "REINITIALIZED")] - Reinitialized, - [EnumMember(Value = "REALLOCATED_REPLICA")] - ReallocatedReplica, - [EnumMember(Value = "PRIMARY_FAILED")] - PrimaryFailed, - [EnumMember(Value = "NODE_LEFT")] - NodeLeft, - [EnumMember(Value = "NEW_INDEX_RESTORED")] - NewIndexRestored, - [EnumMember(Value = "MANUAL_ALLOCATION")] - ManualAllocation, - [EnumMember(Value = "INDEX_REOPENED")] - IndexReopened, - [EnumMember(Value = "INDEX_CREATED")] - IndexCreated, - [EnumMember(Value = "FORCED_EMPTY_PRIMARY")] - ForcedEmptyPrimary, - [EnumMember(Value = "EXISTING_INDEX_RESTORED")] - ExistingIndexRestored, - [EnumMember(Value = "DANGLING_INDEX_IMPORTED")] - DanglingIndexImported, - [EnumMember(Value = "CLUSTER_RECOVERED")] - ClusterRecovered, - [EnumMember(Value = "ALLOCATION_FAILED")] - AllocationFailed -} - -internal sealed class UnassignedInformationReasonConverter : JsonConverter -{ - public override UnassignedInformationReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "REROUTE_CANCELLED": - return UnassignedInformationReason.RerouteCancelled; - case "REPLICA_ADDED": - return UnassignedInformationReason.ReplicaAdded; - case "REINITIALIZED": - return UnassignedInformationReason.Reinitialized; - case "REALLOCATED_REPLICA": - return UnassignedInformationReason.ReallocatedReplica; - case "PRIMARY_FAILED": - return UnassignedInformationReason.PrimaryFailed; - case "NODE_LEFT": - return UnassignedInformationReason.NodeLeft; - case "NEW_INDEX_RESTORED": - return UnassignedInformationReason.NewIndexRestored; - case "MANUAL_ALLOCATION": - return UnassignedInformationReason.ManualAllocation; - case "INDEX_REOPENED": - return UnassignedInformationReason.IndexReopened; - case "INDEX_CREATED": - return UnassignedInformationReason.IndexCreated; - case "FORCED_EMPTY_PRIMARY": - return UnassignedInformationReason.ForcedEmptyPrimary; - case "EXISTING_INDEX_RESTORED": - return UnassignedInformationReason.ExistingIndexRestored; - case "DANGLING_INDEX_IMPORTED": - return UnassignedInformationReason.DanglingIndexImported; - case "CLUSTER_RECOVERED": - return UnassignedInformationReason.ClusterRecovered; - case "ALLOCATION_FAILED": - return UnassignedInformationReason.AllocationFailed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, UnassignedInformationReason value, JsonSerializerOptions options) - { - switch (value) - { - case UnassignedInformationReason.RerouteCancelled: - writer.WriteStringValue("REROUTE_CANCELLED"); - return; - case UnassignedInformationReason.ReplicaAdded: - writer.WriteStringValue("REPLICA_ADDED"); - return; - case UnassignedInformationReason.Reinitialized: - writer.WriteStringValue("REINITIALIZED"); - return; - case UnassignedInformationReason.ReallocatedReplica: - writer.WriteStringValue("REALLOCATED_REPLICA"); - return; - case UnassignedInformationReason.PrimaryFailed: - writer.WriteStringValue("PRIMARY_FAILED"); - return; - case UnassignedInformationReason.NodeLeft: - writer.WriteStringValue("NODE_LEFT"); - return; - case UnassignedInformationReason.NewIndexRestored: - writer.WriteStringValue("NEW_INDEX_RESTORED"); - return; - case UnassignedInformationReason.ManualAllocation: - writer.WriteStringValue("MANUAL_ALLOCATION"); - return; - case UnassignedInformationReason.IndexReopened: - writer.WriteStringValue("INDEX_REOPENED"); - return; - case UnassignedInformationReason.IndexCreated: - writer.WriteStringValue("INDEX_CREATED"); - return; - case UnassignedInformationReason.ForcedEmptyPrimary: - writer.WriteStringValue("FORCED_EMPTY_PRIMARY"); - return; - case UnassignedInformationReason.ExistingIndexRestored: - writer.WriteStringValue("EXISTING_INDEX_RESTORED"); - return; - case UnassignedInformationReason.DanglingIndexImported: - writer.WriteStringValue("DANGLING_INDEX_IMPORTED"); - return; - case UnassignedInformationReason.ClusterRecovered: - writer.WriteStringValue("CLUSTER_RECOVERED"); - return; - case UnassignedInformationReason.AllocationFailed: - writer.WriteStringValue("ALLOCATION_FAILED"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs deleted file mode 100644 index 8752f1368d9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.HealthReport.g.cs +++ /dev/null @@ -1,141 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.HealthReport; - -[JsonConverter(typeof(ImpactAreaConverter))] -public enum ImpactArea -{ - [EnumMember(Value = "search")] - Search, - [EnumMember(Value = "ingest")] - Ingest, - [EnumMember(Value = "deployment_management")] - DeploymentManagement, - [EnumMember(Value = "backup")] - Backup -} - -internal sealed class ImpactAreaConverter : JsonConverter -{ - public override ImpactArea Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "search": - return ImpactArea.Search; - case "ingest": - return ImpactArea.Ingest; - case "deployment_management": - return ImpactArea.DeploymentManagement; - case "backup": - return ImpactArea.Backup; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ImpactArea value, JsonSerializerOptions options) - { - switch (value) - { - case ImpactArea.Search: - writer.WriteStringValue("search"); - return; - case ImpactArea.Ingest: - writer.WriteStringValue("ingest"); - return; - case ImpactArea.DeploymentManagement: - writer.WriteStringValue("deployment_management"); - return; - case ImpactArea.Backup: - writer.WriteStringValue("backup"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IndicatorHealthStatusConverter))] -public enum IndicatorHealthStatus -{ - [EnumMember(Value = "yellow")] - Yellow, - [EnumMember(Value = "unknown")] - Unknown, - [EnumMember(Value = "red")] - Red, - [EnumMember(Value = "green")] - Green -} - -internal sealed class IndicatorHealthStatusConverter : JsonConverter -{ - public override IndicatorHealthStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yellow": - return IndicatorHealthStatus.Yellow; - case "unknown": - return IndicatorHealthStatus.Unknown; - case "red": - return IndicatorHealthStatus.Red; - case "green": - return IndicatorHealthStatus.Green; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IndicatorHealthStatus value, JsonSerializerOptions options) - { - switch (value) - { - case IndicatorHealthStatus.Yellow: - writer.WriteStringValue("yellow"); - return; - case IndicatorHealthStatus.Unknown: - writer.WriteStringValue("unknown"); - return; - case IndicatorHealthStatus.Red: - writer.WriteStringValue("red"); - return; - case IndicatorHealthStatus.Green: - writer.WriteStringValue("green"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.Search.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.Search.g.cs deleted file mode 100644 index 733910adc3f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.Search.g.cs +++ /dev/null @@ -1,577 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; - -[JsonConverter(typeof(BoundaryScannerConverter))] -public enum BoundaryScanner -{ - /// - /// - /// Break highlighted fragments at the next word boundary, as determined by Java’s BreakIterator. - /// You can specify the locale to use with boundary_scanner_locale. - /// - /// - [EnumMember(Value = "word")] - Word, - /// - /// - /// Break highlighted fragments at the next sentence boundary, as determined by Java’s BreakIterator. - /// You can specify the locale to use with boundary_scanner_locale. - /// When used with the unified highlighter, the sentence scanner splits sentences bigger than fragment_size at the first word boundary next to fragment_size. - /// You can set fragment_size to 0 to never split any sentence. - /// - /// - [EnumMember(Value = "sentence")] - Sentence, - /// - /// - /// Use the characters specified by boundary_chars as highlighting boundaries. - /// The boundary_max_scan setting controls how far to scan for boundary characters. - /// Only valid for the fvh highlighter. - /// - /// - [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 : IEnumStruct -{ - public HighlighterType(string value) => Value = value; - - HighlighterType IEnumStruct.Create(string value) => value; - - public readonly string Value { get; } - - /// - /// - /// The unified highlighter uses the Lucene Unified Highlighter. - /// - /// - public static HighlighterType Unified { get; } = new HighlighterType("unified"); - - /// - /// - /// The plain highlighter uses the standard Lucene highlighter - /// - /// - public static HighlighterType Plain { get; } = new HighlighterType("plain"); - - /// - /// - /// The fvh highlighter uses the Lucene Fast Vector highlighter. - /// - /// - 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 -{ - /// - /// - /// Add the original score and the rescore query score. - /// - /// - [EnumMember(Value = "total")] - Total, - /// - /// - /// Multiply the original score by the rescore query score. - /// Useful for function query rescores. - /// - /// - [EnumMember(Value = "multiply")] - Multiply, - /// - /// - /// Take the min of the original score and the rescore query score. - /// - /// - [EnumMember(Value = "min")] - Min, - /// - /// - /// Take the max of original score and the rescore query score. - /// - /// - [EnumMember(Value = "max")] - Max, - /// - /// - /// Average the original score and the rescore query score. - /// - /// - [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 -{ - /// - /// - /// String distance algorithm based on character n-grams. - /// - /// - [EnumMember(Value = "ngram")] - Ngram, - /// - /// - /// String distance algorithm based on the Levenshtein edit distance algorithm. - /// - /// - [EnumMember(Value = "levenshtein")] - Levenshtein, - /// - /// - /// String distance algorithm based on Jaro-Winkler algorithm. - /// - /// - [EnumMember(Value = "jaro_winkler")] - JaroWinkler, - /// - /// - /// Based on the Damerau-Levenshtein algorithm, but highly optimized for comparing string distance for terms inside the index. - /// - /// - [EnumMember(Value = "internal")] - Internal, - /// - /// - /// String distance algorithm based on Damerau-Levenshtein algorithm. - /// - /// - [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 -{ - /// - /// - /// Sort by score first, then document frequency and then the term itself. - /// - /// - [EnumMember(Value = "score")] - Score, - /// - /// - /// Sort by document frequency first, then similarity score and then the term itself. - /// - /// - [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 -{ - /// - /// - /// Lower bound, including returned events or sequences - /// - /// - [EnumMember(Value = "gte")] - Gte, - /// - /// - /// Accurate - /// - /// - [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.Serverless/_Generated/Types/Enums/Enums.Core.SearchMvt.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.SearchMvt.g.cs deleted file mode 100644 index 9570d6fe1ff..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Core.SearchMvt.g.cs +++ /dev/null @@ -1,120 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Core.SearchMvt; - -[JsonConverter(typeof(GridAggregationTypeConverter))] -public enum GridAggregationType -{ - [EnumMember(Value = "geotile")] - Geotile, - [EnumMember(Value = "geohex")] - Geohex -} - -internal sealed class GridAggregationTypeConverter : JsonConverter -{ - public override GridAggregationType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "geotile": - return GridAggregationType.Geotile; - case "geohex": - return GridAggregationType.Geohex; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GridAggregationType value, JsonSerializerOptions options) - { - switch (value) - { - case GridAggregationType.Geotile: - writer.WriteStringValue("geotile"); - return; - case GridAggregationType.Geohex: - writer.WriteStringValue("geohex"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GridTypeConverter))] -public enum GridType -{ - [EnumMember(Value = "point")] - Point, - [EnumMember(Value = "grid")] - Grid, - [EnumMember(Value = "centroid")] - Centroid -} - -internal sealed class GridTypeConverter : JsonConverter -{ - public override GridType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "point": - return GridType.Point; - case "grid": - return GridType.Grid; - case "centroid": - return GridType.Centroid; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GridType value, JsonSerializerOptions options) - { - switch (value) - { - case GridType.Point: - writer.WriteStringValue("point"); - return; - case GridType.Grid: - writer.WriteStringValue("grid"); - return; - case GridType.Centroid: - writer.WriteStringValue("centroid"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Enrich.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Enrich.g.cs deleted file mode 100644 index ae03d3ffb09..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Enrich.g.cs +++ /dev/null @@ -1,134 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Enrich; - -[JsonConverter(typeof(EnrichPolicyPhaseConverter))] -public enum EnrichPolicyPhase -{ - [EnumMember(Value = "SCHEDULED")] - Scheduled, - [EnumMember(Value = "RUNNING")] - Running, - [EnumMember(Value = "FAILED")] - Failed, - [EnumMember(Value = "COMPLETE")] - Complete -} - -internal sealed class EnrichPolicyPhaseConverter : JsonConverter -{ - public override EnrichPolicyPhase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "SCHEDULED": - return EnrichPolicyPhase.Scheduled; - case "RUNNING": - return EnrichPolicyPhase.Running; - case "FAILED": - return EnrichPolicyPhase.Failed; - case "COMPLETE": - return EnrichPolicyPhase.Complete; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, EnrichPolicyPhase value, JsonSerializerOptions options) - { - switch (value) - { - case EnrichPolicyPhase.Scheduled: - writer.WriteStringValue("SCHEDULED"); - return; - case EnrichPolicyPhase.Running: - writer.WriteStringValue("RUNNING"); - return; - case EnrichPolicyPhase.Failed: - writer.WriteStringValue("FAILED"); - return; - case EnrichPolicyPhase.Complete: - writer.WriteStringValue("COMPLETE"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(PolicyTypeConverter))] -public enum PolicyType -{ - [EnumMember(Value = "range")] - Range, - [EnumMember(Value = "match")] - Match, - [EnumMember(Value = "geo_match")] - GeoMatch -} - -internal sealed class PolicyTypeConverter : JsonConverter -{ - public override PolicyType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "range": - return PolicyType.Range; - case "match": - return PolicyType.Match; - case "geo_match": - return PolicyType.GeoMatch; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, PolicyType value, JsonSerializerOptions options) - { - switch (value) - { - case PolicyType.Range: - writer.WriteStringValue("range"); - return; - case PolicyType.Match: - writer.WriteStringValue("match"); - return; - case PolicyType.GeoMatch: - writer.WriteStringValue("geo_match"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Eql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Eql.g.cs deleted file mode 100644 index 75e0ada4a0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Eql.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -[JsonConverter(typeof(ResultPositionConverter))] -public enum ResultPosition -{ - /// - /// - /// Return the most recent matches, similar to the Unix tail command. - /// - /// - [EnumMember(Value = "tail")] - Tail, - /// - /// - /// Return the earliest matches, similar to the Unix head command. - /// - /// - [EnumMember(Value = "head")] - Head -} - -internal sealed class ResultPositionConverter : JsonConverter -{ - public override ResultPosition Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "tail": - return ResultPosition.Tail; - case "head": - return ResultPosition.Head; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ResultPosition value, JsonSerializerOptions options) - { - switch (value) - { - case ResultPosition.Tail: - writer.WriteStringValue("tail"); - return; - case ResultPosition.Head: - writer.WriteStringValue("head"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs deleted file mode 100644 index 9f3b55c714b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Esql; - -[JsonConverter(typeof(EsqlFormatConverter))] -public enum EsqlFormat -{ - [EnumMember(Value = "yaml")] - Yaml, - [EnumMember(Value = "txt")] - Txt, - [EnumMember(Value = "tsv")] - Tsv, - [EnumMember(Value = "smile")] - Smile, - [EnumMember(Value = "json")] - Json, - [EnumMember(Value = "csv")] - Csv, - [EnumMember(Value = "cbor")] - Cbor, - [EnumMember(Value = "arrow")] - Arrow -} - -internal sealed class EsqlFormatConverter : JsonConverter -{ - public override EsqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yaml": - return EsqlFormat.Yaml; - case "txt": - return EsqlFormat.Txt; - case "tsv": - return EsqlFormat.Tsv; - case "smile": - return EsqlFormat.Smile; - case "json": - return EsqlFormat.Json; - case "csv": - return EsqlFormat.Csv; - case "cbor": - return EsqlFormat.Cbor; - case "arrow": - return EsqlFormat.Arrow; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, EsqlFormat value, JsonSerializerOptions options) - { - switch (value) - { - case EsqlFormat.Yaml: - writer.WriteStringValue("yaml"); - return; - case EsqlFormat.Txt: - writer.WriteStringValue("txt"); - return; - case EsqlFormat.Tsv: - writer.WriteStringValue("tsv"); - return; - case EsqlFormat.Smile: - writer.WriteStringValue("smile"); - return; - case EsqlFormat.Json: - writer.WriteStringValue("json"); - return; - case EsqlFormat.Csv: - writer.WriteStringValue("csv"); - return; - case EsqlFormat.Cbor: - writer.WriteStringValue("cbor"); - return; - case EsqlFormat.Arrow: - writer.WriteStringValue("arrow"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.IndexManagement.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.IndexManagement.g.cs deleted file mode 100644 index 8c629226390..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.IndexManagement.g.cs +++ /dev/null @@ -1,672 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -[JsonConverter(typeof(FeatureConverter))] -public enum Feature -{ - [EnumMember(Value = "settings")] - Settings, - [EnumMember(Value = "mappings")] - Mappings, - [EnumMember(Value = "aliases")] - Aliases -} - -internal sealed class FeatureConverter : JsonConverter -{ - public override Feature Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "settings": - return Feature.Settings; - case "mappings": - return Feature.Mappings; - case "aliases": - return Feature.Aliases; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Feature value, JsonSerializerOptions options) - { - switch (value) - { - case Feature.Settings: - writer.WriteStringValue("settings"); - return; - case Feature.Mappings: - writer.WriteStringValue("mappings"); - return; - case Feature.Aliases: - writer.WriteStringValue("aliases"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IndexCheckOnStartupConverter))] -public enum IndexCheckOnStartup -{ - [EnumMember(Value = "true")] - True, - [EnumMember(Value = "false")] - False, - [EnumMember(Value = "checksum")] - Checksum -} - -internal sealed class IndexCheckOnStartupConverter : JsonConverter -{ - public override IndexCheckOnStartup Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "true": - return IndexCheckOnStartup.True; - case "false": - return IndexCheckOnStartup.False; - case "checksum": - return IndexCheckOnStartup.Checksum; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IndexCheckOnStartup value, JsonSerializerOptions options) - { - switch (value) - { - case IndexCheckOnStartup.True: - writer.WriteStringValue("true"); - return; - case IndexCheckOnStartup.False: - writer.WriteStringValue("false"); - return; - case IndexCheckOnStartup.Checksum: - writer.WriteStringValue("checksum"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IndexMetadataStateConverter))] -public enum IndexMetadataState -{ - [EnumMember(Value = "open")] - Open, - [EnumMember(Value = "close")] - Close -} - -internal sealed class IndexMetadataStateConverter : JsonConverter -{ - public override IndexMetadataState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "open": - return IndexMetadataState.Open; - case "close": - return IndexMetadataState.Close; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IndexMetadataState value, JsonSerializerOptions options) - { - switch (value) - { - case IndexMetadataState.Open: - writer.WriteStringValue("open"); - return; - case IndexMetadataState.Close: - writer.WriteStringValue("close"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IndexRoutingAllocationOptionsConverter))] -public enum IndexRoutingAllocationOptions -{ - [EnumMember(Value = "primaries")] - Primaries, - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "new_primaries")] - NewPrimaries, - [EnumMember(Value = "all")] - All -} - -internal sealed class IndexRoutingAllocationOptionsConverter : JsonConverter -{ - public override IndexRoutingAllocationOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "primaries": - return IndexRoutingAllocationOptions.Primaries; - case "none": - return IndexRoutingAllocationOptions.None; - case "new_primaries": - return IndexRoutingAllocationOptions.NewPrimaries; - case "all": - return IndexRoutingAllocationOptions.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IndexRoutingAllocationOptions value, JsonSerializerOptions options) - { - switch (value) - { - case IndexRoutingAllocationOptions.Primaries: - writer.WriteStringValue("primaries"); - return; - case IndexRoutingAllocationOptions.None: - writer.WriteStringValue("none"); - return; - case IndexRoutingAllocationOptions.NewPrimaries: - writer.WriteStringValue("new_primaries"); - return; - case IndexRoutingAllocationOptions.All: - writer.WriteStringValue("all"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IndexRoutingRebalanceOptionsConverter))] -public enum IndexRoutingRebalanceOptions -{ - [EnumMember(Value = "replicas")] - Replicas, - [EnumMember(Value = "primaries")] - Primaries, - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "all")] - All -} - -internal sealed class IndexRoutingRebalanceOptionsConverter : JsonConverter -{ - public override IndexRoutingRebalanceOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "replicas": - return IndexRoutingRebalanceOptions.Replicas; - case "primaries": - return IndexRoutingRebalanceOptions.Primaries; - case "none": - return IndexRoutingRebalanceOptions.None; - case "all": - return IndexRoutingRebalanceOptions.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IndexRoutingRebalanceOptions value, JsonSerializerOptions options) - { - switch (value) - { - case IndexRoutingRebalanceOptions.Replicas: - writer.WriteStringValue("replicas"); - return; - case IndexRoutingRebalanceOptions.Primaries: - writer.WriteStringValue("primaries"); - return; - case IndexRoutingRebalanceOptions.None: - writer.WriteStringValue("none"); - return; - case IndexRoutingRebalanceOptions.All: - writer.WriteStringValue("all"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ManagedByConverter))] -public enum ManagedBy -{ - [EnumMember(Value = "Unmanaged")] - Unmanaged, - [EnumMember(Value = "Index Lifecycle Management")] - Ilm, - [EnumMember(Value = "Data stream lifecycle")] - Datastream -} - -internal sealed class ManagedByConverter : JsonConverter -{ - public override ManagedBy Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "Unmanaged": - return ManagedBy.Unmanaged; - case "Index Lifecycle Management": - return ManagedBy.Ilm; - case "Data stream lifecycle": - return ManagedBy.Datastream; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ManagedBy value, JsonSerializerOptions options) - { - switch (value) - { - case ManagedBy.Unmanaged: - writer.WriteStringValue("Unmanaged"); - return; - case ManagedBy.Ilm: - writer.WriteStringValue("Index Lifecycle Management"); - return; - case ManagedBy.Datastream: - writer.WriteStringValue("Data stream lifecycle"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(NumericFielddataFormatConverter))] -public enum NumericFielddataFormat -{ - [EnumMember(Value = "disabled")] - Disabled, - [EnumMember(Value = "array")] - Array -} - -internal sealed class NumericFielddataFormatConverter : JsonConverter -{ - public override NumericFielddataFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "disabled": - return NumericFielddataFormat.Disabled; - case "array": - return NumericFielddataFormat.Array; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, NumericFielddataFormat value, JsonSerializerOptions options) - { - switch (value) - { - case NumericFielddataFormat.Disabled: - writer.WriteStringValue("disabled"); - return; - case NumericFielddataFormat.Array: - writer.WriteStringValue("array"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SegmentSortMissingConverter))] -public enum SegmentSortMissing -{ - [EnumMember(Value = "_last")] - Last, - [EnumMember(Value = "_first")] - First -} - -internal sealed class SegmentSortMissingConverter : JsonConverter -{ - public override SegmentSortMissing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "_last": - return SegmentSortMissing.Last; - case "_first": - return SegmentSortMissing.First; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SegmentSortMissing value, JsonSerializerOptions options) - { - switch (value) - { - case SegmentSortMissing.Last: - writer.WriteStringValue("_last"); - return; - case SegmentSortMissing.First: - writer.WriteStringValue("_first"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SegmentSortModeConverter))] -public enum SegmentSortMode -{ - [EnumMember(Value = "min")] - Min, - [EnumMember(Value = "max")] - Max -} - -internal sealed class SegmentSortModeConverter : JsonConverter -{ - public override SegmentSortMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "min": - case "MIN": - return SegmentSortMode.Min; - case "max": - case "MAX": - return SegmentSortMode.Max; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SegmentSortMode value, JsonSerializerOptions options) - { - switch (value) - { - case SegmentSortMode.Min: - writer.WriteStringValue("min"); - return; - case SegmentSortMode.Max: - writer.WriteStringValue("max"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SegmentSortOrderConverter))] -public enum SegmentSortOrder -{ - [EnumMember(Value = "desc")] - Desc, - [EnumMember(Value = "asc")] - Asc -} - -internal sealed class SegmentSortOrderConverter : JsonConverter -{ - public override SegmentSortOrder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "desc": - case "DESC": - return SegmentSortOrder.Desc; - case "asc": - case "ASC": - return SegmentSortOrder.Asc; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SegmentSortOrder value, JsonSerializerOptions options) - { - switch (value) - { - case SegmentSortOrder.Desc: - writer.WriteStringValue("desc"); - return; - case SegmentSortOrder.Asc: - writer.WriteStringValue("asc"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ShardRoutingStateConverter))] -public enum ShardRoutingState -{ - [EnumMember(Value = "UNASSIGNED")] - Unassigned, - [EnumMember(Value = "STARTED")] - Started, - [EnumMember(Value = "RELOCATING")] - Relocating, - [EnumMember(Value = "INITIALIZING")] - Initializing -} - -internal sealed class ShardRoutingStateConverter : JsonConverter -{ - public override ShardRoutingState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "UNASSIGNED": - return ShardRoutingState.Unassigned; - case "STARTED": - return ShardRoutingState.Started; - case "RELOCATING": - return ShardRoutingState.Relocating; - case "INITIALIZING": - return ShardRoutingState.Initializing; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ShardRoutingState value, JsonSerializerOptions options) - { - switch (value) - { - case ShardRoutingState.Unassigned: - writer.WriteStringValue("UNASSIGNED"); - return; - case ShardRoutingState.Started: - writer.WriteStringValue("STARTED"); - return; - case ShardRoutingState.Relocating: - writer.WriteStringValue("RELOCATING"); - return; - case ShardRoutingState.Initializing: - writer.WriteStringValue("INITIALIZING"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(EnumStructConverter))] -public readonly partial struct StorageType : IEnumStruct -{ - public StorageType(string value) => Value = value; - - StorageType IEnumStruct.Create(string value) => value; - - public readonly string Value { get; } - - /// - /// - /// The NIO FS type stores the shard index on the file system (maps to Lucene NIOFSDirectory) using NIO. It allows multiple - /// threads to read from the same file concurrently. It is not recommended on Windows because of a bug in the SUN Java - /// implementation and disables some optimizations for heap memory usage. - /// - /// - public static StorageType Niofs { get; } = new StorageType("niofs"); - - /// - /// - /// The MMap FS type stores the shard index on the file system (maps to Lucene MMapDirectory) by mapping a file into - /// memory (mmap). Memory mapping uses up a portion of the virtual memory address space in your process equal to the size - /// of the file being mapped. Before using this class, be sure you have allowed plenty of virtual address space. - /// - /// - public static StorageType Mmapfs { get; } = new StorageType("mmapfs"); - - /// - /// - /// The hybridfs type is a hybrid of niofs and mmapfs, which chooses the best file system type for each type of file - /// based on the read access pattern. Currently only the Lucene term dictionary, norms and doc values files are memory - /// mapped. All other files are opened using Lucene NIOFSDirectory. Similarly to mmapfs be sure you have allowed - /// plenty of virtual address space. - /// - /// - public static StorageType Hybridfs { get; } = new StorageType("hybridfs"); - - /// - /// - /// Default file system implementation. This will pick the best implementation depending on the operating environment, which - /// is currently hybridfs on all supported systems but is subject to change. - /// - /// - public static StorageType Fs { get; } = new StorageType("fs"); - - public override string ToString() => Value ?? string.Empty; - - public static implicit operator string(StorageType storageType) => storageType.Value; - public static implicit operator StorageType(string value) => new(value); - - public override int GetHashCode() => Value.GetHashCode(); - public override bool Equals(object obj) => obj is StorageType other && this.Equals(other); - public bool Equals(StorageType other) => Value == other.Value; - - public static bool operator ==(StorageType a, StorageType b) => a.Equals(b); - public static bool operator !=(StorageType a, StorageType b) => !(a == b); -} - -[JsonConverter(typeof(TranslogDurabilityConverter))] -public enum TranslogDurability -{ - /// - /// - /// (default) fsync and commit after every request. In the event of hardware failure, all acknowledged writes - /// will already have been committed to disk. - /// - /// - [EnumMember(Value = "request")] - Request, - /// - /// - /// fsync and commit in the background every sync_interval. In the event of a failure, all acknowledged writes - /// since the last automatic commit will be discarded. - /// - /// - [EnumMember(Value = "async")] - Async -} - -internal sealed class TranslogDurabilityConverter : JsonConverter -{ - public override TranslogDurability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "request": - case "REQUEST": - return TranslogDurability.Request; - case "async": - case "ASYNC": - return TranslogDurability.Async; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TranslogDurability value, JsonSerializerOptions options) - { - switch (value) - { - case TranslogDurability.Request: - writer.WriteStringValue("request"); - return; - case TranslogDurability.Async: - writer.WriteStringValue("async"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs deleted file mode 100644 index 2a4deee6213..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs +++ /dev/null @@ -1,85 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -[JsonConverter(typeof(TaskTypeConverter))] -public enum TaskType -{ - [EnumMember(Value = "text_embedding")] - TextEmbedding, - [EnumMember(Value = "sparse_embedding")] - SparseEmbedding, - [EnumMember(Value = "rerank")] - Rerank, - [EnumMember(Value = "completion")] - Completion -} - -internal sealed class TaskTypeConverter : JsonConverter -{ - public override TaskType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "text_embedding": - return TaskType.TextEmbedding; - case "sparse_embedding": - return TaskType.SparseEmbedding; - case "rerank": - return TaskType.Rerank; - case "completion": - return TaskType.Completion; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TaskType value, JsonSerializerOptions options) - { - switch (value) - { - case TaskType.TextEmbedding: - writer.WriteStringValue("text_embedding"); - return; - case TaskType.SparseEmbedding: - writer.WriteStringValue("sparse_embedding"); - return; - case TaskType.Rerank: - writer.WriteStringValue("rerank"); - return; - case TaskType.Completion: - writer.WriteStringValue("completion"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs deleted file mode 100644 index 81ceefaf2ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs +++ /dev/null @@ -1,424 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -[JsonConverter(typeof(ConvertTypeConverter))] -public enum ConvertType -{ - [EnumMember(Value = "string")] - String, - [EnumMember(Value = "long")] - Long, - [EnumMember(Value = "ip")] - Ip, - [EnumMember(Value = "integer")] - Integer, - [EnumMember(Value = "float")] - Float, - [EnumMember(Value = "double")] - Double, - [EnumMember(Value = "boolean")] - Boolean, - [EnumMember(Value = "auto")] - Auto -} - -internal sealed class ConvertTypeConverter : JsonConverter -{ - public override ConvertType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "string": - return ConvertType.String; - case "long": - return ConvertType.Long; - case "ip": - return ConvertType.Ip; - case "integer": - return ConvertType.Integer; - case "float": - return ConvertType.Float; - case "double": - return ConvertType.Double; - case "boolean": - return ConvertType.Boolean; - case "auto": - return ConvertType.Auto; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ConvertType value, JsonSerializerOptions options) - { - switch (value) - { - case ConvertType.String: - writer.WriteStringValue("string"); - return; - case ConvertType.Long: - writer.WriteStringValue("long"); - return; - case ConvertType.Ip: - writer.WriteStringValue("ip"); - return; - case ConvertType.Integer: - writer.WriteStringValue("integer"); - return; - case ConvertType.Float: - writer.WriteStringValue("float"); - return; - case ConvertType.Double: - writer.WriteStringValue("double"); - return; - case ConvertType.Boolean: - writer.WriteStringValue("boolean"); - return; - case ConvertType.Auto: - writer.WriteStringValue("auto"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FingerprintDigestConverter))] -public enum FingerprintDigest -{ - [EnumMember(Value = "SHA-512")] - Sha512, - [EnumMember(Value = "SHA-256")] - Sha256, - [EnumMember(Value = "SHA-1")] - Sha1, - [EnumMember(Value = "MurmurHash3")] - Murmurhash3, - [EnumMember(Value = "MD5")] - Md5 -} - -internal sealed class FingerprintDigestConverter : JsonConverter -{ - public override FingerprintDigest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "SHA-512": - return FingerprintDigest.Sha512; - case "SHA-256": - return FingerprintDigest.Sha256; - case "SHA-1": - return FingerprintDigest.Sha1; - case "MurmurHash3": - return FingerprintDigest.Murmurhash3; - case "MD5": - return FingerprintDigest.Md5; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FingerprintDigest value, JsonSerializerOptions options) - { - switch (value) - { - case FingerprintDigest.Sha512: - writer.WriteStringValue("SHA-512"); - return; - case FingerprintDigest.Sha256: - writer.WriteStringValue("SHA-256"); - return; - case FingerprintDigest.Sha1: - writer.WriteStringValue("SHA-1"); - return; - case FingerprintDigest.Murmurhash3: - writer.WriteStringValue("MurmurHash3"); - return; - case FingerprintDigest.Md5: - writer.WriteStringValue("MD5"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoGridTargetFormatConverter))] -public enum GeoGridTargetFormat -{ - [EnumMember(Value = "wkt")] - Wkt, - [EnumMember(Value = "geojson")] - Geojson -} - -internal sealed class GeoGridTargetFormatConverter : JsonConverter -{ - public override GeoGridTargetFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "wkt": - return GeoGridTargetFormat.Wkt; - case "geojson": - return GeoGridTargetFormat.Geojson; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoGridTargetFormat value, JsonSerializerOptions options) - { - switch (value) - { - case GeoGridTargetFormat.Wkt: - writer.WriteStringValue("wkt"); - return; - case GeoGridTargetFormat.Geojson: - writer.WriteStringValue("geojson"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoGridTileTypeConverter))] -public enum GeoGridTileType -{ - [EnumMember(Value = "geotile")] - Geotile, - [EnumMember(Value = "geohex")] - Geohex, - [EnumMember(Value = "geohash")] - Geohash -} - -internal sealed class GeoGridTileTypeConverter : JsonConverter -{ - public override GeoGridTileType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "geotile": - return GeoGridTileType.Geotile; - case "geohex": - return GeoGridTileType.Geohex; - case "geohash": - return GeoGridTileType.Geohash; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoGridTileType value, JsonSerializerOptions options) - { - switch (value) - { - case GeoGridTileType.Geotile: - writer.WriteStringValue("geotile"); - return; - case GeoGridTileType.Geohex: - writer.WriteStringValue("geohex"); - return; - case GeoGridTileType.Geohash: - writer.WriteStringValue("geohash"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(JsonProcessorConflictStrategyConverter))] -public enum JsonProcessorConflictStrategy -{ - /// - /// - /// Root fields that conflict with fields from the parsed JSON will be overridden. - /// - /// - [EnumMember(Value = "replace")] - Replace, - /// - /// - /// Conflicting fields will be merged. - /// - /// - [EnumMember(Value = "merge")] - Merge -} - -internal sealed class JsonProcessorConflictStrategyConverter : JsonConverter -{ - public override JsonProcessorConflictStrategy Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "replace": - return JsonProcessorConflictStrategy.Replace; - case "merge": - return JsonProcessorConflictStrategy.Merge; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, JsonProcessorConflictStrategy value, JsonSerializerOptions options) - { - switch (value) - { - case JsonProcessorConflictStrategy.Replace: - writer.WriteStringValue("replace"); - return; - case JsonProcessorConflictStrategy.Merge: - writer.WriteStringValue("merge"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ShapeTypeConverter))] -public enum ShapeType -{ - [EnumMember(Value = "shape")] - Shape, - [EnumMember(Value = "geo_shape")] - GeoShape -} - -internal sealed class ShapeTypeConverter : JsonConverter -{ - public override ShapeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "shape": - return ShapeType.Shape; - case "geo_shape": - return ShapeType.GeoShape; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ShapeType value, JsonSerializerOptions options) - { - switch (value) - { - case ShapeType.Shape: - writer.WriteStringValue("shape"); - return; - case ShapeType.GeoShape: - writer.WriteStringValue("geo_shape"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(UserAgentPropertyConverter))] -public enum UserAgentProperty -{ - [EnumMember(Value = "version")] - Version, - [EnumMember(Value = "os")] - Os, - [EnumMember(Value = "original")] - Original, - [EnumMember(Value = "name")] - Name, - [EnumMember(Value = "device")] - Device -} - -internal sealed class UserAgentPropertyConverter : JsonConverter -{ - public override UserAgentProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "version": - return UserAgentProperty.Version; - case "os": - return UserAgentProperty.Os; - case "original": - return UserAgentProperty.Original; - case "name": - return UserAgentProperty.Name; - case "device": - return UserAgentProperty.Device; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, UserAgentProperty value, JsonSerializerOptions options) - { - switch (value) - { - case UserAgentProperty.Version: - writer.WriteStringValue("version"); - return; - case UserAgentProperty.Os: - writer.WriteStringValue("os"); - return; - case UserAgentProperty.Original: - writer.WriteStringValue("original"); - return; - case UserAgentProperty.Name: - writer.WriteStringValue("name"); - return; - case UserAgentProperty.Device: - writer.WriteStringValue("device"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.LicenseManagement.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.LicenseManagement.g.cs deleted file mode 100644 index 70a028f6e76..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.LicenseManagement.g.cs +++ /dev/null @@ -1,176 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.LicenseManagement; - -[JsonConverter(typeof(LicenseStatusConverter))] -public enum LicenseStatus -{ - [EnumMember(Value = "valid")] - Valid, - [EnumMember(Value = "invalid")] - Invalid, - [EnumMember(Value = "expired")] - Expired, - [EnumMember(Value = "active")] - Active -} - -internal sealed class LicenseStatusConverter : JsonConverter -{ - public override LicenseStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "valid": - return LicenseStatus.Valid; - case "invalid": - return LicenseStatus.Invalid; - case "expired": - return LicenseStatus.Expired; - case "active": - return LicenseStatus.Active; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, LicenseStatus value, JsonSerializerOptions options) - { - switch (value) - { - case LicenseStatus.Valid: - writer.WriteStringValue("valid"); - return; - case LicenseStatus.Invalid: - writer.WriteStringValue("invalid"); - return; - case LicenseStatus.Expired: - writer.WriteStringValue("expired"); - return; - case LicenseStatus.Active: - writer.WriteStringValue("active"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(LicenseTypeConverter))] -public enum LicenseType -{ - [EnumMember(Value = "trial")] - Trial, - [EnumMember(Value = "standard")] - Standard, - [EnumMember(Value = "silver")] - Silver, - [EnumMember(Value = "platinum")] - Platinum, - [EnumMember(Value = "missing")] - Missing, - [EnumMember(Value = "gold")] - Gold, - [EnumMember(Value = "enterprise")] - Enterprise, - [EnumMember(Value = "dev")] - Dev, - [EnumMember(Value = "basic")] - Basic -} - -internal sealed class LicenseTypeConverter : JsonConverter -{ - public override LicenseType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "trial": - return LicenseType.Trial; - case "standard": - return LicenseType.Standard; - case "silver": - return LicenseType.Silver; - case "platinum": - return LicenseType.Platinum; - case "missing": - return LicenseType.Missing; - case "gold": - return LicenseType.Gold; - case "enterprise": - return LicenseType.Enterprise; - case "dev": - return LicenseType.Dev; - case "basic": - return LicenseType.Basic; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, LicenseType value, JsonSerializerOptions options) - { - switch (value) - { - case LicenseType.Trial: - writer.WriteStringValue("trial"); - return; - case LicenseType.Standard: - writer.WriteStringValue("standard"); - return; - case LicenseType.Silver: - writer.WriteStringValue("silver"); - return; - case LicenseType.Platinum: - writer.WriteStringValue("platinum"); - return; - case LicenseType.Missing: - writer.WriteStringValue("missing"); - return; - case LicenseType.Gold: - writer.WriteStringValue("gold"); - return; - case LicenseType.Enterprise: - writer.WriteStringValue("enterprise"); - return; - case LicenseType.Dev: - writer.WriteStringValue("dev"); - return; - case LicenseType.Basic: - writer.WriteStringValue("basic"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs deleted file mode 100644 index 31515f05fd6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.MachineLearning.g.cs +++ /dev/null @@ -1,1223 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -[JsonConverter(typeof(AppliesToConverter))] -public enum AppliesTo -{ - [EnumMember(Value = "typical")] - Typical, - [EnumMember(Value = "time")] - Time, - [EnumMember(Value = "diff_from_typical")] - DiffFromTypical, - [EnumMember(Value = "actual")] - Actual -} - -internal sealed class AppliesToConverter : JsonConverter -{ - public override AppliesTo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "typical": - return AppliesTo.Typical; - case "time": - return AppliesTo.Time; - case "diff_from_typical": - return AppliesTo.DiffFromTypical; - case "actual": - return AppliesTo.Actual; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, AppliesTo value, JsonSerializerOptions options) - { - switch (value) - { - case AppliesTo.Typical: - writer.WriteStringValue("typical"); - return; - case AppliesTo.Time: - writer.WriteStringValue("time"); - return; - case AppliesTo.DiffFromTypical: - writer.WriteStringValue("diff_from_typical"); - return; - case AppliesTo.Actual: - writer.WriteStringValue("actual"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(CategorizationStatusConverter))] -public enum CategorizationStatus -{ - [EnumMember(Value = "warn")] - Warn, - [EnumMember(Value = "ok")] - Ok -} - -internal sealed class CategorizationStatusConverter : JsonConverter -{ - public override CategorizationStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "warn": - return CategorizationStatus.Warn; - case "ok": - return CategorizationStatus.Ok; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, CategorizationStatus value, JsonSerializerOptions options) - { - switch (value) - { - case CategorizationStatus.Warn: - writer.WriteStringValue("warn"); - return; - case CategorizationStatus.Ok: - writer.WriteStringValue("ok"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ChunkingModeConverter))] -public enum ChunkingMode -{ - [EnumMember(Value = "off")] - Off, - [EnumMember(Value = "manual")] - Manual, - [EnumMember(Value = "auto")] - Auto -} - -internal sealed class ChunkingModeConverter : JsonConverter -{ - public override ChunkingMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "off": - return ChunkingMode.Off; - case "manual": - return ChunkingMode.Manual; - case "auto": - return ChunkingMode.Auto; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ChunkingMode value, JsonSerializerOptions options) - { - switch (value) - { - case ChunkingMode.Off: - writer.WriteStringValue("off"); - return; - case ChunkingMode.Manual: - writer.WriteStringValue("manual"); - return; - case ChunkingMode.Auto: - writer.WriteStringValue("auto"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ConditionOperatorConverter))] -public enum ConditionOperator -{ - [EnumMember(Value = "lte")] - Lte, - [EnumMember(Value = "lt")] - Lt, - [EnumMember(Value = "gte")] - Gte, - [EnumMember(Value = "gt")] - Gt -} - -internal sealed class ConditionOperatorConverter : JsonConverter -{ - public override ConditionOperator Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "lte": - return ConditionOperator.Lte; - case "lt": - return ConditionOperator.Lt; - case "gte": - return ConditionOperator.Gte; - case "gt": - return ConditionOperator.Gt; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ConditionOperator value, JsonSerializerOptions options) - { - switch (value) - { - case ConditionOperator.Lte: - writer.WriteStringValue("lte"); - return; - case ConditionOperator.Lt: - writer.WriteStringValue("lt"); - return; - case ConditionOperator.Gte: - writer.WriteStringValue("gte"); - return; - case ConditionOperator.Gt: - writer.WriteStringValue("gt"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DatafeedStateConverter))] -public enum DatafeedState -{ - [EnumMember(Value = "stopping")] - Stopping, - [EnumMember(Value = "stopped")] - Stopped, - [EnumMember(Value = "starting")] - Starting, - [EnumMember(Value = "started")] - Started -} - -internal sealed class DatafeedStateConverter : JsonConverter -{ - public override DatafeedState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopping": - return DatafeedState.Stopping; - case "stopped": - return DatafeedState.Stopped; - case "starting": - return DatafeedState.Starting; - case "started": - return DatafeedState.Started; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DatafeedState value, JsonSerializerOptions options) - { - switch (value) - { - case DatafeedState.Stopping: - writer.WriteStringValue("stopping"); - return; - case DatafeedState.Stopped: - writer.WriteStringValue("stopped"); - return; - case DatafeedState.Starting: - writer.WriteStringValue("starting"); - return; - case DatafeedState.Started: - writer.WriteStringValue("started"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DataframeStateConverter))] -public enum DataframeState -{ - [EnumMember(Value = "stopping")] - Stopping, - [EnumMember(Value = "stopped")] - Stopped, - [EnumMember(Value = "starting")] - Starting, - [EnumMember(Value = "started")] - Started, - [EnumMember(Value = "failed")] - Failed -} - -internal sealed class DataframeStateConverter : JsonConverter -{ - public override DataframeState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopping": - return DataframeState.Stopping; - case "stopped": - return DataframeState.Stopped; - case "starting": - return DataframeState.Starting; - case "started": - return DataframeState.Started; - case "failed": - return DataframeState.Failed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DataframeState value, JsonSerializerOptions options) - { - switch (value) - { - case DataframeState.Stopping: - writer.WriteStringValue("stopping"); - return; - case DataframeState.Stopped: - writer.WriteStringValue("stopped"); - return; - case DataframeState.Starting: - writer.WriteStringValue("starting"); - return; - case DataframeState.Started: - writer.WriteStringValue("started"); - return; - case DataframeState.Failed: - writer.WriteStringValue("failed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DeploymentAllocationStateConverter))] -public enum DeploymentAllocationState -{ - /// - /// - /// Trained model deployment is starting but it is not yet deployed on any nodes. - /// - /// - [EnumMember(Value = "starting")] - Starting, - /// - /// - /// The trained model is started on at least one node. - /// - /// - [EnumMember(Value = "started")] - Started, - /// - /// - /// Trained model deployment has started on all valid nodes. - /// - /// - [EnumMember(Value = "fully_allocated")] - FullyAllocated -} - -internal sealed class DeploymentAllocationStateConverter : JsonConverter -{ - public override DeploymentAllocationState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "starting": - return DeploymentAllocationState.Starting; - case "started": - return DeploymentAllocationState.Started; - case "fully_allocated": - return DeploymentAllocationState.FullyAllocated; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DeploymentAllocationState value, JsonSerializerOptions options) - { - switch (value) - { - case DeploymentAllocationState.Starting: - writer.WriteStringValue("starting"); - return; - case DeploymentAllocationState.Started: - writer.WriteStringValue("started"); - return; - case DeploymentAllocationState.FullyAllocated: - writer.WriteStringValue("fully_allocated"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DeploymentAssignmentStateConverter))] -public enum DeploymentAssignmentState -{ - /// - /// - /// The deployment is preparing to stop and deallocate the model from the relevant nodes. - /// - /// - [EnumMember(Value = "stopping")] - Stopping, - /// - /// - /// The deployment has recently started but is not yet usable; the model is not allocated on any nodes. - /// - /// - [EnumMember(Value = "starting")] - Starting, - /// - /// - /// The deployment is usable; at least one node has the model allocated. - /// - /// - [EnumMember(Value = "started")] - Started, - /// - /// - /// The deployment is on a failed state and must be re-deployed. - /// - /// - [EnumMember(Value = "failed")] - Failed -} - -internal sealed class DeploymentAssignmentStateConverter : JsonConverter -{ - public override DeploymentAssignmentState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopping": - return DeploymentAssignmentState.Stopping; - case "starting": - return DeploymentAssignmentState.Starting; - case "started": - return DeploymentAssignmentState.Started; - case "failed": - return DeploymentAssignmentState.Failed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DeploymentAssignmentState value, JsonSerializerOptions options) - { - switch (value) - { - case DeploymentAssignmentState.Stopping: - writer.WriteStringValue("stopping"); - return; - case DeploymentAssignmentState.Starting: - writer.WriteStringValue("starting"); - return; - case DeploymentAssignmentState.Started: - writer.WriteStringValue("started"); - return; - case DeploymentAssignmentState.Failed: - writer.WriteStringValue("failed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ExcludeFrequentConverter))] -public enum ExcludeFrequent -{ - [EnumMember(Value = "over")] - Over, - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "by")] - By, - [EnumMember(Value = "all")] - All -} - -internal sealed class ExcludeFrequentConverter : JsonConverter -{ - public override ExcludeFrequent Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "over": - return ExcludeFrequent.Over; - case "none": - return ExcludeFrequent.None; - case "by": - return ExcludeFrequent.By; - case "all": - return ExcludeFrequent.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ExcludeFrequent value, JsonSerializerOptions options) - { - switch (value) - { - case ExcludeFrequent.Over: - writer.WriteStringValue("over"); - return; - case ExcludeFrequent.None: - writer.WriteStringValue("none"); - return; - case ExcludeFrequent.By: - writer.WriteStringValue("by"); - return; - case ExcludeFrequent.All: - writer.WriteStringValue("all"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FilterTypeConverter))] -public enum FilterType -{ - [EnumMember(Value = "include")] - Include, - [EnumMember(Value = "exclude")] - Exclude -} - -internal sealed class FilterTypeConverter : JsonConverter -{ - public override FilterType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "include": - return FilterType.Include; - case "exclude": - return FilterType.Exclude; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FilterType value, JsonSerializerOptions options) - { - switch (value) - { - case FilterType.Include: - writer.WriteStringValue("include"); - return; - case FilterType.Exclude: - writer.WriteStringValue("exclude"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IncludeConverter))] -public enum Include -{ - /// - /// - /// Includes the total feature importance for the training data set. The - /// baseline and total feature importance values are returned in the metadata - /// field in the response body. - /// - /// - [EnumMember(Value = "total_feature_importance")] - TotalFeatureImportance, - /// - /// - /// Includes the information about hyperparameters used to train the model. - /// This information consists of the value, the absolute and relative - /// importance of the hyperparameter as well as an indicator of whether it was - /// specified by the user or tuned during hyperparameter optimization. - /// - /// - [EnumMember(Value = "hyperparameters")] - Hyperparameters, - /// - /// - /// Includes the baseline for feature importance values. - /// - /// - [EnumMember(Value = "feature_importance_baseline")] - FeatureImportanceBaseline, - /// - /// - /// Includes the model definition status. - /// - /// - [EnumMember(Value = "definition_status")] - DefinitionStatus, - /// - /// - /// Includes the model definition. - /// - /// - [EnumMember(Value = "definition")] - Definition -} - -internal sealed class IncludeConverter : JsonConverter -{ - public override Include Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "total_feature_importance": - return Include.TotalFeatureImportance; - case "hyperparameters": - return Include.Hyperparameters; - case "feature_importance_baseline": - return Include.FeatureImportanceBaseline; - case "definition_status": - return Include.DefinitionStatus; - case "definition": - return Include.Definition; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Include value, JsonSerializerOptions options) - { - switch (value) - { - case Include.TotalFeatureImportance: - writer.WriteStringValue("total_feature_importance"); - return; - case Include.Hyperparameters: - writer.WriteStringValue("hyperparameters"); - return; - case Include.FeatureImportanceBaseline: - writer.WriteStringValue("feature_importance_baseline"); - return; - case Include.DefinitionStatus: - writer.WriteStringValue("definition_status"); - return; - case Include.Definition: - writer.WriteStringValue("definition"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(JobBlockedReasonConverter))] -public enum JobBlockedReason -{ - [EnumMember(Value = "revert")] - Revert, - [EnumMember(Value = "reset")] - Reset, - [EnumMember(Value = "delete")] - Delete -} - -internal sealed class JobBlockedReasonConverter : JsonConverter -{ - public override JobBlockedReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "revert": - return JobBlockedReason.Revert; - case "reset": - return JobBlockedReason.Reset; - case "delete": - return JobBlockedReason.Delete; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, JobBlockedReason value, JsonSerializerOptions options) - { - switch (value) - { - case JobBlockedReason.Revert: - writer.WriteStringValue("revert"); - return; - case JobBlockedReason.Reset: - writer.WriteStringValue("reset"); - return; - case JobBlockedReason.Delete: - writer.WriteStringValue("delete"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(JobStateConverter))] -public enum JobState -{ - /// - /// - /// The job open action is in progress and has not yet completed. - /// - /// - [EnumMember(Value = "opening")] - Opening, - /// - /// - /// The job is available to receive and process data. - /// - /// - [EnumMember(Value = "opened")] - Opened, - /// - /// - /// The job did not finish successfully due to an error. - /// This situation can occur due to invalid input data, a fatal error occurring during the analysis, or an external interaction such as the process being killed by the Linux out of memory (OOM) killer. - /// If the job had irrevocably failed, it must be force closed and then deleted. - /// If the datafeed can be corrected, the job can be closed and then re-opened. - /// - /// - [EnumMember(Value = "failed")] - Failed, - /// - /// - /// The job close action is in progress and has not yet completed. A closing job cannot accept further data. - /// - /// - [EnumMember(Value = "closing")] - Closing, - /// - /// - /// The job finished successfully with its model state persisted. The job must be opened before it can accept further data. - /// - /// - [EnumMember(Value = "closed")] - Closed -} - -internal sealed class JobStateConverter : JsonConverter -{ - public override JobState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "opening": - return JobState.Opening; - case "opened": - return JobState.Opened; - case "failed": - return JobState.Failed; - case "closing": - return JobState.Closing; - case "closed": - return JobState.Closed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, JobState value, JsonSerializerOptions options) - { - switch (value) - { - case JobState.Opening: - writer.WriteStringValue("opening"); - return; - case JobState.Opened: - writer.WriteStringValue("opened"); - return; - case JobState.Failed: - writer.WriteStringValue("failed"); - return; - case JobState.Closing: - writer.WriteStringValue("closing"); - return; - case JobState.Closed: - writer.WriteStringValue("closed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(MemoryStatusConverter))] -public enum MemoryStatus -{ - [EnumMember(Value = "soft_limit")] - SoftLimit, - [EnumMember(Value = "ok")] - Ok, - [EnumMember(Value = "hard_limit")] - HardLimit -} - -internal sealed class MemoryStatusConverter : JsonConverter -{ - public override MemoryStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "soft_limit": - return MemoryStatus.SoftLimit; - case "ok": - return MemoryStatus.Ok; - case "hard_limit": - return MemoryStatus.HardLimit; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, MemoryStatus value, JsonSerializerOptions options) - { - switch (value) - { - case MemoryStatus.SoftLimit: - writer.WriteStringValue("soft_limit"); - return; - case MemoryStatus.Ok: - writer.WriteStringValue("ok"); - return; - case MemoryStatus.HardLimit: - writer.WriteStringValue("hard_limit"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(RoutingStateConverter))] -public enum RoutingState -{ - /// - /// - /// The trained model is being deallocated from this node. - /// - /// - [EnumMember(Value = "stopping")] - Stopping, - /// - /// - /// The trained model is fully deallocated from this node. - /// - /// - [EnumMember(Value = "stopped")] - Stopped, - /// - /// - /// The trained model is attempting to allocate on this node; inference requests are not yet accepted. - /// - /// - [EnumMember(Value = "starting")] - Starting, - /// - /// - /// The trained model is allocated and ready to accept inference requests. - /// - /// - [EnumMember(Value = "started")] - Started, - /// - /// - /// The allocation attempt failed. - /// - /// - [EnumMember(Value = "failed")] - Failed -} - -internal sealed class RoutingStateConverter : JsonConverter -{ - public override RoutingState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopping": - return RoutingState.Stopping; - case "stopped": - return RoutingState.Stopped; - case "starting": - return RoutingState.Starting; - case "started": - return RoutingState.Started; - case "failed": - return RoutingState.Failed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, RoutingState value, JsonSerializerOptions options) - { - switch (value) - { - case RoutingState.Stopping: - writer.WriteStringValue("stopping"); - return; - case RoutingState.Stopped: - writer.WriteStringValue("stopped"); - return; - case RoutingState.Starting: - writer.WriteStringValue("starting"); - return; - case RoutingState.Started: - writer.WriteStringValue("started"); - return; - case RoutingState.Failed: - writer.WriteStringValue("failed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(RuleActionConverter))] -public enum RuleAction -{ - /// - /// - /// The result will not be created. Unless you also specify skip_model_update, the model will be updated as usual with the corresponding series value. - /// - /// - [EnumMember(Value = "skip_result")] - SkipResult, - /// - /// - /// The value for that series will not be used to update the model. Unless you also specify skip_result, the results will be created as usual. This action is suitable when certain values are expected to be consistently anomalous and they affect the model in a way that negatively impacts the rest of the results. - /// - /// - [EnumMember(Value = "skip_model_update")] - SkipModelUpdate -} - -internal sealed class RuleActionConverter : JsonConverter -{ - public override RuleAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "skip_result": - return RuleAction.SkipResult; - case "skip_model_update": - return RuleAction.SkipModelUpdate; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, RuleAction value, JsonSerializerOptions options) - { - switch (value) - { - case RuleAction.SkipResult: - writer.WriteStringValue("skip_result"); - return; - case RuleAction.SkipModelUpdate: - writer.WriteStringValue("skip_model_update"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SnapshotUpgradeStateConverter))] -public enum SnapshotUpgradeState -{ - [EnumMember(Value = "stopped")] - Stopped, - [EnumMember(Value = "saving_new_state")] - SavingNewState, - [EnumMember(Value = "loading_old_state")] - LoadingOldState, - [EnumMember(Value = "failed")] - Failed -} - -internal sealed class SnapshotUpgradeStateConverter : JsonConverter -{ - public override SnapshotUpgradeState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "stopped": - return SnapshotUpgradeState.Stopped; - case "saving_new_state": - return SnapshotUpgradeState.SavingNewState; - case "loading_old_state": - return SnapshotUpgradeState.LoadingOldState; - case "failed": - return SnapshotUpgradeState.Failed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SnapshotUpgradeState value, JsonSerializerOptions options) - { - switch (value) - { - case SnapshotUpgradeState.Stopped: - writer.WriteStringValue("stopped"); - return; - case SnapshotUpgradeState.SavingNewState: - writer.WriteStringValue("saving_new_state"); - return; - case SnapshotUpgradeState.LoadingOldState: - writer.WriteStringValue("loading_old_state"); - return; - case SnapshotUpgradeState.Failed: - writer.WriteStringValue("failed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TokenizationTruncateConverter))] -public enum TokenizationTruncate -{ - [EnumMember(Value = "second")] - Second, - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "first")] - First -} - -internal sealed class TokenizationTruncateConverter : JsonConverter -{ - public override TokenizationTruncate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "second": - return TokenizationTruncate.Second; - case "none": - return TokenizationTruncate.None; - case "first": - return TokenizationTruncate.First; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TokenizationTruncate value, JsonSerializerOptions options) - { - switch (value) - { - case TokenizationTruncate.Second: - writer.WriteStringValue("second"); - return; - case TokenizationTruncate.None: - writer.WriteStringValue("none"); - return; - case TokenizationTruncate.First: - writer.WriteStringValue("first"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TrainedModelTypeConverter))] -public enum TrainedModelType -{ - /// - /// - /// The model definition is an ensemble model of decision trees. - /// - /// - [EnumMember(Value = "tree_ensemble")] - TreeEnsemble, - /// - /// - /// The stored definition is a PyTorch (specifically a TorchScript) model. - /// Currently only NLP models are supported. - /// - /// - [EnumMember(Value = "pytorch")] - Pytorch, - /// - /// - /// A special type reserved for language identification models. - /// - /// - [EnumMember(Value = "lang_ident")] - LangIdent -} - -internal sealed class TrainedModelTypeConverter : JsonConverter -{ - public override TrainedModelType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "tree_ensemble": - return TrainedModelType.TreeEnsemble; - case "pytorch": - return TrainedModelType.Pytorch; - case "lang_ident": - return TrainedModelType.LangIdent; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TrainedModelType value, JsonSerializerOptions options) - { - switch (value) - { - case TrainedModelType.TreeEnsemble: - writer.WriteStringValue("tree_ensemble"); - return; - case TrainedModelType.Pytorch: - writer.WriteStringValue("pytorch"); - return; - case TrainedModelType.LangIdent: - writer.WriteStringValue("lang_ident"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TrainingPriorityConverter))] -public enum TrainingPriority -{ - [EnumMember(Value = "normal")] - Normal, - [EnumMember(Value = "low")] - Low -} - -internal sealed class TrainingPriorityConverter : JsonConverter -{ - public override TrainingPriority Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "normal": - return TrainingPriority.Normal; - case "low": - return TrainingPriority.Low; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TrainingPriority value, JsonSerializerOptions options) - { - switch (value) - { - case TrainingPriority.Normal: - writer.WriteStringValue("normal"); - return; - case TrainingPriority.Low: - writer.WriteStringValue("low"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs deleted file mode 100644 index 35464a20739..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs +++ /dev/null @@ -1,1250 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -[JsonConverter(typeof(DenseVectorElementTypeConverter))] -public enum DenseVectorElementType -{ - /// - /// - /// Indexes a 4-byte floating-point value per dimension. - /// - /// - [EnumMember(Value = "float")] - Float, - /// - /// - /// Indexes a 1-byte integer value per dimension. - /// - /// - [EnumMember(Value = "byte")] - Byte, - /// - /// - /// Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support - /// bit vectors. - /// - /// - /// NOTE: when using bit, the number of dimensions must be a multiple of 8 and must represent the number of bits. - /// - /// - [EnumMember(Value = "bit")] - Bit -} - -internal sealed class DenseVectorElementTypeConverter : JsonConverter -{ - public override DenseVectorElementType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "float": - return DenseVectorElementType.Float; - case "byte": - return DenseVectorElementType.Byte; - case "bit": - return DenseVectorElementType.Bit; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DenseVectorElementType value, JsonSerializerOptions options) - { - switch (value) - { - case DenseVectorElementType.Float: - writer.WriteStringValue("float"); - return; - case DenseVectorElementType.Byte: - writer.WriteStringValue("byte"); - return; - case DenseVectorElementType.Bit: - writer.WriteStringValue("bit"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DenseVectorIndexOptionsTypeConverter))] -public enum DenseVectorIndexOptionsType -{ - /// - /// - /// The default index type for float vectors. This utilizes the HNSW algorithm in addition to automatically scalar - /// quantization for scalable approximate kNN search with element_type of float. - /// - /// - /// This can reduce the memory footprint by 4x at the cost of some accuracy. - /// - /// - [EnumMember(Value = "int8_hnsw")] - Int8Hnsw, - /// - /// - /// This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports - /// element_type of float. - /// - /// - [EnumMember(Value = "int8_flat")] - Int8Flat, - /// - /// - /// This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN - /// search with element_type of float. - /// - /// - /// This can reduce the memory footprint by 8x at the cost of some accuracy. - /// - /// - [EnumMember(Value = "int4_hnsw")] - Int4Hnsw, - /// - /// - /// This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization. - /// Only supports element_type of float. - /// - /// - [EnumMember(Value = "int4_flat")] - Int4Flat, - /// - /// - /// This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all element_type values. - /// - /// - [EnumMember(Value = "hnsw")] - Hnsw, - /// - /// - /// This utilizes a brute-force search algorithm for exact kNN search. This supports all element_type values. - /// - /// - [EnumMember(Value = "flat")] - Flat -} - -internal sealed class DenseVectorIndexOptionsTypeConverter : JsonConverter -{ - public override DenseVectorIndexOptionsType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "int8_hnsw": - return DenseVectorIndexOptionsType.Int8Hnsw; - case "int8_flat": - return DenseVectorIndexOptionsType.Int8Flat; - case "int4_hnsw": - return DenseVectorIndexOptionsType.Int4Hnsw; - case "int4_flat": - return DenseVectorIndexOptionsType.Int4Flat; - case "hnsw": - return DenseVectorIndexOptionsType.Hnsw; - case "flat": - return DenseVectorIndexOptionsType.Flat; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DenseVectorIndexOptionsType value, JsonSerializerOptions options) - { - switch (value) - { - case DenseVectorIndexOptionsType.Int8Hnsw: - writer.WriteStringValue("int8_hnsw"); - return; - case DenseVectorIndexOptionsType.Int8Flat: - writer.WriteStringValue("int8_flat"); - return; - case DenseVectorIndexOptionsType.Int4Hnsw: - writer.WriteStringValue("int4_hnsw"); - return; - case DenseVectorIndexOptionsType.Int4Flat: - writer.WriteStringValue("int4_flat"); - return; - case DenseVectorIndexOptionsType.Hnsw: - writer.WriteStringValue("hnsw"); - return; - case DenseVectorIndexOptionsType.Flat: - writer.WriteStringValue("flat"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DenseVectorSimilarityConverter))] -public enum DenseVectorSimilarity -{ - /// - /// - /// Computes the maximum inner product of two vectors. This is similar to dot_product, but doesn't require vectors - /// to be normalized. This means that each vector’s magnitude can significantly effect the score. - /// - /// - /// The document _score is adjusted to prevent negative values. For max_inner_product values < 0, the _score - /// is 1 / (1 + -1 * max_inner_product(query, vector)). For non-negative max_inner_product results the _score - /// is calculated max_inner_product(query, vector) + 1. - /// - /// - [EnumMember(Value = "max_inner_product")] - MaxInnerProduct, - /// - /// - /// Computes similarity based on the L2 distance (also known as Euclidean distance) between the vectors. - /// - /// - /// The document _score is computed as 1 / (1 + l2_norm(query, vector)^2). - /// - /// - /// For bit vectors, instead of using l2_norm, the hamming distance between the vectors is used. - /// - /// - /// The _score transformation is (numBits - hamming(a, b)) / numBits. - /// - /// - [EnumMember(Value = "l2_norm")] - L2Norm, - /// - /// - /// Computes the dot product of two unit vectors. This option provides an optimized way to perform cosine similarity. - /// The constraints and computed score are defined by element_type. - /// - /// - /// When element_type is float, all vectors must be unit length, including both document and query vectors. - /// - /// - /// The document _score is computed as (1 + dot_product(query, vector)) / 2. - /// - /// - /// When element_type is byte, all vectors must have the same length including both document and query vectors or - /// results will be inaccurate. - /// - /// - /// The document _score is computed as 0.5 + (dot_product(query, vector) / (32768 * dims)) where dims is the - /// number of dimensions per vector. - /// - /// - [EnumMember(Value = "dot_product")] - DotProduct, - /// - /// - /// Computes the cosine similarity. During indexing Elasticsearch automatically normalizes vectors with cosine - /// similarity to unit length. This allows to internally use dot_product for computing similarity, which is more - /// efficient. Original un-normalized vectors can be still accessed through scripts. - /// - /// - /// The document _score is computed as (1 + cosine(query, vector)) / 2. - /// - /// - /// The cosine similarity does not allow vectors with zero magnitude, since cosine is not defined in this case. - /// - /// - [EnumMember(Value = "cosine")] - Cosine -} - -internal sealed class DenseVectorSimilarityConverter : JsonConverter -{ - public override DenseVectorSimilarity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "max_inner_product": - return DenseVectorSimilarity.MaxInnerProduct; - case "l2_norm": - return DenseVectorSimilarity.L2Norm; - case "dot_product": - return DenseVectorSimilarity.DotProduct; - case "cosine": - return DenseVectorSimilarity.Cosine; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DenseVectorSimilarity value, JsonSerializerOptions options) - { - switch (value) - { - case DenseVectorSimilarity.MaxInnerProduct: - writer.WriteStringValue("max_inner_product"); - return; - case DenseVectorSimilarity.L2Norm: - writer.WriteStringValue("l2_norm"); - return; - case DenseVectorSimilarity.DotProduct: - writer.WriteStringValue("dot_product"); - return; - case DenseVectorSimilarity.Cosine: - writer.WriteStringValue("cosine"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DynamicMappingConverter))] -public enum DynamicMapping -{ - [EnumMember(Value = "true")] - True, - [EnumMember(Value = "strict")] - Strict, - [EnumMember(Value = "runtime")] - Runtime, - [EnumMember(Value = "false")] - False -} - -internal sealed class DynamicMappingConverter : JsonConverter -{ - public override DynamicMapping Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "true": - return DynamicMapping.True; - case "strict": - return DynamicMapping.Strict; - case "runtime": - return DynamicMapping.Runtime; - case "false": - return DynamicMapping.False; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DynamicMapping value, JsonSerializerOptions options) - { - switch (value) - { - case DynamicMapping.True: - writer.WriteStringValue("true"); - return; - case DynamicMapping.Strict: - writer.WriteStringValue("strict"); - return; - case DynamicMapping.Runtime: - writer.WriteStringValue("runtime"); - return; - case DynamicMapping.False: - writer.WriteStringValue("false"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FieldTypeConverter))] -public enum FieldType -{ - [EnumMember(Value = "version")] - Version, - [EnumMember(Value = "token_count")] - TokenCount, - [EnumMember(Value = "text")] - Text, - [EnumMember(Value = "sparse_vector")] - SparseVector, - [EnumMember(Value = "short")] - Short, - [EnumMember(Value = "shape")] - Shape, - [EnumMember(Value = "semantic_text")] - SemanticText, - [EnumMember(Value = "search_as_you_type")] - SearchAsYouType, - [EnumMember(Value = "scaled_float")] - ScaledFloat, - [EnumMember(Value = "rank_features")] - RankFeatures, - [EnumMember(Value = "rank_feature")] - RankFeature, - [EnumMember(Value = "percolator")] - Percolator, - [EnumMember(Value = "passthrough")] - Passthrough, - [EnumMember(Value = "object")] - Object, - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "nested")] - Nested, - [EnumMember(Value = "murmur3")] - Murmur3, - [EnumMember(Value = "match_only_text")] - MatchOnlyText, - [EnumMember(Value = "long_range")] - LongRange, - [EnumMember(Value = "long")] - Long, - [EnumMember(Value = "keyword")] - Keyword, - [EnumMember(Value = "join")] - Join, - [EnumMember(Value = "ip_range")] - IpRange, - [EnumMember(Value = "ip")] - Ip, - [EnumMember(Value = "integer_range")] - IntegerRange, - [EnumMember(Value = "integer")] - Integer, - [EnumMember(Value = "icu_collation_keyword")] - IcuCollationKeyword, - [EnumMember(Value = "histogram")] - Histogram, - [EnumMember(Value = "half_float")] - HalfFloat, - [EnumMember(Value = "geo_shape")] - GeoShape, - [EnumMember(Value = "geo_point")] - GeoPoint, - [EnumMember(Value = "float_range")] - FloatRange, - [EnumMember(Value = "float")] - Float, - [EnumMember(Value = "flattened")] - Flattened, - [EnumMember(Value = "double_range")] - DoubleRange, - [EnumMember(Value = "double")] - Double, - [EnumMember(Value = "dense_vector")] - DenseVector, - [EnumMember(Value = "date_range")] - DateRange, - [EnumMember(Value = "date_nanos")] - DateNanos, - [EnumMember(Value = "date")] - Date, - [EnumMember(Value = "constant_keyword")] - ConstantKeyword, - [EnumMember(Value = "completion")] - Completion, - [EnumMember(Value = "byte")] - Byte, - [EnumMember(Value = "boolean")] - Boolean, - [EnumMember(Value = "binary")] - Binary, - [EnumMember(Value = "alias")] - Alias, - [EnumMember(Value = "aggregate_metric_double")] - AggregateMetricDouble -} - -internal sealed class FieldTypeConverter : JsonConverter -{ - public override FieldType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "version": - return FieldType.Version; - case "token_count": - return FieldType.TokenCount; - case "text": - return FieldType.Text; - case "sparse_vector": - return FieldType.SparseVector; - case "short": - return FieldType.Short; - case "shape": - return FieldType.Shape; - case "semantic_text": - return FieldType.SemanticText; - case "search_as_you_type": - return FieldType.SearchAsYouType; - case "scaled_float": - return FieldType.ScaledFloat; - case "rank_features": - return FieldType.RankFeatures; - case "rank_feature": - return FieldType.RankFeature; - case "percolator": - return FieldType.Percolator; - case "passthrough": - return FieldType.Passthrough; - case "object": - return FieldType.Object; - case "none": - return FieldType.None; - case "nested": - return FieldType.Nested; - case "murmur3": - return FieldType.Murmur3; - case "match_only_text": - return FieldType.MatchOnlyText; - case "long_range": - return FieldType.LongRange; - case "long": - return FieldType.Long; - case "keyword": - return FieldType.Keyword; - case "join": - return FieldType.Join; - case "ip_range": - return FieldType.IpRange; - case "ip": - return FieldType.Ip; - case "integer_range": - return FieldType.IntegerRange; - case "integer": - return FieldType.Integer; - case "icu_collation_keyword": - return FieldType.IcuCollationKeyword; - case "histogram": - return FieldType.Histogram; - case "half_float": - return FieldType.HalfFloat; - case "geo_shape": - return FieldType.GeoShape; - case "geo_point": - return FieldType.GeoPoint; - case "float_range": - return FieldType.FloatRange; - case "float": - return FieldType.Float; - case "flattened": - return FieldType.Flattened; - case "double_range": - return FieldType.DoubleRange; - case "double": - return FieldType.Double; - case "dense_vector": - return FieldType.DenseVector; - case "date_range": - return FieldType.DateRange; - case "date_nanos": - return FieldType.DateNanos; - case "date": - return FieldType.Date; - case "constant_keyword": - return FieldType.ConstantKeyword; - case "completion": - return FieldType.Completion; - case "byte": - return FieldType.Byte; - case "boolean": - return FieldType.Boolean; - case "binary": - return FieldType.Binary; - case "alias": - return FieldType.Alias; - case "aggregate_metric_double": - return FieldType.AggregateMetricDouble; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FieldType value, JsonSerializerOptions options) - { - switch (value) - { - case FieldType.Version: - writer.WriteStringValue("version"); - return; - case FieldType.TokenCount: - writer.WriteStringValue("token_count"); - return; - case FieldType.Text: - writer.WriteStringValue("text"); - return; - case FieldType.SparseVector: - writer.WriteStringValue("sparse_vector"); - return; - case FieldType.Short: - writer.WriteStringValue("short"); - return; - case FieldType.Shape: - writer.WriteStringValue("shape"); - return; - case FieldType.SemanticText: - writer.WriteStringValue("semantic_text"); - return; - case FieldType.SearchAsYouType: - writer.WriteStringValue("search_as_you_type"); - return; - case FieldType.ScaledFloat: - writer.WriteStringValue("scaled_float"); - return; - case FieldType.RankFeatures: - writer.WriteStringValue("rank_features"); - return; - case FieldType.RankFeature: - writer.WriteStringValue("rank_feature"); - return; - case FieldType.Percolator: - writer.WriteStringValue("percolator"); - return; - case FieldType.Passthrough: - writer.WriteStringValue("passthrough"); - return; - case FieldType.Object: - writer.WriteStringValue("object"); - return; - case FieldType.None: - writer.WriteStringValue("none"); - return; - case FieldType.Nested: - writer.WriteStringValue("nested"); - return; - case FieldType.Murmur3: - writer.WriteStringValue("murmur3"); - return; - case FieldType.MatchOnlyText: - writer.WriteStringValue("match_only_text"); - return; - case FieldType.LongRange: - writer.WriteStringValue("long_range"); - return; - case FieldType.Long: - writer.WriteStringValue("long"); - return; - case FieldType.Keyword: - writer.WriteStringValue("keyword"); - return; - case FieldType.Join: - writer.WriteStringValue("join"); - return; - case FieldType.IpRange: - writer.WriteStringValue("ip_range"); - return; - case FieldType.Ip: - writer.WriteStringValue("ip"); - return; - case FieldType.IntegerRange: - writer.WriteStringValue("integer_range"); - return; - case FieldType.Integer: - writer.WriteStringValue("integer"); - return; - case FieldType.IcuCollationKeyword: - writer.WriteStringValue("icu_collation_keyword"); - return; - case FieldType.Histogram: - writer.WriteStringValue("histogram"); - return; - case FieldType.HalfFloat: - writer.WriteStringValue("half_float"); - return; - case FieldType.GeoShape: - writer.WriteStringValue("geo_shape"); - return; - case FieldType.GeoPoint: - writer.WriteStringValue("geo_point"); - return; - case FieldType.FloatRange: - writer.WriteStringValue("float_range"); - return; - case FieldType.Float: - writer.WriteStringValue("float"); - return; - case FieldType.Flattened: - writer.WriteStringValue("flattened"); - return; - case FieldType.DoubleRange: - writer.WriteStringValue("double_range"); - return; - case FieldType.Double: - writer.WriteStringValue("double"); - return; - case FieldType.DenseVector: - writer.WriteStringValue("dense_vector"); - return; - case FieldType.DateRange: - writer.WriteStringValue("date_range"); - return; - case FieldType.DateNanos: - writer.WriteStringValue("date_nanos"); - return; - case FieldType.Date: - writer.WriteStringValue("date"); - return; - case FieldType.ConstantKeyword: - writer.WriteStringValue("constant_keyword"); - return; - case FieldType.Completion: - writer.WriteStringValue("completion"); - return; - case FieldType.Byte: - writer.WriteStringValue("byte"); - return; - case FieldType.Boolean: - writer.WriteStringValue("boolean"); - return; - case FieldType.Binary: - writer.WriteStringValue("binary"); - return; - case FieldType.Alias: - writer.WriteStringValue("alias"); - return; - case FieldType.AggregateMetricDouble: - writer.WriteStringValue("aggregate_metric_double"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoOrientationConverter))] -public enum GeoOrientation -{ - [EnumMember(Value = "right")] - Right, - [EnumMember(Value = "left")] - Left -} - -internal sealed class GeoOrientationConverter : JsonConverter -{ - public override GeoOrientation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "right": - case "RIGHT": - case "counterclockwise": - case "ccw": - return GeoOrientation.Right; - case "left": - case "LEFT": - case "clockwise": - case "cw": - return GeoOrientation.Left; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoOrientation value, JsonSerializerOptions options) - { - switch (value) - { - case GeoOrientation.Right: - writer.WriteStringValue("right"); - return; - case GeoOrientation.Left: - writer.WriteStringValue("left"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoStrategyConverter))] -public enum GeoStrategy -{ - [EnumMember(Value = "term")] - Term, - [EnumMember(Value = "recursive")] - Recursive -} - -internal sealed class GeoStrategyConverter : JsonConverter -{ - public override GeoStrategy Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "term": - return GeoStrategy.Term; - case "recursive": - return GeoStrategy.Recursive; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoStrategy value, JsonSerializerOptions options) - { - switch (value) - { - case GeoStrategy.Term: - writer.WriteStringValue("term"); - return; - case GeoStrategy.Recursive: - writer.WriteStringValue("recursive"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IndexOptionsConverter))] -public enum IndexOptions -{ - [EnumMember(Value = "positions")] - Positions, - [EnumMember(Value = "offsets")] - Offsets, - [EnumMember(Value = "freqs")] - Freqs, - [EnumMember(Value = "docs")] - Docs -} - -internal sealed class IndexOptionsConverter : JsonConverter -{ - public override IndexOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "positions": - return IndexOptions.Positions; - case "offsets": - return IndexOptions.Offsets; - case "freqs": - return IndexOptions.Freqs; - case "docs": - return IndexOptions.Docs; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IndexOptions value, JsonSerializerOptions options) - { - switch (value) - { - case IndexOptions.Positions: - writer.WriteStringValue("positions"); - return; - case IndexOptions.Offsets: - writer.WriteStringValue("offsets"); - return; - case IndexOptions.Freqs: - writer.WriteStringValue("freqs"); - return; - case IndexOptions.Docs: - writer.WriteStringValue("docs"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(MatchTypeConverter))] -public enum MatchType -{ - [EnumMember(Value = "simple")] - Simple, - [EnumMember(Value = "regex")] - Regex -} - -internal sealed class MatchTypeConverter : JsonConverter -{ - public override MatchType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "simple": - return MatchType.Simple; - case "regex": - return MatchType.Regex; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, MatchType value, JsonSerializerOptions options) - { - switch (value) - { - case MatchType.Simple: - writer.WriteStringValue("simple"); - return; - case MatchType.Regex: - writer.WriteStringValue("regex"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(OnScriptErrorConverter))] -public enum OnScriptError -{ - [EnumMember(Value = "fail")] - Fail, - [EnumMember(Value = "continue")] - Continue -} - -internal sealed class OnScriptErrorConverter : JsonConverter -{ - public override OnScriptError Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "fail": - return OnScriptError.Fail; - case "continue": - return OnScriptError.Continue; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, OnScriptError value, JsonSerializerOptions options) - { - switch (value) - { - case OnScriptError.Fail: - writer.WriteStringValue("fail"); - return; - case OnScriptError.Continue: - writer.WriteStringValue("continue"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(RuntimeFieldTypeConverter))] -public enum RuntimeFieldType -{ - [EnumMember(Value = "lookup")] - Lookup, - [EnumMember(Value = "long")] - Long, - [EnumMember(Value = "keyword")] - Keyword, - [EnumMember(Value = "ip")] - Ip, - [EnumMember(Value = "geo_point")] - GeoPoint, - [EnumMember(Value = "double")] - Double, - [EnumMember(Value = "date")] - Date, - [EnumMember(Value = "composite")] - Composite, - [EnumMember(Value = "boolean")] - Boolean -} - -internal sealed class RuntimeFieldTypeConverter : JsonConverter -{ - public override RuntimeFieldType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "lookup": - return RuntimeFieldType.Lookup; - case "long": - return RuntimeFieldType.Long; - case "keyword": - return RuntimeFieldType.Keyword; - case "ip": - return RuntimeFieldType.Ip; - case "geo_point": - return RuntimeFieldType.GeoPoint; - case "double": - return RuntimeFieldType.Double; - case "date": - return RuntimeFieldType.Date; - case "composite": - return RuntimeFieldType.Composite; - case "boolean": - return RuntimeFieldType.Boolean; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, RuntimeFieldType value, JsonSerializerOptions options) - { - switch (value) - { - case RuntimeFieldType.Lookup: - writer.WriteStringValue("lookup"); - return; - case RuntimeFieldType.Long: - writer.WriteStringValue("long"); - return; - case RuntimeFieldType.Keyword: - writer.WriteStringValue("keyword"); - return; - case RuntimeFieldType.Ip: - writer.WriteStringValue("ip"); - return; - case RuntimeFieldType.GeoPoint: - writer.WriteStringValue("geo_point"); - return; - case RuntimeFieldType.Double: - writer.WriteStringValue("double"); - return; - case RuntimeFieldType.Date: - writer.WriteStringValue("date"); - return; - case RuntimeFieldType.Composite: - writer.WriteStringValue("composite"); - return; - case RuntimeFieldType.Boolean: - writer.WriteStringValue("boolean"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SourceFieldModeConverter))] -public enum SourceFieldMode -{ - /// - /// - /// Instead of storing source documents on disk exactly as you send them, - /// Elasticsearch can reconstruct source content on the fly upon retrieval. - /// - /// - [EnumMember(Value = "synthetic")] - Synthetic, - [EnumMember(Value = "stored")] - Stored, - [EnumMember(Value = "disabled")] - Disabled -} - -internal sealed class SourceFieldModeConverter : JsonConverter -{ - public override SourceFieldMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "synthetic": - return SourceFieldMode.Synthetic; - case "stored": - return SourceFieldMode.Stored; - case "disabled": - return SourceFieldMode.Disabled; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SourceFieldMode value, JsonSerializerOptions options) - { - switch (value) - { - case SourceFieldMode.Synthetic: - writer.WriteStringValue("synthetic"); - return; - case SourceFieldMode.Stored: - writer.WriteStringValue("stored"); - return; - case SourceFieldMode.Disabled: - writer.WriteStringValue("disabled"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TermVectorOptionConverter))] -public enum TermVectorOption -{ - [EnumMember(Value = "yes")] - Yes, - [EnumMember(Value = "with_positions_payloads")] - WithPositionsPayloads, - [EnumMember(Value = "with_positions_offsets_payloads")] - WithPositionsOffsetsPayloads, - [EnumMember(Value = "with_positions_offsets")] - WithPositionsOffsets, - [EnumMember(Value = "with_positions")] - WithPositions, - [EnumMember(Value = "with_offsets")] - WithOffsets, - [EnumMember(Value = "no")] - No -} - -internal sealed class TermVectorOptionConverter : JsonConverter -{ - public override TermVectorOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yes": - return TermVectorOption.Yes; - case "with_positions_payloads": - return TermVectorOption.WithPositionsPayloads; - case "with_positions_offsets_payloads": - return TermVectorOption.WithPositionsOffsetsPayloads; - case "with_positions_offsets": - return TermVectorOption.WithPositionsOffsets; - case "with_positions": - return TermVectorOption.WithPositions; - case "with_offsets": - return TermVectorOption.WithOffsets; - case "no": - return TermVectorOption.No; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TermVectorOption value, JsonSerializerOptions options) - { - switch (value) - { - case TermVectorOption.Yes: - writer.WriteStringValue("yes"); - return; - case TermVectorOption.WithPositionsPayloads: - writer.WriteStringValue("with_positions_payloads"); - return; - case TermVectorOption.WithPositionsOffsetsPayloads: - writer.WriteStringValue("with_positions_offsets_payloads"); - return; - case TermVectorOption.WithPositionsOffsets: - writer.WriteStringValue("with_positions_offsets"); - return; - case TermVectorOption.WithPositions: - writer.WriteStringValue("with_positions"); - return; - case TermVectorOption.WithOffsets: - writer.WriteStringValue("with_offsets"); - return; - case TermVectorOption.No: - writer.WriteStringValue("no"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TimeSeriesMetricTypeConverter))] -public enum TimeSeriesMetricType -{ - [EnumMember(Value = "summary")] - Summary, - [EnumMember(Value = "position")] - Position, - [EnumMember(Value = "histogram")] - Histogram, - [EnumMember(Value = "gauge")] - Gauge, - [EnumMember(Value = "counter")] - Counter -} - -internal sealed class TimeSeriesMetricTypeConverter : JsonConverter -{ - public override TimeSeriesMetricType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "summary": - return TimeSeriesMetricType.Summary; - case "position": - return TimeSeriesMetricType.Position; - case "histogram": - return TimeSeriesMetricType.Histogram; - case "gauge": - return TimeSeriesMetricType.Gauge; - case "counter": - return TimeSeriesMetricType.Counter; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TimeSeriesMetricType value, JsonSerializerOptions options) - { - switch (value) - { - case TimeSeriesMetricType.Summary: - writer.WriteStringValue("summary"); - return; - case TimeSeriesMetricType.Position: - writer.WriteStringValue("position"); - return; - case TimeSeriesMetricType.Histogram: - writer.WriteStringValue("histogram"); - return; - case TimeSeriesMetricType.Gauge: - writer.WriteStringValue("gauge"); - return; - case TimeSeriesMetricType.Counter: - writer.WriteStringValue("counter"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.NoNamespace.g.cs deleted file mode 100644 index d44b52c36e8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.NoNamespace.g.cs +++ /dev/null @@ -1,1900 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -[JsonConverter(typeof(ClusterInfoTargetConverter))] -public enum ClusterInfoTarget -{ - [EnumMember(Value = "thread_pool")] - ThreadPool, - [EnumMember(Value = "script")] - Script, - [EnumMember(Value = "ingest")] - Ingest, - [EnumMember(Value = "http")] - Http, - [EnumMember(Value = "_all")] - All -} - -internal sealed class ClusterInfoTargetConverter : JsonConverter -{ - public override ClusterInfoTarget Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "thread_pool": - return ClusterInfoTarget.ThreadPool; - case "script": - return ClusterInfoTarget.Script; - case "ingest": - return ClusterInfoTarget.Ingest; - case "http": - return ClusterInfoTarget.Http; - case "_all": - return ClusterInfoTarget.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ClusterInfoTarget value, JsonSerializerOptions options) - { - switch (value) - { - case ClusterInfoTarget.ThreadPool: - writer.WriteStringValue("thread_pool"); - return; - case ClusterInfoTarget.Script: - writer.WriteStringValue("script"); - return; - case ClusterInfoTarget.Ingest: - writer.WriteStringValue("ingest"); - return; - case ClusterInfoTarget.Http: - writer.WriteStringValue("http"); - return; - case ClusterInfoTarget.All: - writer.WriteStringValue("_all"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ClusterSearchStatusConverter))] -public enum ClusterSearchStatus -{ - [EnumMember(Value = "successful")] - Successful, - [EnumMember(Value = "skipped")] - Skipped, - [EnumMember(Value = "running")] - Running, - [EnumMember(Value = "partial")] - Partial, - [EnumMember(Value = "failed")] - Failed -} - -internal sealed class ClusterSearchStatusConverter : JsonConverter -{ - public override ClusterSearchStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "successful": - return ClusterSearchStatus.Successful; - case "skipped": - return ClusterSearchStatus.Skipped; - case "running": - return ClusterSearchStatus.Running; - case "partial": - return ClusterSearchStatus.Partial; - case "failed": - return ClusterSearchStatus.Failed; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ClusterSearchStatus value, JsonSerializerOptions options) - { - switch (value) - { - case ClusterSearchStatus.Successful: - writer.WriteStringValue("successful"); - return; - case ClusterSearchStatus.Skipped: - writer.WriteStringValue("skipped"); - return; - case ClusterSearchStatus.Running: - writer.WriteStringValue("running"); - return; - case ClusterSearchStatus.Partial: - writer.WriteStringValue("partial"); - return; - case ClusterSearchStatus.Failed: - writer.WriteStringValue("failed"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ConflictsConverter))] -public enum Conflicts -{ - /// - /// - /// Continue reindexing even if there are conflicts. - /// - /// - [EnumMember(Value = "proceed")] - Proceed, - /// - /// - /// Stop reindexing if there are conflicts. - /// - /// - [EnumMember(Value = "abort")] - Abort -} - -internal sealed class ConflictsConverter : JsonConverter -{ - public override Conflicts Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "proceed": - return Conflicts.Proceed; - case "abort": - return Conflicts.Abort; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Conflicts value, JsonSerializerOptions options) - { - switch (value) - { - case Conflicts.Proceed: - writer.WriteStringValue("proceed"); - return; - case Conflicts.Abort: - writer.WriteStringValue("abort"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DFIIndependenceMeasureConverter))] -public enum DFIIndependenceMeasure -{ - [EnumMember(Value = "standardized")] - Standardized, - [EnumMember(Value = "saturated")] - Saturated, - [EnumMember(Value = "chisquared")] - Chisquared -} - -internal sealed class DFIIndependenceMeasureConverter : JsonConverter -{ - public override DFIIndependenceMeasure Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "standardized": - return DFIIndependenceMeasure.Standardized; - case "saturated": - return DFIIndependenceMeasure.Saturated; - case "chisquared": - return DFIIndependenceMeasure.Chisquared; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DFIIndependenceMeasure value, JsonSerializerOptions options) - { - switch (value) - { - case DFIIndependenceMeasure.Standardized: - writer.WriteStringValue("standardized"); - return; - case DFIIndependenceMeasure.Saturated: - writer.WriteStringValue("saturated"); - return; - case DFIIndependenceMeasure.Chisquared: - writer.WriteStringValue("chisquared"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DFRAfterEffectConverter))] -public enum DFRAfterEffect -{ - [EnumMember(Value = "no")] - No, - [EnumMember(Value = "l")] - l, - [EnumMember(Value = "b")] - b -} - -internal sealed class DFRAfterEffectConverter : JsonConverter -{ - public override DFRAfterEffect Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "no": - return DFRAfterEffect.No; - case "l": - return DFRAfterEffect.l; - case "b": - return DFRAfterEffect.b; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DFRAfterEffect value, JsonSerializerOptions options) - { - switch (value) - { - case DFRAfterEffect.No: - writer.WriteStringValue("no"); - return; - case DFRAfterEffect.l: - writer.WriteStringValue("l"); - return; - case DFRAfterEffect.b: - writer.WriteStringValue("b"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DFRBasicModelConverter))] -public enum DFRBasicModel -{ - [EnumMember(Value = "p")] - p, - [EnumMember(Value = "ine")] - Ine, - [EnumMember(Value = "in")] - In, - [EnumMember(Value = "if")] - If, - [EnumMember(Value = "g")] - g, - [EnumMember(Value = "d")] - d, - [EnumMember(Value = "be")] - Be -} - -internal sealed class DFRBasicModelConverter : JsonConverter -{ - public override DFRBasicModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "p": - return DFRBasicModel.p; - case "ine": - return DFRBasicModel.Ine; - case "in": - return DFRBasicModel.In; - case "if": - return DFRBasicModel.If; - case "g": - return DFRBasicModel.g; - case "d": - return DFRBasicModel.d; - case "be": - return DFRBasicModel.Be; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DFRBasicModel value, JsonSerializerOptions options) - { - switch (value) - { - case DFRBasicModel.p: - writer.WriteStringValue("p"); - return; - case DFRBasicModel.Ine: - writer.WriteStringValue("ine"); - return; - case DFRBasicModel.In: - writer.WriteStringValue("in"); - return; - case DFRBasicModel.If: - writer.WriteStringValue("if"); - return; - case DFRBasicModel.g: - writer.WriteStringValue("g"); - return; - case DFRBasicModel.d: - writer.WriteStringValue("d"); - return; - case DFRBasicModel.Be: - writer.WriteStringValue("be"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DistanceUnitConverter))] -public enum DistanceUnit -{ - [EnumMember(Value = "yd")] - Yards, - [EnumMember(Value = "nmi")] - NauticMiles, - [EnumMember(Value = "mm")] - Millimeters, - [EnumMember(Value = "mi")] - Miles, - [EnumMember(Value = "m")] - Meters, - [EnumMember(Value = "km")] - Kilometers, - [EnumMember(Value = "in")] - Inches, - [EnumMember(Value = "ft")] - Feet, - [EnumMember(Value = "cm")] - Centimeters -} - -internal sealed class DistanceUnitConverter : JsonConverter -{ - public override DistanceUnit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yd": - return DistanceUnit.Yards; - case "nmi": - return DistanceUnit.NauticMiles; - case "mm": - return DistanceUnit.Millimeters; - case "mi": - return DistanceUnit.Miles; - case "m": - return DistanceUnit.Meters; - case "km": - return DistanceUnit.Kilometers; - case "in": - return DistanceUnit.Inches; - case "ft": - return DistanceUnit.Feet; - case "cm": - return DistanceUnit.Centimeters; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DistanceUnit value, JsonSerializerOptions options) - { - switch (value) - { - case DistanceUnit.Yards: - writer.WriteStringValue("yd"); - return; - case DistanceUnit.NauticMiles: - writer.WriteStringValue("nmi"); - return; - case DistanceUnit.Millimeters: - writer.WriteStringValue("mm"); - return; - case DistanceUnit.Miles: - writer.WriteStringValue("mi"); - return; - case DistanceUnit.Meters: - writer.WriteStringValue("m"); - return; - case DistanceUnit.Kilometers: - writer.WriteStringValue("km"); - return; - case DistanceUnit.Inches: - writer.WriteStringValue("in"); - return; - case DistanceUnit.Feet: - writer.WriteStringValue("ft"); - return; - case DistanceUnit.Centimeters: - writer.WriteStringValue("cm"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ExpandWildcardConverter))] -public enum ExpandWildcard -{ - /// - /// - /// Match open, non-hidden indices. Also matches any non-hidden data stream. - /// - /// - [EnumMember(Value = "open")] - Open, - /// - /// - /// Wildcard expressions are not accepted. - /// - /// - [EnumMember(Value = "none")] - None, - /// - /// - /// Match hidden data streams and hidden indices. Must be combined with open, closed, or both. - /// - /// - [EnumMember(Value = "hidden")] - Hidden, - /// - /// - /// Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. - /// - /// - [EnumMember(Value = "closed")] - Closed, - /// - /// - /// Match any data stream or index, including hidden ones. - /// - /// - [EnumMember(Value = "all")] - All -} - -internal sealed class ExpandWildcardConverter : JsonConverter -{ - public override ExpandWildcard Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "open": - return ExpandWildcard.Open; - case "none": - return ExpandWildcard.None; - case "hidden": - return ExpandWildcard.Hidden; - case "closed": - return ExpandWildcard.Closed; - case "all": - return ExpandWildcard.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ExpandWildcard value, JsonSerializerOptions options) - { - switch (value) - { - case ExpandWildcard.Open: - writer.WriteStringValue("open"); - return; - case ExpandWildcard.None: - writer.WriteStringValue("none"); - return; - case ExpandWildcard.Hidden: - writer.WriteStringValue("hidden"); - return; - case ExpandWildcard.Closed: - writer.WriteStringValue("closed"); - return; - case ExpandWildcard.All: - writer.WriteStringValue("all"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FieldSortNumericTypeConverter))] -public enum FieldSortNumericType -{ - [EnumMember(Value = "long")] - Long, - [EnumMember(Value = "double")] - Double, - [EnumMember(Value = "date_nanos")] - DateNanos, - [EnumMember(Value = "date")] - Date -} - -internal sealed class FieldSortNumericTypeConverter : JsonConverter -{ - public override FieldSortNumericType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "long": - return FieldSortNumericType.Long; - case "double": - return FieldSortNumericType.Double; - case "date_nanos": - return FieldSortNumericType.DateNanos; - case "date": - return FieldSortNumericType.Date; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FieldSortNumericType value, JsonSerializerOptions options) - { - switch (value) - { - case FieldSortNumericType.Long: - writer.WriteStringValue("long"); - return; - case FieldSortNumericType.Double: - writer.WriteStringValue("double"); - return; - case FieldSortNumericType.DateNanos: - writer.WriteStringValue("date_nanos"); - return; - case FieldSortNumericType.Date: - writer.WriteStringValue("date"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoDistanceTypeConverter))] -public enum GeoDistanceType -{ - /// - /// - /// The plane calculation is faster but less accurate. - /// - /// - [EnumMember(Value = "plane")] - Plane, - /// - /// - /// The arc calculation is the most accurate. - /// - /// - [EnumMember(Value = "arc")] - Arc -} - -internal sealed class GeoDistanceTypeConverter : JsonConverter -{ - public override GeoDistanceType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "plane": - return GeoDistanceType.Plane; - case "arc": - return GeoDistanceType.Arc; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoDistanceType value, JsonSerializerOptions options) - { - switch (value) - { - case GeoDistanceType.Plane: - writer.WriteStringValue("plane"); - return; - case GeoDistanceType.Arc: - writer.WriteStringValue("arc"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoShapeRelationConverter))] -public enum GeoShapeRelation -{ - /// - /// - /// Return all documents whose geo_shape or geo_point field is within the query geometry. - /// Line geometries are not supported. - /// - /// - [EnumMember(Value = "within")] - Within, - /// - /// - /// Return all documents whose geo_shape or geo_point field intersects the query geometry. - /// - /// - [EnumMember(Value = "intersects")] - Intersects, - /// - /// - /// Return all documents whose geo_shape or geo_point field has nothing in common with the query geometry. - /// - /// - [EnumMember(Value = "disjoint")] - Disjoint, - /// - /// - /// Return all documents whose geo_shape or geo_point field contains the query geometry. - /// - /// - [EnumMember(Value = "contains")] - Contains -} - -internal sealed class GeoShapeRelationConverter : JsonConverter -{ - public override GeoShapeRelation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "within": - return GeoShapeRelation.Within; - case "intersects": - return GeoShapeRelation.Intersects; - case "disjoint": - return GeoShapeRelation.Disjoint; - case "contains": - return GeoShapeRelation.Contains; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoShapeRelation value, JsonSerializerOptions options) - { - switch (value) - { - case GeoShapeRelation.Within: - writer.WriteStringValue("within"); - return; - case GeoShapeRelation.Intersects: - writer.WriteStringValue("intersects"); - return; - case GeoShapeRelation.Disjoint: - writer.WriteStringValue("disjoint"); - return; - case GeoShapeRelation.Contains: - writer.WriteStringValue("contains"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(HealthStatusConverter))] -public enum HealthStatus -{ - /// - /// - /// All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired. - /// - /// - [EnumMember(Value = "yellow")] - Yellow, - /// - /// - /// One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned. - /// - /// - [EnumMember(Value = "red")] - Red, - /// - /// - /// All shards are assigned. - /// - /// - [EnumMember(Value = "green")] - Green -} - -internal sealed class HealthStatusConverter : JsonConverter -{ - public override HealthStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yellow": - case "YELLOW": - return HealthStatus.Yellow; - case "red": - case "RED": - return HealthStatus.Red; - case "green": - case "GREEN": - return HealthStatus.Green; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, HealthStatus value, JsonSerializerOptions options) - { - switch (value) - { - case HealthStatus.Yellow: - writer.WriteStringValue("yellow"); - return; - case HealthStatus.Red: - writer.WriteStringValue("red"); - return; - case HealthStatus.Green: - writer.WriteStringValue("green"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IBDistributionConverter))] -public enum IBDistribution -{ - [EnumMember(Value = "spl")] - Spl, - [EnumMember(Value = "ll")] - Ll -} - -internal sealed class IBDistributionConverter : JsonConverter -{ - public override IBDistribution Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "spl": - return IBDistribution.Spl; - case "ll": - return IBDistribution.Ll; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IBDistribution value, JsonSerializerOptions options) - { - switch (value) - { - case IBDistribution.Spl: - writer.WriteStringValue("spl"); - return; - case IBDistribution.Ll: - writer.WriteStringValue("ll"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(IBLambdaConverter))] -public enum IBLambda -{ - [EnumMember(Value = "ttf")] - Ttf, - [EnumMember(Value = "df")] - Df -} - -internal sealed class IBLambdaConverter : JsonConverter -{ - public override IBLambda Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "ttf": - return IBLambda.Ttf; - case "df": - return IBLambda.Df; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, IBLambda value, JsonSerializerOptions options) - { - switch (value) - { - case IBLambda.Ttf: - writer.WriteStringValue("ttf"); - return; - case IBLambda.Df: - writer.WriteStringValue("df"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(LevelConverter))] -public enum Level -{ - [EnumMember(Value = "shards")] - Shards, - [EnumMember(Value = "indices")] - Indices, - [EnumMember(Value = "cluster")] - Cluster -} - -internal sealed class LevelConverter : JsonConverter -{ - public override Level Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "shards": - return Level.Shards; - case "indices": - return Level.Indices; - case "cluster": - return Level.Cluster; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Level value, JsonSerializerOptions options) - { - switch (value) - { - case Level.Shards: - writer.WriteStringValue("shards"); - return; - case Level.Indices: - writer.WriteStringValue("indices"); - return; - case Level.Cluster: - writer.WriteStringValue("cluster"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(LifecycleOperationModeConverter))] -public enum LifecycleOperationMode -{ - [EnumMember(Value = "STOPPING")] - Stopping, - [EnumMember(Value = "STOPPED")] - Stopped, - [EnumMember(Value = "RUNNING")] - Running -} - -internal sealed class LifecycleOperationModeConverter : JsonConverter -{ - public override LifecycleOperationMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "STOPPING": - return LifecycleOperationMode.Stopping; - case "STOPPED": - return LifecycleOperationMode.Stopped; - case "RUNNING": - return LifecycleOperationMode.Running; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, LifecycleOperationMode value, JsonSerializerOptions options) - { - switch (value) - { - case LifecycleOperationMode.Stopping: - writer.WriteStringValue("STOPPING"); - return; - case LifecycleOperationMode.Stopped: - writer.WriteStringValue("STOPPED"); - return; - case LifecycleOperationMode.Running: - writer.WriteStringValue("RUNNING"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(NodeRoleConverter))] -public enum NodeRole -{ - [EnumMember(Value = "voting_only")] - VotingOnly, - [EnumMember(Value = "transform")] - Transform, - [EnumMember(Value = "remote_cluster_client")] - RemoteClusterClient, - [EnumMember(Value = "ml")] - Ml, - [EnumMember(Value = "master")] - Master, - [EnumMember(Value = "ingest")] - Ingest, - [EnumMember(Value = "data_warm")] - DataWarm, - [EnumMember(Value = "data_hot")] - DataHot, - [EnumMember(Value = "data_frozen")] - DataFrozen, - [EnumMember(Value = "data_content")] - DataContent, - [EnumMember(Value = "data_cold")] - DataCold, - [EnumMember(Value = "data")] - Data, - [EnumMember(Value = "coordinating_only")] - CoordinatingOnly, - [EnumMember(Value = "client")] - Client -} - -internal sealed class NodeRoleConverter : JsonConverter -{ - public override NodeRole Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "voting_only": - return NodeRole.VotingOnly; - case "transform": - return NodeRole.Transform; - case "remote_cluster_client": - return NodeRole.RemoteClusterClient; - case "ml": - return NodeRole.Ml; - case "master": - return NodeRole.Master; - case "ingest": - return NodeRole.Ingest; - case "data_warm": - return NodeRole.DataWarm; - case "data_hot": - return NodeRole.DataHot; - case "data_frozen": - return NodeRole.DataFrozen; - case "data_content": - return NodeRole.DataContent; - case "data_cold": - return NodeRole.DataCold; - case "data": - return NodeRole.Data; - case "coordinating_only": - return NodeRole.CoordinatingOnly; - case "client": - return NodeRole.Client; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, NodeRole value, JsonSerializerOptions options) - { - switch (value) - { - case NodeRole.VotingOnly: - writer.WriteStringValue("voting_only"); - return; - case NodeRole.Transform: - writer.WriteStringValue("transform"); - return; - case NodeRole.RemoteClusterClient: - writer.WriteStringValue("remote_cluster_client"); - return; - case NodeRole.Ml: - writer.WriteStringValue("ml"); - return; - case NodeRole.Master: - writer.WriteStringValue("master"); - return; - case NodeRole.Ingest: - writer.WriteStringValue("ingest"); - return; - case NodeRole.DataWarm: - writer.WriteStringValue("data_warm"); - return; - case NodeRole.DataHot: - writer.WriteStringValue("data_hot"); - return; - case NodeRole.DataFrozen: - writer.WriteStringValue("data_frozen"); - return; - case NodeRole.DataContent: - writer.WriteStringValue("data_content"); - return; - case NodeRole.DataCold: - writer.WriteStringValue("data_cold"); - return; - case NodeRole.Data: - writer.WriteStringValue("data"); - return; - case NodeRole.CoordinatingOnly: - writer.WriteStringValue("coordinating_only"); - return; - case NodeRole.Client: - writer.WriteStringValue("client"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(NormalizationConverter))] -public enum Normalization -{ - [EnumMember(Value = "z")] - z, - [EnumMember(Value = "no")] - No, - [EnumMember(Value = "h3")] - H3, - [EnumMember(Value = "h2")] - H2, - [EnumMember(Value = "h1")] - H1 -} - -internal sealed class NormalizationConverter : JsonConverter -{ - public override Normalization Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "z": - return Normalization.z; - case "no": - return Normalization.No; - case "h3": - return Normalization.H3; - case "h2": - return Normalization.H2; - case "h1": - return Normalization.H1; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Normalization value, JsonSerializerOptions options) - { - switch (value) - { - case Normalization.z: - writer.WriteStringValue("z"); - return; - case Normalization.No: - writer.WriteStringValue("no"); - return; - case Normalization.H3: - writer.WriteStringValue("h3"); - return; - case Normalization.H2: - writer.WriteStringValue("h2"); - return; - case Normalization.H1: - writer.WriteStringValue("h1"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ResultConverter))] -public enum Result -{ - [EnumMember(Value = "updated")] - Updated, - [EnumMember(Value = "not_found")] - NotFound, - [EnumMember(Value = "noop")] - NoOp, - [EnumMember(Value = "deleted")] - Deleted, - [EnumMember(Value = "created")] - Created -} - -internal sealed class ResultConverter : JsonConverter -{ - public override Result Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "updated": - return Result.Updated; - case "not_found": - return Result.NotFound; - case "noop": - return Result.NoOp; - case "deleted": - return Result.Deleted; - case "created": - return Result.Created; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Result value, JsonSerializerOptions options) - { - switch (value) - { - case Result.Updated: - writer.WriteStringValue("updated"); - return; - case Result.NotFound: - writer.WriteStringValue("not_found"); - return; - case Result.NoOp: - writer.WriteStringValue("noop"); - return; - case Result.Deleted: - writer.WriteStringValue("deleted"); - return; - case Result.Created: - writer.WriteStringValue("created"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(EnumStructConverter))] -public readonly partial struct ScriptLanguage : IEnumStruct -{ - public ScriptLanguage(string value) => Value = value; - - ScriptLanguage IEnumStruct.Create(string value) => value; - - public readonly string Value { get; } - - /// - /// - /// Painless scripting language, purpose-built for Elasticsearch. - /// - /// - public static ScriptLanguage Painless { get; } = new ScriptLanguage("painless"); - - /// - /// - /// Mustache templated, used for templates. - /// - /// - public static ScriptLanguage Mustache { get; } = new ScriptLanguage("mustache"); - - /// - /// - /// Expert Java API - /// - /// - public static ScriptLanguage Java { get; } = new ScriptLanguage("java"); - - /// - /// - /// Lucene’s expressions language, compiles a JavaScript expression to bytecode. - /// - /// - public static ScriptLanguage Expression { get; } = new ScriptLanguage("expression"); - - public override string ToString() => Value ?? string.Empty; - - public static implicit operator string(ScriptLanguage scriptLanguage) => scriptLanguage.Value; - public static implicit operator ScriptLanguage(string value) => new(value); - - public override int GetHashCode() => Value.GetHashCode(); - public override bool Equals(object obj) => obj is ScriptLanguage other && this.Equals(other); - public bool Equals(ScriptLanguage other) => Value == other.Value; - - public static bool operator ==(ScriptLanguage a, ScriptLanguage b) => a.Equals(b); - public static bool operator !=(ScriptLanguage a, ScriptLanguage b) => !(a == b); -} - -[JsonConverter(typeof(ScriptSortTypeConverter))] -public enum ScriptSortType -{ - [EnumMember(Value = "version")] - Version, - [EnumMember(Value = "string")] - String, - [EnumMember(Value = "number")] - Number -} - -internal sealed class ScriptSortTypeConverter : JsonConverter -{ - public override ScriptSortType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "version": - return ScriptSortType.Version; - case "string": - return ScriptSortType.String; - case "number": - return ScriptSortType.Number; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ScriptSortType value, JsonSerializerOptions options) - { - switch (value) - { - case ScriptSortType.Version: - writer.WriteStringValue("version"); - return; - case ScriptSortType.String: - writer.WriteStringValue("string"); - return; - case ScriptSortType.Number: - writer.WriteStringValue("number"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SearchTypeConverter))] -public enum SearchType -{ - /// - /// - /// Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate. - /// - /// - [EnumMember(Value = "query_then_fetch")] - QueryThenFetch, - /// - /// - /// Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate. - /// - /// - [EnumMember(Value = "dfs_query_then_fetch")] - DfsQueryThenFetch -} - -internal sealed class SearchTypeConverter : JsonConverter -{ - public override SearchType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "query_then_fetch": - return SearchType.QueryThenFetch; - case "dfs_query_then_fetch": - return SearchType.DfsQueryThenFetch; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SearchType value, JsonSerializerOptions options) - { - switch (value) - { - case SearchType.QueryThenFetch: - writer.WriteStringValue("query_then_fetch"); - return; - case SearchType.DfsQueryThenFetch: - writer.WriteStringValue("dfs_query_then_fetch"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SlicesCalculationConverter))] -public enum SlicesCalculation -{ - /// - /// - /// Let Elasticsearch choose a reasonable number for most data streams and indices. - /// - /// - [EnumMember(Value = "auto")] - Auto -} - -internal sealed class SlicesCalculationConverter : JsonConverter -{ - public override SlicesCalculation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "auto": - return SlicesCalculation.Auto; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SlicesCalculation value, JsonSerializerOptions options) - { - switch (value) - { - case SlicesCalculation.Auto: - writer.WriteStringValue("auto"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SortModeConverter))] -public enum SortMode -{ - [EnumMember(Value = "sum")] - Sum, - [EnumMember(Value = "min")] - Min, - [EnumMember(Value = "median")] - Median, - [EnumMember(Value = "max")] - Max, - [EnumMember(Value = "avg")] - Avg -} - -internal sealed class SortModeConverter : JsonConverter -{ - public override SortMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "sum": - return SortMode.Sum; - case "min": - return SortMode.Min; - case "median": - return SortMode.Median; - case "max": - return SortMode.Max; - case "avg": - return SortMode.Avg; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SortMode value, JsonSerializerOptions options) - { - switch (value) - { - case SortMode.Sum: - writer.WriteStringValue("sum"); - return; - case SortMode.Min: - writer.WriteStringValue("min"); - return; - case SortMode.Median: - writer.WriteStringValue("median"); - return; - case SortMode.Max: - writer.WriteStringValue("max"); - return; - case SortMode.Avg: - writer.WriteStringValue("avg"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SortOrderConverter))] -public enum SortOrder -{ - /// - /// - /// Descending (largest to smallest) - /// - /// - [EnumMember(Value = "desc")] - Desc, - /// - /// - /// Ascending (smallest to largest) - /// - /// - [EnumMember(Value = "asc")] - Asc -} - -internal sealed class SortOrderConverter : JsonConverter -{ - public override SortOrder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "desc": - return SortOrder.Desc; - case "asc": - return SortOrder.Asc; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SortOrder value, JsonSerializerOptions options) - { - switch (value) - { - case SortOrder.Desc: - writer.WriteStringValue("desc"); - return; - case SortOrder.Asc: - writer.WriteStringValue("asc"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SuggestModeConverter))] -public enum SuggestMode -{ - /// - /// - /// Only suggest terms that occur in more docs on the shard than the original term. - /// - /// - [EnumMember(Value = "popular")] - Popular, - /// - /// - /// Only generate suggestions for terms that are not in the shard. - /// - /// - [EnumMember(Value = "missing")] - Missing, - /// - /// - /// Suggest any matching suggestions based on terms in the suggest text. - /// - /// - [EnumMember(Value = "always")] - Always -} - -internal sealed class SuggestModeConverter : JsonConverter -{ - public override SuggestMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "popular": - return SuggestMode.Popular; - case "missing": - return SuggestMode.Missing; - case "always": - return SuggestMode.Always; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SuggestMode value, JsonSerializerOptions options) - { - switch (value) - { - case SuggestMode.Popular: - writer.WriteStringValue("popular"); - return; - case SuggestMode.Missing: - writer.WriteStringValue("missing"); - return; - case SuggestMode.Always: - writer.WriteStringValue("always"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ThreadTypeConverter))] -public enum ThreadType -{ - [EnumMember(Value = "wait")] - Wait, - [EnumMember(Value = "mem")] - Mem, - [EnumMember(Value = "gpu")] - Gpu, - [EnumMember(Value = "cpu")] - Cpu, - [EnumMember(Value = "block")] - Block -} - -internal sealed class ThreadTypeConverter : JsonConverter -{ - public override ThreadType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "wait": - return ThreadType.Wait; - case "mem": - return ThreadType.Mem; - case "gpu": - return ThreadType.Gpu; - case "cpu": - return ThreadType.Cpu; - case "block": - return ThreadType.Block; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ThreadType value, JsonSerializerOptions options) - { - switch (value) - { - case ThreadType.Wait: - writer.WriteStringValue("wait"); - return; - case ThreadType.Mem: - writer.WriteStringValue("mem"); - return; - case ThreadType.Gpu: - writer.WriteStringValue("gpu"); - return; - case ThreadType.Cpu: - writer.WriteStringValue("cpu"); - return; - case ThreadType.Block: - writer.WriteStringValue("block"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(TimeUnitConverter))] -public enum TimeUnit -{ - [EnumMember(Value = "s")] - Seconds, - [EnumMember(Value = "nanos")] - Nanoseconds, - [EnumMember(Value = "m")] - Minutes, - [EnumMember(Value = "ms")] - Milliseconds, - [EnumMember(Value = "micros")] - Microseconds, - [EnumMember(Value = "h")] - Hours, - [EnumMember(Value = "d")] - Days -} - -internal sealed class TimeUnitConverter : JsonConverter -{ - public override TimeUnit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "s": - return TimeUnit.Seconds; - case "nanos": - return TimeUnit.Nanoseconds; - case "m": - return TimeUnit.Minutes; - case "ms": - return TimeUnit.Milliseconds; - case "micros": - return TimeUnit.Microseconds; - case "h": - return TimeUnit.Hours; - case "d": - return TimeUnit.Days; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TimeUnit value, JsonSerializerOptions options) - { - switch (value) - { - case TimeUnit.Seconds: - writer.WriteStringValue("s"); - return; - case TimeUnit.Nanoseconds: - writer.WriteStringValue("nanos"); - return; - case TimeUnit.Minutes: - writer.WriteStringValue("m"); - return; - case TimeUnit.Milliseconds: - writer.WriteStringValue("ms"); - return; - case TimeUnit.Microseconds: - writer.WriteStringValue("micros"); - return; - case TimeUnit.Hours: - writer.WriteStringValue("h"); - return; - case TimeUnit.Days: - writer.WriteStringValue("d"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(VersionTypeConverter))] -public enum VersionType -{ - /// - /// - /// Use internal versioning that starts at 1 and increments with each update or delete. - /// - /// - [EnumMember(Value = "internal")] - Internal, - [EnumMember(Value = "force")] - Force, - /// - /// - /// Only index the document if the given version is equal or higher than the version of the stored document or if there is no existing document. - /// Note: the external_gte version type is meant for special use cases and should be used with care. - /// If used incorrectly, it can result in loss of data. - /// - /// - [EnumMember(Value = "external_gte")] - ExternalGte, - /// - /// - /// Only index the document if the given version is strictly higher than the version of the stored document or if there is no existing document. - /// - /// - [EnumMember(Value = "external")] - External -} - -internal sealed class VersionTypeConverter : JsonConverter -{ - public override VersionType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "internal": - return VersionType.Internal; - case "force": - return VersionType.Force; - case "external_gte": - return VersionType.ExternalGte; - case "external": - return VersionType.External; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, VersionType value, JsonSerializerOptions options) - { - switch (value) - { - case VersionType.Internal: - writer.WriteStringValue("internal"); - return; - case VersionType.Force: - writer.WriteStringValue("force"); - return; - case VersionType.ExternalGte: - writer.WriteStringValue("external_gte"); - return; - case VersionType.External: - writer.WriteStringValue("external"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(WaitForEventsConverter))] -public enum WaitForEvents -{ - [EnumMember(Value = "urgent")] - Urgent, - [EnumMember(Value = "normal")] - Normal, - [EnumMember(Value = "low")] - Low, - [EnumMember(Value = "languid")] - Languid, - [EnumMember(Value = "immediate")] - Immediate, - [EnumMember(Value = "high")] - High -} - -internal sealed class WaitForEventsConverter : JsonConverter -{ - public override WaitForEvents Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "urgent": - return WaitForEvents.Urgent; - case "normal": - return WaitForEvents.Normal; - case "low": - return WaitForEvents.Low; - case "languid": - return WaitForEvents.Languid; - case "immediate": - return WaitForEvents.Immediate; - case "high": - return WaitForEvents.High; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, WaitForEvents value, JsonSerializerOptions options) - { - switch (value) - { - case WaitForEvents.Urgent: - writer.WriteStringValue("urgent"); - return; - case WaitForEvents.Normal: - writer.WriteStringValue("normal"); - return; - case WaitForEvents.Low: - writer.WriteStringValue("low"); - return; - case WaitForEvents.Languid: - writer.WriteStringValue("languid"); - return; - case WaitForEvents.Immediate: - writer.WriteStringValue("immediate"); - return; - case WaitForEvents.High: - writer.WriteStringValue("high"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryDsl.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryDsl.g.cs deleted file mode 100644 index e5e98a0d91a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryDsl.g.cs +++ /dev/null @@ -1,1114 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(ChildScoreModeConverter))] -public enum ChildScoreMode -{ - [EnumMember(Value = "sum")] - Sum, - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "min")] - Min, - [EnumMember(Value = "max")] - Max, - [EnumMember(Value = "avg")] - Avg -} - -internal sealed class ChildScoreModeConverter : JsonConverter -{ - public override ChildScoreMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "sum": - return ChildScoreMode.Sum; - case "none": - return ChildScoreMode.None; - case "min": - return ChildScoreMode.Min; - case "max": - return ChildScoreMode.Max; - case "avg": - return ChildScoreMode.Avg; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ChildScoreMode value, JsonSerializerOptions options) - { - switch (value) - { - case ChildScoreMode.Sum: - writer.WriteStringValue("sum"); - return; - case ChildScoreMode.None: - writer.WriteStringValue("none"); - return; - case ChildScoreMode.Min: - writer.WriteStringValue("min"); - return; - case ChildScoreMode.Max: - writer.WriteStringValue("max"); - return; - case ChildScoreMode.Avg: - writer.WriteStringValue("avg"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(CombinedFieldsOperatorConverter))] -public enum CombinedFieldsOperator -{ - [EnumMember(Value = "or")] - Or, - [EnumMember(Value = "and")] - And -} - -internal sealed class CombinedFieldsOperatorConverter : JsonConverter -{ - public override CombinedFieldsOperator Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "or": - return CombinedFieldsOperator.Or; - case "and": - return CombinedFieldsOperator.And; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, CombinedFieldsOperator value, JsonSerializerOptions options) - { - switch (value) - { - case CombinedFieldsOperator.Or: - writer.WriteStringValue("or"); - return; - case CombinedFieldsOperator.And: - writer.WriteStringValue("and"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(CombinedFieldsZeroTermsConverter))] -public enum CombinedFieldsZeroTerms -{ - /// - /// - /// No documents are returned if the analyzer removes all tokens. - /// - /// - [EnumMember(Value = "none")] - None, - /// - /// - /// Returns all documents, similar to a match_all query. - /// - /// - [EnumMember(Value = "all")] - All -} - -internal sealed class CombinedFieldsZeroTermsConverter : JsonConverter -{ - public override CombinedFieldsZeroTerms Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "none": - return CombinedFieldsZeroTerms.None; - case "all": - return CombinedFieldsZeroTerms.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, CombinedFieldsZeroTerms value, JsonSerializerOptions options) - { - switch (value) - { - case CombinedFieldsZeroTerms.None: - writer.WriteStringValue("none"); - return; - case CombinedFieldsZeroTerms.All: - writer.WriteStringValue("all"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FieldValueFactorModifierConverter))] -public enum FieldValueFactorModifier -{ - /// - /// - /// Square the field value (multiply it by itself). - /// - /// - [EnumMember(Value = "square")] - Square, - /// - /// - /// Take the square root of the field value. - /// - /// - [EnumMember(Value = "sqrt")] - Sqrt, - /// - /// - /// Reciprocate the field value, same as 1/x where x is the field’s value. - /// - /// - [EnumMember(Value = "reciprocal")] - Reciprocal, - /// - /// - /// Do not apply any multiplier to the field value. - /// - /// - [EnumMember(Value = "none")] - None, - /// - /// - /// Add 2 to the field value and take the common logarithm. - /// - /// - [EnumMember(Value = "log2p")] - Log2p, - /// - /// - /// Add 1 to the field value and take the common logarithm. - /// - /// - [EnumMember(Value = "log1p")] - Log1p, - /// - /// - /// Take the common logarithm of the field value. - /// Because this function will return a negative value and cause an error if used on values between 0 and 1, it is recommended to use log1p instead. - /// - /// - [EnumMember(Value = "log")] - Log, - /// - /// - /// Add 2 to the field value and take the natural logarithm. - /// - /// - [EnumMember(Value = "ln2p")] - Ln2p, - /// - /// - /// Add 1 to the field value and take the natural logarithm. - /// - /// - [EnumMember(Value = "ln1p")] - Ln1p, - /// - /// - /// Take the natural logarithm of the field value. - /// Because this function will return a negative value and cause an error if used on values between 0 and 1, it is recommended to use ln1p instead. - /// - /// - [EnumMember(Value = "ln")] - Ln -} - -internal sealed class FieldValueFactorModifierConverter : JsonConverter -{ - public override FieldValueFactorModifier Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "square": - return FieldValueFactorModifier.Square; - case "sqrt": - return FieldValueFactorModifier.Sqrt; - case "reciprocal": - return FieldValueFactorModifier.Reciprocal; - case "none": - return FieldValueFactorModifier.None; - case "log2p": - return FieldValueFactorModifier.Log2p; - case "log1p": - return FieldValueFactorModifier.Log1p; - case "log": - return FieldValueFactorModifier.Log; - case "ln2p": - return FieldValueFactorModifier.Ln2p; - case "ln1p": - return FieldValueFactorModifier.Ln1p; - case "ln": - return FieldValueFactorModifier.Ln; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FieldValueFactorModifier value, JsonSerializerOptions options) - { - switch (value) - { - case FieldValueFactorModifier.Square: - writer.WriteStringValue("square"); - return; - case FieldValueFactorModifier.Sqrt: - writer.WriteStringValue("sqrt"); - return; - case FieldValueFactorModifier.Reciprocal: - writer.WriteStringValue("reciprocal"); - return; - case FieldValueFactorModifier.None: - writer.WriteStringValue("none"); - return; - case FieldValueFactorModifier.Log2p: - writer.WriteStringValue("log2p"); - return; - case FieldValueFactorModifier.Log1p: - writer.WriteStringValue("log1p"); - return; - case FieldValueFactorModifier.Log: - writer.WriteStringValue("log"); - return; - case FieldValueFactorModifier.Ln2p: - writer.WriteStringValue("ln2p"); - return; - case FieldValueFactorModifier.Ln1p: - writer.WriteStringValue("ln1p"); - return; - case FieldValueFactorModifier.Ln: - writer.WriteStringValue("ln"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FunctionBoostModeConverter))] -public enum FunctionBoostMode -{ - /// - /// - /// Query score and function score are added - /// - /// - [EnumMember(Value = "sum")] - Sum, - /// - /// - /// Only the function score is used. - /// The query score is ignored. - /// - /// - [EnumMember(Value = "replace")] - Replace, - /// - /// - /// Query score and function score are multiplied - /// - /// - [EnumMember(Value = "multiply")] - Multiply, - /// - /// - /// Min of query score and function score - /// - /// - [EnumMember(Value = "min")] - Min, - /// - /// - /// Max of query score and function score - /// - /// - [EnumMember(Value = "max")] - Max, - /// - /// - /// Query score and function score are averaged - /// - /// - [EnumMember(Value = "avg")] - Avg -} - -internal sealed class FunctionBoostModeConverter : JsonConverter -{ - public override FunctionBoostMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "sum": - return FunctionBoostMode.Sum; - case "replace": - return FunctionBoostMode.Replace; - case "multiply": - return FunctionBoostMode.Multiply; - case "min": - return FunctionBoostMode.Min; - case "max": - return FunctionBoostMode.Max; - case "avg": - return FunctionBoostMode.Avg; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FunctionBoostMode value, JsonSerializerOptions options) - { - switch (value) - { - case FunctionBoostMode.Sum: - writer.WriteStringValue("sum"); - return; - case FunctionBoostMode.Replace: - writer.WriteStringValue("replace"); - return; - case FunctionBoostMode.Multiply: - writer.WriteStringValue("multiply"); - return; - case FunctionBoostMode.Min: - writer.WriteStringValue("min"); - return; - case FunctionBoostMode.Max: - writer.WriteStringValue("max"); - return; - case FunctionBoostMode.Avg: - writer.WriteStringValue("avg"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(FunctionScoreModeConverter))] -public enum FunctionScoreMode -{ - /// - /// - /// Scores are summed. - /// - /// - [EnumMember(Value = "sum")] - Sum, - /// - /// - /// Scores are multiplied. - /// - /// - [EnumMember(Value = "multiply")] - Multiply, - /// - /// - /// Minimum score is used. - /// - /// - [EnumMember(Value = "min")] - Min, - /// - /// - /// Maximum score is used. - /// - /// - [EnumMember(Value = "max")] - Max, - /// - /// - /// The first function that has a matching filter is applied. - /// - /// - [EnumMember(Value = "first")] - First, - /// - /// - /// Scores are averaged. - /// - /// - [EnumMember(Value = "avg")] - Avg -} - -internal sealed class FunctionScoreModeConverter : JsonConverter -{ - public override FunctionScoreMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "sum": - return FunctionScoreMode.Sum; - case "multiply": - return FunctionScoreMode.Multiply; - case "min": - return FunctionScoreMode.Min; - case "max": - return FunctionScoreMode.Max; - case "first": - return FunctionScoreMode.First; - case "avg": - return FunctionScoreMode.Avg; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, FunctionScoreMode value, JsonSerializerOptions options) - { - switch (value) - { - case FunctionScoreMode.Sum: - writer.WriteStringValue("sum"); - return; - case FunctionScoreMode.Multiply: - writer.WriteStringValue("multiply"); - return; - case FunctionScoreMode.Min: - writer.WriteStringValue("min"); - return; - case FunctionScoreMode.Max: - writer.WriteStringValue("max"); - return; - case FunctionScoreMode.First: - writer.WriteStringValue("first"); - return; - case FunctionScoreMode.Avg: - writer.WriteStringValue("avg"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(GeoValidationMethodConverter))] -public enum GeoValidationMethod -{ - [EnumMember(Value = "strict")] - Strict, - /// - /// - /// Accept geo points with invalid latitude or longitude. - /// - /// - [EnumMember(Value = "ignore_malformed")] - IgnoreMalformed, - /// - /// - /// Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates. - /// - /// - [EnumMember(Value = "coerce")] - Coerce -} - -internal sealed class GeoValidationMethodConverter : JsonConverter -{ - public override GeoValidationMethod Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "strict": - return GeoValidationMethod.Strict; - case "ignore_malformed": - return GeoValidationMethod.IgnoreMalformed; - case "coerce": - return GeoValidationMethod.Coerce; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GeoValidationMethod value, JsonSerializerOptions options) - { - switch (value) - { - case GeoValidationMethod.Strict: - writer.WriteStringValue("strict"); - return; - case GeoValidationMethod.IgnoreMalformed: - writer.WriteStringValue("ignore_malformed"); - return; - case GeoValidationMethod.Coerce: - writer.WriteStringValue("coerce"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(MultiValueModeConverter))] -public enum MultiValueMode -{ - /// - /// - /// Distance is the sum of all distances. - /// - /// - [EnumMember(Value = "sum")] - Sum, - /// - /// - /// Distance is the minimum distance. - /// - /// - [EnumMember(Value = "min")] - Min, - /// - /// - /// Distance is the maximum distance. - /// - /// - [EnumMember(Value = "max")] - Max, - /// - /// - /// Distance is the average distance. - /// - /// - [EnumMember(Value = "avg")] - Avg -} - -internal sealed class MultiValueModeConverter : JsonConverter -{ - public override MultiValueMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "sum": - return MultiValueMode.Sum; - case "min": - return MultiValueMode.Min; - case "max": - return MultiValueMode.Max; - case "avg": - return MultiValueMode.Avg; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, MultiValueMode value, JsonSerializerOptions options) - { - switch (value) - { - case MultiValueMode.Sum: - writer.WriteStringValue("sum"); - return; - case MultiValueMode.Min: - writer.WriteStringValue("min"); - return; - case MultiValueMode.Max: - writer.WriteStringValue("max"); - return; - case MultiValueMode.Avg: - writer.WriteStringValue("avg"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(OperatorConverter))] -public enum Operator -{ - [EnumMember(Value = "or")] - Or, - [EnumMember(Value = "and")] - And -} - -internal sealed class OperatorConverter : JsonConverter -{ - public override Operator Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "or": - case "OR": - return Operator.Or; - case "and": - case "AND": - return Operator.And; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, Operator value, JsonSerializerOptions options) - { - switch (value) - { - case Operator.Or: - writer.WriteStringValue("or"); - return; - case Operator.And: - writer.WriteStringValue("and"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(RangeRelationConverter))] -public enum RangeRelation -{ - /// - /// - /// Matches documents with a range field value entirely within the query’s range. - /// - /// - [EnumMember(Value = "within")] - Within, - /// - /// - /// Matches documents with a range field value that intersects the query’s range. - /// - /// - [EnumMember(Value = "intersects")] - Intersects, - /// - /// - /// Matches documents with a range field value that entirely contains the query’s range. - /// - /// - [EnumMember(Value = "contains")] - Contains -} - -internal sealed class RangeRelationConverter : JsonConverter -{ - public override RangeRelation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "within": - return RangeRelation.Within; - case "intersects": - return RangeRelation.Intersects; - case "contains": - return RangeRelation.Contains; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, RangeRelation value, JsonSerializerOptions options) - { - switch (value) - { - case RangeRelation.Within: - writer.WriteStringValue("within"); - return; - case RangeRelation.Intersects: - writer.WriteStringValue("intersects"); - return; - case RangeRelation.Contains: - writer.WriteStringValue("contains"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SimpleQueryStringFlagConverter))] -[Flags] -public enum SimpleQueryStringFlag -{ - /// - /// - /// Enables whitespace as split characters. - /// - /// - [EnumMember(Value = "WHITESPACE")] - Whitespace = 1 << 0, - /// - /// - /// Enables the ~N operator, after a phrase where N is maximum number of positions allowed between matching tokens. - /// Synonymous to NEAR. - /// - /// - [EnumMember(Value = "SLOP")] - Slop = 1 << 1, - /// - /// - /// Enables the * prefix operator. - /// - /// - [EnumMember(Value = "PREFIX")] - Prefix = 1 << 2, - /// - /// - /// Enables the ( and ) operators to control operator precedence. - /// - /// - [EnumMember(Value = "PRECEDENCE")] - Precedence = 1 << 3, - /// - /// - /// Enables the " quotes operator used to search for phrases. - /// - /// - [EnumMember(Value = "PHRASE")] - Phrase = 1 << 4, - /// - /// - /// Enables the \| OR operator. - /// - /// - [EnumMember(Value = "OR")] - Or = 1 << 5, - /// - /// - /// Enables the - NOT operator. - /// - /// - [EnumMember(Value = "NOT")] - Not = 1 << 6, - /// - /// - /// Disables all operators. - /// - /// - [EnumMember(Value = "NONE")] - None = 1 << 7, - /// - /// - /// Enables the ~N operator, after a phrase where N is the maximum number of positions allowed between matching tokens. - /// Synonymous to SLOP. - /// - /// - [EnumMember(Value = "NEAR")] - Near = 1 << 8, - /// - /// - /// Enables the ~N operator after a word, where N is an integer denoting the allowed edit distance for matching. - /// - /// - [EnumMember(Value = "FUZZY")] - Fuzzy = 1 << 9, - /// - /// - /// Enables \ as an escape character. - /// - /// - [EnumMember(Value = "ESCAPE")] - Escape = 1 << 10, - /// - /// - /// Enables the + AND operator. - /// - /// - [EnumMember(Value = "AND")] - And = 1 << 11, - /// - /// - /// Enables all optional operators. - /// - /// - [EnumMember(Value = "ALL")] - All = 1 << 12 -} - -internal sealed class SimpleQueryStringFlagConverter : JsonConverter -{ - public override SimpleQueryStringFlag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var s = reader.GetString(); - if (string.IsNullOrEmpty(s)) - { - return default; - } - - var flags = s.Split('|'); - var result = default(SimpleQueryStringFlag); - foreach (var flag in flags) - { - result |= flag switch - { - "WHITESPACE" => SimpleQueryStringFlag.Whitespace, - "SLOP" => SimpleQueryStringFlag.Slop, - "PREFIX" => SimpleQueryStringFlag.Prefix, - "PRECEDENCE" => SimpleQueryStringFlag.Precedence, - "PHRASE" => SimpleQueryStringFlag.Phrase, - "OR" => SimpleQueryStringFlag.Or, - "NOT" => SimpleQueryStringFlag.Not, - "NONE" => SimpleQueryStringFlag.None, - "NEAR" => SimpleQueryStringFlag.Near, - "FUZZY" => SimpleQueryStringFlag.Fuzzy, - "ESCAPE" => SimpleQueryStringFlag.Escape, - "AND" => SimpleQueryStringFlag.And, - "ALL" => SimpleQueryStringFlag.All, - _ => throw new JsonException($"Invalid flag value '{flag}' for type '{typeToConvert.Name}'.") - }; - } - - return result; - } - - public override void Write(Utf8JsonWriter writer, SimpleQueryStringFlag value, JsonSerializerOptions options) - { - if (value == default) - { - writer.WriteStringValue(string.Empty); - return; - } - - var sb = new StringBuilder(); - if (value.HasFlag(SimpleQueryStringFlag.Whitespace)) - sb.Append("WHITESPACE|"); - if (value.HasFlag(SimpleQueryStringFlag.Slop)) - sb.Append("SLOP|"); - if (value.HasFlag(SimpleQueryStringFlag.Prefix)) - sb.Append("PREFIX|"); - if (value.HasFlag(SimpleQueryStringFlag.Precedence)) - sb.Append("PRECEDENCE|"); - if (value.HasFlag(SimpleQueryStringFlag.Phrase)) - sb.Append("PHRASE|"); - if (value.HasFlag(SimpleQueryStringFlag.Or)) - sb.Append("OR|"); - if (value.HasFlag(SimpleQueryStringFlag.Not)) - sb.Append("NOT|"); - if (value.HasFlag(SimpleQueryStringFlag.None)) - sb.Append("NONE|"); - if (value.HasFlag(SimpleQueryStringFlag.Near)) - sb.Append("NEAR|"); - if (value.HasFlag(SimpleQueryStringFlag.Fuzzy)) - sb.Append("FUZZY|"); - if (value.HasFlag(SimpleQueryStringFlag.Escape)) - sb.Append("ESCAPE|"); - if (value.HasFlag(SimpleQueryStringFlag.And)) - sb.Append("AND|"); - if (value.HasFlag(SimpleQueryStringFlag.All)) - sb.Append("ALL|"); - if (sb.Length == 0) - { - writer.WriteStringValue(string.Empty); - return; - } - - sb.Remove(sb.Length - 1, 1); - writer.WriteStringValue(sb.ToString()); - } -} - -[JsonConverter(typeof(TextQueryTypeConverter))] -public enum TextQueryType -{ - /// - /// - /// Runs a match_phrase_prefix query on each field and uses the _score from the best field. - /// - /// - [EnumMember(Value = "phrase_prefix")] - PhrasePrefix, - /// - /// - /// Runs a match_phrase query on each field and uses the _score from the best field. - /// - /// - [EnumMember(Value = "phrase")] - Phrase, - /// - /// - /// Finds documents that match any field and combines the _score from each field. - /// - /// - [EnumMember(Value = "most_fields")] - MostFields, - /// - /// - /// Treats fields with the same analyzer as though they were one big field. - /// Looks for each word in any field. - /// - /// - [EnumMember(Value = "cross_fields")] - CrossFields, - /// - /// - /// Creates a match_bool_prefix query on each field and combines the _score from each field. - /// - /// - [EnumMember(Value = "bool_prefix")] - BoolPrefix, - /// - /// - /// Finds documents that match any field, but uses the _score from the best field. - /// - /// - [EnumMember(Value = "best_fields")] - BestFields -} - -internal sealed class TextQueryTypeConverter : JsonConverter -{ - public override TextQueryType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "phrase_prefix": - return TextQueryType.PhrasePrefix; - case "phrase": - return TextQueryType.Phrase; - case "most_fields": - return TextQueryType.MostFields; - case "cross_fields": - return TextQueryType.CrossFields; - case "bool_prefix": - return TextQueryType.BoolPrefix; - case "best_fields": - return TextQueryType.BestFields; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TextQueryType value, JsonSerializerOptions options) - { - switch (value) - { - case TextQueryType.PhrasePrefix: - writer.WriteStringValue("phrase_prefix"); - return; - case TextQueryType.Phrase: - writer.WriteStringValue("phrase"); - return; - case TextQueryType.MostFields: - writer.WriteStringValue("most_fields"); - return; - case TextQueryType.CrossFields: - writer.WriteStringValue("cross_fields"); - return; - case TextQueryType.BoolPrefix: - writer.WriteStringValue("bool_prefix"); - return; - case TextQueryType.BestFields: - writer.WriteStringValue("best_fields"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ZeroTermsQueryConverter))] -public enum ZeroTermsQuery -{ - /// - /// - /// No documents are returned if the analyzer removes all tokens. - /// - /// - [EnumMember(Value = "none")] - None, - /// - /// - /// Returns all documents, similar to a match_all query. - /// - /// - [EnumMember(Value = "all")] - All -} - -internal sealed class ZeroTermsQueryConverter : JsonConverter -{ - public override ZeroTermsQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "none": - return ZeroTermsQuery.None; - case "all": - return ZeroTermsQuery.All; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ZeroTermsQuery value, JsonSerializerOptions options) - { - switch (value) - { - case ZeroTermsQuery.None: - writer.WriteStringValue("none"); - return; - case ZeroTermsQuery.All: - writer.WriteStringValue("all"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryRules.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryRules.g.cs deleted file mode 100644 index a363213625d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.QueryRules.g.cs +++ /dev/null @@ -1,183 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -[JsonConverter(typeof(QueryRuleCriteriaTypeConverter))] -public enum QueryRuleCriteriaType -{ - [EnumMember(Value = "suffix")] - Suffix, - [EnumMember(Value = "prefix")] - Prefix, - [EnumMember(Value = "lte")] - Lte, - [EnumMember(Value = "lt")] - Lt, - [EnumMember(Value = "gte")] - Gte, - [EnumMember(Value = "gt")] - Gt, - [EnumMember(Value = "global")] - Global, - [EnumMember(Value = "fuzzy")] - Fuzzy, - [EnumMember(Value = "exact_fuzzy")] - ExactFuzzy, - [EnumMember(Value = "exact")] - Exact, - [EnumMember(Value = "contains")] - Contains, - [EnumMember(Value = "always")] - Always -} - -internal sealed class QueryRuleCriteriaTypeConverter : JsonConverter -{ - public override QueryRuleCriteriaType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "suffix": - return QueryRuleCriteriaType.Suffix; - case "prefix": - return QueryRuleCriteriaType.Prefix; - case "lte": - return QueryRuleCriteriaType.Lte; - case "lt": - return QueryRuleCriteriaType.Lt; - case "gte": - return QueryRuleCriteriaType.Gte; - case "gt": - return QueryRuleCriteriaType.Gt; - case "global": - return QueryRuleCriteriaType.Global; - case "fuzzy": - return QueryRuleCriteriaType.Fuzzy; - case "exact_fuzzy": - return QueryRuleCriteriaType.ExactFuzzy; - case "exact": - return QueryRuleCriteriaType.Exact; - case "contains": - return QueryRuleCriteriaType.Contains; - case "always": - return QueryRuleCriteriaType.Always; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, QueryRuleCriteriaType value, JsonSerializerOptions options) - { - switch (value) - { - case QueryRuleCriteriaType.Suffix: - writer.WriteStringValue("suffix"); - return; - case QueryRuleCriteriaType.Prefix: - writer.WriteStringValue("prefix"); - return; - case QueryRuleCriteriaType.Lte: - writer.WriteStringValue("lte"); - return; - case QueryRuleCriteriaType.Lt: - writer.WriteStringValue("lt"); - return; - case QueryRuleCriteriaType.Gte: - writer.WriteStringValue("gte"); - return; - case QueryRuleCriteriaType.Gt: - writer.WriteStringValue("gt"); - return; - case QueryRuleCriteriaType.Global: - writer.WriteStringValue("global"); - return; - case QueryRuleCriteriaType.Fuzzy: - writer.WriteStringValue("fuzzy"); - return; - case QueryRuleCriteriaType.ExactFuzzy: - writer.WriteStringValue("exact_fuzzy"); - return; - case QueryRuleCriteriaType.Exact: - writer.WriteStringValue("exact"); - return; - case QueryRuleCriteriaType.Contains: - writer.WriteStringValue("contains"); - return; - case QueryRuleCriteriaType.Always: - writer.WriteStringValue("always"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(QueryRuleTypeConverter))] -public enum QueryRuleType -{ - [EnumMember(Value = "pinned")] - Pinned, - [EnumMember(Value = "exclude")] - Exclude -} - -internal sealed class QueryRuleTypeConverter : JsonConverter -{ - public override QueryRuleType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "pinned": - return QueryRuleType.Pinned; - case "exclude": - return QueryRuleType.Exclude; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, QueryRuleType value, JsonSerializerOptions options) - { - switch (value) - { - case QueryRuleType.Pinned: - writer.WriteStringValue("pinned"); - return; - case QueryRuleType.Exclude: - writer.WriteStringValue("exclude"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Security.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Security.g.cs deleted file mode 100644 index bd9dce49136..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Security.g.cs +++ /dev/null @@ -1,373 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(AccessTokenGrantTypeConverter))] -public enum AccessTokenGrantType -{ - [EnumMember(Value = "refresh_token")] - RefreshToken, - [EnumMember(Value = "password")] - Password, - [EnumMember(Value = "_kerberos")] - Kerberos, - [EnumMember(Value = "client_credentials")] - ClientCredentials -} - -internal sealed class AccessTokenGrantTypeConverter : JsonConverter -{ - public override AccessTokenGrantType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "refresh_token": - return AccessTokenGrantType.RefreshToken; - case "password": - return AccessTokenGrantType.Password; - case "_kerberos": - return AccessTokenGrantType.Kerberos; - case "client_credentials": - return AccessTokenGrantType.ClientCredentials; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, AccessTokenGrantType value, JsonSerializerOptions options) - { - switch (value) - { - case AccessTokenGrantType.RefreshToken: - writer.WriteStringValue("refresh_token"); - return; - case AccessTokenGrantType.Password: - writer.WriteStringValue("password"); - return; - case AccessTokenGrantType.Kerberos: - writer.WriteStringValue("_kerberos"); - return; - case AccessTokenGrantType.ClientCredentials: - writer.WriteStringValue("client_credentials"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ApiKeyGrantTypeConverter))] -public enum ApiKeyGrantType -{ - [EnumMember(Value = "password")] - Password, - [EnumMember(Value = "access_token")] - AccessToken -} - -internal sealed class ApiKeyGrantTypeConverter : JsonConverter -{ - public override ApiKeyGrantType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "password": - return ApiKeyGrantType.Password; - case "access_token": - return ApiKeyGrantType.AccessToken; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ApiKeyGrantType value, JsonSerializerOptions options) - { - switch (value) - { - case ApiKeyGrantType.Password: - writer.WriteStringValue("password"); - return; - case ApiKeyGrantType.AccessToken: - writer.WriteStringValue("access_token"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(ApiKeyTypeConverter))] -public enum ApiKeyType -{ - [EnumMember(Value = "rest")] - Rest, - [EnumMember(Value = "cross_cluster")] - CrossCluster -} - -internal sealed class ApiKeyTypeConverter : JsonConverter -{ - public override ApiKeyType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "rest": - return ApiKeyType.Rest; - case "cross_cluster": - return ApiKeyType.CrossCluster; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ApiKeyType value, JsonSerializerOptions options) - { - switch (value) - { - case ApiKeyType.Rest: - writer.WriteStringValue("rest"); - return; - case ApiKeyType.CrossCluster: - writer.WriteStringValue("cross_cluster"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(EnumStructConverter))] -public readonly partial struct ClusterPrivilege : IEnumStruct -{ - public ClusterPrivilege(string value) => Value = value; - - ClusterPrivilege IEnumStruct.Create(string value) => value; - - public readonly string Value { get; } - public static ClusterPrivilege ReadSecurity { get; } = new ClusterPrivilege("read_security"); - public static ClusterPrivilege ReadPipeline { get; } = new ClusterPrivilege("read_pipeline"); - public static ClusterPrivilege PostBehavioralAnalyticsEvent { get; } = new ClusterPrivilege("post_behavioral_analytics_event"); - public static ClusterPrivilege None { get; } = new ClusterPrivilege("none"); - public static ClusterPrivilege MonitorTransform { get; } = new ClusterPrivilege("monitor_transform"); - public static ClusterPrivilege MonitorMl { get; } = new ClusterPrivilege("monitor_ml"); - public static ClusterPrivilege MonitorInference { get; } = new ClusterPrivilege("monitor_inference"); - public static ClusterPrivilege MonitorEnrich { get; } = new ClusterPrivilege("monitor_enrich"); - public static ClusterPrivilege Monitor { get; } = new ClusterPrivilege("monitor"); - public static ClusterPrivilege ManageTransform { get; } = new ClusterPrivilege("manage_transform"); - public static ClusterPrivilege ManageSecurity { get; } = new ClusterPrivilege("manage_security"); - public static ClusterPrivilege ManageSearchSynonyms { get; } = new ClusterPrivilege("manage_search_synonyms"); - public static ClusterPrivilege ManageSearchQueryRules { get; } = new ClusterPrivilege("manage_search_query_rules"); - public static ClusterPrivilege ManageSearchApplication { get; } = new ClusterPrivilege("manage_search_application"); - public static ClusterPrivilege ManagePipeline { get; } = new ClusterPrivilege("manage_pipeline"); - public static ClusterPrivilege ManageOwnApiKey { get; } = new ClusterPrivilege("manage_own_api_key"); - public static ClusterPrivilege ManageMl { get; } = new ClusterPrivilege("manage_ml"); - public static ClusterPrivilege ManageLogstashPipelines { get; } = new ClusterPrivilege("manage_logstash_pipelines"); - public static ClusterPrivilege ManageIngestPipelines { get; } = new ClusterPrivilege("manage_ingest_pipelines"); - public static ClusterPrivilege ManageInference { get; } = new ClusterPrivilege("manage_inference"); - public static ClusterPrivilege ManageIndexTemplates { get; } = new ClusterPrivilege("manage_index_templates"); - public static ClusterPrivilege ManageEnrich { get; } = new ClusterPrivilege("manage_enrich"); - public static ClusterPrivilege ManageBehavioralAnalytics { get; } = new ClusterPrivilege("manage_behavioral_analytics"); - public static ClusterPrivilege ManageApiKey { get; } = new ClusterPrivilege("manage_api_key"); - public static ClusterPrivilege Manage { get; } = new ClusterPrivilege("manage"); - public static ClusterPrivilege CancelTask { get; } = new ClusterPrivilege("cancel_task"); - public static ClusterPrivilege All { get; } = new ClusterPrivilege("all"); - - public override string ToString() => Value ?? string.Empty; - - public static implicit operator string(ClusterPrivilege clusterPrivilege) => clusterPrivilege.Value; - public static implicit operator ClusterPrivilege(string value) => new(value); - - public override int GetHashCode() => Value.GetHashCode(); - public override bool Equals(object obj) => obj is ClusterPrivilege other && this.Equals(other); - public bool Equals(ClusterPrivilege other) => Value == other.Value; - - public static bool operator ==(ClusterPrivilege a, ClusterPrivilege b) => a.Equals(b); - public static bool operator !=(ClusterPrivilege a, ClusterPrivilege b) => !(a == b); -} - -[JsonConverter(typeof(GrantTypeConverter))] -public enum GrantType -{ - /// - /// - /// In this type of grant, you must supply the user ID and password for which you want to create the API key. - /// - /// - [EnumMember(Value = "password")] - Password, - /// - /// - /// In this type of grant, you must supply an access token that was created by the Elasticsearch token service. - /// - /// - [EnumMember(Value = "access_token")] - AccessToken -} - -internal sealed class GrantTypeConverter : JsonConverter -{ - public override GrantType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "password": - return GrantType.Password; - case "access_token": - return GrantType.AccessToken; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, GrantType value, JsonSerializerOptions options) - { - switch (value) - { - case GrantType.Password: - writer.WriteStringValue("password"); - return; - case GrantType.AccessToken: - writer.WriteStringValue("access_token"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(EnumStructConverter))] -public readonly partial struct IndexPrivilege : IEnumStruct -{ - public IndexPrivilege(string value) => Value = value; - - IndexPrivilege IEnumStruct.Create(string value) => value; - - public readonly string Value { get; } - public static IndexPrivilege Write { get; } = new IndexPrivilege("write"); - public static IndexPrivilege ViewIndexMetadata { get; } = new IndexPrivilege("view_index_metadata"); - public static IndexPrivilege Read { get; } = new IndexPrivilege("read"); - public static IndexPrivilege None { get; } = new IndexPrivilege("none"); - public static IndexPrivilege Monitor { get; } = new IndexPrivilege("monitor"); - public static IndexPrivilege ManageDataStreamLifecycle { get; } = new IndexPrivilege("manage_data_stream_lifecycle"); - public static IndexPrivilege Manage { get; } = new IndexPrivilege("manage"); - public static IndexPrivilege Maintenance { get; } = new IndexPrivilege("maintenance"); - public static IndexPrivilege Index { get; } = new IndexPrivilege("index"); - public static IndexPrivilege DeleteIndex { get; } = new IndexPrivilege("delete_index"); - public static IndexPrivilege Delete { get; } = new IndexPrivilege("delete"); - public static IndexPrivilege CreateIndex { get; } = new IndexPrivilege("create_index"); - public static IndexPrivilege CreateDoc { get; } = new IndexPrivilege("create_doc"); - public static IndexPrivilege Create { get; } = new IndexPrivilege("create"); - public static IndexPrivilege AutoConfigure { get; } = new IndexPrivilege("auto_configure"); - public static IndexPrivilege All { get; } = new IndexPrivilege("all"); - - public override string ToString() => Value ?? string.Empty; - - public static implicit operator string(IndexPrivilege indexPrivilege) => indexPrivilege.Value; - public static implicit operator IndexPrivilege(string value) => new(value); - - public override int GetHashCode() => Value.GetHashCode(); - public override bool Equals(object obj) => obj is IndexPrivilege other && this.Equals(other); - public bool Equals(IndexPrivilege other) => Value == other.Value; - - public static bool operator ==(IndexPrivilege a, IndexPrivilege b) => a.Equals(b); - public static bool operator !=(IndexPrivilege a, IndexPrivilege b) => !(a == b); -} - -[JsonConverter(typeof(EnumStructConverter))] -public readonly partial struct RestrictionWorkflow : IEnumStruct -{ - public RestrictionWorkflow(string value) => Value = value; - - RestrictionWorkflow IEnumStruct.Create(string value) => value; - - public readonly string Value { get; } - public static RestrictionWorkflow SearchApplicationQuery { get; } = new RestrictionWorkflow("search_application_query"); - - public override string ToString() => Value ?? string.Empty; - - public static implicit operator string(RestrictionWorkflow restrictionWorkflow) => restrictionWorkflow.Value; - public static implicit operator RestrictionWorkflow(string value) => new(value); - - public override int GetHashCode() => Value.GetHashCode(); - public override bool Equals(object obj) => obj is RestrictionWorkflow other && this.Equals(other); - public bool Equals(RestrictionWorkflow other) => Value == other.Value; - - public static bool operator ==(RestrictionWorkflow a, RestrictionWorkflow b) => a.Equals(b); - public static bool operator !=(RestrictionWorkflow a, RestrictionWorkflow b) => !(a == b); -} - -[JsonConverter(typeof(TemplateFormatConverter))] -public enum TemplateFormat -{ - [EnumMember(Value = "string")] - String, - [EnumMember(Value = "json")] - Json -} - -internal sealed class TemplateFormatConverter : JsonConverter -{ - public override TemplateFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "string": - return TemplateFormat.String; - case "json": - return TemplateFormat.Json; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TemplateFormat value, JsonSerializerOptions options) - { - switch (value) - { - case TemplateFormat.String: - writer.WriteStringValue("string"); - return; - case TemplateFormat.Json: - writer.WriteStringValue("json"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Snapshot.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Snapshot.g.cs deleted file mode 100644 index 0d7094311a0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Snapshot.g.cs +++ /dev/null @@ -1,194 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -[JsonConverter(typeof(ShardsStatsStageConverter))] -public enum ShardsStatsStage -{ - /// - /// - /// Number of shards in the snapshot that are in the started stage of being stored in the repository. - /// - /// - [EnumMember(Value = "STARTED")] - Started, - /// - /// - /// Number of shards in the snapshot that are in the initializing stage of being stored in the repository. - /// - /// - [EnumMember(Value = "INIT")] - Init, - /// - /// - /// Number of shards in the snapshot that are in the finalizing stage of being stored in the repository. - /// - /// - [EnumMember(Value = "FINALIZE")] - Finalize, - /// - /// - /// Number of shards in the snapshot that were not successfully stored in the repository. - /// - /// - [EnumMember(Value = "FAILURE")] - Failure, - /// - /// - /// Number of shards in the snapshot that were successfully stored in the repository. - /// - /// - [EnumMember(Value = "DONE")] - Done -} - -internal sealed class ShardsStatsStageConverter : JsonConverter -{ - public override ShardsStatsStage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "STARTED": - return ShardsStatsStage.Started; - case "INIT": - return ShardsStatsStage.Init; - case "FINALIZE": - return ShardsStatsStage.Finalize; - case "FAILURE": - return ShardsStatsStage.Failure; - case "DONE": - return ShardsStatsStage.Done; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ShardsStatsStage value, JsonSerializerOptions options) - { - switch (value) - { - case ShardsStatsStage.Started: - writer.WriteStringValue("STARTED"); - return; - case ShardsStatsStage.Init: - writer.WriteStringValue("INIT"); - return; - case ShardsStatsStage.Finalize: - writer.WriteStringValue("FINALIZE"); - return; - case ShardsStatsStage.Failure: - writer.WriteStringValue("FAILURE"); - return; - case ShardsStatsStage.Done: - writer.WriteStringValue("DONE"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(SnapshotSortConverter))] -public enum SnapshotSort -{ - [EnumMember(Value = "start_time")] - StartTime, - [EnumMember(Value = "shard_count")] - ShardCount, - [EnumMember(Value = "repository")] - Repository, - [EnumMember(Value = "name")] - Name, - [EnumMember(Value = "index_count")] - IndexCount, - [EnumMember(Value = "failed_shard_count")] - FailedShardCount, - [EnumMember(Value = "duration")] - Duration -} - -internal sealed class SnapshotSortConverter : JsonConverter -{ - public override SnapshotSort Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "start_time": - return SnapshotSort.StartTime; - case "shard_count": - return SnapshotSort.ShardCount; - case "repository": - return SnapshotSort.Repository; - case "name": - return SnapshotSort.Name; - case "index_count": - return SnapshotSort.IndexCount; - case "failed_shard_count": - return SnapshotSort.FailedShardCount; - case "duration": - return SnapshotSort.Duration; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SnapshotSort value, JsonSerializerOptions options) - { - switch (value) - { - case SnapshotSort.StartTime: - writer.WriteStringValue("start_time"); - return; - case SnapshotSort.ShardCount: - writer.WriteStringValue("shard_count"); - return; - case SnapshotSort.Repository: - writer.WriteStringValue("repository"); - return; - case SnapshotSort.Name: - writer.WriteStringValue("name"); - return; - case SnapshotSort.IndexCount: - writer.WriteStringValue("index_count"); - return; - case SnapshotSort.FailedShardCount: - writer.WriteStringValue("failed_shard_count"); - return; - case SnapshotSort.Duration: - writer.WriteStringValue("duration"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs deleted file mode 100644 index 4cdbebbc92a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -[JsonConverter(typeof(SqlFormatConverter))] -public enum SqlFormat -{ - [EnumMember(Value = "yaml")] - Yaml, - [EnumMember(Value = "txt")] - Txt, - [EnumMember(Value = "tsv")] - Tsv, - [EnumMember(Value = "smile")] - Smile, - [EnumMember(Value = "json")] - Json, - [EnumMember(Value = "csv")] - Csv, - [EnumMember(Value = "cbor")] - Cbor -} - -internal sealed class SqlFormatConverter : JsonConverter -{ - public override SqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "yaml": - return SqlFormat.Yaml; - case "txt": - return SqlFormat.Txt; - case "tsv": - return SqlFormat.Tsv; - case "smile": - return SqlFormat.Smile; - case "json": - return SqlFormat.Json; - case "csv": - return SqlFormat.Csv; - case "cbor": - return SqlFormat.Cbor; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SqlFormat value, JsonSerializerOptions options) - { - switch (value) - { - case SqlFormat.Yaml: - writer.WriteStringValue("yaml"); - return; - case SqlFormat.Txt: - writer.WriteStringValue("txt"); - return; - case SqlFormat.Tsv: - writer.WriteStringValue("tsv"); - return; - case SqlFormat.Smile: - writer.WriteStringValue("smile"); - return; - case SqlFormat.Json: - writer.WriteStringValue("json"); - return; - case SqlFormat.Csv: - writer.WriteStringValue("csv"); - return; - case SqlFormat.Cbor: - writer.WriteStringValue("cbor"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Watcher.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Watcher.g.cs deleted file mode 100644 index 9a877190686..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Watcher.g.cs +++ /dev/null @@ -1,85 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Watcher; - -[JsonConverter(typeof(ActionStatusOptionsConverter))] -public enum ActionStatusOptions -{ - [EnumMember(Value = "throttled")] - Throttled, - [EnumMember(Value = "success")] - Success, - [EnumMember(Value = "simulated")] - Simulated, - [EnumMember(Value = "failure")] - Failure -} - -internal sealed class ActionStatusOptionsConverter : JsonConverter -{ - public override ActionStatusOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "throttled": - return ActionStatusOptions.Throttled; - case "success": - return ActionStatusOptions.Success; - case "simulated": - return ActionStatusOptions.Simulated; - case "failure": - return ActionStatusOptions.Failure; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ActionStatusOptions value, JsonSerializerOptions options) - { - switch (value) - { - case ActionStatusOptions.Throttled: - writer.WriteStringValue("throttled"); - return; - case ActionStatusOptions.Success: - writer.WriteStringValue("success"); - return; - case ActionStatusOptions.Simulated: - writer.WriteStringValue("simulated"); - return; - case ActionStatusOptions.Failure: - writer.WriteStringValue("failure"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs deleted file mode 100644 index e217b5508b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Runtime.Serialization; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -[JsonConverter(typeof(XPackCategoryConverter))] -public enum XPackCategory -{ - [EnumMember(Value = "license")] - License, - [EnumMember(Value = "features")] - Features, - [EnumMember(Value = "build")] - Build -} - -internal sealed class XPackCategoryConverter : JsonConverter -{ - public override XPackCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "license": - return XPackCategory.License; - case "features": - return XPackCategory.Features; - case "build": - return XPackCategory.Build; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, XPackCategory value, JsonSerializerOptions options) - { - switch (value) - { - case XPackCategory.License: - writer.WriteStringValue("license"); - return; - case XPackCategory.Features: - writer.WriteStringValue("features"); - return; - case XPackCategory.Build: - writer.WriteStringValue("build"); - return; - } - - writer.WriteNullValue(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/EqlHits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/EqlHits.g.cs deleted file mode 100644 index 72efe9c0cc7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/EqlHits.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class EqlHits -{ - /// - /// - /// Contains events matching the query. Each object represents a matching event. - /// - /// - [JsonInclude, JsonPropertyName("events")] - public IReadOnlyCollection>? Events { get; init; } - - /// - /// - /// Contains event sequences matching the query. Each object represents a matching sequence. This parameter is only returned for EQL queries containing a sequence. - /// - /// - [JsonInclude, JsonPropertyName("sequences")] - public IReadOnlyCollection>? Sequences { get; init; } - - /// - /// - /// Metadata about the number of matching events or sequences. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TotalHits? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsEvent.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsEvent.g.cs deleted file mode 100644 index 5614df40669..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsEvent.g.cs +++ /dev/null @@ -1,68 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class HitsEvent -{ - [JsonInclude, JsonPropertyName("fields")] - [ReadOnlyFieldDictionaryConverter(typeof(IReadOnlyCollection))] - public IReadOnlyDictionary>? Fields { get; init; } - - /// - /// - /// Unique identifier for the event. This ID is only unique within the index. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public string Id { get; init; } - - /// - /// - /// Name of the index containing the event. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public string Index { get; init; } - - /// - /// - /// Set to true for events in a timespan-constrained sequence that do not meet a given condition. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public bool? Missing { get; init; } - - /// - /// - /// Original JSON body passed for the event at index time. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - [SourceConverter] - public TEvent Source { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsSequence.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsSequence.g.cs deleted file mode 100644 index db8772ee9ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Eql/HitsSequence.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Eql; - -public sealed partial class HitsSequence -{ - /// - /// - /// Contains events matching the query. Each object represents a matching event. - /// - /// - [JsonInclude, JsonPropertyName("events")] - public IReadOnlyCollection> Events { get; init; } - - /// - /// - /// Shared field values used to constrain matches in the sequence. These are defined using the by keyword in the EQL query syntax. - /// - /// - [JsonInclude, JsonPropertyName("join_keys")] - public IReadOnlyCollection? JoinKeys { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorCause.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorCause.g.cs deleted file mode 100644 index f5aa3c93f05..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorCause.g.cs +++ /dev/null @@ -1,139 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -internal sealed partial class ErrorCauseConverter : JsonConverter -{ - public override ErrorCause Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - Elastic.Clients.Elasticsearch.Serverless.ErrorCause? causedBy = default; - string? reason = default; - IReadOnlyCollection? rootCause = default; - string? stackTrace = default; - IReadOnlyCollection? suppressed = default; - string type = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "caused_by") - { - causedBy = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "reason") - { - reason = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "root_cause") - { - rootCause = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "stack_trace") - { - stackTrace = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "suppressed") - { - suppressed = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "type") - { - type = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - return new ErrorCause { CausedBy = causedBy, Metadata = additionalProperties, Reason = reason, RootCause = rootCause, StackTrace = stackTrace, Suppressed = suppressed, Type = type }; - } - - public override void Write(Utf8JsonWriter writer, ErrorCause value, JsonSerializerOptions options) - { - throw new NotImplementedException("'ErrorCause' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -/// -/// -/// Cause and details about a request failure. This class defines the properties common to all error types. -/// Additional details are also provided, that depend on the error type. -/// -/// -[JsonConverter(typeof(ErrorCauseConverter))] -public sealed partial class ErrorCause -{ - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? CausedBy { get; init; } - - /// - /// - /// Additional details about the error - /// - /// - public IReadOnlyDictionary Metadata { get; init; } - - /// - /// - /// A human-readable explanation of the error, in english - /// - /// - public string? Reason { get; init; } - public IReadOnlyCollection? RootCause { get; init; } - - /// - /// - /// The server stack trace. Present only if the error_trace=true parameter was sent with the request. - /// - /// - public string? StackTrace { get; init; } - public IReadOnlyCollection? Suppressed { get; init; } - - /// - /// - /// The type of error - /// - /// - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorResponseBase.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorResponseBase.g.cs deleted file mode 100644 index 0bf6505243d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ErrorResponseBase.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// The response returned by Elasticsearch when request execution did not succeed. -/// -/// -public sealed partial class ErrorResponseBase -{ - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause Error { get; init; } - [JsonInclude, JsonPropertyName("status")] - public int Status { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldMemoryUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldMemoryUsage.g.cs deleted file mode 100644 index 1c68d895a3b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldMemoryUsage.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FieldMemoryUsage -{ - [JsonInclude, JsonPropertyName("memory_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MemorySize { get; init; } - [JsonInclude, JsonPropertyName("memory_size_in_bytes")] - public long MemorySizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSizeUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSizeUsage.g.cs deleted file mode 100644 index d6737dfbcb2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSizeUsage.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FieldSizeUsage -{ - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Size { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs deleted file mode 100644 index 430fc042c4c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FieldSort.g.cs +++ /dev/null @@ -1,320 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FieldSort -{ - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("missing")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.SortMode? Mode { get; set; } - [JsonInclude, JsonPropertyName("nested")] - public Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? Nested { get; set; } - [JsonInclude, JsonPropertyName("numeric_type")] - public Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? NumericType { get; set; } - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - [JsonInclude, JsonPropertyName("unmapped_type")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? UnmappedType { get; set; } -} - -public sealed partial class FieldSortDescriptor : SerializableDescriptor> -{ - internal FieldSortDescriptor(Action> configure) => configure.Invoke(this); - - public FieldSortDescriptor() : base() - { - } - - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action> NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? NumericTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? UnmappedTypeValue { get; set; } - - public FieldSortDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public FieldSortDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public FieldSortDescriptor Nested(Action> configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public FieldSortDescriptor NumericType(Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? numericType) - { - NumericTypeValue = numericType; - return Self; - } - - public FieldSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public FieldSortDescriptor UnmappedType(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? unmappedType) - { - UnmappedTypeValue = unmappedType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - if (NumericTypeValue is not null) - { - writer.WritePropertyName("numeric_type"); - JsonSerializer.Serialize(writer, NumericTypeValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (UnmappedTypeValue is not null) - { - writer.WritePropertyName("unmapped_type"); - JsonSerializer.Serialize(writer, UnmappedTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldSortDescriptor : SerializableDescriptor -{ - internal FieldSortDescriptor(Action configure) => configure.Invoke(this); - - public FieldSortDescriptor() : base() - { - } - - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? NumericTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? UnmappedTypeValue { get; set; } - - public FieldSortDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public FieldSortDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) - { - MissingValue = missing; - return Self; - } - - public FieldSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public FieldSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public FieldSortDescriptor Nested(Action configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public FieldSortDescriptor NumericType(Elastic.Clients.Elasticsearch.Serverless.FieldSortNumericType? numericType) - { - NumericTypeValue = numericType; - return Self; - } - - public FieldSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public FieldSortDescriptor UnmappedType(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldType? unmappedType) - { - UnmappedTypeValue = unmappedType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - JsonSerializer.Serialize(writer, MissingValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - if (NumericTypeValue is not null) - { - writer.WritePropertyName("numeric_type"); - JsonSerializer.Serialize(writer, NumericTypeValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (UnmappedTypeValue is not null) - { - writer.WritePropertyName("unmapped_type"); - JsonSerializer.Serialize(writer, UnmappedTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FielddataStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FielddataStats.g.cs deleted file mode 100644 index 56985a0b49d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FielddataStats.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FielddataStats -{ - [JsonInclude, JsonPropertyName("evictions")] - public long? Evictions { get; init; } - [JsonInclude, JsonPropertyName("fields")] - [ReadOnlyFieldDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.FieldMemoryUsage))] - public IReadOnlyDictionary? Fields { get; init; } - [JsonInclude, JsonPropertyName("memory_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MemorySize { get; init; } - [JsonInclude, JsonPropertyName("memory_size_in_bytes")] - public long MemorySizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FlushStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FlushStats.g.cs deleted file mode 100644 index 765b09ff5eb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/FlushStats.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class FlushStats -{ - [JsonInclude, JsonPropertyName("periodic")] - public long Periodic { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Fuzziness.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Fuzziness.g.cs deleted file mode 100644 index 4c54c28aa4c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Fuzziness.g.cs +++ /dev/null @@ -1,45 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class Fuzziness : Union -{ - public Fuzziness(string Fuzziness) : base(Fuzziness) - { - } - - public Fuzziness(int Fuzziness) : base(Fuzziness) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoBounds.g.cs deleted file mode 100644 index b8a34bb8503..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoBounds.g.cs +++ /dev/null @@ -1,165 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// A geo bounding box. It can be represented in various ways: -/// -/// -/// -/// -/// as 4 top/bottom/left/right coordinates -/// -/// -/// -/// -/// as 2 top_left / bottom_right points -/// -/// -/// -/// -/// as 2 top_right / bottom_left points -/// -/// -/// -/// -/// as a WKT bounding box -/// -/// -/// -/// -[JsonConverter(typeof(GeoBoundsConverter))] -public sealed partial class GeoBounds : IComplexUnion -{ - public enum Kind - { - Coordinates, - TopLeftBottomRight, - TopRightBottomLeft, - Wkt - } - - private readonly Kind _kind; - private readonly object _value; - - Kind IComplexUnion.ValueKind => _kind; - - object IComplexUnion.Value => _value; - - private GeoBounds(Kind kind, object value) - { - _kind = kind; - _value = value; - } - - public static GeoBounds Coordinates(Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds coordinates) => new(Kind.Coordinates, coordinates); - - public bool IsCoordinates => _kind == Kind.Coordinates; - - public bool TryGetCoordinates([NotNullWhen(true)] out Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds? coordinates) - { - coordinates = null; - if (_kind == Kind.Coordinates) - { - coordinates = (Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds)_value; - return true; - } - - return false; - } - - public static implicit operator GeoBounds(Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds coordinates) => GeoBounds.Coordinates(coordinates); - - public static GeoBounds TopLeftBottomRight(Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds topLeftBottomRight) => new(Kind.TopLeftBottomRight, topLeftBottomRight); - - public bool IsTopLeftBottomRight => _kind == Kind.TopLeftBottomRight; - - public bool TryGetTopLeftBottomRight([NotNullWhen(true)] out Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds? topLeftBottomRight) - { - topLeftBottomRight = null; - if (_kind == Kind.TopLeftBottomRight) - { - topLeftBottomRight = (Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds)_value; - return true; - } - - return false; - } - - public static implicit operator GeoBounds(Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds topLeftBottomRight) => GeoBounds.TopLeftBottomRight(topLeftBottomRight); - - public static GeoBounds TopRightBottomLeft(Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds topRightBottomLeft) => new(Kind.TopRightBottomLeft, topRightBottomLeft); - - public bool IsTopRightBottomLeft => _kind == Kind.TopRightBottomLeft; - - public bool TryGetTopRightBottomLeft([NotNullWhen(true)] out Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds? topRightBottomLeft) - { - topRightBottomLeft = null; - if (_kind == Kind.TopRightBottomLeft) - { - topRightBottomLeft = (Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds)_value; - return true; - } - - return false; - } - - public static implicit operator GeoBounds(Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds topRightBottomLeft) => GeoBounds.TopRightBottomLeft(topRightBottomLeft); - - public static GeoBounds Wkt(Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds wkt) => new(Kind.Wkt, wkt); - - public bool IsWkt => _kind == Kind.Wkt; - - public bool TryGetWkt([NotNullWhen(true)] out Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds? wkt) - { - wkt = null; - if (_kind == Kind.Wkt) - { - wkt = (Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds)_value; - return true; - } - - return false; - } - - public static implicit operator GeoBounds(Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds wkt) => GeoBounds.Wkt(wkt); -} - -internal sealed class GeoBoundsConverter : MultiItemUnionConverter -{ - public GeoBoundsConverter() - { - _types = new Dictionary { { GeoBounds.Kind.Coordinates, typeof(Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds) }, { GeoBounds.Kind.TopLeftBottomRight, typeof(Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds) }, { GeoBounds.Kind.TopRightBottomLeft, typeof(Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds) }, { GeoBounds.Kind.Wkt, typeof(Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds) } }; - _factories = new Dictionary> { { typeof(Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds), o => GeoBounds.Coordinates((Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds)o) }, { typeof(Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds), o => GeoBounds.TopLeftBottomRight((Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds)o) }, { typeof(Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds), o => GeoBounds.TopRightBottomLeft((Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds)o) }, { typeof(Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds), o => GeoBounds.Wkt((Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds)o) } }; - _uniquePropertyToType = new Dictionary { { "bottom", typeof(Elastic.Clients.Elasticsearch.Serverless.CoordsGeoBounds) }, { "bottom_right", typeof(Elastic.Clients.Elasticsearch.Serverless.TopLeftBottomRightGeoBounds) }, { "bottom_left", typeof(Elastic.Clients.Elasticsearch.Serverless.TopRightBottomLeftGeoBounds) }, { "wkt", typeof(Elastic.Clients.Elasticsearch.Serverless.WktGeoBounds) } }; - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoDistanceSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoDistanceSort.g.cs deleted file mode 100644 index a691a7efc98..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoDistanceSort.g.cs +++ /dev/null @@ -1,469 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -internal sealed partial class GeoDistanceSortConverter : JsonConverter -{ - public override GeoDistanceSort Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new GeoDistanceSort(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "distance_type") - { - variant.DistanceType = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ignore_unmapped") - { - variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "mode") - { - variant.Mode = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "nested") - { - variant.Nested = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "order") - { - variant.Order = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "unit") - { - variant.Unit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Location = JsonSerializer.Deserialize>(ref reader, options); - } - } - - return variant; - } - - 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)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - 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"); - JsonSerializer.Serialize(writer, value.DistanceType, options); - } - - if (value.IgnoreUnmapped.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(value.IgnoreUnmapped.Value); - } - - if (value.Mode is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, value.Mode, options); - } - - if (value.Nested is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, value.Nested, options); - } - - if (value.Order is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, value.Order, options); - } - - if (value.Unit is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, value.Unit, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(GeoDistanceSortConverter))] -public sealed partial class GeoDistanceSort -{ - public Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceType { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - public bool? IgnoreUnmapped { get; set; } - public ICollection Location { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.SortMode? Mode { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? Nested { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? Unit { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.SortOptions(GeoDistanceSort geoDistanceSort) => Elastic.Clients.Elasticsearch.Serverless.SortOptions.GeoDistance(geoDistanceSort); -} - -public sealed partial class GeoDistanceSortDescriptor : SerializableDescriptor> -{ - internal GeoDistanceSortDescriptor(Action> configure) => configure.Invoke(this); - - public GeoDistanceSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private ICollection LocationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action> NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? UnitValue { get; set; } - - public GeoDistanceSortDescriptor DistanceType(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? distanceType) - { - DistanceTypeValue = distanceType; - return Self; - } - - public GeoDistanceSortDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoDistanceSortDescriptor Location(ICollection location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - public GeoDistanceSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public GeoDistanceSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public GeoDistanceSortDescriptor Nested(Action> configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public GeoDistanceSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public GeoDistanceSortDescriptor Unit(Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? unit) - { - UnitValue = unit; - 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"); - JsonSerializer.Serialize(writer, DistanceTypeValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (UnitValue is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, UnitValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoDistanceSortDescriptor : SerializableDescriptor -{ - internal GeoDistanceSortDescriptor(Action configure) => configure.Invoke(this); - - public GeoDistanceSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private ICollection LocationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? UnitValue { get; set; } - - public GeoDistanceSortDescriptor DistanceType(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? distanceType) - { - DistanceTypeValue = distanceType; - return Self; - } - - public GeoDistanceSortDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoDistanceSortDescriptor Location(ICollection location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - public GeoDistanceSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public GeoDistanceSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public GeoDistanceSortDescriptor Nested(Action configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public GeoDistanceSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public GeoDistanceSortDescriptor Unit(Elastic.Clients.Elasticsearch.Serverless.DistanceUnit? unit) - { - UnitValue = unit; - 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"); - JsonSerializer.Serialize(writer, DistanceTypeValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (UnitValue is not null) - { - writer.WritePropertyName("unit"); - JsonSerializer.Serialize(writer, UnitValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoHashLocation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoHashLocation.g.cs deleted file mode 100644 index 9007964a10b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoHashLocation.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GeoHashLocation -{ - [JsonInclude, JsonPropertyName("geohash")] - public string Geohash { get; set; } -} - -public sealed partial class GeoHashLocationDescriptor : SerializableDescriptor -{ - 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"); - writer.WriteStringValue(GeohashValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLine.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLine.g.cs deleted file mode 100644 index 5eed9e2f8a1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLine.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// A GeoJson GeoLine. -/// -/// -public sealed partial class GeoLine -{ - /// - /// - /// Array of [lon, lat] coordinates - /// - /// - [JsonInclude, JsonPropertyName("coordinates")] - public IReadOnlyCollection> Coordinates { get; init; } - - /// - /// - /// Always "LineString" - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLocation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLocation.g.cs deleted file mode 100644 index dcf1bc9a0b3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeoLocation.g.cs +++ /dev/null @@ -1,165 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// A latitude/longitude as a 2 dimensional point. It can be represented in various ways: -/// -/// -/// -/// -/// as a {lat, long} object -/// -/// -/// -/// -/// as a geo hash value -/// -/// -/// -/// -/// as a [lon, lat] array -/// -/// -/// -/// -/// as a string in "<lat>, <lon>" or WKT point formats -/// -/// -/// -/// -[JsonConverter(typeof(GeoLocationConverter))] -public sealed partial class GeoLocation : IComplexUnion -{ - public enum Kind - { - LatitudeLongitude, - Geohash, - Coordinates, - Text - } - - private readonly Kind _kind; - private readonly object _value; - - Kind IComplexUnion.ValueKind => _kind; - - object IComplexUnion.Value => _value; - - private GeoLocation(Kind kind, object value) - { - _kind = kind; - _value = value; - } - - public static GeoLocation LatitudeLongitude(Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation latitudeLongitude) => new(Kind.LatitudeLongitude, latitudeLongitude); - - public bool IsLatitudeLongitude => _kind == Kind.LatitudeLongitude; - - public bool TryGetLatitudeLongitude([NotNullWhen(true)] out Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation? latitudeLongitude) - { - latitudeLongitude = null; - if (_kind == Kind.LatitudeLongitude) - { - latitudeLongitude = (Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation)_value; - return true; - } - - return false; - } - - public static implicit operator GeoLocation(Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation latitudeLongitude) => GeoLocation.LatitudeLongitude(latitudeLongitude); - - public static GeoLocation Geohash(Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation geohash) => new(Kind.Geohash, geohash); - - public bool IsGeohash => _kind == Kind.Geohash; - - public bool TryGetGeohash([NotNullWhen(true)] out Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation? geohash) - { - geohash = null; - if (_kind == Kind.Geohash) - { - geohash = (Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation)_value; - return true; - } - - return false; - } - - public static implicit operator GeoLocation(Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation geohash) => GeoLocation.Geohash(geohash); - - public static GeoLocation Coordinates(double[] coordinates) => new(Kind.Coordinates, coordinates); - - public bool IsCoordinates => _kind == Kind.Coordinates; - - public bool TryGetCoordinates([NotNullWhen(true)] out double[]? coordinates) - { - coordinates = null; - if (_kind == Kind.Coordinates) - { - coordinates = (double[])_value; - return true; - } - - return false; - } - - public static implicit operator GeoLocation(double[] coordinates) => GeoLocation.Coordinates(coordinates); - - public static GeoLocation Text(string text) => new(Kind.Text, text); - - public bool IsText => _kind == Kind.Text; - - public bool TryGetText([NotNullWhen(true)] out string? text) - { - text = null; - if (_kind == Kind.Text) - { - text = (string)_value; - return true; - } - - return false; - } - - public static implicit operator GeoLocation(string text) => GeoLocation.Text(text); -} - -internal sealed class GeoLocationConverter : MultiItemUnionConverter -{ - public GeoLocationConverter() - { - _types = new Dictionary { { GeoLocation.Kind.LatitudeLongitude, typeof(Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation) }, { GeoLocation.Kind.Geohash, typeof(Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation) } }; - _factories = new Dictionary> { { typeof(Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation), o => GeoLocation.LatitudeLongitude((Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation)o) }, { typeof(Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation), o => GeoLocation.Geohash((Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation)o) } }; - _uniquePropertyToType = new Dictionary { { "lat", typeof(Elastic.Clients.Elasticsearch.Serverless.LatLonGeoLocation) }, { "geohash", typeof(Elastic.Clients.Elasticsearch.Serverless.GeoHashLocation) } }; - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeohashPrecision.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeohashPrecision.g.cs deleted file mode 100644 index e9e49928d87..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GeohashPrecision.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// A precision that can be expressed as a geohash length between 1 and 12, or a distance measure like "1km", "10m". -/// -/// -public sealed partial class GeohashPrecision : Union -{ - public GeohashPrecision(double GeohashLength) : base(GeohashLength) - { - } - - public GeohashPrecision(string Distance) : base(Distance) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GetStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GetStats.g.cs deleted file mode 100644 index bdd4dd14fca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/GetStats.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class GetStats -{ - [JsonInclude, JsonPropertyName("current")] - public long Current { get; init; } - [JsonInclude, JsonPropertyName("exists_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ExistsTime { get; init; } - [JsonInclude, JsonPropertyName("exists_time_in_millis")] - public long ExistsTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("exists_total")] - public long ExistsTotal { get; init; } - [JsonInclude, JsonPropertyName("missing_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MissingTime { get; init; } - [JsonInclude, JsonPropertyName("missing_time_in_millis")] - public long MissingTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("missing_total")] - public long MissingTotal { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_millis")] - public long TimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Connection.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Connection.g.cs deleted file mode 100644 index 9314adb2e0c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Connection.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class Connection -{ - [JsonInclude, JsonPropertyName("doc_count")] - public long DocCount { get; init; } - [JsonInclude, JsonPropertyName("source")] - public long Source { get; init; } - [JsonInclude, JsonPropertyName("target")] - public long Target { get; init; } - [JsonInclude, JsonPropertyName("weight")] - public double Weight { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/ExploreControls.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/ExploreControls.g.cs deleted file mode 100644 index 7ce7756ed12..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/ExploreControls.g.cs +++ /dev/null @@ -1,309 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class ExploreControls -{ - /// - /// - /// To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample. - /// You can do this by selecting a single-value field and setting a maximum number of documents per value for that field. - /// - /// - [JsonInclude, JsonPropertyName("sample_diversity")] - public Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversity? SampleDiversity { get; set; } - - /// - /// - /// Each hop considers a sample of the best-matching documents on each shard. - /// Using samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms. - /// Very small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms. - /// Very large sample sizes can dilute the quality of the results and increase execution times. - /// - /// - [JsonInclude, JsonPropertyName("sample_size")] - public int? SampleSize { get; set; } - - /// - /// - /// The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned. - /// This timeout is honored on a best-effort basis. - /// Execution might overrun this timeout if, for example, a long pause is encountered while FieldData is loaded for a field. - /// - /// - [JsonInclude, JsonPropertyName("timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; } - - /// - /// - /// Filters associated terms so only those that are significantly associated with your query are included. - /// - /// - [JsonInclude, JsonPropertyName("use_significance")] - public bool UseSignificance { get; set; } -} - -public sealed partial class ExploreControlsDescriptor : SerializableDescriptor> -{ - internal ExploreControlsDescriptor(Action> configure) => configure.Invoke(this); - - public ExploreControlsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversity? SampleDiversityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversityDescriptor SampleDiversityDescriptor { get; set; } - private Action> SampleDiversityDescriptorAction { get; set; } - private int? SampleSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - private bool UseSignificanceValue { get; set; } - - /// - /// - /// To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample. - /// You can do this by selecting a single-value field and setting a maximum number of documents per value for that field. - /// - /// - public ExploreControlsDescriptor SampleDiversity(Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversity? sampleDiversity) - { - SampleDiversityDescriptor = null; - SampleDiversityDescriptorAction = null; - SampleDiversityValue = sampleDiversity; - return Self; - } - - public ExploreControlsDescriptor SampleDiversity(Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversityDescriptor descriptor) - { - SampleDiversityValue = null; - SampleDiversityDescriptorAction = null; - SampleDiversityDescriptor = descriptor; - return Self; - } - - public ExploreControlsDescriptor SampleDiversity(Action> configure) - { - SampleDiversityValue = null; - SampleDiversityDescriptor = null; - SampleDiversityDescriptorAction = configure; - return Self; - } - - /// - /// - /// Each hop considers a sample of the best-matching documents on each shard. - /// Using samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms. - /// Very small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms. - /// Very large sample sizes can dilute the quality of the results and increase execution times. - /// - /// - public ExploreControlsDescriptor SampleSize(int? sampleSize) - { - SampleSizeValue = sampleSize; - return Self; - } - - /// - /// - /// The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned. - /// This timeout is honored on a best-effort basis. - /// Execution might overrun this timeout if, for example, a long pause is encountered while FieldData is loaded for a field. - /// - /// - public ExploreControlsDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// Filters associated terms so only those that are significantly associated with your query are included. - /// - /// - public ExploreControlsDescriptor UseSignificance(bool useSignificance = true) - { - UseSignificanceValue = useSignificance; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SampleDiversityDescriptor is not null) - { - writer.WritePropertyName("sample_diversity"); - JsonSerializer.Serialize(writer, SampleDiversityDescriptor, options); - } - else if (SampleDiversityDescriptorAction is not null) - { - writer.WritePropertyName("sample_diversity"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversityDescriptor(SampleDiversityDescriptorAction), options); - } - else if (SampleDiversityValue is not null) - { - writer.WritePropertyName("sample_diversity"); - JsonSerializer.Serialize(writer, SampleDiversityValue, options); - } - - if (SampleSizeValue.HasValue) - { - writer.WritePropertyName("sample_size"); - writer.WriteNumberValue(SampleSizeValue.Value); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WritePropertyName("use_significance"); - writer.WriteBooleanValue(UseSignificanceValue); - writer.WriteEndObject(); - } -} - -public sealed partial class ExploreControlsDescriptor : SerializableDescriptor -{ - internal ExploreControlsDescriptor(Action configure) => configure.Invoke(this); - - public ExploreControlsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversity? SampleDiversityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversityDescriptor SampleDiversityDescriptor { get; set; } - private Action SampleDiversityDescriptorAction { get; set; } - private int? SampleSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; } - private bool UseSignificanceValue { get; set; } - - /// - /// - /// To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample. - /// You can do this by selecting a single-value field and setting a maximum number of documents per value for that field. - /// - /// - public ExploreControlsDescriptor SampleDiversity(Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversity? sampleDiversity) - { - SampleDiversityDescriptor = null; - SampleDiversityDescriptorAction = null; - SampleDiversityValue = sampleDiversity; - return Self; - } - - public ExploreControlsDescriptor SampleDiversity(Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversityDescriptor descriptor) - { - SampleDiversityValue = null; - SampleDiversityDescriptorAction = null; - SampleDiversityDescriptor = descriptor; - return Self; - } - - public ExploreControlsDescriptor SampleDiversity(Action configure) - { - SampleDiversityValue = null; - SampleDiversityDescriptor = null; - SampleDiversityDescriptorAction = configure; - return Self; - } - - /// - /// - /// Each hop considers a sample of the best-matching documents on each shard. - /// Using samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms. - /// Very small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms. - /// Very large sample sizes can dilute the quality of the results and increase execution times. - /// - /// - public ExploreControlsDescriptor SampleSize(int? sampleSize) - { - SampleSizeValue = sampleSize; - return Self; - } - - /// - /// - /// The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned. - /// This timeout is honored on a best-effort basis. - /// Execution might overrun this timeout if, for example, a long pause is encountered while FieldData is loaded for a field. - /// - /// - public ExploreControlsDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) - { - TimeoutValue = timeout; - return Self; - } - - /// - /// - /// Filters associated terms so only those that are significantly associated with your query are included. - /// - /// - public ExploreControlsDescriptor UseSignificance(bool useSignificance = true) - { - UseSignificanceValue = useSignificance; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SampleDiversityDescriptor is not null) - { - writer.WritePropertyName("sample_diversity"); - JsonSerializer.Serialize(writer, SampleDiversityDescriptor, options); - } - else if (SampleDiversityDescriptorAction is not null) - { - writer.WritePropertyName("sample_diversity"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.SampleDiversityDescriptor(SampleDiversityDescriptorAction), options); - } - else if (SampleDiversityValue is not null) - { - writer.WritePropertyName("sample_diversity"); - JsonSerializer.Serialize(writer, SampleDiversityValue, options); - } - - if (SampleSizeValue.HasValue) - { - writer.WritePropertyName("sample_size"); - writer.WriteNumberValue(SampleSizeValue.Value); - } - - if (TimeoutValue is not null) - { - writer.WritePropertyName("timeout"); - JsonSerializer.Serialize(writer, TimeoutValue, options); - } - - writer.WritePropertyName("use_significance"); - writer.WriteBooleanValue(UseSignificanceValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Hop.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Hop.g.cs deleted file mode 100644 index bc55d644b4f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Hop.g.cs +++ /dev/null @@ -1,431 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class Hop -{ - /// - /// - /// Specifies one or more fields from which you want to extract terms that are associated with the specified vertices. - /// - /// - [JsonInclude, JsonPropertyName("connections")] - public Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? Connections { get; set; } - - /// - /// - /// An optional guiding query that constrains the Graph API as it explores connected terms. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - - /// - /// - /// Contains the fields you are interested in. - /// - /// - [JsonInclude, JsonPropertyName("vertices")] - public ICollection Vertices { get; set; } -} - -public sealed partial class HopDescriptor : SerializableDescriptor> -{ - internal HopDescriptor(Action> configure) => configure.Invoke(this); - - public HopDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? ConnectionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor ConnectionsDescriptor { get; set; } - private Action> ConnectionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection VerticesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor VerticesDescriptor { get; set; } - private Action> VerticesDescriptorAction { get; set; } - private Action>[] VerticesDescriptorActions { get; set; } - - /// - /// - /// Specifies one or more fields from which you want to extract terms that are associated with the specified vertices. - /// - /// - public HopDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? connections) - { - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = null; - ConnectionsValue = connections; - return Self; - } - - public HopDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor descriptor) - { - ConnectionsValue = null; - ConnectionsDescriptorAction = null; - ConnectionsDescriptor = descriptor; - return Self; - } - - public HopDescriptor Connections(Action> configure) - { - ConnectionsValue = null; - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// An optional guiding query that constrains the Graph API as it explores connected terms. - /// - /// - public HopDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public HopDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public HopDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Contains the fields you are interested in. - /// - /// - public HopDescriptor Vertices(ICollection vertices) - { - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesValue = vertices; - return Self; - } - - public HopDescriptor Vertices(Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor descriptor) - { - VerticesValue = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesDescriptor = descriptor; - return Self; - } - - public HopDescriptor Vertices(Action> configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorActions = null; - VerticesDescriptorAction = configure; - return Self; - } - - public HopDescriptor Vertices(params Action>[] configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConnectionsDescriptor is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsDescriptor, options); - } - else if (ConnectionsDescriptorAction is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor(ConnectionsDescriptorAction), options); - } - else if (ConnectionsValue is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (VerticesDescriptor is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, VerticesDescriptor, options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorAction is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(VerticesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorActions is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - foreach (var action in VerticesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("vertices"); - JsonSerializer.Serialize(writer, VerticesValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class HopDescriptor : SerializableDescriptor -{ - internal HopDescriptor(Action configure) => configure.Invoke(this); - - public HopDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? ConnectionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor ConnectionsDescriptor { get; set; } - private Action ConnectionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection VerticesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor VerticesDescriptor { get; set; } - private Action VerticesDescriptorAction { get; set; } - private Action[] VerticesDescriptorActions { get; set; } - - /// - /// - /// Specifies one or more fields from which you want to extract terms that are associated with the specified vertices. - /// - /// - public HopDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.Hop? connections) - { - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = null; - ConnectionsValue = connections; - return Self; - } - - public HopDescriptor Connections(Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor descriptor) - { - ConnectionsValue = null; - ConnectionsDescriptorAction = null; - ConnectionsDescriptor = descriptor; - return Self; - } - - public HopDescriptor Connections(Action configure) - { - ConnectionsValue = null; - ConnectionsDescriptor = null; - ConnectionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// An optional guiding query that constrains the Graph API as it explores connected terms. - /// - /// - public HopDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public HopDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public HopDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Contains the fields you are interested in. - /// - /// - public HopDescriptor Vertices(ICollection vertices) - { - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesValue = vertices; - return Self; - } - - public HopDescriptor Vertices(Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor descriptor) - { - VerticesValue = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = null; - VerticesDescriptor = descriptor; - return Self; - } - - public HopDescriptor Vertices(Action configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorActions = null; - VerticesDescriptorAction = configure; - return Self; - } - - public HopDescriptor Vertices(params Action[] configure) - { - VerticesValue = null; - VerticesDescriptor = null; - VerticesDescriptorAction = null; - VerticesDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConnectionsDescriptor is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsDescriptor, options); - } - else if (ConnectionsDescriptorAction is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.HopDescriptor(ConnectionsDescriptorAction), options); - } - else if (ConnectionsValue is not null) - { - writer.WritePropertyName("connections"); - JsonSerializer.Serialize(writer, ConnectionsValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (VerticesDescriptor is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, VerticesDescriptor, options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorAction is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(VerticesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (VerticesDescriptorActions is not null) - { - writer.WritePropertyName("vertices"); - writer.WriteStartArray(); - foreach (var action in VerticesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexDefinitionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("vertices"); - JsonSerializer.Serialize(writer, VerticesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/SampleDiversity.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/SampleDiversity.g.cs deleted file mode 100644 index a09103a43f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/SampleDiversity.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class SampleDiversity -{ - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("max_docs_per_value")] - public int MaxDocsPerValue { get; set; } -} - -public sealed partial class SampleDiversityDescriptor : SerializableDescriptor> -{ - internal SampleDiversityDescriptor(Action> configure) => configure.Invoke(this); - - public SampleDiversityDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int MaxDocsPerValueValue { get; set; } - - public SampleDiversityDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SampleDiversityDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SampleDiversityDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SampleDiversityDescriptor MaxDocsPerValue(int maxDocsPerValue) - { - MaxDocsPerValueValue = maxDocsPerValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("max_docs_per_value"); - writer.WriteNumberValue(MaxDocsPerValueValue); - writer.WriteEndObject(); - } -} - -public sealed partial class SampleDiversityDescriptor : SerializableDescriptor -{ - internal SampleDiversityDescriptor(Action configure) => configure.Invoke(this); - - public SampleDiversityDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int MaxDocsPerValueValue { get; set; } - - public SampleDiversityDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SampleDiversityDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SampleDiversityDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SampleDiversityDescriptor MaxDocsPerValue(int maxDocsPerValue) - { - MaxDocsPerValueValue = maxDocsPerValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("max_docs_per_value"); - writer.WriteNumberValue(MaxDocsPerValueValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Vertex.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Vertex.g.cs deleted file mode 100644 index 16e968ef411..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/Vertex.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class Vertex -{ - [JsonInclude, JsonPropertyName("depth")] - public long Depth { get; init; } - [JsonInclude, JsonPropertyName("field")] - public string Field { get; init; } - [JsonInclude, JsonPropertyName("term")] - public string Term { get; init; } - [JsonInclude, JsonPropertyName("weight")] - public double Weight { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexDefinition.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexDefinition.g.cs deleted file mode 100644 index 7296fe76a63..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexDefinition.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class VertexDefinition -{ - /// - /// - /// Prevents the specified terms from being included in the results. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public ICollection? Exclude { get; set; } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Identifies the terms of interest that form the starting points from which you want to spider out. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public ICollection? Include { get; set; } - - /// - /// - /// Specifies how many documents must contain a pair of terms before it is considered to be a useful connection. - /// This setting acts as a certainty threshold. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_count")] - public long? MinDocCount { get; set; } - - /// - /// - /// Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration. - /// - /// - [JsonInclude, JsonPropertyName("shard_min_doc_count")] - public long? ShardMinDocCount { get; set; } - - /// - /// - /// Specifies the maximum number of vertex terms returned for each field. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } -} - -public sealed partial class VertexDefinitionDescriptor : SerializableDescriptor> -{ - internal VertexDefinitionDescriptor(Action> configure) => configure.Invoke(this); - - public VertexDefinitionDescriptor() : base() - { - } - - private ICollection? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor IncludeDescriptor { get; set; } - private Action IncludeDescriptorAction { get; set; } - private Action[] IncludeDescriptorActions { get; set; } - private long? MinDocCountValue { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Prevents the specified terms from being included in the results. - /// - /// - public VertexDefinitionDescriptor Exclude(ICollection? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - public VertexDefinitionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - public VertexDefinitionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - public VertexDefinitionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Identifies the terms of interest that form the starting points from which you want to spider out. - /// - /// - public VertexDefinitionDescriptor Include(ICollection? include) - { - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeDescriptorActions = null; - IncludeValue = include; - return Self; - } - - public VertexDefinitionDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor descriptor) - { - IncludeValue = null; - IncludeDescriptorAction = null; - IncludeDescriptorActions = null; - IncludeDescriptor = descriptor; - return Self; - } - - public VertexDefinitionDescriptor Include(Action configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorActions = null; - IncludeDescriptorAction = configure; - return Self; - } - - public VertexDefinitionDescriptor Include(params Action[] configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeDescriptorActions = configure; - return Self; - } - - /// - /// - /// Specifies how many documents must contain a pair of terms before it is considered to be a useful connection. - /// This setting acts as a certainty threshold. - /// - /// - public VertexDefinitionDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration. - /// - /// - public VertexDefinitionDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// Specifies the maximum number of vertex terms returned for each field. - /// - /// - public VertexDefinitionDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IncludeDescriptor is not null) - { - writer.WritePropertyName("include"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IncludeDescriptor, options); - writer.WriteEndArray(); - } - else if (IncludeDescriptorAction is not null) - { - writer.WritePropertyName("include"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor(IncludeDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IncludeDescriptorActions is not null) - { - writer.WritePropertyName("include"); - writer.WriteStartArray(); - foreach (var action in IncludeDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class VertexDefinitionDescriptor : SerializableDescriptor -{ - internal VertexDefinitionDescriptor(Action configure) => configure.Invoke(this); - - public VertexDefinitionDescriptor() : base() - { - } - - private ICollection? ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor IncludeDescriptor { get; set; } - private Action IncludeDescriptorAction { get; set; } - private Action[] IncludeDescriptorActions { get; set; } - private long? MinDocCountValue { get; set; } - private long? ShardMinDocCountValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Prevents the specified terms from being included in the results. - /// - /// - public VertexDefinitionDescriptor Exclude(ICollection? exclude) - { - ExcludeValue = exclude; - return Self; - } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - public VertexDefinitionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - public VertexDefinitionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Identifies a field in the documents of interest. - /// - /// - public VertexDefinitionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Identifies the terms of interest that form the starting points from which you want to spider out. - /// - /// - public VertexDefinitionDescriptor Include(ICollection? include) - { - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeDescriptorActions = null; - IncludeValue = include; - return Self; - } - - public VertexDefinitionDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor descriptor) - { - IncludeValue = null; - IncludeDescriptorAction = null; - IncludeDescriptorActions = null; - IncludeDescriptor = descriptor; - return Self; - } - - public VertexDefinitionDescriptor Include(Action configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorActions = null; - IncludeDescriptorAction = configure; - return Self; - } - - public VertexDefinitionDescriptor Include(params Action[] configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeDescriptorActions = configure; - return Self; - } - - /// - /// - /// Specifies how many documents must contain a pair of terms before it is considered to be a useful connection. - /// This setting acts as a certainty threshold. - /// - /// - public VertexDefinitionDescriptor MinDocCount(long? minDocCount) - { - MinDocCountValue = minDocCount; - return Self; - } - - /// - /// - /// Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration. - /// - /// - public VertexDefinitionDescriptor ShardMinDocCount(long? shardMinDocCount) - { - ShardMinDocCountValue = shardMinDocCount; - return Self; - } - - /// - /// - /// Specifies the maximum number of vertex terms returned for each field. - /// - /// - public VertexDefinitionDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExcludeValue is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IncludeDescriptor is not null) - { - writer.WritePropertyName("include"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IncludeDescriptor, options); - writer.WriteEndArray(); - } - else if (IncludeDescriptorAction is not null) - { - writer.WritePropertyName("include"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor(IncludeDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IncludeDescriptorActions is not null) - { - writer.WritePropertyName("include"); - writer.WriteStartArray(); - foreach (var action in IncludeDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Graph.VertexIncludeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (MinDocCountValue.HasValue) - { - writer.WritePropertyName("min_doc_count"); - writer.WriteNumberValue(MinDocCountValue.Value); - } - - if (ShardMinDocCountValue.HasValue) - { - writer.WritePropertyName("shard_min_doc_count"); - writer.WriteNumberValue(ShardMinDocCountValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexInclude.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexInclude.g.cs deleted file mode 100644 index 0671c7c3195..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Graph/VertexInclude.g.cs +++ /dev/null @@ -1,70 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Graph; - -public sealed partial class VertexInclude -{ - [JsonInclude, JsonPropertyName("boost")] - public double Boost { get; set; } - [JsonInclude, JsonPropertyName("term")] - public string Term { get; set; } -} - -public sealed partial class VertexIncludeDescriptor : SerializableDescriptor -{ - internal VertexIncludeDescriptor(Action configure) => configure.Invoke(this); - - public VertexIncludeDescriptor() : base() - { - } - - private double BoostValue { get; set; } - private string TermValue { get; set; } - - public VertexIncludeDescriptor Boost(double boost) - { - BoostValue = boost; - return Self; - } - - public VertexIncludeDescriptor Term(string term) - { - TermValue = term; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue); - writer.WritePropertyName("term"); - writer.WriteStringValue(TermValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Actions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Actions.g.cs deleted file mode 100644 index 6f11b17d11c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Actions.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class Actions -{ - /// - /// - /// Phases allowed: warm, cold. - /// - /// - [JsonInclude, JsonPropertyName("allocate")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.AllocateAction? Allocate { get; init; } - - /// - /// - /// Phases allowed: delete. - /// - /// - [JsonInclude, JsonPropertyName("delete")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.DeleteAction? Delete { get; init; } - - /// - /// - /// Phases allowed: hot, warm, cold. - /// - /// - [JsonInclude, JsonPropertyName("downsample")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.DownsampleAction? Downsample { get; init; } - - /// - /// - /// Phases allowed: hot, warm. - /// - /// - [JsonInclude, JsonPropertyName("forcemerge")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.ForceMergeAction? Forcemerge { get; init; } - - /// - /// - /// Phases allowed: warm, cold. - /// - /// - [JsonInclude, JsonPropertyName("migrate")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.MigrateAction? Migrate { get; init; } - - /// - /// - /// Phases allowed: hot, warm, cold. - /// - /// - [JsonInclude, JsonPropertyName("readonly")] - public Elastic.Clients.Elasticsearch.Serverless.EmptyObject? Readonly { get; init; } - - /// - /// - /// Phases allowed: hot. - /// - /// - [JsonInclude, JsonPropertyName("rollover")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.RolloverAction? Rollover { get; init; } - - /// - /// - /// Phases allowed: hot, cold, frozen. - /// - /// - [JsonInclude, JsonPropertyName("searchable_snapshot")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.SearchableSnapshotAction? SearchableSnapshot { get; init; } - - /// - /// - /// Phases allowed: hot, warm, cold. - /// - /// - [JsonInclude, JsonPropertyName("set_priority")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.SetPriorityAction? SetPriority { get; init; } - - /// - /// - /// Phases allowed: hot, warm. - /// - /// - [JsonInclude, JsonPropertyName("shrink")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.ShrinkAction? Shrink { get; init; } - - /// - /// - /// Phases allowed: hot, warm, cold, frozen. - /// - /// - [JsonInclude, JsonPropertyName("unfollow")] - public Elastic.Clients.Elasticsearch.Serverless.EmptyObject? Unfollow { get; init; } - - /// - /// - /// Phases allowed: delete. - /// - /// - [JsonInclude, JsonPropertyName("wait_for_snapshot")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.WaitForSnapshotAction? WaitForSnapshot { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs deleted file mode 100644 index 10e67920270..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class AllocateAction -{ - [JsonInclude, JsonPropertyName("exclude")] - public IReadOnlyDictionary? Exclude { get; init; } - [JsonInclude, JsonPropertyName("include")] - public IReadOnlyDictionary? Include { get; init; } - [JsonInclude, JsonPropertyName("number_of_replicas")] - public int? NumberOfReplicas { get; init; } - [JsonInclude, JsonPropertyName("require")] - public IReadOnlyDictionary? Require { get; init; } - [JsonInclude, JsonPropertyName("total_shards_per_node")] - public int? TotalShardsPerNode { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs deleted file mode 100644 index b6595e79aec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class DeleteAction -{ - [JsonInclude, JsonPropertyName("delete_searchable_snapshot")] - public bool? DeleteSearchableSnapshot { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DownsampleAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DownsampleAction.g.cs deleted file mode 100644 index 5f4c4956068..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/DownsampleAction.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class DownsampleAction -{ - [JsonInclude, JsonPropertyName("fixed_interval")] - public string FixedInterval { get; init; } - [JsonInclude, JsonPropertyName("wait_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitTimeout { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ForceMergeAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ForceMergeAction.g.cs deleted file mode 100644 index 1f57a878dbf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ForceMergeAction.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class ForceMergeAction -{ - [JsonInclude, JsonPropertyName("index_codec")] - public string? IndexCodec { get; init; } - [JsonInclude, JsonPropertyName("max_num_segments")] - public int MaxNumSegments { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs deleted file mode 100644 index 5526d51e6ba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class MigrateAction -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phase.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phase.g.cs deleted file mode 100644 index c4d4385d142..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phase.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class Phase -{ - [JsonInclude, JsonPropertyName("actions")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Actions? Actions { get; init; } - [JsonInclude, JsonPropertyName("min_age")] - public Union? MinAge { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phases.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phases.g.cs deleted file mode 100644 index 2c0adadc922..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/Phases.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class Phases -{ - [JsonInclude, JsonPropertyName("cold")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Phase? Cold { get; init; } - [JsonInclude, JsonPropertyName("delete")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Phase? Delete { get; init; } - [JsonInclude, JsonPropertyName("frozen")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Phase? Frozen { get; init; } - [JsonInclude, JsonPropertyName("hot")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Phase? Hot { get; init; } - [JsonInclude, JsonPropertyName("warm")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Phase? Warm { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs deleted file mode 100644 index 71e1fa516b0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class RolloverAction -{ - [JsonInclude, JsonPropertyName("max_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MaxAge { get; init; } - [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; init; } - [JsonInclude, JsonPropertyName("max_primary_shard_docs")] - public long? MaxPrimaryShardDocs { get; init; } - [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSize { get; init; } - [JsonInclude, JsonPropertyName("max_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSize { get; init; } - [JsonInclude, JsonPropertyName("min_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MinAge { get; init; } - [JsonInclude, JsonPropertyName("min_docs")] - public long? MinDocs { get; init; } - [JsonInclude, JsonPropertyName("min_primary_shard_docs")] - public long? MinPrimaryShardDocs { get; init; } - [JsonInclude, JsonPropertyName("min_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSize { get; init; } - [JsonInclude, JsonPropertyName("min_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs deleted file mode 100644 index 75fa239c141..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class SearchableSnapshotAction -{ - [JsonInclude, JsonPropertyName("force_merge_index")] - public bool? ForceMergeIndex { get; init; } - [JsonInclude, JsonPropertyName("snapshot_repository")] - public string SnapshotRepository { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs deleted file mode 100644 index 515826b7aaf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class SetPriorityAction -{ - [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs deleted file mode 100644 index c1aa5ee27c4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class ShrinkAction -{ - [JsonInclude, JsonPropertyName("allow_write_after_shrink")] - public bool? AllowWriteAfterShrink { get; init; } - [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSize { get; init; } - [JsonInclude, JsonPropertyName("number_of_shards")] - public int? NumberOfShards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/WaitForSnapshotAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/WaitForSnapshotAction.g.cs deleted file mode 100644 index bb5cff0a8db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexLifecycleManagement/WaitForSnapshotAction.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement; - -public sealed partial class WaitForSnapshotAction -{ - [JsonInclude, JsonPropertyName("policy")] - public string Policy { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs deleted file mode 100644 index b7b1346d94b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AddAction.g.cs +++ /dev/null @@ -1,637 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AddAction -{ - /// - /// - /// Alias for the action. - /// Index alias names support date math. - /// - /// - [JsonInclude, JsonPropertyName("alias")] - public Elastic.Clients.Elasticsearch.Serverless.IndexAlias? Alias { get; set; } - - /// - /// - /// Aliases for the action. - /// Index alias names support date math. - /// - /// - [JsonInclude, JsonPropertyName("aliases")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexAlias))] - public ICollection? Aliases { get; set; } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// Data stream aliases don’t support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("index_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRouting { get; set; } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// If true, the alias is hidden. - /// - /// - [JsonInclude, JsonPropertyName("is_hidden")] - public bool? IsHidden { get; set; } - - /// - /// - /// If true, sets the write index or data stream for the alias. - /// - /// - [JsonInclude, JsonPropertyName("is_write_index")] - public bool? IsWriteIndex { get; set; } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - [JsonInclude, JsonPropertyName("must_exist")] - public bool? MustExist { get; set; } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// Data stream aliases don’t support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// Data stream aliases don’t support this parameter. - /// - /// - [JsonInclude, JsonPropertyName("search_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRouting { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesAction(AddAction addAction) => Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesAction.Add(addAction); -} - -public sealed partial class AddActionDescriptor : SerializableDescriptor> -{ - internal AddActionDescriptor(Action> configure) => configure.Invoke(this); - - public AddActionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private bool? IsHiddenValue { get; set; } - private bool? IsWriteIndexValue { get; set; } - private bool? MustExistValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } - - /// - /// - /// Alias for the action. - /// Index alias names support date math. - /// - /// - public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// - /// Aliases for the action. - /// Index alias names support date math. - /// - /// - public AddActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - public AddActionDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public AddActionDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public AddActionDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - public AddActionDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public AddActionDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? indexRouting) - { - IndexRoutingValue = indexRouting; - return Self; - } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - public AddActionDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// If true, the alias is hidden. - /// - /// - public AddActionDescriptor IsHidden(bool? isHidden = true) - { - IsHiddenValue = isHidden; - return Self; - } - - /// - /// - /// If true, sets the write index or data stream for the alias. - /// - /// - public AddActionDescriptor IsWriteIndex(bool? isWriteIndex = true) - { - IsWriteIndexValue = isWriteIndex; - return Self; - } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - public AddActionDescriptor MustExist(bool? mustExist = true) - { - MustExistValue = mustExist; - return Self; - } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// Data stream aliases don’t support this parameter. - /// - /// - public AddActionDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? searchRouting) - { - SearchRoutingValue = searchRouting; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (IndexRoutingValue is not null) - { - writer.WritePropertyName("index_routing"); - JsonSerializer.Serialize(writer, IndexRoutingValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IsHiddenValue.HasValue) - { - writer.WritePropertyName("is_hidden"); - writer.WriteBooleanValue(IsHiddenValue.Value); - } - - if (IsWriteIndexValue.HasValue) - { - writer.WritePropertyName("is_write_index"); - writer.WriteBooleanValue(IsWriteIndexValue.Value); - } - - if (MustExistValue.HasValue) - { - writer.WritePropertyName("must_exist"); - writer.WriteBooleanValue(MustExistValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchRoutingValue is not null) - { - writer.WritePropertyName("search_routing"); - JsonSerializer.Serialize(writer, SearchRoutingValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AddActionDescriptor : SerializableDescriptor -{ - internal AddActionDescriptor(Action configure) => configure.Invoke(this); - - public AddActionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private bool? IsHiddenValue { get; set; } - private bool? IsWriteIndexValue { get; set; } - private bool? MustExistValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } - - /// - /// - /// Alias for the action. - /// Index alias names support date math. - /// - /// - public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// - /// Aliases for the action. - /// Index alias names support date math. - /// - /// - public AddActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - public AddActionDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public AddActionDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public AddActionDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - public AddActionDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public AddActionDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? indexRouting) - { - IndexRoutingValue = indexRouting; - return Self; - } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - public AddActionDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// If true, the alias is hidden. - /// - /// - public AddActionDescriptor IsHidden(bool? isHidden = true) - { - IsHiddenValue = isHidden; - return Self; - } - - /// - /// - /// If true, sets the write index or data stream for the alias. - /// - /// - public AddActionDescriptor IsWriteIndex(bool? isWriteIndex = true) - { - IsWriteIndexValue = isWriteIndex; - return Self; - } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - public AddActionDescriptor MustExist(bool? mustExist = true) - { - MustExistValue = mustExist; - return Self; - } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// Data stream aliases don’t support this parameter. - /// - /// - public AddActionDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// Data stream aliases don’t support this parameter. - /// - /// - public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? searchRouting) - { - SearchRoutingValue = searchRouting; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (IndexRoutingValue is not null) - { - writer.WritePropertyName("index_routing"); - JsonSerializer.Serialize(writer, IndexRoutingValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IsHiddenValue.HasValue) - { - writer.WritePropertyName("is_hidden"); - writer.WriteBooleanValue(IsHiddenValue.Value); - } - - if (IsWriteIndexValue.HasValue) - { - writer.WritePropertyName("is_write_index"); - writer.WriteBooleanValue(IsWriteIndexValue.Value); - } - - if (MustExistValue.HasValue) - { - writer.WritePropertyName("must_exist"); - writer.WriteBooleanValue(MustExistValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchRoutingValue is not null) - { - writer.WritePropertyName("search_routing"); - JsonSerializer.Serialize(writer, SearchRoutingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Alias.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Alias.g.cs deleted file mode 100644 index 1d1675189b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Alias.g.cs +++ /dev/null @@ -1,396 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Alias -{ - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// - /// - [JsonInclude, JsonPropertyName("index_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRouting { get; set; } - - /// - /// - /// If true, the alias is hidden. - /// All indices for the alias must have the same is_hidden value. - /// - /// - [JsonInclude, JsonPropertyName("is_hidden")] - public bool? IsHidden { get; set; } - - /// - /// - /// If true, the index is the write index for the alias. - /// - /// - [JsonInclude, JsonPropertyName("is_write_index")] - public bool? IsWriteIndex { get; set; } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// - /// - [JsonInclude, JsonPropertyName("search_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRouting { get; set; } -} - -public sealed partial class AliasDescriptor : SerializableDescriptor> -{ - internal AliasDescriptor(Action> configure) => configure.Invoke(this); - - public AliasDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } - private bool? IsHiddenValue { get; set; } - private bool? IsWriteIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - public AliasDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public AliasDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public AliasDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// - /// - public AliasDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? indexRouting) - { - IndexRoutingValue = indexRouting; - return Self; - } - - /// - /// - /// If true, the alias is hidden. - /// All indices for the alias must have the same is_hidden value. - /// - /// - public AliasDescriptor IsHidden(bool? isHidden = true) - { - IsHiddenValue = isHidden; - return Self; - } - - /// - /// - /// If true, the index is the write index for the alias. - /// - /// - public AliasDescriptor IsWriteIndex(bool? isWriteIndex = true) - { - IsWriteIndexValue = isWriteIndex; - return Self; - } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// - /// - public AliasDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// - /// - public AliasDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? searchRouting) - { - SearchRoutingValue = searchRouting; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexRoutingValue is not null) - { - writer.WritePropertyName("index_routing"); - JsonSerializer.Serialize(writer, IndexRoutingValue, options); - } - - if (IsHiddenValue.HasValue) - { - writer.WritePropertyName("is_hidden"); - writer.WriteBooleanValue(IsHiddenValue.Value); - } - - if (IsWriteIndexValue.HasValue) - { - writer.WritePropertyName("is_write_index"); - writer.WriteBooleanValue(IsWriteIndexValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchRoutingValue is not null) - { - writer.WritePropertyName("search_routing"); - JsonSerializer.Serialize(writer, SearchRoutingValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AliasDescriptor : SerializableDescriptor -{ - internal AliasDescriptor(Action configure) => configure.Invoke(this); - - public AliasDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? IndexRoutingValue { get; set; } - private bool? IsHiddenValue { get; set; } - private bool? IsWriteIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? SearchRoutingValue { get; set; } - - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - public AliasDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public AliasDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public AliasDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// - /// - public AliasDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? indexRouting) - { - IndexRoutingValue = indexRouting; - return Self; - } - - /// - /// - /// If true, the alias is hidden. - /// All indices for the alias must have the same is_hidden value. - /// - /// - public AliasDescriptor IsHidden(bool? isHidden = true) - { - IsHiddenValue = isHidden; - return Self; - } - - /// - /// - /// If true, the index is the write index for the alias. - /// - /// - public AliasDescriptor IsWriteIndex(bool? isWriteIndex = true) - { - IsWriteIndexValue = isWriteIndex; - return Self; - } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// - /// - public AliasDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// - /// - public AliasDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Serverless.Routing? searchRouting) - { - SearchRoutingValue = searchRouting; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IndexRoutingValue is not null) - { - writer.WritePropertyName("index_routing"); - JsonSerializer.Serialize(writer, IndexRoutingValue, options); - } - - if (IsHiddenValue.HasValue) - { - writer.WritePropertyName("is_hidden"); - writer.WriteBooleanValue(IsHiddenValue.Value); - } - - if (IsWriteIndexValue.HasValue) - { - writer.WritePropertyName("is_write_index"); - writer.WriteBooleanValue(IsWriteIndexValue.Value); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (SearchRoutingValue is not null) - { - writer.WritePropertyName("search_routing"); - JsonSerializer.Serialize(writer, SearchRoutingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AliasDefinition.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AliasDefinition.g.cs deleted file mode 100644 index 1a33c027bda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AliasDefinition.g.cs +++ /dev/null @@ -1,82 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AliasDefinition -{ - /// - /// - /// Query used to limit documents the alias can access. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; init; } - - /// - /// - /// Value used to route indexing operations to a specific shard. - /// If specified, this overwrites the routing value for indexing operations. - /// - /// - [JsonInclude, JsonPropertyName("index_routing")] - public string? IndexRouting { get; init; } - - /// - /// - /// If true, the alias is hidden. - /// All indices for the alias must have the same is_hidden value. - /// - /// - [JsonInclude, JsonPropertyName("is_hidden")] - public bool? IsHidden { get; init; } - - /// - /// - /// If true, the index is the write index for the alias. - /// - /// - [JsonInclude, JsonPropertyName("is_write_index")] - public bool? IsWriteIndex { get; init; } - - /// - /// - /// Value used to route indexing and search operations to a specific shard. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public string? Routing { get; init; } - - /// - /// - /// Value used to route search operations to a specific shard. - /// If specified, this overwrites the routing value for search operations. - /// - /// - [JsonInclude, JsonPropertyName("search_routing")] - public string? SearchRouting { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeDetail.g.cs deleted file mode 100644 index 690517296ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeDetail.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AnalyzeDetail -{ - [JsonInclude, JsonPropertyName("analyzer")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.AnalyzerDetail? Analyzer { get; init; } - [JsonInclude, JsonPropertyName("charfilters")] - public IReadOnlyCollection? Charfilters { get; init; } - [JsonInclude, JsonPropertyName("custom_analyzer")] - public bool CustomAnalyzer { get; init; } - [JsonInclude, JsonPropertyName("tokenfilters")] - public IReadOnlyCollection? Tokenfilters { get; init; } - [JsonInclude, JsonPropertyName("tokenizer")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TokenDetail? Tokenizer { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeToken.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeToken.g.cs deleted file mode 100644 index 31ae7caedbf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzeToken.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AnalyzeToken -{ - [JsonInclude, JsonPropertyName("end_offset")] - public long EndOffset { get; init; } - [JsonInclude, JsonPropertyName("position")] - public long Position { get; init; } - [JsonInclude, JsonPropertyName("positionLength")] - public long? Positionlength { get; init; } - [JsonInclude, JsonPropertyName("start_offset")] - public long StartOffset { get; init; } - [JsonInclude, JsonPropertyName("token")] - public string Token { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzerDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzerDetail.g.cs deleted file mode 100644 index 4926b17edba..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/AnalyzerDetail.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class AnalyzerDetail -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("tokens")] - public IReadOnlyCollection Tokens { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CacheQueries.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CacheQueries.g.cs deleted file mode 100644 index 3b086b3412d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CacheQueries.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CacheQueries -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } -} - -public sealed partial class CacheQueriesDescriptor : SerializableDescriptor -{ - internal CacheQueriesDescriptor(Action configure) => configure.Invoke(this); - - public CacheQueriesDescriptor() : base() - { - } - - private bool EnabledValue { get; set; } - - public CacheQueriesDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CharFilterDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CharFilterDetail.g.cs deleted file mode 100644 index db98e54ae72..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CharFilterDetail.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CharFilterDetail -{ - [JsonInclude, JsonPropertyName("filtered_text")] - public IReadOnlyCollection FilteredText { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseIndexResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseIndexResult.g.cs deleted file mode 100644 index d03a44b201c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseIndexResult.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CloseIndexResult -{ - [JsonInclude, JsonPropertyName("closed")] - public bool Closed { get; init; } - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyDictionary? Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseShardResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseShardResult.g.cs deleted file mode 100644 index c5d7f640878..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/CloseShardResult.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class CloseShardResult -{ - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection Failures { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs deleted file mode 100644 index c703759cbde..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStream.g.cs +++ /dev/null @@ -1,174 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStream -{ - /// - /// - /// If true, the data stream allows custom routing on write request. - /// - /// - [JsonInclude, JsonPropertyName("allow_custom_routing")] - public bool? AllowCustomRouting { get; init; } - - /// - /// - /// Information about failure store backing indices - /// - /// - [JsonInclude, JsonPropertyName("failure_store")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FailureStore? FailureStore { get; init; } - - /// - /// - /// Current generation for the data stream. This number acts as a cumulative count of the stream’s rollovers, starting at 1. - /// - /// - [JsonInclude, JsonPropertyName("generation")] - public int Generation { get; init; } - - /// - /// - /// If true, the data stream is hidden. - /// - /// - [JsonInclude, JsonPropertyName("hidden")] - public bool Hidden { get; init; } - - /// - /// - /// Name of the current ILM lifecycle policy in the stream’s matching index template. - /// This lifecycle policy is set in the index.lifecycle.name setting. - /// If the template does not include a lifecycle policy, this property is not included in the response. - /// NOTE: A data stream’s backing indices may be assigned different lifecycle policies. To retrieve the lifecycle policy for individual backing indices, use the get index settings API. - /// - /// - [JsonInclude, JsonPropertyName("ilm_policy")] - public string? IlmPolicy { get; init; } - - /// - /// - /// Array of objects containing information about the data stream’s backing indices. - /// The last item in this array contains information about the stream’s current write index. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - - /// - /// - /// Contains the configuration for the data stream lifecycle of this data stream. - /// - /// - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } - - /// - /// - /// Custom metadata for the stream, copied from the _meta object of the stream’s matching index template. - /// If empty, the response omits this property. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// Name of the data stream. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// Name of the lifecycle system that'll manage the next generation of the data stream. - /// - /// - [JsonInclude, JsonPropertyName("next_generation_managed_by")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ManagedBy NextGenerationManagedBy { get; init; } - - /// - /// - /// Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream. - /// - /// - [JsonInclude, JsonPropertyName("prefer_ilm")] - public bool PreferIlm { get; init; } - - /// - /// - /// If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings. - /// - /// - [JsonInclude, JsonPropertyName("replicated")] - public bool? Replicated { get; init; } - - /// - /// - /// If true, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too. - /// - /// - [JsonInclude, JsonPropertyName("rollover_on_write")] - public bool RolloverOnWrite { get; init; } - - /// - /// - /// Health status of the data stream. - /// This health status is based on the state of the primary and replica shards of the stream’s backing indices. - /// - /// - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } - - /// - /// - /// If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction. - /// - /// - [JsonInclude, JsonPropertyName("system")] - public bool? System { get; init; } - - /// - /// - /// Name of the index template used to create the data stream’s backing indices. - /// The template’s index pattern must match the name of this data stream. - /// - /// - [JsonInclude, JsonPropertyName("template")] - public string Template { get; init; } - - /// - /// - /// Information about the @timestamp field in the data stream. - /// - /// - [JsonInclude, JsonPropertyName("timestamp_field")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamTimestampField TimestampField { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.g.cs deleted file mode 100644 index db163b2f1aa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamIndex.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamIndex -{ - /// - /// - /// Name of the current ILM lifecycle policy configured for this backing index. - /// - /// - [JsonInclude, JsonPropertyName("ilm_policy")] - public string? IlmPolicy { get; init; } - - /// - /// - /// Name of the backing index. - /// - /// - [JsonInclude, JsonPropertyName("index_name")] - public string IndexName { get; init; } - - /// - /// - /// Universally unique identifier (UUID) for the index. - /// - /// - [JsonInclude, JsonPropertyName("index_uuid")] - public string IndexUuid { get; init; } - - /// - /// - /// Name of the lifecycle system that's currently managing this backing index. - /// - /// - [JsonInclude, JsonPropertyName("managed_by")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ManagedBy? ManagedBy { get; init; } - - /// - /// - /// Indicates if ILM should take precedence over DSL in case both are configured to manage this index. - /// - /// - [JsonInclude, JsonPropertyName("prefer_ilm")] - public bool? PreferIlm { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs deleted file mode 100644 index 1cd15282d5b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs +++ /dev/null @@ -1,171 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -/// -/// -/// Data stream lifecycle denotes that a data stream is managed by the data stream lifecycle and contains the configuration. -/// -/// -public sealed partial class DataStreamLifecycle -{ - /// - /// - /// If defined, every document added to this data stream will be stored at least for this time frame. - /// Any time after this duration the document could be deleted. - /// When empty, every document in this data stream will be stored indefinitely. - /// - /// - [JsonInclude, JsonPropertyName("data_retention")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? DataRetention { get; set; } - - /// - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - /// - [JsonInclude, JsonPropertyName("downsampling")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } - - /// - /// - /// If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle - /// that's disabled (enabled: false) will have no effect on the data stream. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } -} - -/// -/// -/// Data stream lifecycle denotes that a data stream is managed by the data stream lifecycle and contains the configuration. -/// -/// -public sealed partial class DataStreamLifecycleDescriptor : SerializableDescriptor -{ - internal DataStreamLifecycleDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamLifecycleDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? DataRetentionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? DownsamplingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsamplingDescriptor DownsamplingDescriptor { get; set; } - private Action DownsamplingDescriptorAction { get; set; } - private bool? EnabledValue { get; set; } - - /// - /// - /// If defined, every document added to this data stream will be stored at least for this time frame. - /// Any time after this duration the document could be deleted. - /// When empty, every document in this data stream will be stored indefinitely. - /// - /// - public DataStreamLifecycleDescriptor DataRetention(Elastic.Clients.Elasticsearch.Serverless.Duration? dataRetention) - { - DataRetentionValue = dataRetention; - return Self; - } - - /// - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - /// - public DataStreamLifecycleDescriptor Downsampling(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? downsampling) - { - DownsamplingDescriptor = null; - DownsamplingDescriptorAction = null; - DownsamplingValue = downsampling; - return Self; - } - - public DataStreamLifecycleDescriptor Downsampling(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsamplingDescriptor descriptor) - { - DownsamplingValue = null; - DownsamplingDescriptorAction = null; - DownsamplingDescriptor = descriptor; - return Self; - } - - public DataStreamLifecycleDescriptor Downsampling(Action configure) - { - DownsamplingValue = null; - DownsamplingDescriptor = null; - DownsamplingDescriptorAction = configure; - return Self; - } - - /// - /// - /// If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle - /// that's disabled (enabled: false) will have no effect on the data stream. - /// - /// - public DataStreamLifecycleDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DataRetentionValue is not null) - { - writer.WritePropertyName("data_retention"); - JsonSerializer.Serialize(writer, DataRetentionValue, options); - } - - if (DownsamplingDescriptor is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, DownsamplingDescriptor, options); - } - else if (DownsamplingDescriptorAction is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsamplingDescriptor(DownsamplingDescriptorAction), options); - } - else if (DownsamplingValue is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, DownsamplingValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleDownsampling.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleDownsampling.g.cs deleted file mode 100644 index 1352b3aa6b5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleDownsampling.g.cs +++ /dev/null @@ -1,131 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamLifecycleDownsampling -{ - /// - /// - /// The list of downsampling rounds to execute as part of this downsampling configuration - /// - /// - [JsonInclude, JsonPropertyName("rounds")] - public ICollection Rounds { get; set; } -} - -public sealed partial class DataStreamLifecycleDownsamplingDescriptor : SerializableDescriptor -{ - internal DataStreamLifecycleDownsamplingDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamLifecycleDownsamplingDescriptor() : base() - { - } - - private ICollection RoundsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsamplingRoundDescriptor RoundsDescriptor { get; set; } - private Action RoundsDescriptorAction { get; set; } - private Action[] RoundsDescriptorActions { get; set; } - - /// - /// - /// The list of downsampling rounds to execute as part of this downsampling configuration - /// - /// - public DataStreamLifecycleDownsamplingDescriptor Rounds(ICollection rounds) - { - RoundsDescriptor = null; - RoundsDescriptorAction = null; - RoundsDescriptorActions = null; - RoundsValue = rounds; - return Self; - } - - public DataStreamLifecycleDownsamplingDescriptor Rounds(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsamplingRoundDescriptor descriptor) - { - RoundsValue = null; - RoundsDescriptorAction = null; - RoundsDescriptorActions = null; - RoundsDescriptor = descriptor; - return Self; - } - - public DataStreamLifecycleDownsamplingDescriptor Rounds(Action configure) - { - RoundsValue = null; - RoundsDescriptor = null; - RoundsDescriptorActions = null; - RoundsDescriptorAction = configure; - return Self; - } - - public DataStreamLifecycleDownsamplingDescriptor Rounds(params Action[] configure) - { - RoundsValue = null; - RoundsDescriptor = null; - RoundsDescriptorAction = null; - RoundsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (RoundsDescriptor is not null) - { - writer.WritePropertyName("rounds"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RoundsDescriptor, options); - writer.WriteEndArray(); - } - else if (RoundsDescriptorAction is not null) - { - writer.WritePropertyName("rounds"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsamplingRoundDescriptor(RoundsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RoundsDescriptorActions is not null) - { - writer.WritePropertyName("rounds"); - writer.WriteStartArray(); - foreach (var action in RoundsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsamplingRoundDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("rounds"); - JsonSerializer.Serialize(writer, RoundsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs deleted file mode 100644 index ceeb604e547..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamLifecycleExplain -{ - [JsonInclude, JsonPropertyName("error")] - public string? Error { get; init; } - [JsonInclude, JsonPropertyName("generation_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? GenerationTime { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("index_creation_date_millis")] - public long? IndexCreationDateMillis { get; init; } - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } - [JsonInclude, JsonPropertyName("managed_by_lifecycle")] - public bool ManagedByLifecycle { get; init; } - [JsonInclude, JsonPropertyName("rollover_date_millis")] - public long? RolloverDateMillis { get; init; } - [JsonInclude, JsonPropertyName("time_since_index_creation")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TimeSinceIndexCreation { get; init; } - [JsonInclude, JsonPropertyName("time_since_rollover")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TimeSinceRollover { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs deleted file mode 100644 index 77837c6a2b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamLifecycleRolloverConditions -{ - [JsonInclude, JsonPropertyName("max_age")] - public string? MaxAge { get; init; } - [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; init; } - [JsonInclude, JsonPropertyName("max_primary_shard_docs")] - public long? MaxPrimaryShardDocs { get; init; } - [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSize { get; init; } - [JsonInclude, JsonPropertyName("max_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSize { get; init; } - [JsonInclude, JsonPropertyName("min_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MinAge { get; init; } - [JsonInclude, JsonPropertyName("min_docs")] - public long? MinDocs { get; init; } - [JsonInclude, JsonPropertyName("min_primary_shard_docs")] - public long? MinPrimaryShardDocs { get; init; } - [JsonInclude, JsonPropertyName("min_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSize { get; init; } - [JsonInclude, JsonPropertyName("min_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs deleted file mode 100644 index 48871a55b04..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs +++ /dev/null @@ -1,74 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -/// -/// -/// Data stream lifecycle with rollover can be used to display the configuration including the default rollover conditions, -/// if asked. -/// -/// -public sealed partial class DataStreamLifecycleWithRollover -{ - /// - /// - /// If defined, every document added to this data stream will be stored at least for this time frame. - /// Any time after this duration the document could be deleted. - /// When empty, every document in this data stream will be stored indefinitely. - /// - /// - [JsonInclude, JsonPropertyName("data_retention")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? DataRetention { get; init; } - - /// - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - /// - [JsonInclude, JsonPropertyName("downsampling")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; init; } - - /// - /// - /// If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle - /// that's disabled (enabled: false) will have no effect on the data stream. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; init; } - - /// - /// - /// The conditions which will trigger the rollover of a backing index as configured by the cluster setting cluster.lifecycle.default.rollover. - /// This property is an implementation detail and it will only be retrieved when the query param include_defaults is set to true. - /// The contents of this field are subject to change. - /// - /// - [JsonInclude, JsonPropertyName("rollover")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamTimestampField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamTimestampField.g.cs deleted file mode 100644 index b8ea21a678a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamTimestampField.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamTimestampField -{ - /// - /// - /// Name of the timestamp field for the data stream, which must be @timestamp. The @timestamp field must be included in every document indexed to the data stream. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs deleted file mode 100644 index 8cfbd13d9b7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamVisibility -{ - [JsonInclude, JsonPropertyName("allow_custom_routing")] - public bool? AllowCustomRouting { get; set; } - [JsonInclude, JsonPropertyName("hidden")] - public bool? Hidden { get; set; } -} - -public sealed partial class DataStreamVisibilityDescriptor : SerializableDescriptor -{ - internal DataStreamVisibilityDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamVisibilityDescriptor() : base() - { - } - - private bool? AllowCustomRoutingValue { get; set; } - private bool? HiddenValue { get; set; } - - public DataStreamVisibilityDescriptor AllowCustomRouting(bool? allowCustomRouting = true) - { - AllowCustomRoutingValue = allowCustomRouting; - return Self; - } - - public DataStreamVisibilityDescriptor Hidden(bool? hidden = true) - { - HiddenValue = hidden; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowCustomRoutingValue.HasValue) - { - writer.WritePropertyName("allow_custom_routing"); - writer.WriteBooleanValue(AllowCustomRoutingValue.Value); - } - - if (HiddenValue.HasValue) - { - writer.WritePropertyName("hidden"); - writer.WriteBooleanValue(HiddenValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs deleted file mode 100644 index 3d942cd5f39..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamWithLifecycle -{ - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamsStatsItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamsStatsItem.g.cs deleted file mode 100644 index 0edca1b0b99..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamsStatsItem.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DataStreamsStatsItem -{ - /// - /// - /// Current number of backing indices for the data stream. - /// - /// - [JsonInclude, JsonPropertyName("backing_indices")] - public int BackingIndices { get; init; } - - /// - /// - /// Name of the data stream. - /// - /// - [JsonInclude, JsonPropertyName("data_stream")] - public string DataStream { get; init; } - - /// - /// - /// The data stream’s highest @timestamp value, converted to milliseconds since the Unix epoch. - /// NOTE: This timestamp is provided as a best effort. - /// The data stream may contain @timestamp values higher than this if one or more of the following conditions are met: - /// The stream contains closed backing indices; - /// Backing indices with a lower generation contain higher @timestamp values. - /// - /// - [JsonInclude, JsonPropertyName("maximum_timestamp")] - public long MaximumTimestamp { get; init; } - - /// - /// - /// Total size of all shards for the data stream’s backing indices. - /// This parameter is only returned if the human query parameter is true. - /// - /// - [JsonInclude, JsonPropertyName("store_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? StoreSize { get; init; } - - /// - /// - /// Total size, in bytes, of all shards for the data stream’s backing indices. - /// - /// - [JsonInclude, JsonPropertyName("store_size_bytes")] - public long StoreSizeBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsampleConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsampleConfig.g.cs deleted file mode 100644 index 2e98d824bd2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsampleConfig.g.cs +++ /dev/null @@ -1,69 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DownsampleConfig -{ - /// - /// - /// The interval at which to aggregate the original time series index. - /// - /// - [JsonInclude, JsonPropertyName("fixed_interval")] - public string FixedInterval { get; set; } -} - -public sealed partial class DownsampleConfigDescriptor : SerializableDescriptor -{ - internal DownsampleConfigDescriptor(Action configure) => configure.Invoke(this); - - public DownsampleConfigDescriptor() : base() - { - } - - private string FixedIntervalValue { get; set; } - - /// - /// - /// The interval at which to aggregate the original time series index. - /// - /// - public DownsampleConfigDescriptor FixedInterval(string fixedInterval) - { - FixedIntervalValue = fixedInterval; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("fixed_interval"); - writer.WriteStringValue(FixedIntervalValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsamplingRound.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsamplingRound.g.cs deleted file mode 100644 index 8c8dddd33d3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DownsamplingRound.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class DownsamplingRound -{ - /// - /// - /// The duration since rollover when this downsampling round should execute - /// - /// - [JsonInclude, JsonPropertyName("after")] - public Elastic.Clients.Elasticsearch.Serverless.Duration After { get; set; } - - /// - /// - /// The downsample configuration to execute. - /// - /// - [JsonInclude, JsonPropertyName("config")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsampleConfig Config { get; set; } -} - -public sealed partial class DownsamplingRoundDescriptor : SerializableDescriptor -{ - internal DownsamplingRoundDescriptor(Action configure) => configure.Invoke(this); - - public DownsamplingRoundDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration AfterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsampleConfig ConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsampleConfigDescriptor ConfigDescriptor { get; set; } - private Action ConfigDescriptorAction { get; set; } - - /// - /// - /// The duration since rollover when this downsampling round should execute - /// - /// - public DownsamplingRoundDescriptor After(Elastic.Clients.Elasticsearch.Serverless.Duration after) - { - AfterValue = after; - return Self; - } - - /// - /// - /// The downsample configuration to execute. - /// - /// - public DownsamplingRoundDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsampleConfig config) - { - ConfigDescriptor = null; - ConfigDescriptorAction = null; - ConfigValue = config; - return Self; - } - - public DownsamplingRoundDescriptor Config(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsampleConfigDescriptor descriptor) - { - ConfigValue = null; - ConfigDescriptorAction = null; - ConfigDescriptor = descriptor; - return Self; - } - - public DownsamplingRoundDescriptor Config(Action configure) - { - ConfigValue = null; - ConfigDescriptor = null; - ConfigDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("after"); - JsonSerializer.Serialize(writer, AfterValue, options); - if (ConfigDescriptor is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigDescriptor, options); - } - else if (ConfigDescriptorAction is not null) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DownsampleConfigDescriptor(ConfigDescriptorAction), options); - } - else - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, ConfigValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs deleted file mode 100644 index 9d6ab4edf40..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -internal sealed partial class ExplainAnalyzeTokenConverter : JsonConverter -{ - public override ExplainAnalyzeToken Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - string bytes = default; - long endOffset = default; - bool? keyword = default; - long position = default; - long positionlength = default; - long startOffset = default; - long termfrequency = default; - string token = default; - string type = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "bytes") - { - bytes = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "end_offset") - { - endOffset = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "keyword") - { - keyword = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "position") - { - position = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "positionLength") - { - positionlength = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "start_offset") - { - startOffset = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "termFrequency") - { - termfrequency = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "token") - { - token = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "type") - { - type = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - return new ExplainAnalyzeToken { Attributes = additionalProperties, Bytes = bytes, EndOffset = endOffset, Keyword = keyword, Position = position, Positionlength = positionlength, StartOffset = startOffset, Termfrequency = termfrequency, Token = token, Type = type }; - } - - public override void Write(Utf8JsonWriter writer, ExplainAnalyzeToken value, JsonSerializerOptions options) - { - throw new NotImplementedException("'ExplainAnalyzeToken' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(ExplainAnalyzeTokenConverter))] -public sealed partial class ExplainAnalyzeToken -{ - /// - /// - /// Additional tokenizer-specific attributes - /// - /// - public IReadOnlyDictionary Attributes { get; init; } - public string Bytes { get; init; } - public long EndOffset { get; init; } - public bool? Keyword { get; init; } - public long Position { get; init; } - public long Positionlength { get; init; } - public long StartOffset { get; init; } - public long Termfrequency { get; init; } - public string Token { get; init; } - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FailureStore.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FailureStore.g.cs deleted file mode 100644 index 913aaeb21f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FailureStore.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class FailureStore -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("rollover_on_write")] - public bool RolloverOnWrite { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.cs deleted file mode 100644 index de39dbe97a0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FielddataFrequencyFilter.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class FielddataFrequencyFilter -{ - [JsonInclude, JsonPropertyName("max")] - public double Max { get; set; } - [JsonInclude, JsonPropertyName("min")] - public double Min { get; set; } - [JsonInclude, JsonPropertyName("min_segment_size")] - public int MinSegmentSize { get; set; } -} - -public sealed partial class FielddataFrequencyFilterDescriptor : SerializableDescriptor -{ - internal FielddataFrequencyFilterDescriptor(Action configure) => configure.Invoke(this); - - public FielddataFrequencyFilterDescriptor() : base() - { - } - - private double MaxValue { get; set; } - private double MinValue { get; set; } - private int MinSegmentSizeValue { get; set; } - - public FielddataFrequencyFilterDescriptor Max(double max) - { - MaxValue = max; - return Self; - } - - public FielddataFrequencyFilterDescriptor Min(double min) - { - MinValue = min; - return Self; - } - - public FielddataFrequencyFilterDescriptor MinSegmentSize(int minSegmentSize) - { - MinSegmentSizeValue = minSegmentSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("max"); - writer.WriteNumberValue(MaxValue); - writer.WritePropertyName("min"); - writer.WriteNumberValue(MinValue); - writer.WritePropertyName("min_segment_size"); - writer.WriteNumberValue(MinSegmentSizeValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FileDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FileDetails.g.cs deleted file mode 100644 index 2650773c584..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/FileDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class FileDetails -{ - [JsonInclude, JsonPropertyName("length")] - public long Length { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("recovered")] - public long Recovered { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAliases.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAliases.g.cs deleted file mode 100644 index 48b0d559502..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAliases.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexAliases -{ - [JsonInclude, JsonPropertyName("aliases")] - public IReadOnlyDictionary Aliases { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAndDataStreamAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAndDataStreamAction.g.cs deleted file mode 100644 index b5b82c9af8b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexAndDataStreamAction.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexAndDataStreamAction -{ - /// - /// - /// Data stream targeted by the action. - /// - /// - [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.DataStreamName DataStream { get; set; } - - /// - /// - /// Index for the action. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } -} - -public sealed partial class IndexAndDataStreamActionDescriptor : SerializableDescriptor -{ - internal IndexAndDataStreamActionDescriptor(Action configure) => configure.Invoke(this); - - public IndexAndDataStreamActionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.DataStreamName DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - - /// - /// - /// Data stream targeted by the action. - /// - /// - public IndexAndDataStreamActionDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// - /// Index for the action. - /// - /// - public IndexAndDataStreamActionDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexMappingRecord.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexMappingRecord.g.cs deleted file mode 100644 index 5f4a17ad5b8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexMappingRecord.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexMappingRecord -{ - [JsonInclude, JsonPropertyName("item")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Item { get; init; } - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping Mappings { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexModifyDataStreamAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexModifyDataStreamAction.g.cs deleted file mode 100644 index 1ae8a45a42f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexModifyDataStreamAction.g.cs +++ /dev/null @@ -1,242 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -[JsonConverter(typeof(IndexModifyDataStreamActionConverter))] -public sealed partial class IndexModifyDataStreamAction -{ - internal IndexModifyDataStreamAction(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 IndexModifyDataStreamAction AddBackingIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction indexAndDataStreamAction) => new IndexModifyDataStreamAction("add_backing_index", indexAndDataStreamAction); - public static IndexModifyDataStreamAction RemoveBackingIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction indexAndDataStreamAction) => new IndexModifyDataStreamAction("remove_backing_index", indexAndDataStreamAction); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class IndexModifyDataStreamActionConverter : JsonConverter -{ - public override IndexModifyDataStreamAction 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; - 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 == "add_backing_index") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "remove_backing_index") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'IndexModifyDataStreamAction' from the response."); - } - - var result = new IndexModifyDataStreamAction(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, IndexModifyDataStreamAction value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "add_backing_index": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction)value.Variant, options); - break; - case "remove_backing_index": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexModifyDataStreamActionDescriptor : SerializableDescriptor> -{ - internal IndexModifyDataStreamActionDescriptor(Action> configure) => configure.Invoke(this); - - public IndexModifyDataStreamActionDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IndexModifyDataStreamActionDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IndexModifyDataStreamActionDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IndexModifyDataStreamActionDescriptor AddBackingIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction indexAndDataStreamAction) => Set(indexAndDataStreamAction, "add_backing_index"); - public IndexModifyDataStreamActionDescriptor AddBackingIndex(Action configure) => Set(configure, "add_backing_index"); - public IndexModifyDataStreamActionDescriptor RemoveBackingIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction indexAndDataStreamAction) => Set(indexAndDataStreamAction, "remove_backing_index"); - public IndexModifyDataStreamActionDescriptor RemoveBackingIndex(Action configure) => Set(configure, "remove_backing_index"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexModifyDataStreamActionDescriptor : SerializableDescriptor -{ - internal IndexModifyDataStreamActionDescriptor(Action configure) => configure.Invoke(this); - - public IndexModifyDataStreamActionDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IndexModifyDataStreamActionDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IndexModifyDataStreamActionDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IndexModifyDataStreamActionDescriptor AddBackingIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction indexAndDataStreamAction) => Set(indexAndDataStreamAction, "add_backing_index"); - public IndexModifyDataStreamActionDescriptor AddBackingIndex(Action configure) => Set(configure, "add_backing_index"); - public IndexModifyDataStreamActionDescriptor RemoveBackingIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexAndDataStreamAction indexAndDataStreamAction) => Set(indexAndDataStreamAction, "remove_backing_index"); - public IndexModifyDataStreamActionDescriptor RemoveBackingIndex(Action configure) => Set(configure, "remove_backing_index"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRouting.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRouting.g.cs deleted file mode 100644 index c8ff7bb5cd9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRouting.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexRouting -{ - [JsonInclude, JsonPropertyName("allocation")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocation? Allocation { get; set; } - [JsonInclude, JsonPropertyName("rebalance")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalance? Rebalance { get; set; } -} - -public sealed partial class IndexRoutingDescriptor : SerializableDescriptor -{ - internal IndexRoutingDescriptor(Action configure) => configure.Invoke(this); - - public IndexRoutingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocation? AllocationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDescriptor AllocationDescriptor { get; set; } - private Action AllocationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalance? RebalanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalanceDescriptor RebalanceDescriptor { get; set; } - private Action RebalanceDescriptorAction { get; set; } - - public IndexRoutingDescriptor Allocation(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocation? allocation) - { - AllocationDescriptor = null; - AllocationDescriptorAction = null; - AllocationValue = allocation; - return Self; - } - - public IndexRoutingDescriptor Allocation(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDescriptor descriptor) - { - AllocationValue = null; - AllocationDescriptorAction = null; - AllocationDescriptor = descriptor; - return Self; - } - - public IndexRoutingDescriptor Allocation(Action configure) - { - AllocationValue = null; - AllocationDescriptor = null; - AllocationDescriptorAction = configure; - return Self; - } - - public IndexRoutingDescriptor Rebalance(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalance? rebalance) - { - RebalanceDescriptor = null; - RebalanceDescriptorAction = null; - RebalanceValue = rebalance; - return Self; - } - - public IndexRoutingDescriptor Rebalance(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalanceDescriptor descriptor) - { - RebalanceValue = null; - RebalanceDescriptorAction = null; - RebalanceDescriptor = descriptor; - return Self; - } - - public IndexRoutingDescriptor Rebalance(Action configure) - { - RebalanceValue = null; - RebalanceDescriptor = null; - RebalanceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllocationDescriptor is not null) - { - writer.WritePropertyName("allocation"); - JsonSerializer.Serialize(writer, AllocationDescriptor, options); - } - else if (AllocationDescriptorAction is not null) - { - writer.WritePropertyName("allocation"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDescriptor(AllocationDescriptorAction), options); - } - else if (AllocationValue is not null) - { - writer.WritePropertyName("allocation"); - JsonSerializer.Serialize(writer, AllocationValue, options); - } - - if (RebalanceDescriptor is not null) - { - writer.WritePropertyName("rebalance"); - JsonSerializer.Serialize(writer, RebalanceDescriptor, options); - } - else if (RebalanceDescriptorAction is not null) - { - writer.WritePropertyName("rebalance"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalanceDescriptor(RebalanceDescriptorAction), options); - } - else if (RebalanceValue is not null) - { - writer.WritePropertyName("rebalance"); - JsonSerializer.Serialize(writer, RebalanceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs deleted file mode 100644 index aa4e229fea5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs +++ /dev/null @@ -1,198 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexRoutingAllocation -{ - [JsonInclude, JsonPropertyName("disk")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDisk? Disk { get; set; } - [JsonInclude, JsonPropertyName("enable")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationOptions? Enable { get; set; } - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInclude? Include { get; set; } - [JsonInclude, JsonPropertyName("initial_recovery")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInitialRecovery? InitialRecovery { get; set; } -} - -public sealed partial class IndexRoutingAllocationDescriptor : SerializableDescriptor -{ - internal IndexRoutingAllocationDescriptor(Action configure) => configure.Invoke(this); - - public IndexRoutingAllocationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDisk? DiskValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDiskDescriptor DiskDescriptor { get; set; } - private Action DiskDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationOptions? EnableValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInclude? IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationIncludeDescriptor IncludeDescriptor { get; set; } - private Action IncludeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInitialRecovery? InitialRecoveryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInitialRecoveryDescriptor InitialRecoveryDescriptor { get; set; } - private Action InitialRecoveryDescriptorAction { get; set; } - - public IndexRoutingAllocationDescriptor Disk(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDisk? disk) - { - DiskDescriptor = null; - DiskDescriptorAction = null; - DiskValue = disk; - return Self; - } - - public IndexRoutingAllocationDescriptor Disk(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDiskDescriptor descriptor) - { - DiskValue = null; - DiskDescriptorAction = null; - DiskDescriptor = descriptor; - return Self; - } - - public IndexRoutingAllocationDescriptor Disk(Action configure) - { - DiskValue = null; - DiskDescriptor = null; - DiskDescriptorAction = configure; - return Self; - } - - public IndexRoutingAllocationDescriptor Enable(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationOptions? enable) - { - EnableValue = enable; - return Self; - } - - public IndexRoutingAllocationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInclude? include) - { - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeValue = include; - return Self; - } - - public IndexRoutingAllocationDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationIncludeDescriptor descriptor) - { - IncludeValue = null; - IncludeDescriptorAction = null; - IncludeDescriptor = descriptor; - return Self; - } - - public IndexRoutingAllocationDescriptor Include(Action configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorAction = configure; - return Self; - } - - public IndexRoutingAllocationDescriptor InitialRecovery(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInitialRecovery? initialRecovery) - { - InitialRecoveryDescriptor = null; - InitialRecoveryDescriptorAction = null; - InitialRecoveryValue = initialRecovery; - return Self; - } - - public IndexRoutingAllocationDescriptor InitialRecovery(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInitialRecoveryDescriptor descriptor) - { - InitialRecoveryValue = null; - InitialRecoveryDescriptorAction = null; - InitialRecoveryDescriptor = descriptor; - return Self; - } - - public IndexRoutingAllocationDescriptor InitialRecovery(Action configure) - { - InitialRecoveryValue = null; - InitialRecoveryDescriptor = null; - InitialRecoveryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DiskDescriptor is not null) - { - writer.WritePropertyName("disk"); - JsonSerializer.Serialize(writer, DiskDescriptor, options); - } - else if (DiskDescriptorAction is not null) - { - writer.WritePropertyName("disk"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationDiskDescriptor(DiskDescriptorAction), options); - } - else if (DiskValue is not null) - { - writer.WritePropertyName("disk"); - JsonSerializer.Serialize(writer, DiskValue, options); - } - - if (EnableValue is not null) - { - writer.WritePropertyName("enable"); - JsonSerializer.Serialize(writer, EnableValue, options); - } - - if (IncludeDescriptor is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeDescriptor, options); - } - else if (IncludeDescriptorAction is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationIncludeDescriptor(IncludeDescriptorAction), options); - } - else if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (InitialRecoveryDescriptor is not null) - { - writer.WritePropertyName("initial_recovery"); - JsonSerializer.Serialize(writer, InitialRecoveryDescriptor, options); - } - else if (InitialRecoveryDescriptorAction is not null) - { - writer.WritePropertyName("initial_recovery"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingAllocationInitialRecoveryDescriptor(InitialRecoveryDescriptorAction), options); - } - else if (InitialRecoveryValue is not null) - { - writer.WritePropertyName("initial_recovery"); - JsonSerializer.Serialize(writer, InitialRecoveryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationDisk.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationDisk.g.cs deleted file mode 100644 index ceed85877f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationDisk.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexRoutingAllocationDisk -{ - [JsonInclude, JsonPropertyName("threshold_enabled")] - public object? ThresholdEnabled { get; set; } -} - -public sealed partial class IndexRoutingAllocationDiskDescriptor : SerializableDescriptor -{ - internal IndexRoutingAllocationDiskDescriptor(Action configure) => configure.Invoke(this); - - public IndexRoutingAllocationDiskDescriptor() : base() - { - } - - private object? ThresholdEnabledValue { get; set; } - - public IndexRoutingAllocationDiskDescriptor ThresholdEnabled(object? thresholdEnabled) - { - ThresholdEnabledValue = thresholdEnabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ThresholdEnabledValue is not null) - { - writer.WritePropertyName("threshold_enabled"); - JsonSerializer.Serialize(writer, ThresholdEnabledValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInclude.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInclude.g.cs deleted file mode 100644 index f89a2bc0c32..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInclude.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexRoutingAllocationInclude -{ - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - [JsonInclude, JsonPropertyName("_tier_preference")] - public string? TierPreference { get; set; } -} - -public sealed partial class IndexRoutingAllocationIncludeDescriptor : SerializableDescriptor -{ - internal IndexRoutingAllocationIncludeDescriptor(Action configure) => configure.Invoke(this); - - public IndexRoutingAllocationIncludeDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private string? TierPreferenceValue { get; set; } - - public IndexRoutingAllocationIncludeDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - public IndexRoutingAllocationIncludeDescriptor TierPreference(string? tierPreference) - { - TierPreferenceValue = tierPreference; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (!string.IsNullOrEmpty(TierPreferenceValue)) - { - writer.WritePropertyName("_tier_preference"); - writer.WriteStringValue(TierPreferenceValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInitialRecovery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInitialRecovery.g.cs deleted file mode 100644 index f70915a1352..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingAllocationInitialRecovery.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexRoutingAllocationInitialRecovery -{ - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } -} - -public sealed partial class IndexRoutingAllocationInitialRecoveryDescriptor : SerializableDescriptor -{ - internal IndexRoutingAllocationInitialRecoveryDescriptor(Action configure) => configure.Invoke(this); - - public IndexRoutingAllocationInitialRecoveryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - - public IndexRoutingAllocationInitialRecoveryDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingRebalance.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingRebalance.g.cs deleted file mode 100644 index b68031e40fd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexRoutingRebalance.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexRoutingRebalance -{ - [JsonInclude, JsonPropertyName("enable")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalanceOptions Enable { get; set; } -} - -public sealed partial class IndexRoutingRebalanceDescriptor : SerializableDescriptor -{ - internal IndexRoutingRebalanceDescriptor(Action configure) => configure.Invoke(this); - - public IndexRoutingRebalanceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalanceOptions EnableValue { get; set; } - - public IndexRoutingRebalanceDescriptor Enable(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingRebalanceOptions enable) - { - EnableValue = enable; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("enable"); - JsonSerializer.Serialize(writer, EnableValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegment.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegment.g.cs deleted file mode 100644 index dd9b4eaf9cb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegment.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSegment -{ - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyDictionary>> Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs deleted file mode 100644 index 3aedc9a4378..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSegmentSort.g.cs +++ /dev/null @@ -1,180 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSegmentSort -{ - [JsonInclude, JsonPropertyName("field")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Field { get; set; } - [JsonInclude, JsonPropertyName("missing")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortMissing))] - public ICollection? Missing { get; set; } - [JsonInclude, JsonPropertyName("mode")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortMode))] - public ICollection? Mode { get; set; } - [JsonInclude, JsonPropertyName("order")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SegmentSortOrder))] - public ICollection? Order { get; set; } -} - -public sealed partial class IndexSegmentSortDescriptor : SerializableDescriptor> -{ - internal IndexSegmentSortDescriptor(Action> configure) => configure.Invoke(this); - - public IndexSegmentSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldValue { get; set; } - private ICollection? MissingValue { get; set; } - private ICollection? ModeValue { get; set; } - private ICollection? OrderValue { get; set; } - - public IndexSegmentSortDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Fields? field) - { - FieldValue = field; - return Self; - } - - public IndexSegmentSortDescriptor Missing(ICollection? missing) - { - MissingValue = missing; - return Self; - } - - public IndexSegmentSortDescriptor Mode(ICollection? mode) - { - ModeValue = mode; - return Self; - } - - public IndexSegmentSortDescriptor Order(ICollection? order) - { - OrderValue = order; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - SingleOrManySerializationHelper.Serialize(MissingValue, writer, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - SingleOrManySerializationHelper.Serialize(ModeValue, writer, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize(OrderValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexSegmentSortDescriptor : SerializableDescriptor -{ - internal IndexSegmentSortDescriptor(Action configure) => configure.Invoke(this); - - public IndexSegmentSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldValue { get; set; } - private ICollection? MissingValue { get; set; } - private ICollection? ModeValue { get; set; } - private ICollection? OrderValue { get; set; } - - public IndexSegmentSortDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Fields? field) - { - FieldValue = field; - return Self; - } - - public IndexSegmentSortDescriptor Missing(ICollection? missing) - { - MissingValue = missing; - return Self; - } - - public IndexSegmentSortDescriptor Mode(ICollection? mode) - { - ModeValue = mode; - return Self; - } - - public IndexSegmentSortDescriptor Order(ICollection? order) - { - OrderValue = order; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (MissingValue is not null) - { - writer.WritePropertyName("missing"); - SingleOrManySerializationHelper.Serialize(MissingValue, writer, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - SingleOrManySerializationHelper.Serialize(ModeValue, writer, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - SingleOrManySerializationHelper.Serialize(OrderValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs deleted file mode 100644 index 0a1817eefda..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs +++ /dev/null @@ -1,123 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSettingBlocks -{ - [JsonInclude, JsonPropertyName("metadata")] - public bool? Metadata { get; set; } - [JsonInclude, JsonPropertyName("read")] - public bool? Read { get; set; } - [JsonInclude, JsonPropertyName("read_only")] - public bool? ReadOnly { get; set; } - [JsonInclude, JsonPropertyName("read_only_allow_delete")] - public bool? ReadOnlyAllowDelete { get; set; } - [JsonInclude, JsonPropertyName("write")] - public bool? Write { get; set; } -} - -public sealed partial class IndexSettingBlocksDescriptor : SerializableDescriptor -{ - internal IndexSettingBlocksDescriptor(Action configure) => configure.Invoke(this); - - public IndexSettingBlocksDescriptor() : base() - { - } - - private bool? MetadataValue { get; set; } - private bool? ReadValue { get; set; } - private bool? ReadOnlyValue { get; set; } - private bool? ReadOnlyAllowDeleteValue { get; set; } - private bool? WriteValue { get; set; } - - public IndexSettingBlocksDescriptor Metadata(bool? metadata = true) - { - MetadataValue = metadata; - return Self; - } - - public IndexSettingBlocksDescriptor Read(bool? read = true) - { - ReadValue = read; - return Self; - } - - public IndexSettingBlocksDescriptor ReadOnly(bool? readOnly = true) - { - ReadOnlyValue = readOnly; - return Self; - } - - public IndexSettingBlocksDescriptor ReadOnlyAllowDelete(bool? readOnlyAllowDelete = true) - { - ReadOnlyAllowDeleteValue = readOnlyAllowDelete; - return Self; - } - - public IndexSettingBlocksDescriptor Write(bool? write = true) - { - WriteValue = write; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MetadataValue.HasValue) - { - writer.WritePropertyName("metadata"); - writer.WriteBooleanValue(MetadataValue.Value); - } - - if (ReadValue.HasValue) - { - writer.WritePropertyName("read"); - writer.WriteBooleanValue(ReadValue.Value); - } - - if (ReadOnlyValue.HasValue) - { - writer.WritePropertyName("read_only"); - writer.WriteBooleanValue(ReadOnlyValue.Value); - } - - if (ReadOnlyAllowDeleteValue.HasValue) - { - writer.WritePropertyName("read_only_allow_delete"); - writer.WriteBooleanValue(ReadOnlyAllowDeleteValue.Value); - } - - if (WriteValue.HasValue) - { - writer.WritePropertyName("write"); - writer.WriteBooleanValue(WriteValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs deleted file mode 100644 index ef149859971..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ /dev/null @@ -1,3714 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -internal sealed partial class IndexSettingsConverter : JsonConverter -{ - public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new IndexSettings(); - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "analysis") - { - variant.Analysis = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "analyze") - { - variant.Analyze = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "auto_expand_replicas") - { - variant.AutoExpandReplicas = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "blocks") - { - variant.Blocks = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "check_on_startup") - { - variant.CheckOnStartup = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "codec") - { - variant.Codec = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "creation_date") - { - variant.CreationDate = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "creation_date_string") - { - variant.CreationDateString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "default_pipeline") - { - variant.DefaultPipeline = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "final_pipeline") - { - variant.FinalPipeline = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "format") - { - variant.Format = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gc_deletes") - { - variant.GcDeletes = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "hidden") - { - variant.Hidden = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "highlight") - { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "index") - { - variant.Index = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indexing_pressure") - { - variant.IndexingPressure = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indexing.slowlog") - { - variant.IndexingSlowlog = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lifecycle") - { - variant.Lifecycle = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "load_fixed_bitset_filters_eagerly") - { - variant.LoadFixedBitsetFiltersEagerly = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "mapping") - { - variant.Mapping = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_docvalue_fields_search") - { - variant.MaxDocvalueFieldsSearch = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_inner_result_window") - { - variant.MaxInnerResultWindow = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_ngram_diff") - { - variant.MaxNgramDiff = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_refresh_listeners") - { - variant.MaxRefreshListeners = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_regex_length") - { - variant.MaxRegexLength = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_rescore_window") - { - variant.MaxRescoreWindow = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_result_window") - { - variant.MaxResultWindow = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_script_fields") - { - variant.MaxScriptFields = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_shingle_diff") - { - variant.MaxShingleDiff = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_slices_per_scroll") - { - variant.MaxSlicesPerScroll = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_terms_count") - { - variant.MaxTermsCount = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "merge") - { - variant.Merge = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "mode") - { - variant.Mode = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "number_of_replicas") - { - variant.NumberOfReplicas = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "number_of_routing_shards") - { - variant.NumberOfRoutingShards = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "number_of_shards") - { - variant.NumberOfShards = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "priority") - { - variant.Priority = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "provided_name") - { - variant.ProvidedName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "queries") - { - variant.Queries = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query_string") - { - variant.QueryString = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "refresh_interval") - { - variant.RefreshInterval = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "routing") - { - variant.Routing = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "routing_partition_size") - { - variant.RoutingPartitionSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "routing_path") - { - variant.RoutingPath = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (property == "search") - { - variant.Search = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "settings") - { - variant.Settings = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "similarity") - { - variant.Similarity = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "soft_deletes") - { - variant.SoftDeletes = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "sort") - { - variant.Sort = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "store") - { - variant.Store = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "time_series") - { - variant.TimeSeries = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "top_metrics_max_size") - { - variant.TopMetricsMaxSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "translog") - { - variant.Translog = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "uuid") - { - variant.Uuid = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "verified_before_close") - { - variant.VerifiedBeforeClose = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "version") - { - variant.Version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - variant.OtherSettings = additionalProperties; - return variant; - } - - public override void Write(Utf8JsonWriter writer, IndexSettings value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.OtherSettings is not null) - { - foreach (var additionalProperty in value.OtherSettings) - { - writer.WritePropertyName(additionalProperty.Key); - JsonSerializer.Serialize(writer, additionalProperty.Value, options); - } - } - - if (value.Analysis is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, value.Analysis, options); - } - - if (value.Analyze is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, value.Analyze, options); - } - - if (!string.IsNullOrEmpty(value.AutoExpandReplicas)) - { - writer.WritePropertyName("auto_expand_replicas"); - writer.WriteStringValue(value.AutoExpandReplicas); - } - - if (value.Blocks is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, value.Blocks, options); - } - - if (value.CheckOnStartup is not null) - { - writer.WritePropertyName("check_on_startup"); - JsonSerializer.Serialize(writer, value.CheckOnStartup, options); - } - - if (!string.IsNullOrEmpty(value.Codec)) - { - writer.WritePropertyName("codec"); - writer.WriteStringValue(value.Codec); - } - - if (value.CreationDate.HasValue) - { - writer.WritePropertyName("creation_date"); - writer.WriteNumberValue(value.CreationDate.Value); - } - - if (value.CreationDateString is not null) - { - writer.WritePropertyName("creation_date_string"); - JsonSerializer.Serialize(writer, value.CreationDateString, options); - } - - if (!string.IsNullOrEmpty(value.DefaultPipeline)) - { - writer.WritePropertyName("default_pipeline"); - writer.WriteStringValue(value.DefaultPipeline); - } - - if (!string.IsNullOrEmpty(value.FinalPipeline)) - { - writer.WritePropertyName("final_pipeline"); - writer.WriteStringValue(value.FinalPipeline); - } - - if (value.Format is not null) - { - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, value.Format, options); - } - - if (value.GcDeletes is not null) - { - writer.WritePropertyName("gc_deletes"); - JsonSerializer.Serialize(writer, value.GcDeletes, options); - } - - if (value.Hidden is not null) - { - writer.WritePropertyName("hidden"); - JsonSerializer.Serialize(writer, value.Hidden, options); - } - - if (value.Highlight is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, value.Highlight, options); - } - - if (value.Index is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, value.Index, options); - } - - if (value.IndexingPressure is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, value.IndexingPressure, options); - } - - if (value.IndexingSlowlog is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, value.IndexingSlowlog, options); - } - - if (value.Lifecycle is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, value.Lifecycle, options); - } - - if (value.LoadFixedBitsetFiltersEagerly.HasValue) - { - writer.WritePropertyName("load_fixed_bitset_filters_eagerly"); - writer.WriteBooleanValue(value.LoadFixedBitsetFiltersEagerly.Value); - } - - if (value.Mapping is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, value.Mapping, options); - } - - if (value.MaxDocvalueFieldsSearch.HasValue) - { - writer.WritePropertyName("max_docvalue_fields_search"); - writer.WriteNumberValue(value.MaxDocvalueFieldsSearch.Value); - } - - if (value.MaxInnerResultWindow.HasValue) - { - writer.WritePropertyName("max_inner_result_window"); - writer.WriteNumberValue(value.MaxInnerResultWindow.Value); - } - - if (value.MaxNgramDiff.HasValue) - { - writer.WritePropertyName("max_ngram_diff"); - writer.WriteNumberValue(value.MaxNgramDiff.Value); - } - - if (value.MaxRefreshListeners.HasValue) - { - writer.WritePropertyName("max_refresh_listeners"); - writer.WriteNumberValue(value.MaxRefreshListeners.Value); - } - - if (value.MaxRegexLength.HasValue) - { - writer.WritePropertyName("max_regex_length"); - writer.WriteNumberValue(value.MaxRegexLength.Value); - } - - if (value.MaxRescoreWindow.HasValue) - { - writer.WritePropertyName("max_rescore_window"); - writer.WriteNumberValue(value.MaxRescoreWindow.Value); - } - - if (value.MaxResultWindow.HasValue) - { - writer.WritePropertyName("max_result_window"); - writer.WriteNumberValue(value.MaxResultWindow.Value); - } - - if (value.MaxScriptFields.HasValue) - { - writer.WritePropertyName("max_script_fields"); - writer.WriteNumberValue(value.MaxScriptFields.Value); - } - - if (value.MaxShingleDiff.HasValue) - { - writer.WritePropertyName("max_shingle_diff"); - writer.WriteNumberValue(value.MaxShingleDiff.Value); - } - - if (value.MaxSlicesPerScroll.HasValue) - { - writer.WritePropertyName("max_slices_per_scroll"); - writer.WriteNumberValue(value.MaxSlicesPerScroll.Value); - } - - if (value.MaxTermsCount.HasValue) - { - writer.WritePropertyName("max_terms_count"); - writer.WriteNumberValue(value.MaxTermsCount.Value); - } - - if (value.Merge is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, value.Merge, options); - } - - if (!string.IsNullOrEmpty(value.Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(value.Mode); - } - - if (value.NumberOfReplicas is not null) - { - writer.WritePropertyName("number_of_replicas"); - JsonSerializer.Serialize(writer, value.NumberOfReplicas, options); - } - - if (value.NumberOfRoutingShards.HasValue) - { - writer.WritePropertyName("number_of_routing_shards"); - writer.WriteNumberValue(value.NumberOfRoutingShards.Value); - } - - if (value.NumberOfShards is not null) - { - writer.WritePropertyName("number_of_shards"); - JsonSerializer.Serialize(writer, value.NumberOfShards, options); - } - - if (value.Priority is not null) - { - writer.WritePropertyName("priority"); - JsonSerializer.Serialize(writer, value.Priority, options); - } - - if (value.ProvidedName is not null) - { - writer.WritePropertyName("provided_name"); - JsonSerializer.Serialize(writer, value.ProvidedName, options); - } - - if (value.Queries is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, value.Queries, options); - } - - if (value.QueryString is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, value.QueryString, options); - } - - if (value.RefreshInterval is not null) - { - writer.WritePropertyName("refresh_interval"); - JsonSerializer.Serialize(writer, value.RefreshInterval, options); - } - - if (value.Routing is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, value.Routing, options); - } - - if (value.RoutingPartitionSize.HasValue) - { - writer.WritePropertyName("routing_partition_size"); - writer.WriteNumberValue(value.RoutingPartitionSize.Value); - } - - if (value.RoutingPath is not null) - { - writer.WritePropertyName("routing_path"); - JsonSerializer.Serialize(writer, value.RoutingPath, options); - } - - if (value.Search is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, value.Search, options); - } - - if (value.Settings is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, value.Settings, options); - } - - if (value.Similarity is not null) - { - writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, value.Similarity, options); - } - - if (value.SoftDeletes is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, value.SoftDeletes, options); - } - - if (value.Sort is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, value.Sort, options); - } - - if (value.Store is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, value.Store, options); - } - - if (value.TimeSeries is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, value.TimeSeries, options); - } - - if (value.TopMetricsMaxSize.HasValue) - { - writer.WritePropertyName("top_metrics_max_size"); - writer.WriteNumberValue(value.TopMetricsMaxSize.Value); - } - - if (value.Translog is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, value.Translog, options); - } - - if (!string.IsNullOrEmpty(value.Uuid)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(value.Uuid); - } - - if (value.VerifiedBeforeClose is not null) - { - writer.WritePropertyName("verified_before_close"); - JsonSerializer.Serialize(writer, value.VerifiedBeforeClose, options); - } - - if (value.Version is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, value.Version, options); - } - - writer.WriteEndObject(); - } -} - -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -[JsonConverter(typeof(IndexSettingsConverter))] -public sealed partial class IndexSettings -{ - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? Analysis { get; set; } - - /// - /// - /// Settings to define analyzers, tokenizers, token filters and character filters. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? Analyze { get; set; } - public string? AutoExpandReplicas { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? Blocks { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? CheckOnStartup { get; set; } - public string? Codec { get; set; } - public long? CreationDate { get; set; } - public DateTimeOffset? CreationDateString { get; set; } - public string? DefaultPipeline { get; set; } - public string? FinalPipeline { get; set; } - public object? Format { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Duration? GcDeletes { get; set; } - public object? Hidden { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? Highlight { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Index { get; set; } - - /// - /// - /// Configure indexing back pressure limits. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressure { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? IndexingSlowlog { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? Lifecycle { get; set; } - public bool? LoadFixedBitsetFiltersEagerly { get; set; } - - /// - /// - /// Enable or disable dynamic mapping for an index. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? Mapping { get; set; } - public int? MaxDocvalueFieldsSearch { get; set; } - public int? MaxInnerResultWindow { get; set; } - public int? MaxNgramDiff { get; set; } - public int? MaxRefreshListeners { get; set; } - public int? MaxRegexLength { get; set; } - public int? MaxRescoreWindow { get; set; } - public int? MaxResultWindow { get; set; } - public int? MaxScriptFields { get; set; } - public int? MaxShingleDiff { get; set; } - public int? MaxSlicesPerScroll { get; set; } - public int? MaxTermsCount { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? Merge { get; set; } - public string? Mode { get; set; } - public object? NumberOfReplicas { get; set; } - public int? NumberOfRoutingShards { get; set; } - public object? NumberOfShards { get; set; } - - /// - /// - /// Additional settings not covered in this type. Unless these settings are defined by a plugin, please open an issue on the Elasticsearch API specification so that they can be added in a future release - /// - /// - public IDictionary OtherSettings { get; set; } - public object? Priority { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Name? ProvidedName { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? Queries { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? QueryString { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Duration? RefreshInterval { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? Routing { get; set; } - public int? RoutingPartitionSize { get; set; } - public ICollection? RoutingPath { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? Search { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; } - - /// - /// - /// Configure custom similarity settings to customize how search results are scored. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? Similarity { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletes { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? Sort { get; set; } - - /// - /// - /// The store module allows you to control how index data is stored and accessed on disk. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? Store { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? TimeSeries { get; set; } - public int? TopMetricsMaxSize { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? Translog { get; set; } - public string? Uuid { get; set; } - public object? VerifiedBeforeClose { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? Version { get; set; } -} - -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class IndexSettingsDescriptor : SerializableDescriptor> -{ - internal IndexSettingsDescriptor(Action> configure) => configure.Invoke(this); - - public IndexSettingsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? AnalyzeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor AnalyzeDescriptor { get; set; } - private Action AnalyzeDescriptorAction { get; set; } - private string? AutoExpandReplicasValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? BlocksValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor BlocksDescriptor { get; set; } - private Action BlocksDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? CheckOnStartupValue { get; set; } - private string? CodecValue { get; set; } - private long? CreationDateValue { get; set; } - private DateTimeOffset? CreationDateStringValue { get; set; } - private string? DefaultPipelineValue { get; set; } - private string? FinalPipelineValue { get; set; } - private object? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? GcDeletesValue { get; set; } - private object? HiddenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor IndexDescriptor { get; set; } - private Action> IndexDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor IndexingPressureDescriptor { get; set; } - private Action IndexingPressureDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? IndexingSlowlogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor IndexingSlowlogDescriptor { get; set; } - private Action IndexingSlowlogDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private bool? LoadFixedBitsetFiltersEagerlyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? MappingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor MappingDescriptor { get; set; } - private Action MappingDescriptorAction { get; set; } - private int? MaxDocvalueFieldsSearchValue { get; set; } - private int? MaxInnerResultWindowValue { get; set; } - private int? MaxNgramDiffValue { get; set; } - private int? MaxRefreshListenersValue { get; set; } - private int? MaxRegexLengthValue { get; set; } - private int? MaxRescoreWindowValue { get; set; } - private int? MaxResultWindowValue { get; set; } - private int? MaxScriptFieldsValue { get; set; } - private int? MaxShingleDiffValue { get; set; } - private int? MaxSlicesPerScrollValue { get; set; } - private int? MaxTermsCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? MergeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor MergeDescriptor { get; set; } - private Action MergeDescriptorAction { get; set; } - private string? ModeValue { get; set; } - private object? NumberOfReplicasValue { get; set; } - private int? NumberOfRoutingShardsValue { get; set; } - private object? NumberOfShardsValue { get; set; } - private IDictionary OtherSettingsValue { get; set; } - private object? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? ProvidedNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? QueriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor QueriesDescriptor { get; set; } - private Action QueriesDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? QueryStringValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor QueryStringDescriptor { get; set; } - private Action QueryStringDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? RefreshIntervalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor RoutingDescriptor { get; set; } - private Action RoutingDescriptorAction { get; set; } - private int? RoutingPartitionSizeValue { get; set; } - private ICollection? RoutingPathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? SearchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor SearchDescriptor { get; set; } - private Action SearchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? SimilarityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor SoftDeletesDescriptor { get; set; } - private Action SoftDeletesDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor StoreDescriptor { get; set; } - private Action StoreDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? TimeSeriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor TimeSeriesDescriptor { get; set; } - private Action TimeSeriesDescriptorAction { get; set; } - private int? TopMetricsMaxSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? TranslogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor TranslogDescriptor { get; set; } - private Action TranslogDescriptorAction { get; set; } - private string? UuidValue { get; set; } - private object? VerifiedBeforeCloseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor VersionDescriptor { get; set; } - private Action VersionDescriptorAction { get; set; } - - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Analysis(Action configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - /// - /// - /// Settings to define analyzers, tokenizers, token filters and character filters. - /// - /// - public IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? analyze) - { - AnalyzeDescriptor = null; - AnalyzeDescriptorAction = null; - AnalyzeValue = analyze; - return Self; - } - - public IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor descriptor) - { - AnalyzeValue = null; - AnalyzeDescriptorAction = null; - AnalyzeDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Analyze(Action configure) - { - AnalyzeValue = null; - AnalyzeDescriptor = null; - AnalyzeDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor AutoExpandReplicas(string? autoExpandReplicas) - { - AutoExpandReplicasValue = autoExpandReplicas; - return Self; - } - - public IndexSettingsDescriptor Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? blocks) - { - BlocksDescriptor = null; - BlocksDescriptorAction = null; - BlocksValue = blocks; - return Self; - } - - public IndexSettingsDescriptor Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor descriptor) - { - BlocksValue = null; - BlocksDescriptorAction = null; - BlocksDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Blocks(Action configure) - { - BlocksValue = null; - BlocksDescriptor = null; - BlocksDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor CheckOnStartup(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? checkOnStartup) - { - CheckOnStartupValue = checkOnStartup; - return Self; - } - - public IndexSettingsDescriptor Codec(string? codec) - { - CodecValue = codec; - return Self; - } - - public IndexSettingsDescriptor CreationDate(long? creationDate) - { - CreationDateValue = creationDate; - return Self; - } - - public IndexSettingsDescriptor CreationDateString(DateTimeOffset? creationDateString) - { - CreationDateStringValue = creationDateString; - return Self; - } - - public IndexSettingsDescriptor DefaultPipeline(string? defaultPipeline) - { - DefaultPipelineValue = defaultPipeline; - return Self; - } - - public IndexSettingsDescriptor FinalPipeline(string? finalPipeline) - { - FinalPipelineValue = finalPipeline; - return Self; - } - - public IndexSettingsDescriptor Format(object? format) - { - FormatValue = format; - return Self; - } - - public IndexSettingsDescriptor GcDeletes(Elastic.Clients.Elasticsearch.Serverless.Duration? gcDeletes) - { - GcDeletesValue = gcDeletes; - return Self; - } - - public IndexSettingsDescriptor Hidden(object? hidden) - { - HiddenValue = hidden; - return Self; - } - - public IndexSettingsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public IndexSettingsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Index(Action> configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configure indexing back pressure limits. - /// - /// - public IndexSettingsDescriptor IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? indexingPressure) - { - IndexingPressureDescriptor = null; - IndexingPressureDescriptorAction = null; - IndexingPressureValue = indexingPressure; - return Self; - } - - public IndexSettingsDescriptor IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor descriptor) - { - IndexingPressureValue = null; - IndexingPressureDescriptorAction = null; - IndexingPressureDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor IndexingPressure(Action configure) - { - IndexingPressureValue = null; - IndexingPressureDescriptor = null; - IndexingPressureDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? indexingSlowlog) - { - IndexingSlowlogDescriptor = null; - IndexingSlowlogDescriptorAction = null; - IndexingSlowlogValue = indexingSlowlog; - return Self; - } - - public IndexSettingsDescriptor IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor descriptor) - { - IndexingSlowlogValue = null; - IndexingSlowlogDescriptorAction = null; - IndexingSlowlogDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor IndexingSlowlog(Action configure) - { - IndexingSlowlogValue = null; - IndexingSlowlogDescriptor = null; - IndexingSlowlogDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexSettingsDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor LoadFixedBitsetFiltersEagerly(bool? loadFixedBitsetFiltersEagerly = true) - { - LoadFixedBitsetFiltersEagerlyValue = loadFixedBitsetFiltersEagerly; - return Self; - } - - /// - /// - /// Enable or disable dynamic mapping for an index. - /// - /// - public IndexSettingsDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? mapping) - { - MappingDescriptor = null; - MappingDescriptorAction = null; - MappingValue = mapping; - return Self; - } - - public IndexSettingsDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor descriptor) - { - MappingValue = null; - MappingDescriptorAction = null; - MappingDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Mapping(Action configure) - { - MappingValue = null; - MappingDescriptor = null; - MappingDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor MaxDocvalueFieldsSearch(int? maxDocvalueFieldsSearch) - { - MaxDocvalueFieldsSearchValue = maxDocvalueFieldsSearch; - return Self; - } - - public IndexSettingsDescriptor MaxInnerResultWindow(int? maxInnerResultWindow) - { - MaxInnerResultWindowValue = maxInnerResultWindow; - return Self; - } - - public IndexSettingsDescriptor MaxNgramDiff(int? maxNgramDiff) - { - MaxNgramDiffValue = maxNgramDiff; - return Self; - } - - public IndexSettingsDescriptor MaxRefreshListeners(int? maxRefreshListeners) - { - MaxRefreshListenersValue = maxRefreshListeners; - return Self; - } - - public IndexSettingsDescriptor MaxRegexLength(int? maxRegexLength) - { - MaxRegexLengthValue = maxRegexLength; - return Self; - } - - public IndexSettingsDescriptor MaxRescoreWindow(int? maxRescoreWindow) - { - MaxRescoreWindowValue = maxRescoreWindow; - return Self; - } - - public IndexSettingsDescriptor MaxResultWindow(int? maxResultWindow) - { - MaxResultWindowValue = maxResultWindow; - return Self; - } - - public IndexSettingsDescriptor MaxScriptFields(int? maxScriptFields) - { - MaxScriptFieldsValue = maxScriptFields; - return Self; - } - - public IndexSettingsDescriptor MaxShingleDiff(int? maxShingleDiff) - { - MaxShingleDiffValue = maxShingleDiff; - return Self; - } - - public IndexSettingsDescriptor MaxSlicesPerScroll(int? maxSlicesPerScroll) - { - MaxSlicesPerScrollValue = maxSlicesPerScroll; - return Self; - } - - public IndexSettingsDescriptor MaxTermsCount(int? maxTermsCount) - { - MaxTermsCountValue = maxTermsCount; - return Self; - } - - public IndexSettingsDescriptor Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? merge) - { - MergeDescriptor = null; - MergeDescriptorAction = null; - MergeValue = merge; - return Self; - } - - public IndexSettingsDescriptor Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor descriptor) - { - MergeValue = null; - MergeDescriptorAction = null; - MergeDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Merge(Action configure) - { - MergeValue = null; - MergeDescriptor = null; - MergeDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Mode(string? mode) - { - ModeValue = mode; - return Self; - } - - public IndexSettingsDescriptor NumberOfReplicas(object? numberOfReplicas) - { - NumberOfReplicasValue = numberOfReplicas; - return Self; - } - - public IndexSettingsDescriptor NumberOfRoutingShards(int? numberOfRoutingShards) - { - NumberOfRoutingShardsValue = numberOfRoutingShards; - return Self; - } - - public IndexSettingsDescriptor NumberOfShards(object? numberOfShards) - { - NumberOfShardsValue = numberOfShards; - return Self; - } - - /// - /// - /// Additional settings not covered in this type. Unless these settings are defined by a plugin, please open an issue on the Elasticsearch API specification so that they can be added in a future release - /// - /// - public IndexSettingsDescriptor OtherSettings(Func, FluentDictionary> selector) - { - OtherSettingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexSettingsDescriptor Priority(object? priority) - { - PriorityValue = priority; - return Self; - } - - public IndexSettingsDescriptor ProvidedName(Elastic.Clients.Elasticsearch.Serverless.Name? providedName) - { - ProvidedNameValue = providedName; - return Self; - } - - public IndexSettingsDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? queries) - { - QueriesDescriptor = null; - QueriesDescriptorAction = null; - QueriesValue = queries; - return Self; - } - - public IndexSettingsDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor descriptor) - { - QueriesValue = null; - QueriesDescriptorAction = null; - QueriesDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Queries(Action configure) - { - QueriesValue = null; - QueriesDescriptor = null; - QueriesDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? queryString) - { - QueryStringDescriptor = null; - QueryStringDescriptorAction = null; - QueryStringValue = queryString; - return Self; - } - - public IndexSettingsDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor descriptor) - { - QueryStringValue = null; - QueryStringDescriptorAction = null; - QueryStringDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor QueryString(Action configure) - { - QueryStringValue = null; - QueryStringDescriptor = null; - QueryStringDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor RefreshInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? refreshInterval) - { - RefreshIntervalValue = refreshInterval; - return Self; - } - - public IndexSettingsDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public IndexSettingsDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor RoutingPartitionSize(int? routingPartitionSize) - { - RoutingPartitionSizeValue = routingPartitionSize; - return Self; - } - - public IndexSettingsDescriptor RoutingPath(ICollection? routingPath) - { - RoutingPathValue = routingPath; - return Self; - } - - public IndexSettingsDescriptor Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? search) - { - SearchDescriptor = null; - SearchDescriptorAction = null; - SearchValue = search; - return Self; - } - - public IndexSettingsDescriptor Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor descriptor) - { - SearchValue = null; - SearchDescriptorAction = null; - SearchDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Search(Action configure) - { - SearchValue = null; - SearchDescriptor = null; - SearchDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configure custom similarity settings to customize how search results are scored. - /// - /// - public IndexSettingsDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public IndexSettingsDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor descriptor) - { - SimilarityValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsDescriptor Similarity(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor(); - configure?.Invoke(descriptor); - SimilarityValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsDescriptor SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? softDeletes) - { - SoftDeletesDescriptor = null; - SoftDeletesDescriptorAction = null; - SoftDeletesValue = softDeletes; - return Self; - } - - public IndexSettingsDescriptor SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor descriptor) - { - SoftDeletesValue = null; - SoftDeletesDescriptorAction = null; - SoftDeletesDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor SoftDeletes(Action configure) - { - SoftDeletesValue = null; - SoftDeletesDescriptor = null; - SoftDeletesDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - - /// - /// - /// The store module allows you to control how index data is stored and accessed on disk. - /// - /// - public IndexSettingsDescriptor Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? store) - { - StoreDescriptor = null; - StoreDescriptorAction = null; - StoreValue = store; - return Self; - } - - public IndexSettingsDescriptor Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor descriptor) - { - StoreValue = null; - StoreDescriptorAction = null; - StoreDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Store(Action configure) - { - StoreValue = null; - StoreDescriptor = null; - StoreDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? timeSeries) - { - TimeSeriesDescriptor = null; - TimeSeriesDescriptorAction = null; - TimeSeriesValue = timeSeries; - return Self; - } - - public IndexSettingsDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor descriptor) - { - TimeSeriesValue = null; - TimeSeriesDescriptorAction = null; - TimeSeriesDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor TimeSeries(Action configure) - { - TimeSeriesValue = null; - TimeSeriesDescriptor = null; - TimeSeriesDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor TopMetricsMaxSize(int? topMetricsMaxSize) - { - TopMetricsMaxSizeValue = topMetricsMaxSize; - return Self; - } - - public IndexSettingsDescriptor Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? translog) - { - TranslogDescriptor = null; - TranslogDescriptorAction = null; - TranslogValue = translog; - return Self; - } - - public IndexSettingsDescriptor Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor descriptor) - { - TranslogValue = null; - TranslogDescriptorAction = null; - TranslogDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Translog(Action configure) - { - TranslogValue = null; - TranslogDescriptor = null; - TranslogDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - public IndexSettingsDescriptor VerifiedBeforeClose(object? verifiedBeforeClose) - { - VerifiedBeforeCloseValue = verifiedBeforeClose; - return Self; - } - - public IndexSettingsDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? version) - { - VersionDescriptor = null; - VersionDescriptorAction = null; - VersionValue = version; - return Self; - } - - public IndexSettingsDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor descriptor) - { - VersionValue = null; - VersionDescriptorAction = null; - VersionDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Version(Action configure) - { - VersionValue = null; - VersionDescriptor = null; - VersionDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else if (AnalysisValue is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzeDescriptor is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, AnalyzeDescriptor, options); - } - else if (AnalyzeDescriptorAction is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor(AnalyzeDescriptorAction), options); - } - else if (AnalyzeValue is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, AnalyzeValue, options); - } - - if (!string.IsNullOrEmpty(AutoExpandReplicasValue)) - { - writer.WritePropertyName("auto_expand_replicas"); - writer.WriteStringValue(AutoExpandReplicasValue); - } - - if (BlocksDescriptor is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, BlocksDescriptor, options); - } - else if (BlocksDescriptorAction is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor(BlocksDescriptorAction), options); - } - else if (BlocksValue is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, BlocksValue, options); - } - - if (CheckOnStartupValue is not null) - { - writer.WritePropertyName("check_on_startup"); - JsonSerializer.Serialize(writer, CheckOnStartupValue, options); - } - - if (!string.IsNullOrEmpty(CodecValue)) - { - writer.WritePropertyName("codec"); - writer.WriteStringValue(CodecValue); - } - - if (CreationDateValue.HasValue) - { - writer.WritePropertyName("creation_date"); - writer.WriteNumberValue(CreationDateValue.Value); - } - - if (CreationDateStringValue is not null) - { - writer.WritePropertyName("creation_date_string"); - JsonSerializer.Serialize(writer, CreationDateStringValue, options); - } - - if (!string.IsNullOrEmpty(DefaultPipelineValue)) - { - writer.WritePropertyName("default_pipeline"); - writer.WriteStringValue(DefaultPipelineValue); - } - - if (!string.IsNullOrEmpty(FinalPipelineValue)) - { - writer.WritePropertyName("final_pipeline"); - writer.WriteStringValue(FinalPipelineValue); - } - - if (FormatValue is not null) - { - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, FormatValue, options); - } - - if (GcDeletesValue is not null) - { - writer.WritePropertyName("gc_deletes"); - JsonSerializer.Serialize(writer, GcDeletesValue, options); - } - - if (HiddenValue is not null) - { - writer.WritePropertyName("hidden"); - JsonSerializer.Serialize(writer, HiddenValue, options); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (IndexingPressureDescriptor is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, IndexingPressureDescriptor, options); - } - else if (IndexingPressureDescriptorAction is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor(IndexingPressureDescriptorAction), options); - } - else if (IndexingPressureValue is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, IndexingPressureValue, options); - } - - if (IndexingSlowlogDescriptor is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, IndexingSlowlogDescriptor, options); - } - else if (IndexingSlowlogDescriptorAction is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor(IndexingSlowlogDescriptorAction), options); - } - else if (IndexingSlowlogValue is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, IndexingSlowlogValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - - if (LoadFixedBitsetFiltersEagerlyValue.HasValue) - { - writer.WritePropertyName("load_fixed_bitset_filters_eagerly"); - writer.WriteBooleanValue(LoadFixedBitsetFiltersEagerlyValue.Value); - } - - if (MappingDescriptor is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, MappingDescriptor, options); - } - else if (MappingDescriptorAction is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor(MappingDescriptorAction), options); - } - else if (MappingValue is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, MappingValue, options); - } - - if (MaxDocvalueFieldsSearchValue.HasValue) - { - writer.WritePropertyName("max_docvalue_fields_search"); - writer.WriteNumberValue(MaxDocvalueFieldsSearchValue.Value); - } - - if (MaxInnerResultWindowValue.HasValue) - { - writer.WritePropertyName("max_inner_result_window"); - writer.WriteNumberValue(MaxInnerResultWindowValue.Value); - } - - if (MaxNgramDiffValue.HasValue) - { - writer.WritePropertyName("max_ngram_diff"); - writer.WriteNumberValue(MaxNgramDiffValue.Value); - } - - if (MaxRefreshListenersValue.HasValue) - { - writer.WritePropertyName("max_refresh_listeners"); - writer.WriteNumberValue(MaxRefreshListenersValue.Value); - } - - if (MaxRegexLengthValue.HasValue) - { - writer.WritePropertyName("max_regex_length"); - writer.WriteNumberValue(MaxRegexLengthValue.Value); - } - - if (MaxRescoreWindowValue.HasValue) - { - writer.WritePropertyName("max_rescore_window"); - writer.WriteNumberValue(MaxRescoreWindowValue.Value); - } - - if (MaxResultWindowValue.HasValue) - { - writer.WritePropertyName("max_result_window"); - writer.WriteNumberValue(MaxResultWindowValue.Value); - } - - if (MaxScriptFieldsValue.HasValue) - { - writer.WritePropertyName("max_script_fields"); - writer.WriteNumberValue(MaxScriptFieldsValue.Value); - } - - if (MaxShingleDiffValue.HasValue) - { - writer.WritePropertyName("max_shingle_diff"); - writer.WriteNumberValue(MaxShingleDiffValue.Value); - } - - if (MaxSlicesPerScrollValue.HasValue) - { - writer.WritePropertyName("max_slices_per_scroll"); - writer.WriteNumberValue(MaxSlicesPerScrollValue.Value); - } - - if (MaxTermsCountValue.HasValue) - { - writer.WritePropertyName("max_terms_count"); - writer.WriteNumberValue(MaxTermsCountValue.Value); - } - - if (MergeDescriptor is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, MergeDescriptor, options); - } - else if (MergeDescriptorAction is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor(MergeDescriptorAction), options); - } - else if (MergeValue is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, MergeValue, options); - } - - if (!string.IsNullOrEmpty(ModeValue)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(ModeValue); - } - - if (NumberOfReplicasValue is not null) - { - writer.WritePropertyName("number_of_replicas"); - JsonSerializer.Serialize(writer, NumberOfReplicasValue, options); - } - - if (NumberOfRoutingShardsValue.HasValue) - { - writer.WritePropertyName("number_of_routing_shards"); - writer.WriteNumberValue(NumberOfRoutingShardsValue.Value); - } - - if (NumberOfShardsValue is not null) - { - writer.WritePropertyName("number_of_shards"); - JsonSerializer.Serialize(writer, NumberOfShardsValue, options); - } - - if (PriorityValue is not null) - { - writer.WritePropertyName("priority"); - JsonSerializer.Serialize(writer, PriorityValue, options); - } - - if (ProvidedNameValue is not null) - { - writer.WritePropertyName("provided_name"); - JsonSerializer.Serialize(writer, ProvidedNameValue, options); - } - - if (QueriesDescriptor is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, QueriesDescriptor, options); - } - else if (QueriesDescriptorAction is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor(QueriesDescriptorAction), options); - } - else if (QueriesValue is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, QueriesValue, options); - } - - if (QueryStringDescriptor is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, QueryStringDescriptor, options); - } - else if (QueryStringDescriptorAction is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor(QueryStringDescriptorAction), options); - } - else if (QueryStringValue is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, QueryStringValue, options); - } - - if (RefreshIntervalValue is not null) - { - writer.WritePropertyName("refresh_interval"); - JsonSerializer.Serialize(writer, RefreshIntervalValue, options); - } - - if (RoutingDescriptor is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingDescriptor, options); - } - else if (RoutingDescriptorAction is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor(RoutingDescriptorAction), options); - } - else if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (RoutingPartitionSizeValue.HasValue) - { - writer.WritePropertyName("routing_partition_size"); - writer.WriteNumberValue(RoutingPartitionSizeValue.Value); - } - - if (RoutingPathValue is not null) - { - writer.WritePropertyName("routing_path"); - SingleOrManySerializationHelper.Serialize(RoutingPathValue, writer, options); - } - - if (SearchDescriptor is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, SearchDescriptor, options); - } - else if (SearchDescriptorAction is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor(SearchDescriptorAction), options); - } - else if (SearchValue is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, SearchValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SimilarityValue is not null) - { - writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, SimilarityValue, options); - } - - if (SoftDeletesDescriptor is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, SoftDeletesDescriptor, options); - } - else if (SoftDeletesDescriptorAction is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor(SoftDeletesDescriptorAction), options); - } - else if (SoftDeletesValue is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, SoftDeletesValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor(SortDescriptorAction), options); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StoreDescriptor is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, StoreDescriptor, options); - } - else if (StoreDescriptorAction is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor(StoreDescriptorAction), options); - } - else if (StoreValue is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, StoreValue, options); - } - - if (TimeSeriesDescriptor is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, TimeSeriesDescriptor, options); - } - else if (TimeSeriesDescriptorAction is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor(TimeSeriesDescriptorAction), options); - } - else if (TimeSeriesValue is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, TimeSeriesValue, options); - } - - if (TopMetricsMaxSizeValue.HasValue) - { - writer.WritePropertyName("top_metrics_max_size"); - writer.WriteNumberValue(TopMetricsMaxSizeValue.Value); - } - - if (TranslogDescriptor is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, TranslogDescriptor, options); - } - else if (TranslogDescriptorAction is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor(TranslogDescriptorAction), options); - } - else if (TranslogValue is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, TranslogValue, options); - } - - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - if (VerifiedBeforeCloseValue is not null) - { - writer.WritePropertyName("verified_before_close"); - JsonSerializer.Serialize(writer, VerifiedBeforeCloseValue, options); - } - - if (VersionDescriptor is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, VersionDescriptor, options); - } - else if (VersionDescriptorAction is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor(VersionDescriptorAction), options); - } - else if (VersionValue is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, VersionValue, options); - } - - if (OtherSettingsValue is not null) - { - foreach (var additionalProperty in OtherSettingsValue) - { - writer.WritePropertyName(additionalProperty.Key); - JsonSerializer.Serialize(writer, additionalProperty.Value, options); - } - } - - writer.WriteEndObject(); - } -} - -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class IndexSettingsDescriptor : SerializableDescriptor -{ - internal IndexSettingsDescriptor(Action configure) => configure.Invoke(this); - - public IndexSettingsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? AnalyzeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor AnalyzeDescriptor { get; set; } - private Action AnalyzeDescriptorAction { get; set; } - private string? AutoExpandReplicasValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? BlocksValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor BlocksDescriptor { get; set; } - private Action BlocksDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? CheckOnStartupValue { get; set; } - private string? CodecValue { get; set; } - private long? CreationDateValue { get; set; } - private DateTimeOffset? CreationDateStringValue { get; set; } - private string? DefaultPipelineValue { get; set; } - private string? FinalPipelineValue { get; set; } - private object? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? GcDeletesValue { get; set; } - private object? HiddenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? HighlightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor IndexDescriptor { get; set; } - private Action IndexDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor IndexingPressureDescriptor { get; set; } - private Action IndexingPressureDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? IndexingSlowlogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor IndexingSlowlogDescriptor { get; set; } - private Action IndexingSlowlogDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private bool? LoadFixedBitsetFiltersEagerlyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? MappingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor MappingDescriptor { get; set; } - private Action MappingDescriptorAction { get; set; } - private int? MaxDocvalueFieldsSearchValue { get; set; } - private int? MaxInnerResultWindowValue { get; set; } - private int? MaxNgramDiffValue { get; set; } - private int? MaxRefreshListenersValue { get; set; } - private int? MaxRegexLengthValue { get; set; } - private int? MaxRescoreWindowValue { get; set; } - private int? MaxResultWindowValue { get; set; } - private int? MaxScriptFieldsValue { get; set; } - private int? MaxShingleDiffValue { get; set; } - private int? MaxSlicesPerScrollValue { get; set; } - private int? MaxTermsCountValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? MergeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor MergeDescriptor { get; set; } - private Action MergeDescriptorAction { get; set; } - private string? ModeValue { get; set; } - private object? NumberOfReplicasValue { get; set; } - private int? NumberOfRoutingShardsValue { get; set; } - private object? NumberOfShardsValue { get; set; } - private IDictionary OtherSettingsValue { get; set; } - private object? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? ProvidedNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? QueriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor QueriesDescriptor { get; set; } - private Action QueriesDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? QueryStringValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor QueryStringDescriptor { get; set; } - private Action QueryStringDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? RefreshIntervalValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor RoutingDescriptor { get; set; } - private Action RoutingDescriptorAction { get; set; } - private int? RoutingPartitionSizeValue { get; set; } - private ICollection? RoutingPathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? SearchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor SearchDescriptor { get; set; } - private Action SearchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? SimilarityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor SoftDeletesDescriptor { get; set; } - private Action SoftDeletesDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor StoreDescriptor { get; set; } - private Action StoreDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? TimeSeriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor TimeSeriesDescriptor { get; set; } - private Action TimeSeriesDescriptorAction { get; set; } - private int? TopMetricsMaxSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? TranslogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor TranslogDescriptor { get; set; } - private Action TranslogDescriptorAction { get; set; } - private string? UuidValue { get; set; } - private object? VerifiedBeforeCloseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor VersionDescriptor { get; set; } - private Action VersionDescriptorAction { get; set; } - - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Analysis(Action configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - /// - /// - /// Settings to define analyzers, tokenizers, token filters and character filters. - /// - /// - public IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? analyze) - { - AnalyzeDescriptor = null; - AnalyzeDescriptorAction = null; - AnalyzeValue = analyze; - return Self; - } - - public IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor descriptor) - { - AnalyzeValue = null; - AnalyzeDescriptorAction = null; - AnalyzeDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Analyze(Action configure) - { - AnalyzeValue = null; - AnalyzeDescriptor = null; - AnalyzeDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor AutoExpandReplicas(string? autoExpandReplicas) - { - AutoExpandReplicasValue = autoExpandReplicas; - return Self; - } - - public IndexSettingsDescriptor Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? blocks) - { - BlocksDescriptor = null; - BlocksDescriptorAction = null; - BlocksValue = blocks; - return Self; - } - - public IndexSettingsDescriptor Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor descriptor) - { - BlocksValue = null; - BlocksDescriptorAction = null; - BlocksDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Blocks(Action configure) - { - BlocksValue = null; - BlocksDescriptor = null; - BlocksDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor CheckOnStartup(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? checkOnStartup) - { - CheckOnStartupValue = checkOnStartup; - return Self; - } - - public IndexSettingsDescriptor Codec(string? codec) - { - CodecValue = codec; - return Self; - } - - public IndexSettingsDescriptor CreationDate(long? creationDate) - { - CreationDateValue = creationDate; - return Self; - } - - public IndexSettingsDescriptor CreationDateString(DateTimeOffset? creationDateString) - { - CreationDateStringValue = creationDateString; - return Self; - } - - public IndexSettingsDescriptor DefaultPipeline(string? defaultPipeline) - { - DefaultPipelineValue = defaultPipeline; - return Self; - } - - public IndexSettingsDescriptor FinalPipeline(string? finalPipeline) - { - FinalPipelineValue = finalPipeline; - return Self; - } - - public IndexSettingsDescriptor Format(object? format) - { - FormatValue = format; - return Self; - } - - public IndexSettingsDescriptor GcDeletes(Elastic.Clients.Elasticsearch.Serverless.Duration? gcDeletes) - { - GcDeletesValue = gcDeletes; - return Self; - } - - public IndexSettingsDescriptor Hidden(object? hidden) - { - HiddenValue = hidden; - return Self; - } - - public IndexSettingsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? highlight) - { - HighlightDescriptor = null; - HighlightDescriptorAction = null; - HighlightValue = highlight; - return Self; - } - - public IndexSettingsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor descriptor) - { - HighlightValue = null; - HighlightDescriptorAction = null; - HighlightDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Highlight(Action configure) - { - HighlightValue = null; - HighlightDescriptor = null; - HighlightDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Index(Action configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configure indexing back pressure limits. - /// - /// - public IndexSettingsDescriptor IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? indexingPressure) - { - IndexingPressureDescriptor = null; - IndexingPressureDescriptorAction = null; - IndexingPressureValue = indexingPressure; - return Self; - } - - public IndexSettingsDescriptor IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor descriptor) - { - IndexingPressureValue = null; - IndexingPressureDescriptorAction = null; - IndexingPressureDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor IndexingPressure(Action configure) - { - IndexingPressureValue = null; - IndexingPressureDescriptor = null; - IndexingPressureDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? indexingSlowlog) - { - IndexingSlowlogDescriptor = null; - IndexingSlowlogDescriptorAction = null; - IndexingSlowlogValue = indexingSlowlog; - return Self; - } - - public IndexSettingsDescriptor IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor descriptor) - { - IndexingSlowlogValue = null; - IndexingSlowlogDescriptorAction = null; - IndexingSlowlogDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor IndexingSlowlog(Action configure) - { - IndexingSlowlogValue = null; - IndexingSlowlogDescriptor = null; - IndexingSlowlogDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexSettingsDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor LoadFixedBitsetFiltersEagerly(bool? loadFixedBitsetFiltersEagerly = true) - { - LoadFixedBitsetFiltersEagerlyValue = loadFixedBitsetFiltersEagerly; - return Self; - } - - /// - /// - /// Enable or disable dynamic mapping for an index. - /// - /// - public IndexSettingsDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? mapping) - { - MappingDescriptor = null; - MappingDescriptorAction = null; - MappingValue = mapping; - return Self; - } - - public IndexSettingsDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor descriptor) - { - MappingValue = null; - MappingDescriptorAction = null; - MappingDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Mapping(Action configure) - { - MappingValue = null; - MappingDescriptor = null; - MappingDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor MaxDocvalueFieldsSearch(int? maxDocvalueFieldsSearch) - { - MaxDocvalueFieldsSearchValue = maxDocvalueFieldsSearch; - return Self; - } - - public IndexSettingsDescriptor MaxInnerResultWindow(int? maxInnerResultWindow) - { - MaxInnerResultWindowValue = maxInnerResultWindow; - return Self; - } - - public IndexSettingsDescriptor MaxNgramDiff(int? maxNgramDiff) - { - MaxNgramDiffValue = maxNgramDiff; - return Self; - } - - public IndexSettingsDescriptor MaxRefreshListeners(int? maxRefreshListeners) - { - MaxRefreshListenersValue = maxRefreshListeners; - return Self; - } - - public IndexSettingsDescriptor MaxRegexLength(int? maxRegexLength) - { - MaxRegexLengthValue = maxRegexLength; - return Self; - } - - public IndexSettingsDescriptor MaxRescoreWindow(int? maxRescoreWindow) - { - MaxRescoreWindowValue = maxRescoreWindow; - return Self; - } - - public IndexSettingsDescriptor MaxResultWindow(int? maxResultWindow) - { - MaxResultWindowValue = maxResultWindow; - return Self; - } - - public IndexSettingsDescriptor MaxScriptFields(int? maxScriptFields) - { - MaxScriptFieldsValue = maxScriptFields; - return Self; - } - - public IndexSettingsDescriptor MaxShingleDiff(int? maxShingleDiff) - { - MaxShingleDiffValue = maxShingleDiff; - return Self; - } - - public IndexSettingsDescriptor MaxSlicesPerScroll(int? maxSlicesPerScroll) - { - MaxSlicesPerScrollValue = maxSlicesPerScroll; - return Self; - } - - public IndexSettingsDescriptor MaxTermsCount(int? maxTermsCount) - { - MaxTermsCountValue = maxTermsCount; - return Self; - } - - public IndexSettingsDescriptor Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? merge) - { - MergeDescriptor = null; - MergeDescriptorAction = null; - MergeValue = merge; - return Self; - } - - public IndexSettingsDescriptor Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor descriptor) - { - MergeValue = null; - MergeDescriptorAction = null; - MergeDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Merge(Action configure) - { - MergeValue = null; - MergeDescriptor = null; - MergeDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Mode(string? mode) - { - ModeValue = mode; - return Self; - } - - public IndexSettingsDescriptor NumberOfReplicas(object? numberOfReplicas) - { - NumberOfReplicasValue = numberOfReplicas; - return Self; - } - - public IndexSettingsDescriptor NumberOfRoutingShards(int? numberOfRoutingShards) - { - NumberOfRoutingShardsValue = numberOfRoutingShards; - return Self; - } - - public IndexSettingsDescriptor NumberOfShards(object? numberOfShards) - { - NumberOfShardsValue = numberOfShards; - return Self; - } - - /// - /// - /// Additional settings not covered in this type. Unless these settings are defined by a plugin, please open an issue on the Elasticsearch API specification so that they can be added in a future release - /// - /// - public IndexSettingsDescriptor OtherSettings(Func, FluentDictionary> selector) - { - OtherSettingsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IndexSettingsDescriptor Priority(object? priority) - { - PriorityValue = priority; - return Self; - } - - public IndexSettingsDescriptor ProvidedName(Elastic.Clients.Elasticsearch.Serverless.Name? providedName) - { - ProvidedNameValue = providedName; - return Self; - } - - public IndexSettingsDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? queries) - { - QueriesDescriptor = null; - QueriesDescriptorAction = null; - QueriesValue = queries; - return Self; - } - - public IndexSettingsDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor descriptor) - { - QueriesValue = null; - QueriesDescriptorAction = null; - QueriesDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Queries(Action configure) - { - QueriesValue = null; - QueriesDescriptor = null; - QueriesDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? queryString) - { - QueryStringDescriptor = null; - QueryStringDescriptorAction = null; - QueryStringValue = queryString; - return Self; - } - - public IndexSettingsDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor descriptor) - { - QueryStringValue = null; - QueryStringDescriptorAction = null; - QueryStringDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor QueryString(Action configure) - { - QueryStringValue = null; - QueryStringDescriptor = null; - QueryStringDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor RefreshInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? refreshInterval) - { - RefreshIntervalValue = refreshInterval; - return Self; - } - - public IndexSettingsDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public IndexSettingsDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor RoutingPartitionSize(int? routingPartitionSize) - { - RoutingPartitionSizeValue = routingPartitionSize; - return Self; - } - - public IndexSettingsDescriptor RoutingPath(ICollection? routingPath) - { - RoutingPathValue = routingPath; - return Self; - } - - public IndexSettingsDescriptor Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? search) - { - SearchDescriptor = null; - SearchDescriptorAction = null; - SearchValue = search; - return Self; - } - - public IndexSettingsDescriptor Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor descriptor) - { - SearchValue = null; - SearchDescriptorAction = null; - SearchDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Search(Action configure) - { - SearchValue = null; - SearchDescriptor = null; - SearchDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configure custom similarity settings to customize how search results are scored. - /// - /// - public IndexSettingsDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public IndexSettingsDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor descriptor) - { - SimilarityValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsDescriptor Similarity(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor(); - configure?.Invoke(descriptor); - SimilarityValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsDescriptor SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? softDeletes) - { - SoftDeletesDescriptor = null; - SoftDeletesDescriptorAction = null; - SoftDeletesValue = softDeletes; - return Self; - } - - public IndexSettingsDescriptor SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor descriptor) - { - SoftDeletesValue = null; - SoftDeletesDescriptorAction = null; - SoftDeletesDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor SoftDeletes(Action configure) - { - SoftDeletesValue = null; - SoftDeletesDescriptor = null; - SoftDeletesDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortValue = sort; - return Self; - } - - public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = configure; - return Self; - } - - /// - /// - /// The store module allows you to control how index data is stored and accessed on disk. - /// - /// - public IndexSettingsDescriptor Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? store) - { - StoreDescriptor = null; - StoreDescriptorAction = null; - StoreValue = store; - return Self; - } - - public IndexSettingsDescriptor Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor descriptor) - { - StoreValue = null; - StoreDescriptorAction = null; - StoreDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Store(Action configure) - { - StoreValue = null; - StoreDescriptor = null; - StoreDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? timeSeries) - { - TimeSeriesDescriptor = null; - TimeSeriesDescriptorAction = null; - TimeSeriesValue = timeSeries; - return Self; - } - - public IndexSettingsDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor descriptor) - { - TimeSeriesValue = null; - TimeSeriesDescriptorAction = null; - TimeSeriesDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor TimeSeries(Action configure) - { - TimeSeriesValue = null; - TimeSeriesDescriptor = null; - TimeSeriesDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor TopMetricsMaxSize(int? topMetricsMaxSize) - { - TopMetricsMaxSizeValue = topMetricsMaxSize; - return Self; - } - - public IndexSettingsDescriptor Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? translog) - { - TranslogDescriptor = null; - TranslogDescriptorAction = null; - TranslogValue = translog; - return Self; - } - - public IndexSettingsDescriptor Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor descriptor) - { - TranslogValue = null; - TranslogDescriptorAction = null; - TranslogDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Translog(Action configure) - { - TranslogValue = null; - TranslogDescriptor = null; - TranslogDescriptorAction = configure; - return Self; - } - - public IndexSettingsDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - public IndexSettingsDescriptor VerifiedBeforeClose(object? verifiedBeforeClose) - { - VerifiedBeforeCloseValue = verifiedBeforeClose; - return Self; - } - - public IndexSettingsDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? version) - { - VersionDescriptor = null; - VersionDescriptorAction = null; - VersionValue = version; - return Self; - } - - public IndexSettingsDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor descriptor) - { - VersionValue = null; - VersionDescriptorAction = null; - VersionDescriptor = descriptor; - return Self; - } - - public IndexSettingsDescriptor Version(Action configure) - { - VersionValue = null; - VersionDescriptor = null; - VersionDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else if (AnalysisValue is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzeDescriptor is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, AnalyzeDescriptor, options); - } - else if (AnalyzeDescriptorAction is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor(AnalyzeDescriptorAction), options); - } - else if (AnalyzeValue is not null) - { - writer.WritePropertyName("analyze"); - JsonSerializer.Serialize(writer, AnalyzeValue, options); - } - - if (!string.IsNullOrEmpty(AutoExpandReplicasValue)) - { - writer.WritePropertyName("auto_expand_replicas"); - writer.WriteStringValue(AutoExpandReplicasValue); - } - - if (BlocksDescriptor is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, BlocksDescriptor, options); - } - else if (BlocksDescriptorAction is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor(BlocksDescriptorAction), options); - } - else if (BlocksValue is not null) - { - writer.WritePropertyName("blocks"); - JsonSerializer.Serialize(writer, BlocksValue, options); - } - - if (CheckOnStartupValue is not null) - { - writer.WritePropertyName("check_on_startup"); - JsonSerializer.Serialize(writer, CheckOnStartupValue, options); - } - - if (!string.IsNullOrEmpty(CodecValue)) - { - writer.WritePropertyName("codec"); - writer.WriteStringValue(CodecValue); - } - - if (CreationDateValue.HasValue) - { - writer.WritePropertyName("creation_date"); - writer.WriteNumberValue(CreationDateValue.Value); - } - - if (CreationDateStringValue is not null) - { - writer.WritePropertyName("creation_date_string"); - JsonSerializer.Serialize(writer, CreationDateStringValue, options); - } - - if (!string.IsNullOrEmpty(DefaultPipelineValue)) - { - writer.WritePropertyName("default_pipeline"); - writer.WriteStringValue(DefaultPipelineValue); - } - - if (!string.IsNullOrEmpty(FinalPipelineValue)) - { - writer.WritePropertyName("final_pipeline"); - writer.WriteStringValue(FinalPipelineValue); - } - - if (FormatValue is not null) - { - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, FormatValue, options); - } - - if (GcDeletesValue is not null) - { - writer.WritePropertyName("gc_deletes"); - JsonSerializer.Serialize(writer, GcDeletesValue, options); - } - - if (HiddenValue is not null) - { - writer.WritePropertyName("hidden"); - JsonSerializer.Serialize(writer, HiddenValue, options); - } - - if (HighlightDescriptor is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightDescriptor, options); - } - else if (HighlightDescriptorAction is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor(HighlightDescriptorAction), options); - } - else if (HighlightValue is not null) - { - writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, HighlightValue, options); - } - - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (IndexingPressureDescriptor is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, IndexingPressureDescriptor, options); - } - else if (IndexingPressureDescriptorAction is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor(IndexingPressureDescriptorAction), options); - } - else if (IndexingPressureValue is not null) - { - writer.WritePropertyName("indexing_pressure"); - JsonSerializer.Serialize(writer, IndexingPressureValue, options); - } - - if (IndexingSlowlogDescriptor is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, IndexingSlowlogDescriptor, options); - } - else if (IndexingSlowlogDescriptorAction is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor(IndexingSlowlogDescriptorAction), options); - } - else if (IndexingSlowlogValue is not null) - { - writer.WritePropertyName("indexing.slowlog"); - JsonSerializer.Serialize(writer, IndexingSlowlogValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - - if (LoadFixedBitsetFiltersEagerlyValue.HasValue) - { - writer.WritePropertyName("load_fixed_bitset_filters_eagerly"); - writer.WriteBooleanValue(LoadFixedBitsetFiltersEagerlyValue.Value); - } - - if (MappingDescriptor is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, MappingDescriptor, options); - } - else if (MappingDescriptorAction is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor(MappingDescriptorAction), options); - } - else if (MappingValue is not null) - { - writer.WritePropertyName("mapping"); - JsonSerializer.Serialize(writer, MappingValue, options); - } - - if (MaxDocvalueFieldsSearchValue.HasValue) - { - writer.WritePropertyName("max_docvalue_fields_search"); - writer.WriteNumberValue(MaxDocvalueFieldsSearchValue.Value); - } - - if (MaxInnerResultWindowValue.HasValue) - { - writer.WritePropertyName("max_inner_result_window"); - writer.WriteNumberValue(MaxInnerResultWindowValue.Value); - } - - if (MaxNgramDiffValue.HasValue) - { - writer.WritePropertyName("max_ngram_diff"); - writer.WriteNumberValue(MaxNgramDiffValue.Value); - } - - if (MaxRefreshListenersValue.HasValue) - { - writer.WritePropertyName("max_refresh_listeners"); - writer.WriteNumberValue(MaxRefreshListenersValue.Value); - } - - if (MaxRegexLengthValue.HasValue) - { - writer.WritePropertyName("max_regex_length"); - writer.WriteNumberValue(MaxRegexLengthValue.Value); - } - - if (MaxRescoreWindowValue.HasValue) - { - writer.WritePropertyName("max_rescore_window"); - writer.WriteNumberValue(MaxRescoreWindowValue.Value); - } - - if (MaxResultWindowValue.HasValue) - { - writer.WritePropertyName("max_result_window"); - writer.WriteNumberValue(MaxResultWindowValue.Value); - } - - if (MaxScriptFieldsValue.HasValue) - { - writer.WritePropertyName("max_script_fields"); - writer.WriteNumberValue(MaxScriptFieldsValue.Value); - } - - if (MaxShingleDiffValue.HasValue) - { - writer.WritePropertyName("max_shingle_diff"); - writer.WriteNumberValue(MaxShingleDiffValue.Value); - } - - if (MaxSlicesPerScrollValue.HasValue) - { - writer.WritePropertyName("max_slices_per_scroll"); - writer.WriteNumberValue(MaxSlicesPerScrollValue.Value); - } - - if (MaxTermsCountValue.HasValue) - { - writer.WritePropertyName("max_terms_count"); - writer.WriteNumberValue(MaxTermsCountValue.Value); - } - - if (MergeDescriptor is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, MergeDescriptor, options); - } - else if (MergeDescriptorAction is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor(MergeDescriptorAction), options); - } - else if (MergeValue is not null) - { - writer.WritePropertyName("merge"); - JsonSerializer.Serialize(writer, MergeValue, options); - } - - if (!string.IsNullOrEmpty(ModeValue)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(ModeValue); - } - - if (NumberOfReplicasValue is not null) - { - writer.WritePropertyName("number_of_replicas"); - JsonSerializer.Serialize(writer, NumberOfReplicasValue, options); - } - - if (NumberOfRoutingShardsValue.HasValue) - { - writer.WritePropertyName("number_of_routing_shards"); - writer.WriteNumberValue(NumberOfRoutingShardsValue.Value); - } - - if (NumberOfShardsValue is not null) - { - writer.WritePropertyName("number_of_shards"); - JsonSerializer.Serialize(writer, NumberOfShardsValue, options); - } - - if (PriorityValue is not null) - { - writer.WritePropertyName("priority"); - JsonSerializer.Serialize(writer, PriorityValue, options); - } - - if (ProvidedNameValue is not null) - { - writer.WritePropertyName("provided_name"); - JsonSerializer.Serialize(writer, ProvidedNameValue, options); - } - - if (QueriesDescriptor is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, QueriesDescriptor, options); - } - else if (QueriesDescriptorAction is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor(QueriesDescriptorAction), options); - } - else if (QueriesValue is not null) - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, QueriesValue, options); - } - - if (QueryStringDescriptor is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, QueryStringDescriptor, options); - } - else if (QueryStringDescriptorAction is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor(QueryStringDescriptorAction), options); - } - else if (QueryStringValue is not null) - { - writer.WritePropertyName("query_string"); - JsonSerializer.Serialize(writer, QueryStringValue, options); - } - - if (RefreshIntervalValue is not null) - { - writer.WritePropertyName("refresh_interval"); - JsonSerializer.Serialize(writer, RefreshIntervalValue, options); - } - - if (RoutingDescriptor is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingDescriptor, options); - } - else if (RoutingDescriptorAction is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor(RoutingDescriptorAction), options); - } - else if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (RoutingPartitionSizeValue.HasValue) - { - writer.WritePropertyName("routing_partition_size"); - writer.WriteNumberValue(RoutingPartitionSizeValue.Value); - } - - if (RoutingPathValue is not null) - { - writer.WritePropertyName("routing_path"); - SingleOrManySerializationHelper.Serialize(RoutingPathValue, writer, options); - } - - if (SearchDescriptor is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, SearchDescriptor, options); - } - else if (SearchDescriptorAction is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor(SearchDescriptorAction), options); - } - else if (SearchValue is not null) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, SearchValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - if (SimilarityValue is not null) - { - writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, SimilarityValue, options); - } - - if (SoftDeletesDescriptor is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, SoftDeletesDescriptor, options); - } - else if (SoftDeletesDescriptorAction is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor(SoftDeletesDescriptorAction), options); - } - else if (SoftDeletesValue is not null) - { - writer.WritePropertyName("soft_deletes"); - JsonSerializer.Serialize(writer, SoftDeletesValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor(SortDescriptorAction), options); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - } - - if (StoreDescriptor is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, StoreDescriptor, options); - } - else if (StoreDescriptorAction is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor(StoreDescriptorAction), options); - } - else if (StoreValue is not null) - { - writer.WritePropertyName("store"); - JsonSerializer.Serialize(writer, StoreValue, options); - } - - if (TimeSeriesDescriptor is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, TimeSeriesDescriptor, options); - } - else if (TimeSeriesDescriptorAction is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor(TimeSeriesDescriptorAction), options); - } - else if (TimeSeriesValue is not null) - { - writer.WritePropertyName("time_series"); - JsonSerializer.Serialize(writer, TimeSeriesValue, options); - } - - if (TopMetricsMaxSizeValue.HasValue) - { - writer.WritePropertyName("top_metrics_max_size"); - writer.WriteNumberValue(TopMetricsMaxSizeValue.Value); - } - - if (TranslogDescriptor is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, TranslogDescriptor, options); - } - else if (TranslogDescriptorAction is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor(TranslogDescriptorAction), options); - } - else if (TranslogValue is not null) - { - writer.WritePropertyName("translog"); - JsonSerializer.Serialize(writer, TranslogValue, options); - } - - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - if (VerifiedBeforeCloseValue is not null) - { - writer.WritePropertyName("verified_before_close"); - JsonSerializer.Serialize(writer, VerifiedBeforeCloseValue, options); - } - - if (VersionDescriptor is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, VersionDescriptor, options); - } - else if (VersionDescriptorAction is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor(VersionDescriptorAction), options); - } - else if (VersionValue is not null) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, VersionValue, options); - } - - if (OtherSettingsValue is not null) - { - foreach (var additionalProperty in OtherSettingsValue) - { - writer.WritePropertyName(additionalProperty.Key); - JsonSerializer.Serialize(writer, additionalProperty.Value, options); - } - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs deleted file mode 100644 index 569b10d9693..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsAnalysis.g.cs +++ /dev/null @@ -1,193 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSettingsAnalysis -{ - [JsonInclude, JsonPropertyName("analyzer")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? Analyzers { get; set; } - [JsonInclude, JsonPropertyName("char_filter")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.CharFilters? CharFilters { get; set; } - [JsonInclude, JsonPropertyName("normalizer")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.Normalizers? Normalizers { get; set; } - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFilters? TokenFilters { get; set; } - [JsonInclude, JsonPropertyName("tokenizer")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.Tokenizers? Tokenizers { get; set; } -} - -public sealed partial class IndexSettingsAnalysisDescriptor : SerializableDescriptor -{ - internal IndexSettingsAnalysisDescriptor(Action configure) => configure.Invoke(this); - - public IndexSettingsAnalysisDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? AnalyzersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.CharFilters? CharFiltersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.Normalizers? NormalizersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFilters? TokenFiltersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.Tokenizers? TokenizersValue { get; set; } - - public IndexSettingsAnalysisDescriptor Analyzers(Elastic.Clients.Elasticsearch.Serverless.Analysis.Analyzers? analyzers) - { - AnalyzersValue = analyzers; - return Self; - } - - public IndexSettingsAnalysisDescriptor Analyzers(Elastic.Clients.Elasticsearch.Serverless.Analysis.AnalyzersDescriptor descriptor) - { - AnalyzersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor Analyzers(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Analysis.AnalyzersDescriptor(); - configure?.Invoke(descriptor); - AnalyzersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor CharFilters(Elastic.Clients.Elasticsearch.Serverless.Analysis.CharFilters? charFilters) - { - CharFiltersValue = charFilters; - return Self; - } - - public IndexSettingsAnalysisDescriptor CharFilters(Elastic.Clients.Elasticsearch.Serverless.Analysis.CharFiltersDescriptor descriptor) - { - CharFiltersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor CharFilters(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Analysis.CharFiltersDescriptor(); - configure?.Invoke(descriptor); - CharFiltersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor Normalizers(Elastic.Clients.Elasticsearch.Serverless.Analysis.Normalizers? normalizers) - { - NormalizersValue = normalizers; - return Self; - } - - public IndexSettingsAnalysisDescriptor Normalizers(Elastic.Clients.Elasticsearch.Serverless.Analysis.NormalizersDescriptor descriptor) - { - NormalizersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor Normalizers(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Analysis.NormalizersDescriptor(); - configure?.Invoke(descriptor); - NormalizersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor TokenFilters(Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFilters? tokenFilters) - { - TokenFiltersValue = tokenFilters; - return Self; - } - - public IndexSettingsAnalysisDescriptor TokenFilters(Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFiltersDescriptor descriptor) - { - TokenFiltersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor TokenFilters(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenFiltersDescriptor(); - configure?.Invoke(descriptor); - TokenFiltersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor Tokenizers(Elastic.Clients.Elasticsearch.Serverless.Analysis.Tokenizers? tokenizers) - { - TokenizersValue = tokenizers; - return Self; - } - - public IndexSettingsAnalysisDescriptor Tokenizers(Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenizersDescriptor descriptor) - { - TokenizersValue = descriptor.PromisedValue; - return Self; - } - - public IndexSettingsAnalysisDescriptor Tokenizers(Action configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Analysis.TokenizersDescriptor(); - configure?.Invoke(descriptor); - TokenizersValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalyzersValue is not null) - { - writer.WritePropertyName("analyzer"); - JsonSerializer.Serialize(writer, AnalyzersValue, options); - } - - if (CharFiltersValue is not null) - { - writer.WritePropertyName("char_filter"); - JsonSerializer.Serialize(writer, CharFiltersValue, options); - } - - if (NormalizersValue is not null) - { - writer.WritePropertyName("normalizer"); - JsonSerializer.Serialize(writer, NormalizersValue, options); - } - - if (TokenFiltersValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, TokenFiltersValue, options); - } - - if (TokenizersValue is not null) - { - writer.WritePropertyName("tokenizer"); - JsonSerializer.Serialize(writer, TokenizersValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs deleted file mode 100644 index 886a878bcb9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs +++ /dev/null @@ -1,238 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSettingsLifecycle -{ - /// - /// - /// Indicates whether or not the index has been rolled over. Automatically set to true when ILM completes the rollover action. - /// You can explicitly set it to skip rollover. - /// - /// - [JsonInclude, JsonPropertyName("indexing_complete")] - public bool? IndexingComplete { get; set; } - - /// - /// - /// The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } - - /// - /// - /// If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting - /// if you create a new index that contains old data and want to use the original creation date to calculate the index - /// age. Specified as a Unix epoch value in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("origination_date")] - public long? OriginationDate { get; set; } - - /// - /// - /// Set to true to parse the origination date from the index name. This origination date is used to calculate the index age - /// for its phase transitions. The index name must match the pattern ^.*-{date_format}-\d+, where the date_format is - /// yyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format, - /// for example logs-2016.10.31-000002). If the index name doesn’t match the pattern, index creation fails. - /// - /// - [JsonInclude, JsonPropertyName("parse_origination_date")] - public bool? ParseOriginationDate { get; set; } - - /// - /// - /// The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. - /// When the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more - /// information about rolling indices, see Rollover. - /// - /// - [JsonInclude, JsonPropertyName("rollover_alias")] - public string? RolloverAlias { get; set; } - [JsonInclude, JsonPropertyName("step")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleStep? Step { get; set; } -} - -public sealed partial class IndexSettingsLifecycleDescriptor : SerializableDescriptor -{ - internal IndexSettingsLifecycleDescriptor(Action configure) => configure.Invoke(this); - - public IndexSettingsLifecycleDescriptor() : base() - { - } - - private bool? IndexingCompleteValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - private long? OriginationDateValue { get; set; } - private bool? ParseOriginationDateValue { get; set; } - private string? RolloverAliasValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleStep? StepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleStepDescriptor StepDescriptor { get; set; } - private Action StepDescriptorAction { get; set; } - - /// - /// - /// Indicates whether or not the index has been rolled over. Automatically set to true when ILM completes the rollover action. - /// You can explicitly set it to skip rollover. - /// - /// - public IndexSettingsLifecycleDescriptor IndexingComplete(bool? indexingComplete = true) - { - IndexingCompleteValue = indexingComplete; - return Self; - } - - /// - /// - /// The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. - /// - /// - public IndexSettingsLifecycleDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting - /// if you create a new index that contains old data and want to use the original creation date to calculate the index - /// age. Specified as a Unix epoch value in milliseconds. - /// - /// - public IndexSettingsLifecycleDescriptor OriginationDate(long? originationDate) - { - OriginationDateValue = originationDate; - return Self; - } - - /// - /// - /// Set to true to parse the origination date from the index name. This origination date is used to calculate the index age - /// for its phase transitions. The index name must match the pattern ^.*-{date_format}-\d+, where the date_format is - /// yyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format, - /// for example logs-2016.10.31-000002). If the index name doesn’t match the pattern, index creation fails. - /// - /// - public IndexSettingsLifecycleDescriptor ParseOriginationDate(bool? parseOriginationDate = true) - { - ParseOriginationDateValue = parseOriginationDate; - return Self; - } - - /// - /// - /// The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. - /// When the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more - /// information about rolling indices, see Rollover. - /// - /// - public IndexSettingsLifecycleDescriptor RolloverAlias(string? rolloverAlias) - { - RolloverAliasValue = rolloverAlias; - return Self; - } - - public IndexSettingsLifecycleDescriptor Step(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleStep? step) - { - StepDescriptor = null; - StepDescriptorAction = null; - StepValue = step; - return Self; - } - - public IndexSettingsLifecycleDescriptor Step(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleStepDescriptor descriptor) - { - StepValue = null; - StepDescriptorAction = null; - StepDescriptor = descriptor; - return Self; - } - - public IndexSettingsLifecycleDescriptor Step(Action configure) - { - StepValue = null; - StepDescriptor = null; - StepDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexingCompleteValue.HasValue) - { - writer.WritePropertyName("indexing_complete"); - writer.WriteBooleanValue(IndexingCompleteValue.Value); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (OriginationDateValue.HasValue) - { - writer.WritePropertyName("origination_date"); - writer.WriteNumberValue(OriginationDateValue.Value); - } - - if (ParseOriginationDateValue.HasValue) - { - writer.WritePropertyName("parse_origination_date"); - writer.WriteBooleanValue(ParseOriginationDateValue.Value); - } - - if (!string.IsNullOrEmpty(RolloverAliasValue)) - { - writer.WritePropertyName("rollover_alias"); - writer.WriteStringValue(RolloverAliasValue); - } - - if (StepDescriptor is not null) - { - writer.WritePropertyName("step"); - JsonSerializer.Serialize(writer, StepDescriptor, options); - } - else if (StepDescriptorAction is not null) - { - writer.WritePropertyName("step"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleStepDescriptor(StepDescriptorAction), options); - } - else if (StepValue is not null) - { - writer.WritePropertyName("step"); - JsonSerializer.Serialize(writer, StepValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycleStep.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycleStep.g.cs deleted file mode 100644 index 7948827f35f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycleStep.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSettingsLifecycleStep -{ - /// - /// - /// Time to wait for the cluster to resolve allocation issues during an ILM shrink action. Must be greater than 1h (1 hour). - /// See Shard allocation for shrink. - /// - /// - [JsonInclude, JsonPropertyName("wait_time_threshold")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitTimeThreshold { get; set; } -} - -public sealed partial class IndexSettingsLifecycleStepDescriptor : SerializableDescriptor -{ - internal IndexSettingsLifecycleStepDescriptor(Action configure) => configure.Invoke(this); - - public IndexSettingsLifecycleStepDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitTimeThresholdValue { get; set; } - - /// - /// - /// Time to wait for the cluster to resolve allocation issues during an ILM shrink action. Must be greater than 1h (1 hour). - /// See Shard allocation for shrink. - /// - /// - public IndexSettingsLifecycleStepDescriptor WaitTimeThreshold(Elastic.Clients.Elasticsearch.Serverless.Duration? waitTimeThreshold) - { - WaitTimeThresholdValue = waitTimeThreshold; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (WaitTimeThresholdValue is not null) - { - writer.WritePropertyName("wait_time_threshold"); - JsonSerializer.Serialize(writer, WaitTimeThresholdValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs deleted file mode 100644 index 800232321e0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexSettingsTimeSeries -{ - [JsonInclude, JsonPropertyName("end_time")] - public DateTimeOffset? EndTime { get; set; } - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset? StartTime { get; set; } -} - -public sealed partial class IndexSettingsTimeSeriesDescriptor : SerializableDescriptor -{ - internal IndexSettingsTimeSeriesDescriptor(Action configure) => configure.Invoke(this); - - public IndexSettingsTimeSeriesDescriptor() : base() - { - } - - private DateTimeOffset? EndTimeValue { get; set; } - private DateTimeOffset? StartTimeValue { get; set; } - - public IndexSettingsTimeSeriesDescriptor EndTime(DateTimeOffset? endTime) - { - EndTimeValue = endTime; - return Self; - } - - public IndexSettingsTimeSeriesDescriptor StartTime(DateTimeOffset? startTime) - { - StartTimeValue = startTime; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EndTimeValue is not null) - { - writer.WritePropertyName("end_time"); - JsonSerializer.Serialize(writer, EndTimeValue, options); - } - - if (StartTimeValue is not null) - { - writer.WritePropertyName("start_time"); - JsonSerializer.Serialize(writer, StartTimeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs deleted file mode 100644 index 67910b34d75..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexState.g.cs +++ /dev/null @@ -1,504 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexState -{ - [JsonInclude, JsonPropertyName("aliases")] - public IDictionary? Aliases { get; set; } - [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStream { get; set; } - - /// - /// - /// Default settings, included when the request's include_default is true. - /// - /// - [JsonInclude, JsonPropertyName("defaults")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Defaults { get; set; } - - /// - /// - /// Data stream lifecycle applicable if this is a data stream. - /// - /// - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? Lifecycle { get; set; } - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; set; } - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; } -} - -public sealed partial class IndexStateDescriptor : SerializableDescriptor> -{ - internal IndexStateDescriptor(Action> configure) => configure.Invoke(this); - - public IndexStateDescriptor() : base() - { - } - - private IDictionary> AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? DefaultsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor DefaultsDescriptor { get; set; } - private Action> DefaultsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action> MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - - public IndexStateDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName? dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// - /// Default settings, included when the request's include_default is true. - /// - /// - public IndexStateDescriptor Defaults(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? defaults) - { - DefaultsDescriptor = null; - DefaultsDescriptorAction = null; - DefaultsValue = defaults; - return Self; - } - - public IndexStateDescriptor Defaults(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - DefaultsValue = null; - DefaultsDescriptorAction = null; - DefaultsDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Defaults(Action> configure) - { - DefaultsValue = null; - DefaultsDescriptor = null; - DefaultsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Data stream lifecycle applicable if this is a data stream. - /// - /// - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Mappings(Action> configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - public IndexStateDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexStateDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (DefaultsDescriptor is not null) - { - writer.WritePropertyName("defaults"); - JsonSerializer.Serialize(writer, DefaultsDescriptor, options); - } - else if (DefaultsDescriptorAction is not null) - { - writer.WritePropertyName("defaults"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(DefaultsDescriptorAction), options); - } - else if (DefaultsValue is not null) - { - writer.WritePropertyName("defaults"); - JsonSerializer.Serialize(writer, DefaultsValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexStateDescriptor : SerializableDescriptor -{ - internal IndexStateDescriptor(Action configure) => configure.Invoke(this); - - public IndexStateDescriptor() : base() - { - } - - private IDictionary AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DataStreamName? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? DefaultsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor DefaultsDescriptor { get; set; } - private Action DefaultsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - - public IndexStateDescriptor Aliases(Func, FluentDescriptorDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public IndexStateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.DataStreamName? dataStream) - { - DataStreamValue = dataStream; - return Self; - } - - /// - /// - /// Default settings, included when the request's include_default is true. - /// - /// - public IndexStateDescriptor Defaults(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? defaults) - { - DefaultsDescriptor = null; - DefaultsDescriptorAction = null; - DefaultsValue = defaults; - return Self; - } - - public IndexStateDescriptor Defaults(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - DefaultsValue = null; - DefaultsDescriptorAction = null; - DefaultsDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Defaults(Action configure) - { - DefaultsValue = null; - DefaultsDescriptor = null; - DefaultsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Data stream lifecycle applicable if this is a data stream. - /// - /// - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexStateDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexStateDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Mappings(Action configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - public IndexStateDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexStateDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexStateDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (DefaultsDescriptor is not null) - { - writer.WritePropertyName("defaults"); - JsonSerializer.Serialize(writer, DefaultsDescriptor, options); - } - else if (DefaultsDescriptorAction is not null) - { - writer.WritePropertyName("defaults"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(DefaultsDescriptorAction), options); - } - else if (DefaultsValue is not null) - { - writer.WritePropertyName("defaults"); - JsonSerializer.Serialize(writer, DefaultsValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexStats.g.cs deleted file mode 100644 index 4e040fc0dde..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexStats.g.cs +++ /dev/null @@ -1,172 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexStats -{ - [JsonInclude, JsonPropertyName("bulk")] - public Elastic.Clients.Elasticsearch.Serverless.BulkStats? Bulk { get; init; } - - /// - /// - /// Contains statistics about completions across all shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("completion")] - public Elastic.Clients.Elasticsearch.Serverless.CompletionStats? Completion { get; init; } - - /// - /// - /// Contains statistics about documents across all primary shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("docs")] - public Elastic.Clients.Elasticsearch.Serverless.DocStats? Docs { get; init; } - - /// - /// - /// Contains statistics about the field data cache across all shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("fielddata")] - public Elastic.Clients.Elasticsearch.Serverless.FielddataStats? Fielddata { get; init; } - - /// - /// - /// Contains statistics about flush operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("flush")] - public Elastic.Clients.Elasticsearch.Serverless.FlushStats? Flush { get; init; } - - /// - /// - /// Contains statistics about get operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("get")] - public Elastic.Clients.Elasticsearch.Serverless.GetStats? Get { get; init; } - - /// - /// - /// Contains statistics about indexing operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("indexing")] - public Elastic.Clients.Elasticsearch.Serverless.IndexingStats? Indexing { get; init; } - - /// - /// - /// Contains statistics about indices operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndicesStats? Indices { get; init; } - - /// - /// - /// Contains statistics about merge operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("merges")] - public Elastic.Clients.Elasticsearch.Serverless.MergesStats? Merges { get; init; } - - /// - /// - /// Contains statistics about the query cache across all shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("query_cache")] - public Elastic.Clients.Elasticsearch.Serverless.QueryCacheStats? QueryCache { get; init; } - - /// - /// - /// Contains statistics about recovery operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("recovery")] - public Elastic.Clients.Elasticsearch.Serverless.RecoveryStats? Recovery { get; init; } - - /// - /// - /// Contains statistics about refresh operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("refresh")] - public Elastic.Clients.Elasticsearch.Serverless.RefreshStats? Refresh { get; init; } - - /// - /// - /// Contains statistics about the request cache across all shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("request_cache")] - public Elastic.Clients.Elasticsearch.Serverless.RequestCacheStats? RequestCache { get; init; } - - /// - /// - /// Contains statistics about search operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("search")] - public Elastic.Clients.Elasticsearch.Serverless.SearchStats? Search { get; init; } - - /// - /// - /// Contains statistics about segments across all shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("segments")] - public Elastic.Clients.Elasticsearch.Serverless.SegmentsStats? Segments { get; init; } - [JsonInclude, JsonPropertyName("shard_stats")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardsTotalStats? ShardStats { get; init; } - - /// - /// - /// Contains statistics about the size of shards assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("store")] - public Elastic.Clients.Elasticsearch.Serverless.StoreStats? Store { get; init; } - - /// - /// - /// Contains statistics about transaction log operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("translog")] - public Elastic.Clients.Elasticsearch.Serverless.TranslogStats? Translog { get; init; } - - /// - /// - /// Contains statistics about index warming operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("warmer")] - public Elastic.Clients.Elasticsearch.Serverless.WarmerStats? Warmer { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs deleted file mode 100644 index 69e9ad496be..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ /dev/null @@ -1,119 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexTemplate -{ - [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; init; } - - /// - /// - /// An ordered list of component template names. - /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. - /// - /// - [JsonInclude, JsonPropertyName("composed_of")] - public IReadOnlyCollection ComposedOf { get; init; } - - /// - /// - /// If this object is included, the template is used to create data streams and their backing indices. - /// Supports an empty object. - /// Data streams require a matching index template with a data_stream object. - /// - /// - [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; init; } - - /// - /// - /// Marks this index template as deprecated. - /// When creating or updating a non-deprecated index template that uses deprecated components, - /// Elasticsearch will emit a deprecation warning. - /// - /// - [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; init; } - - /// - /// - /// A list of component template names that are allowed to be absent. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? IgnoreMissingComponentTemplates { get; init; } - - /// - /// - /// Name of the index template. - /// - /// - [JsonInclude, JsonPropertyName("index_patterns")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection IndexPatterns { get; init; } - - /// - /// - /// Optional user metadata about the index template. May have any contents. - /// This map is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// Priority to determine index template precedence when a new data stream or index is created. - /// The index template with the highest priority is chosen. - /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). - /// This number is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("priority")] - public long? Priority { get; init; } - - /// - /// - /// Template to be applied. - /// It may optionally include an aliases, mappings, or settings configuration. - /// - /// - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? Template { get; init; } - - /// - /// - /// Version number used to manage index templates externally. - /// This number is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs deleted file mode 100644 index 62ced6e40fc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexTemplateDataStreamConfiguration -{ - /// - /// - /// If true, the data stream supports custom routing. - /// - /// - [JsonInclude, JsonPropertyName("allow_custom_routing")] - public bool? AllowCustomRouting { get; init; } - - /// - /// - /// If true, the data stream is hidden. - /// - /// - [JsonInclude, JsonPropertyName("hidden")] - public bool? Hidden { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateItem.g.cs deleted file mode 100644 index 670c890ec14..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateItem.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexTemplateItem -{ - [JsonInclude, JsonPropertyName("index_template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplate IndexTemplate { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs deleted file mode 100644 index aeee17d900b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateMapping.g.cs +++ /dev/null @@ -1,415 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexTemplateMapping -{ - /// - /// - /// Aliases to add. - /// If the index template includes a data_stream object, these are data stream aliases. - /// Otherwise, these are index aliases. - /// Data stream aliases ignore the index_routing, routing, and search_routing options. - /// - /// - [JsonInclude, JsonPropertyName("aliases")] - public IDictionary? Aliases { get; set; } - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? Lifecycle { get; set; } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping parameters. - /// - /// - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; set; } - - /// - /// - /// Configuration options for the index. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; } -} - -public sealed partial class IndexTemplateMappingDescriptor : SerializableDescriptor> -{ - internal IndexTemplateMappingDescriptor(Action> configure) => configure.Invoke(this); - - public IndexTemplateMappingDescriptor() : base() - { - } - - private IDictionary> AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action> MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - - /// - /// - /// Aliases to add. - /// If the index template includes a data_stream object, these are data stream aliases. - /// Otherwise, these are index aliases. - /// Data stream aliases ignore the index_routing, routing, and search_routing options. - /// - /// - public IndexTemplateMappingDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping parameters. - /// - /// - public IndexTemplateMappingDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexTemplateMappingDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Mappings(Action> configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configuration options for the index. - /// - /// - public IndexTemplateMappingDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexTemplateMappingDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexTemplateMappingDescriptor : SerializableDescriptor -{ - internal IndexTemplateMappingDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateMappingDescriptor() : base() - { - } - - private IDictionary AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - - /// - /// - /// Aliases to add. - /// If the index template includes a data_stream object, these are data stream aliases. - /// Otherwise, these are index aliases. - /// Data stream aliases ignore the index_routing, routing, and search_routing options. - /// - /// - public IndexTemplateMappingDescriptor Aliases(Func, FluentDescriptorDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycle? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping parameters. - /// - /// - public IndexTemplateMappingDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexTemplateMappingDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Mappings(Action configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Configuration options for the index. - /// - /// - public IndexTemplateMappingDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexTemplateMappingDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateMappingDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - JsonSerializer.Serialize(writer, AliasesValue, options); - } - - if (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, options); - } - - if (MappingsDescriptor is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsDescriptor, options); - } - else if (MappingsDescriptorAction is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs deleted file mode 100644 index a13a65df15f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexTemplateSummary -{ - /// - /// - /// Aliases to add. - /// If the index template includes a data_stream object, these are data stream aliases. - /// Otherwise, these are index aliases. - /// Data stream aliases ignore the index_routing, routing, and search_routing options. - /// - /// - [JsonInclude, JsonPropertyName("aliases")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Alias))] - public IReadOnlyDictionary? Aliases { get; init; } - [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } - - /// - /// - /// Mapping for fields in the index. - /// If specified, this mapping can include field names, field data types, and mapping parameters. - /// - /// - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; init; } - - /// - /// - /// Configuration options for the index. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexUpdateAliasesAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexUpdateAliasesAction.g.cs deleted file mode 100644 index 009836d7915..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexUpdateAliasesAction.g.cs +++ /dev/null @@ -1,257 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -[JsonConverter(typeof(IndexUpdateAliasesActionConverter))] -public sealed partial class IndexUpdateAliasesAction -{ - internal IndexUpdateAliasesAction(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 IndexUpdateAliasesAction Add(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.AddAction addAction) => new IndexUpdateAliasesAction("add", addAction); - public static IndexUpdateAliasesAction Remove(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveAction removeAction) => new IndexUpdateAliasesAction("remove", removeAction); - public static IndexUpdateAliasesAction RemoveIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveIndexAction removeIndexAction) => new IndexUpdateAliasesAction("remove_index", removeIndexAction); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class IndexUpdateAliasesActionConverter : JsonConverter -{ - public override IndexUpdateAliasesAction 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; - 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 == "add") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "remove") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "remove_index") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'IndexUpdateAliasesAction' from the response."); - } - - var result = new IndexUpdateAliasesAction(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, IndexUpdateAliasesAction value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "add": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.IndexManagement.AddAction)value.Variant, options); - break; - case "remove": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveAction)value.Variant, options); - break; - case "remove_index": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveIndexAction)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexUpdateAliasesActionDescriptor : SerializableDescriptor> -{ - internal IndexUpdateAliasesActionDescriptor(Action> configure) => configure.Invoke(this); - - public IndexUpdateAliasesActionDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IndexUpdateAliasesActionDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IndexUpdateAliasesActionDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IndexUpdateAliasesActionDescriptor Add(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.AddAction addAction) => Set(addAction, "add"); - public IndexUpdateAliasesActionDescriptor Add(Action> configure) => Set(configure, "add"); - public IndexUpdateAliasesActionDescriptor Remove(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveAction removeAction) => Set(removeAction, "remove"); - public IndexUpdateAliasesActionDescriptor Remove(Action configure) => Set(configure, "remove"); - public IndexUpdateAliasesActionDescriptor RemoveIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveIndexAction removeIndexAction) => Set(removeIndexAction, "remove_index"); - public IndexUpdateAliasesActionDescriptor RemoveIndex(Action configure) => Set(configure, "remove_index"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexUpdateAliasesActionDescriptor : SerializableDescriptor -{ - internal IndexUpdateAliasesActionDescriptor(Action configure) => configure.Invoke(this); - - public IndexUpdateAliasesActionDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IndexUpdateAliasesActionDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IndexUpdateAliasesActionDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IndexUpdateAliasesActionDescriptor Add(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.AddAction addAction) => Set(addAction, "add"); - public IndexUpdateAliasesActionDescriptor Add(Action configure) => Set(configure, "add"); - public IndexUpdateAliasesActionDescriptor Remove(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveAction removeAction) => Set(removeAction, "remove"); - public IndexUpdateAliasesActionDescriptor Remove(Action configure) => Set(configure, "remove"); - public IndexUpdateAliasesActionDescriptor RemoveIndex(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RemoveIndexAction removeIndexAction) => Set(removeIndexAction, "remove_index"); - public IndexUpdateAliasesActionDescriptor RemoveIndex(Action configure) => Set(configure, "remove_index"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexVersioning.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexVersioning.g.cs deleted file mode 100644 index c6cb8a4169f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexVersioning.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexVersioning -{ - [JsonInclude, JsonPropertyName("created")] - public string? Created { get; set; } - [JsonInclude, JsonPropertyName("created_string")] - public string? CreatedString { get; set; } -} - -public sealed partial class IndexVersioningDescriptor : SerializableDescriptor -{ - internal IndexVersioningDescriptor(Action configure) => configure.Invoke(this); - - public IndexVersioningDescriptor() : base() - { - } - - private string? CreatedValue { get; set; } - private string? CreatedStringValue { get; set; } - - public IndexVersioningDescriptor Created(string? created) - { - CreatedValue = created; - return Self; - } - - public IndexVersioningDescriptor CreatedString(string? createdString) - { - CreatedStringValue = createdString; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(CreatedValue)) - { - writer.WritePropertyName("created"); - writer.WriteStringValue(CreatedValue); - } - - if (!string.IsNullOrEmpty(CreatedStringValue)) - { - writer.WritePropertyName("created_string"); - writer.WriteStringValue(CreatedStringValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressure.g.cs deleted file mode 100644 index 5aef5f07646..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressure.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexingPressure -{ - [JsonInclude, JsonPropertyName("memory")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureMemory Memory { get; set; } -} - -public sealed partial class IndexingPressureDescriptor : SerializableDescriptor -{ - internal IndexingPressureDescriptor(Action configure) => configure.Invoke(this); - - public IndexingPressureDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureMemory MemoryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureMemoryDescriptor MemoryDescriptor { get; set; } - private Action MemoryDescriptorAction { get; set; } - - public IndexingPressureDescriptor Memory(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureMemory memory) - { - MemoryDescriptor = null; - MemoryDescriptorAction = null; - MemoryValue = memory; - return Self; - } - - public IndexingPressureDescriptor Memory(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureMemoryDescriptor descriptor) - { - MemoryValue = null; - MemoryDescriptorAction = null; - MemoryDescriptor = descriptor; - return Self; - } - - public IndexingPressureDescriptor Memory(Action configure) - { - MemoryValue = null; - MemoryDescriptor = null; - MemoryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MemoryDescriptor is not null) - { - writer.WritePropertyName("memory"); - JsonSerializer.Serialize(writer, MemoryDescriptor, options); - } - else if (MemoryDescriptorAction is not null) - { - writer.WritePropertyName("memory"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureMemoryDescriptor(MemoryDescriptorAction), options); - } - else - { - writer.WritePropertyName("memory"); - JsonSerializer.Serialize(writer, MemoryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs deleted file mode 100644 index d6e8cab7ca4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs +++ /dev/null @@ -1,77 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexingPressureMemory -{ - /// - /// - /// Number of outstanding bytes that may be consumed by indexing requests. When this limit is reached or exceeded, - /// the node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit, - /// the node will reject new replica operations. Defaults to 10% of the heap. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public int? Limit { get; set; } -} - -public sealed partial class IndexingPressureMemoryDescriptor : SerializableDescriptor -{ - internal IndexingPressureMemoryDescriptor(Action configure) => configure.Invoke(this); - - public IndexingPressureMemoryDescriptor() : base() - { - } - - private int? LimitValue { get; set; } - - /// - /// - /// Number of outstanding bytes that may be consumed by indexing requests. When this limit is reached or exceeded, - /// the node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit, - /// the node will reject new replica operations. Defaults to 10% of the heap. - /// - /// - public IndexingPressureMemoryDescriptor Limit(int? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LimitValue.HasValue) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(LimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs deleted file mode 100644 index 932d2b7fe8b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexingSlowlogSettings -{ - [JsonInclude, JsonPropertyName("level")] - public string? Level { get; set; } - [JsonInclude, JsonPropertyName("reformat")] - public bool? Reformat { get; set; } - [JsonInclude, JsonPropertyName("source")] - public int? Source { get; set; } - [JsonInclude, JsonPropertyName("threshold")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogTresholds? Threshold { get; set; } -} - -public sealed partial class IndexingSlowlogSettingsDescriptor : SerializableDescriptor -{ - internal IndexingSlowlogSettingsDescriptor(Action configure) => configure.Invoke(this); - - public IndexingSlowlogSettingsDescriptor() : base() - { - } - - private string? LevelValue { get; set; } - private bool? ReformatValue { get; set; } - private int? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogTresholds? ThresholdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogTresholdsDescriptor ThresholdDescriptor { get; set; } - private Action ThresholdDescriptorAction { get; set; } - - public IndexingSlowlogSettingsDescriptor Level(string? level) - { - LevelValue = level; - return Self; - } - - public IndexingSlowlogSettingsDescriptor Reformat(bool? reformat = true) - { - ReformatValue = reformat; - return Self; - } - - public IndexingSlowlogSettingsDescriptor Source(int? source) - { - SourceValue = source; - return Self; - } - - public IndexingSlowlogSettingsDescriptor Threshold(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogTresholds? threshold) - { - ThresholdDescriptor = null; - ThresholdDescriptorAction = null; - ThresholdValue = threshold; - return Self; - } - - public IndexingSlowlogSettingsDescriptor Threshold(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogTresholdsDescriptor descriptor) - { - ThresholdValue = null; - ThresholdDescriptorAction = null; - ThresholdDescriptor = descriptor; - return Self; - } - - public IndexingSlowlogSettingsDescriptor Threshold(Action configure) - { - ThresholdValue = null; - ThresholdDescriptor = null; - ThresholdDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(LevelValue)) - { - writer.WritePropertyName("level"); - writer.WriteStringValue(LevelValue); - } - - if (ReformatValue.HasValue) - { - writer.WritePropertyName("reformat"); - writer.WriteBooleanValue(ReformatValue.Value); - } - - if (SourceValue.HasValue) - { - writer.WritePropertyName("source"); - writer.WriteNumberValue(SourceValue.Value); - } - - if (ThresholdDescriptor is not null) - { - writer.WritePropertyName("threshold"); - JsonSerializer.Serialize(writer, ThresholdDescriptor, options); - } - else if (ThresholdDescriptorAction is not null) - { - writer.WritePropertyName("threshold"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogTresholdsDescriptor(ThresholdDescriptorAction), options); - } - else if (ThresholdValue is not null) - { - writer.WritePropertyName("threshold"); - JsonSerializer.Serialize(writer, ThresholdValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogTresholds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogTresholds.g.cs deleted file mode 100644 index 3671ec3a746..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexingSlowlogTresholds.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndexingSlowlogTresholds -{ - /// - /// - /// The indexing slow log, similar in functionality to the search slow log. The log file name ends with _index_indexing_slowlog.json. - /// Log and the thresholds are configured in the same way as the search slowlog. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? Index { get; set; } -} - -public sealed partial class IndexingSlowlogTresholdsDescriptor : SerializableDescriptor -{ - internal IndexingSlowlogTresholdsDescriptor(Action configure) => configure.Invoke(this); - - public IndexingSlowlogTresholdsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor IndexDescriptor { get; set; } - private Action IndexDescriptorAction { get; set; } - - /// - /// - /// The indexing slow log, similar in functionality to the search slow log. The log file name ends with _index_indexing_slowlog.json. - /// Log and the thresholds are configured in the same way as the search slowlog. - /// - /// - public IndexingSlowlogTresholdsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexValue = index; - return Self; - } - - public IndexingSlowlogTresholdsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptor = descriptor; - return Self; - } - - public IndexingSlowlogTresholdsDescriptor Index(Action configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor(IndexDescriptorAction), options); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesStats.g.cs deleted file mode 100644 index 3ca893656a1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndicesStats -{ - [JsonInclude, JsonPropertyName("health")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus? Health { get; init; } - [JsonInclude, JsonPropertyName("primaries")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStats? Primaries { get; init; } - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyDictionary>? Shards { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexMetadataState? Status { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStats? Total { get; init; } - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesValidationExplanation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesValidationExplanation.g.cs deleted file mode 100644 index 7f051aa76a8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndicesValidationExplanation.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class IndicesValidationExplanation -{ - [JsonInclude, JsonPropertyName("error")] - public string? Error { get; init; } - [JsonInclude, JsonPropertyName("explanation")] - public string? Explanation { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("valid")] - public bool Valid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs deleted file mode 100644 index 5c9472e884d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs +++ /dev/null @@ -1,360 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -/// -/// -/// Mapping Limit Settings -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class MappingLimitSettings -{ - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("depth")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDepth? Depth { get; set; } - [JsonInclude, JsonPropertyName("dimension_fields")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDimensionFields? DimensionFields { get; set; } - [JsonInclude, JsonPropertyName("field_name_length")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsFieldNameLength? FieldNameLength { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("nested_fields")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedFields? NestedFields { get; set; } - [JsonInclude, JsonPropertyName("nested_objects")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedObjects? NestedObjects { get; set; } - [JsonInclude, JsonPropertyName("total_fields")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsTotalFields? TotalFields { get; set; } -} - -/// -/// -/// Mapping Limit Settings -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class MappingLimitSettingsDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsDescriptor() : base() - { - } - - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDepth? DepthValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDepthDescriptor DepthDescriptor { get; set; } - private Action DepthDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDimensionFields? DimensionFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDimensionFieldsDescriptor DimensionFieldsDescriptor { get; set; } - private Action DimensionFieldsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsFieldNameLength? FieldNameLengthValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsFieldNameLengthDescriptor FieldNameLengthDescriptor { get; set; } - private Action FieldNameLengthDescriptorAction { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedFields? NestedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedFieldsDescriptor NestedFieldsDescriptor { get; set; } - private Action NestedFieldsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedObjects? NestedObjectsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedObjectsDescriptor NestedObjectsDescriptor { get; set; } - private Action NestedObjectsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsTotalFields? TotalFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsTotalFieldsDescriptor TotalFieldsDescriptor { get; set; } - private Action TotalFieldsDescriptorAction { get; set; } - - public MappingLimitSettingsDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public MappingLimitSettingsDescriptor Depth(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDepth? depth) - { - DepthDescriptor = null; - DepthDescriptorAction = null; - DepthValue = depth; - return Self; - } - - public MappingLimitSettingsDescriptor Depth(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDepthDescriptor descriptor) - { - DepthValue = null; - DepthDescriptorAction = null; - DepthDescriptor = descriptor; - return Self; - } - - public MappingLimitSettingsDescriptor Depth(Action configure) - { - DepthValue = null; - DepthDescriptor = null; - DepthDescriptorAction = configure; - return Self; - } - - public MappingLimitSettingsDescriptor DimensionFields(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDimensionFields? dimensionFields) - { - DimensionFieldsDescriptor = null; - DimensionFieldsDescriptorAction = null; - DimensionFieldsValue = dimensionFields; - return Self; - } - - public MappingLimitSettingsDescriptor DimensionFields(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDimensionFieldsDescriptor descriptor) - { - DimensionFieldsValue = null; - DimensionFieldsDescriptorAction = null; - DimensionFieldsDescriptor = descriptor; - return Self; - } - - public MappingLimitSettingsDescriptor DimensionFields(Action configure) - { - DimensionFieldsValue = null; - DimensionFieldsDescriptor = null; - DimensionFieldsDescriptorAction = configure; - return Self; - } - - public MappingLimitSettingsDescriptor FieldNameLength(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsFieldNameLength? fieldNameLength) - { - FieldNameLengthDescriptor = null; - FieldNameLengthDescriptorAction = null; - FieldNameLengthValue = fieldNameLength; - return Self; - } - - public MappingLimitSettingsDescriptor FieldNameLength(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsFieldNameLengthDescriptor descriptor) - { - FieldNameLengthValue = null; - FieldNameLengthDescriptorAction = null; - FieldNameLengthDescriptor = descriptor; - return Self; - } - - public MappingLimitSettingsDescriptor FieldNameLength(Action configure) - { - FieldNameLengthValue = null; - FieldNameLengthDescriptor = null; - FieldNameLengthDescriptorAction = configure; - return Self; - } - - public MappingLimitSettingsDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public MappingLimitSettingsDescriptor NestedFields(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedFields? nestedFields) - { - NestedFieldsDescriptor = null; - NestedFieldsDescriptorAction = null; - NestedFieldsValue = nestedFields; - return Self; - } - - public MappingLimitSettingsDescriptor NestedFields(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedFieldsDescriptor descriptor) - { - NestedFieldsValue = null; - NestedFieldsDescriptorAction = null; - NestedFieldsDescriptor = descriptor; - return Self; - } - - public MappingLimitSettingsDescriptor NestedFields(Action configure) - { - NestedFieldsValue = null; - NestedFieldsDescriptor = null; - NestedFieldsDescriptorAction = configure; - return Self; - } - - public MappingLimitSettingsDescriptor NestedObjects(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedObjects? nestedObjects) - { - NestedObjectsDescriptor = null; - NestedObjectsDescriptorAction = null; - NestedObjectsValue = nestedObjects; - return Self; - } - - public MappingLimitSettingsDescriptor NestedObjects(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedObjectsDescriptor descriptor) - { - NestedObjectsValue = null; - NestedObjectsDescriptorAction = null; - NestedObjectsDescriptor = descriptor; - return Self; - } - - public MappingLimitSettingsDescriptor NestedObjects(Action configure) - { - NestedObjectsValue = null; - NestedObjectsDescriptor = null; - NestedObjectsDescriptorAction = configure; - return Self; - } - - public MappingLimitSettingsDescriptor TotalFields(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsTotalFields? totalFields) - { - TotalFieldsDescriptor = null; - TotalFieldsDescriptorAction = null; - TotalFieldsValue = totalFields; - return Self; - } - - public MappingLimitSettingsDescriptor TotalFields(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsTotalFieldsDescriptor descriptor) - { - TotalFieldsValue = null; - TotalFieldsDescriptorAction = null; - TotalFieldsDescriptor = descriptor; - return Self; - } - - public MappingLimitSettingsDescriptor TotalFields(Action configure) - { - TotalFieldsValue = null; - TotalFieldsDescriptor = null; - TotalFieldsDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (DepthDescriptor is not null) - { - writer.WritePropertyName("depth"); - JsonSerializer.Serialize(writer, DepthDescriptor, options); - } - else if (DepthDescriptorAction is not null) - { - writer.WritePropertyName("depth"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDepthDescriptor(DepthDescriptorAction), options); - } - else if (DepthValue is not null) - { - writer.WritePropertyName("depth"); - JsonSerializer.Serialize(writer, DepthValue, options); - } - - if (DimensionFieldsDescriptor is not null) - { - writer.WritePropertyName("dimension_fields"); - JsonSerializer.Serialize(writer, DimensionFieldsDescriptor, options); - } - else if (DimensionFieldsDescriptorAction is not null) - { - writer.WritePropertyName("dimension_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDimensionFieldsDescriptor(DimensionFieldsDescriptorAction), options); - } - else if (DimensionFieldsValue is not null) - { - writer.WritePropertyName("dimension_fields"); - JsonSerializer.Serialize(writer, DimensionFieldsValue, options); - } - - if (FieldNameLengthDescriptor is not null) - { - writer.WritePropertyName("field_name_length"); - JsonSerializer.Serialize(writer, FieldNameLengthDescriptor, options); - } - else if (FieldNameLengthDescriptorAction is not null) - { - writer.WritePropertyName("field_name_length"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsFieldNameLengthDescriptor(FieldNameLengthDescriptorAction), options); - } - else if (FieldNameLengthValue is not null) - { - writer.WritePropertyName("field_name_length"); - JsonSerializer.Serialize(writer, FieldNameLengthValue, options); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (NestedFieldsDescriptor is not null) - { - writer.WritePropertyName("nested_fields"); - JsonSerializer.Serialize(writer, NestedFieldsDescriptor, options); - } - else if (NestedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("nested_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedFieldsDescriptor(NestedFieldsDescriptorAction), options); - } - else if (NestedFieldsValue is not null) - { - writer.WritePropertyName("nested_fields"); - JsonSerializer.Serialize(writer, NestedFieldsValue, options); - } - - if (NestedObjectsDescriptor is not null) - { - writer.WritePropertyName("nested_objects"); - JsonSerializer.Serialize(writer, NestedObjectsDescriptor, options); - } - else if (NestedObjectsDescriptorAction is not null) - { - writer.WritePropertyName("nested_objects"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsNestedObjectsDescriptor(NestedObjectsDescriptorAction), options); - } - else if (NestedObjectsValue is not null) - { - writer.WritePropertyName("nested_objects"); - JsonSerializer.Serialize(writer, NestedObjectsValue, options); - } - - if (TotalFieldsDescriptor is not null) - { - writer.WritePropertyName("total_fields"); - JsonSerializer.Serialize(writer, TotalFieldsDescriptor, options); - } - else if (TotalFieldsDescriptorAction is not null) - { - writer.WritePropertyName("total_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsTotalFieldsDescriptor(TotalFieldsDescriptorAction), options); - } - else if (TotalFieldsValue is not null) - { - writer.WritePropertyName("total_fields"); - JsonSerializer.Serialize(writer, TotalFieldsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs deleted file mode 100644 index d60bf5c8430..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingLimitSettingsDepth -{ - /// - /// - /// The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined - /// at the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public long? Limit { get; set; } -} - -public sealed partial class MappingLimitSettingsDepthDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsDepthDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsDepthDescriptor() : base() - { - } - - private long? LimitValue { get; set; } - - /// - /// - /// The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined - /// at the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc. - /// - /// - public MappingLimitSettingsDepthDescriptor Limit(long? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LimitValue.HasValue) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(LimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs deleted file mode 100644 index 1133af14e1f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingLimitSettingsDimensionFields -{ - /// - /// - /// [preview] This functionality is in technical preview and may be changed or removed in a future release. - /// Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public long? Limit { get; set; } -} - -public sealed partial class MappingLimitSettingsDimensionFieldsDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsDimensionFieldsDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsDimensionFieldsDescriptor() : base() - { - } - - private long? LimitValue { get; set; } - - /// - /// - /// [preview] This functionality is in technical preview and may be changed or removed in a future release. - /// Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. - /// - /// - public MappingLimitSettingsDimensionFieldsDescriptor Limit(long? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LimitValue.HasValue) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(LimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs deleted file mode 100644 index 85fa93716b2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs +++ /dev/null @@ -1,77 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingLimitSettingsFieldNameLength -{ - /// - /// - /// Setting for the maximum length of a field name. This setting isn’t really something that addresses mappings explosion but - /// might still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The - /// default is okay unless a user starts to add a huge number of fields with really long names. Default is Long.MAX_VALUE (no limit). - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public long? Limit { get; set; } -} - -public sealed partial class MappingLimitSettingsFieldNameLengthDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsFieldNameLengthDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsFieldNameLengthDescriptor() : base() - { - } - - private long? LimitValue { get; set; } - - /// - /// - /// Setting for the maximum length of a field name. This setting isn’t really something that addresses mappings explosion but - /// might still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The - /// default is okay unless a user starts to add a huge number of fields with really long names. Default is Long.MAX_VALUE (no limit). - /// - /// - public MappingLimitSettingsFieldNameLengthDescriptor Limit(long? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LimitValue.HasValue) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(LimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs deleted file mode 100644 index b02aabdc182..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs +++ /dev/null @@ -1,77 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingLimitSettingsNestedFields -{ - /// - /// - /// The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when - /// arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this - /// setting limits the number of unique nested types per index. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public long? Limit { get; set; } -} - -public sealed partial class MappingLimitSettingsNestedFieldsDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsNestedFieldsDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsNestedFieldsDescriptor() : base() - { - } - - private long? LimitValue { get; set; } - - /// - /// - /// The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when - /// arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this - /// setting limits the number of unique nested types per index. - /// - /// - public MappingLimitSettingsNestedFieldsDescriptor Limit(long? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LimitValue.HasValue) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(LimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs deleted file mode 100644 index 860e1442178..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingLimitSettingsNestedObjects -{ - /// - /// - /// The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps - /// to prevent out of memory errors when a document contains too many nested objects. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public long? Limit { get; set; } -} - -public sealed partial class MappingLimitSettingsNestedObjectsDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsNestedObjectsDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsNestedObjectsDescriptor() : base() - { - } - - private long? LimitValue { get; set; } - - /// - /// - /// The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps - /// to prevent out of memory errors when a document contains too many nested objects. - /// - /// - public MappingLimitSettingsNestedObjectsDescriptor Limit(long? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LimitValue.HasValue) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(LimitValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsTotalFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsTotalFields.g.cs deleted file mode 100644 index 2bb334a6e3e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingLimitSettingsTotalFields.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingLimitSettingsTotalFields -{ - /// - /// - /// This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set - /// to false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail - /// with the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail. - /// Instead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false. - /// The fields that were not added to the mapping will be added to the _ignored field. - /// - /// - [JsonInclude, JsonPropertyName("ignore_dynamic_beyond_limit")] - public object? IgnoreDynamicBeyondLimit { get; set; } - - /// - /// - /// The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit. - /// The limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance - /// degradations and memory issues, especially in clusters with a high load or few resources. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public object? Limit { get; set; } -} - -public sealed partial class MappingLimitSettingsTotalFieldsDescriptor : SerializableDescriptor -{ - internal MappingLimitSettingsTotalFieldsDescriptor(Action configure) => configure.Invoke(this); - - public MappingLimitSettingsTotalFieldsDescriptor() : base() - { - } - - private object? IgnoreDynamicBeyondLimitValue { get; set; } - private object? LimitValue { get; set; } - - /// - /// - /// This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set - /// to false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail - /// with the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail. - /// Instead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false. - /// The fields that were not added to the mapping will be added to the _ignored field. - /// - /// - public MappingLimitSettingsTotalFieldsDescriptor IgnoreDynamicBeyondLimit(object? ignoreDynamicBeyondLimit) - { - IgnoreDynamicBeyondLimitValue = ignoreDynamicBeyondLimit; - return Self; - } - - /// - /// - /// The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit. - /// The limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance - /// degradations and memory issues, especially in clusters with a high load or few resources. - /// - /// - public MappingLimitSettingsTotalFieldsDescriptor Limit(object? limit) - { - LimitValue = limit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IgnoreDynamicBeyondLimitValue is not null) - { - writer.WritePropertyName("ignore_dynamic_beyond_limit"); - JsonSerializer.Serialize(writer, IgnoreDynamicBeyondLimitValue, options); - } - - if (LimitValue is not null) - { - writer.WritePropertyName("limit"); - JsonSerializer.Serialize(writer, LimitValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingStats.g.cs deleted file mode 100644 index c7e5c6f45ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MappingStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MappingStats -{ - [JsonInclude, JsonPropertyName("total_count")] - public long TotalCount { get; init; } - [JsonInclude, JsonPropertyName("total_estimated_overhead")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TotalEstimatedOverhead { get; init; } - [JsonInclude, JsonPropertyName("total_estimated_overhead_in_bytes")] - public long TotalEstimatedOverheadInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Merge.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Merge.g.cs deleted file mode 100644 index beee8fcd8d1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Merge.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Merge -{ - [JsonInclude, JsonPropertyName("scheduler")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeScheduler? Scheduler { get; set; } -} - -public sealed partial class MergeDescriptor : SerializableDescriptor -{ - internal MergeDescriptor(Action configure) => configure.Invoke(this); - - public MergeDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeScheduler? SchedulerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeSchedulerDescriptor SchedulerDescriptor { get; set; } - private Action SchedulerDescriptorAction { get; set; } - - public MergeDescriptor Scheduler(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeScheduler? scheduler) - { - SchedulerDescriptor = null; - SchedulerDescriptorAction = null; - SchedulerValue = scheduler; - return Self; - } - - public MergeDescriptor Scheduler(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeSchedulerDescriptor descriptor) - { - SchedulerValue = null; - SchedulerDescriptorAction = null; - SchedulerDescriptor = descriptor; - return Self; - } - - public MergeDescriptor Scheduler(Action configure) - { - SchedulerValue = null; - SchedulerDescriptor = null; - SchedulerDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SchedulerDescriptor is not null) - { - writer.WritePropertyName("scheduler"); - JsonSerializer.Serialize(writer, SchedulerDescriptor, options); - } - else if (SchedulerDescriptorAction is not null) - { - writer.WritePropertyName("scheduler"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeSchedulerDescriptor(SchedulerDescriptorAction), options); - } - else if (SchedulerValue is not null) - { - writer.WritePropertyName("scheduler"); - JsonSerializer.Serialize(writer, SchedulerValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MergeScheduler.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MergeScheduler.g.cs deleted file mode 100644 index c61ac117daa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/MergeScheduler.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class MergeScheduler -{ - [JsonInclude, JsonPropertyName("max_merge_count")] - public int? MaxMergeCount { get; set; } - [JsonInclude, JsonPropertyName("max_thread_count")] - public int? MaxThreadCount { get; set; } -} - -public sealed partial class MergeSchedulerDescriptor : SerializableDescriptor -{ - internal MergeSchedulerDescriptor(Action configure) => configure.Invoke(this); - - public MergeSchedulerDescriptor() : base() - { - } - - private int? MaxMergeCountValue { get; set; } - private int? MaxThreadCountValue { get; set; } - - public MergeSchedulerDescriptor MaxMergeCount(int? maxMergeCount) - { - MaxMergeCountValue = maxMergeCount; - return Self; - } - - public MergeSchedulerDescriptor MaxThreadCount(int? maxThreadCount) - { - MaxThreadCountValue = maxThreadCount; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxMergeCountValue.HasValue) - { - writer.WritePropertyName("max_merge_count"); - writer.WriteNumberValue(MaxMergeCountValue.Value); - } - - if (MaxThreadCountValue.HasValue) - { - writer.WritePropertyName("max_thread_count"); - writer.WriteNumberValue(MaxThreadCountValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/NumericFielddata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/NumericFielddata.g.cs deleted file mode 100644 index 4df368534fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/NumericFielddata.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class NumericFielddata -{ - [JsonInclude, JsonPropertyName("format")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataFormat Format { get; set; } -} - -public sealed partial class NumericFielddataDescriptor : SerializableDescriptor -{ - internal NumericFielddataDescriptor(Action configure) => configure.Invoke(this); - - public NumericFielddataDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataFormat FormatValue { get; set; } - - public NumericFielddataDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataFormat format) - { - FormatValue = format; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, FormatValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Overlapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Overlapping.g.cs deleted file mode 100644 index 497b86d024f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Overlapping.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Overlapping -{ - [JsonInclude, JsonPropertyName("index_patterns")] - public IReadOnlyCollection IndexPatterns { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Queries.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Queries.g.cs deleted file mode 100644 index c4c86baa6e3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Queries.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Queries -{ - [JsonInclude, JsonPropertyName("cache")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CacheQueries? Cache { get; set; } -} - -public sealed partial class QueriesDescriptor : SerializableDescriptor -{ - internal QueriesDescriptor(Action configure) => configure.Invoke(this); - - public QueriesDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CacheQueries? CacheValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CacheQueriesDescriptor CacheDescriptor { get; set; } - private Action CacheDescriptorAction { get; set; } - - public QueriesDescriptor Cache(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CacheQueries? cache) - { - CacheDescriptor = null; - CacheDescriptorAction = null; - CacheValue = cache; - return Self; - } - - public QueriesDescriptor Cache(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CacheQueriesDescriptor descriptor) - { - CacheValue = null; - CacheDescriptorAction = null; - CacheDescriptor = descriptor; - return Self; - } - - public QueriesDescriptor Cache(Action configure) - { - CacheValue = null; - CacheDescriptor = null; - CacheDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CacheDescriptor is not null) - { - writer.WritePropertyName("cache"); - JsonSerializer.Serialize(writer, CacheDescriptor, options); - } - else if (CacheDescriptorAction is not null) - { - writer.WritePropertyName("cache"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.CacheQueriesDescriptor(CacheDescriptorAction), options); - } - else if (CacheValue is not null) - { - writer.WritePropertyName("cache"); - JsonSerializer.Serialize(writer, CacheValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryBytes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryBytes.g.cs deleted file mode 100644 index cab75889b65..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryBytes.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryBytes -{ - [JsonInclude, JsonPropertyName("percent")] - public double Percent { get; init; } - [JsonInclude, JsonPropertyName("recovered")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Recovered { get; init; } - [JsonInclude, JsonPropertyName("recovered_from_snapshot")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? RecoveredFromSnapshot { get; init; } - [JsonInclude, JsonPropertyName("recovered_from_snapshot_in_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? RecoveredFromSnapshotInBytes { get; init; } - [JsonInclude, JsonPropertyName("recovered_in_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize RecoveredInBytes { get; init; } - [JsonInclude, JsonPropertyName("reused")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Reused { get; init; } - [JsonInclude, JsonPropertyName("reused_in_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize ReusedInBytes { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Total { get; init; } - [JsonInclude, JsonPropertyName("total_in_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize TotalInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryFiles.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryFiles.g.cs deleted file mode 100644 index 6819948198a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryFiles.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryFiles -{ - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyCollection? Details { get; init; } - [JsonInclude, JsonPropertyName("percent")] - public double Percent { get; init; } - [JsonInclude, JsonPropertyName("recovered")] - public long Recovered { get; init; } - [JsonInclude, JsonPropertyName("reused")] - public long Reused { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryIndexStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryIndexStatus.g.cs deleted file mode 100644 index 3a131cc7162..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryIndexStatus.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryIndexStatus -{ - [JsonInclude, JsonPropertyName("bytes")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryBytes? Bytes { get; init; } - [JsonInclude, JsonPropertyName("files")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryFiles Files { get; init; } - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryBytes Size { get; init; } - [JsonInclude, JsonPropertyName("source_throttle_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? SourceThrottleTime { get; init; } - [JsonInclude, JsonPropertyName("source_throttle_time_in_millis")] - public long SourceThrottleTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("target_throttle_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TargetThrottleTime { get; init; } - [JsonInclude, JsonPropertyName("target_throttle_time_in_millis")] - public long TargetThrottleTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs deleted file mode 100644 index 4976c5cc385..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryOrigin -{ - [JsonInclude, JsonPropertyName("bootstrap_new_history_uuid")] - public bool? BootstrapNewHistoryUuid { get; init; } - [JsonInclude, JsonPropertyName("host")] - public string? Host { get; init; } - [JsonInclude, JsonPropertyName("hostname")] - public string? Hostname { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string? Id { get; init; } - [JsonInclude, JsonPropertyName("index")] - public string? Index { get; init; } - [JsonInclude, JsonPropertyName("ip")] - public string? Ip { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } - [JsonInclude, JsonPropertyName("repository")] - public string? Repository { get; init; } - [JsonInclude, JsonPropertyName("restoreUUID")] - public string? Restoreuuid { get; init; } - [JsonInclude, JsonPropertyName("snapshot")] - public string? Snapshot { get; init; } - [JsonInclude, JsonPropertyName("transport_address")] - public string? TransportAddress { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStartStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStartStatus.g.cs deleted file mode 100644 index 7fd273ed9d9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStartStatus.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryStartStatus -{ - [JsonInclude, JsonPropertyName("check_index_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? CheckIndexTime { get; init; } - [JsonInclude, JsonPropertyName("check_index_time_in_millis")] - public long CheckIndexTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStatus.g.cs deleted file mode 100644 index dc8f87343fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RecoveryStatus.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RecoveryStatus -{ - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyCollection Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadDetails.g.cs deleted file mode 100644 index 930f83fc80a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadDetails.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ReloadDetails -{ - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("reloaded_analyzers")] - public IReadOnlyCollection ReloadedAnalyzers { get; init; } - [JsonInclude, JsonPropertyName("reloaded_node_ids")] - public IReadOnlyCollection ReloadedNodeIds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadResult.g.cs deleted file mode 100644 index 9bf98942a54..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ReloadResult.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ReloadResult -{ - [JsonInclude, JsonPropertyName("reload_details")] - public IReadOnlyCollection ReloadDetails { get; init; } - [JsonInclude, JsonPropertyName("_shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs deleted file mode 100644 index 580051e8000..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveAction.g.cs +++ /dev/null @@ -1,188 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RemoveAction -{ - /// - /// - /// Alias for the action. - /// Index alias names support date math. - /// - /// - [JsonInclude, JsonPropertyName("alias")] - public Elastic.Clients.Elasticsearch.Serverless.IndexAlias? Alias { get; set; } - - /// - /// - /// Aliases for the action. - /// Index alias names support date math. - /// - /// - [JsonInclude, JsonPropertyName("aliases")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexAlias))] - public ICollection? Aliases { get; set; } - - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - [JsonInclude, JsonPropertyName("must_exist")] - public bool? MustExist { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesAction(RemoveAction removeAction) => Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesAction.Remove(removeAction); -} - -public sealed partial class RemoveActionDescriptor : SerializableDescriptor -{ - internal RemoveActionDescriptor(Action configure) => configure.Invoke(this); - - public RemoveActionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexAlias? AliasValue { get; set; } - private ICollection? AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private bool? MustExistValue { get; set; } - - /// - /// - /// Alias for the action. - /// Index alias names support date math. - /// - /// - public RemoveActionDescriptor Alias(Elastic.Clients.Elasticsearch.Serverless.IndexAlias? alias) - { - AliasValue = alias; - return Self; - } - - /// - /// - /// Aliases for the action. - /// Index alias names support date math. - /// - /// - public RemoveActionDescriptor Aliases(ICollection? aliases) - { - AliasesValue = aliases; - return Self; - } - - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - public RemoveActionDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - public RemoveActionDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - public RemoveActionDescriptor MustExist(bool? mustExist = true) - { - MustExistValue = mustExist; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AliasValue is not null) - { - writer.WritePropertyName("alias"); - JsonSerializer.Serialize(writer, AliasValue, options); - } - - if (AliasesValue is not null) - { - writer.WritePropertyName("aliases"); - SingleOrManySerializationHelper.Serialize(AliasesValue, writer, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MustExistValue.HasValue) - { - writer.WritePropertyName("must_exist"); - writer.WriteBooleanValue(MustExistValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs deleted file mode 100644 index ad925cdd4ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs +++ /dev/null @@ -1,131 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RemoveIndexAction -{ - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - [JsonInclude, JsonPropertyName("must_exist")] - public bool? MustExist { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesAction(RemoveIndexAction removeIndexAction) => Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexUpdateAliasesAction.RemoveIndex(removeIndexAction); -} - -public sealed partial class RemoveIndexActionDescriptor : SerializableDescriptor -{ - internal RemoveIndexActionDescriptor(Action configure) => configure.Invoke(this); - - public RemoveIndexActionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private bool? MustExistValue { get; set; } - - /// - /// - /// Data stream or index for the action. - /// Supports wildcards (*). - /// - /// - public RemoveIndexActionDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Data streams or indices for the action. - /// Supports wildcards (*). - /// - /// - public RemoveIndexActionDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// If true, the alias must exist to perform the action. - /// - /// - public RemoveIndexActionDescriptor MustExist(bool? mustExist = true) - { - MustExistValue = mustExist; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MustExistValue.HasValue) - { - writer.WritePropertyName("must_exist"); - writer.WriteBooleanValue(MustExistValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexAliasItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexAliasItem.g.cs deleted file mode 100644 index 593daf169b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexAliasItem.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ResolveIndexAliasItem -{ - [JsonInclude, JsonPropertyName("indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexDataStreamsItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexDataStreamsItem.g.cs deleted file mode 100644 index 5d6e1cd7c74..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexDataStreamsItem.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ResolveIndexDataStreamsItem -{ - [JsonInclude, JsonPropertyName("backing_indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection BackingIndices { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("timestamp_field")] - public string TimestampField { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexItem.g.cs deleted file mode 100644 index e8d8b95fcc4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ResolveIndexItem.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ResolveIndexItem -{ - [JsonInclude, JsonPropertyName("aliases")] - public IReadOnlyCollection? Aliases { get; init; } - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyCollection Attributes { get; init; } - [JsonInclude, JsonPropertyName("data_stream")] - public string? DataStream { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RetentionLease.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RetentionLease.g.cs deleted file mode 100644 index ca638b06cc7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RetentionLease.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RetentionLease -{ - [JsonInclude, JsonPropertyName("period")] - public Elastic.Clients.Elasticsearch.Serverless.Duration Period { get; set; } -} - -public sealed partial class RetentionLeaseDescriptor : SerializableDescriptor -{ - internal RetentionLeaseDescriptor(Action configure) => configure.Invoke(this); - - public RetentionLeaseDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration PeriodValue { get; set; } - - public RetentionLeaseDescriptor Period(Elastic.Clients.Elasticsearch.Serverless.Duration period) - { - PeriodValue = period; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("period"); - JsonSerializer.Serialize(writer, PeriodValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RolloverConditions.g.cs deleted file mode 100644 index e05c9e040fc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/RolloverConditions.g.cs +++ /dev/null @@ -1,273 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class RolloverConditions -{ - [JsonInclude, JsonPropertyName("max_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MaxAge { get; set; } - [JsonInclude, JsonPropertyName("max_age_millis")] - public long? MaxAgeMillis { get; set; } - [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; set; } - [JsonInclude, JsonPropertyName("max_primary_shard_docs")] - public long? MaxPrimaryShardDocs { get; set; } - [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSize { get; set; } - [JsonInclude, JsonPropertyName("max_primary_shard_size_bytes")] - public long? MaxPrimaryShardSizeBytes { get; set; } - [JsonInclude, JsonPropertyName("max_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSize { get; set; } - [JsonInclude, JsonPropertyName("max_size_bytes")] - public long? MaxSizeBytes { get; set; } - [JsonInclude, JsonPropertyName("min_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MinAge { get; set; } - [JsonInclude, JsonPropertyName("min_docs")] - public long? MinDocs { get; set; } - [JsonInclude, JsonPropertyName("min_primary_shard_docs")] - public long? MinPrimaryShardDocs { get; set; } - [JsonInclude, JsonPropertyName("min_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSize { get; set; } - [JsonInclude, JsonPropertyName("min_primary_shard_size_bytes")] - public long? MinPrimaryShardSizeBytes { get; set; } - [JsonInclude, JsonPropertyName("min_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSize { get; set; } - [JsonInclude, JsonPropertyName("min_size_bytes")] - public long? MinSizeBytes { get; set; } -} - -public sealed partial class RolloverConditionsDescriptor : SerializableDescriptor -{ - internal RolloverConditionsDescriptor(Action configure) => configure.Invoke(this); - - public RolloverConditionsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? MaxAgeValue { get; set; } - private long? MaxAgeMillisValue { get; set; } - private long? MaxDocsValue { get; set; } - private long? MaxPrimaryShardDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSizeValue { get; set; } - private long? MaxPrimaryShardSizeBytesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSizeValue { get; set; } - private long? MaxSizeBytesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? MinAgeValue { get; set; } - private long? MinDocsValue { get; set; } - private long? MinPrimaryShardDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSizeValue { get; set; } - private long? MinPrimaryShardSizeBytesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSizeValue { get; set; } - private long? MinSizeBytesValue { get; set; } - - public RolloverConditionsDescriptor MaxAge(Elastic.Clients.Elasticsearch.Serverless.Duration? maxAge) - { - MaxAgeValue = maxAge; - return Self; - } - - public RolloverConditionsDescriptor MaxAgeMillis(long? maxAgeMillis) - { - MaxAgeMillisValue = maxAgeMillis; - return Self; - } - - public RolloverConditionsDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - public RolloverConditionsDescriptor MaxPrimaryShardDocs(long? maxPrimaryShardDocs) - { - MaxPrimaryShardDocsValue = maxPrimaryShardDocs; - return Self; - } - - public RolloverConditionsDescriptor MaxPrimaryShardSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxPrimaryShardSize) - { - MaxPrimaryShardSizeValue = maxPrimaryShardSize; - return Self; - } - - public RolloverConditionsDescriptor MaxPrimaryShardSizeBytes(long? maxPrimaryShardSizeBytes) - { - MaxPrimaryShardSizeBytesValue = maxPrimaryShardSizeBytes; - return Self; - } - - public RolloverConditionsDescriptor MaxSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSize) - { - MaxSizeValue = maxSize; - return Self; - } - - public RolloverConditionsDescriptor MaxSizeBytes(long? maxSizeBytes) - { - MaxSizeBytesValue = maxSizeBytes; - return Self; - } - - public RolloverConditionsDescriptor MinAge(Elastic.Clients.Elasticsearch.Serverless.Duration? minAge) - { - MinAgeValue = minAge; - return Self; - } - - public RolloverConditionsDescriptor MinDocs(long? minDocs) - { - MinDocsValue = minDocs; - return Self; - } - - public RolloverConditionsDescriptor MinPrimaryShardDocs(long? minPrimaryShardDocs) - { - MinPrimaryShardDocsValue = minPrimaryShardDocs; - return Self; - } - - public RolloverConditionsDescriptor MinPrimaryShardSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? minPrimaryShardSize) - { - MinPrimaryShardSizeValue = minPrimaryShardSize; - return Self; - } - - public RolloverConditionsDescriptor MinPrimaryShardSizeBytes(long? minPrimaryShardSizeBytes) - { - MinPrimaryShardSizeBytesValue = minPrimaryShardSizeBytes; - return Self; - } - - public RolloverConditionsDescriptor MinSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? minSize) - { - MinSizeValue = minSize; - return Self; - } - - public RolloverConditionsDescriptor MinSizeBytes(long? minSizeBytes) - { - MinSizeBytesValue = minSizeBytes; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxAgeValue is not null) - { - writer.WritePropertyName("max_age"); - JsonSerializer.Serialize(writer, MaxAgeValue, options); - } - - if (MaxAgeMillisValue.HasValue) - { - writer.WritePropertyName("max_age_millis"); - writer.WriteNumberValue(MaxAgeMillisValue.Value); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (MaxPrimaryShardDocsValue.HasValue) - { - writer.WritePropertyName("max_primary_shard_docs"); - writer.WriteNumberValue(MaxPrimaryShardDocsValue.Value); - } - - if (MaxPrimaryShardSizeValue is not null) - { - writer.WritePropertyName("max_primary_shard_size"); - JsonSerializer.Serialize(writer, MaxPrimaryShardSizeValue, options); - } - - if (MaxPrimaryShardSizeBytesValue.HasValue) - { - writer.WritePropertyName("max_primary_shard_size_bytes"); - writer.WriteNumberValue(MaxPrimaryShardSizeBytesValue.Value); - } - - if (MaxSizeValue is not null) - { - writer.WritePropertyName("max_size"); - JsonSerializer.Serialize(writer, MaxSizeValue, options); - } - - if (MaxSizeBytesValue.HasValue) - { - writer.WritePropertyName("max_size_bytes"); - writer.WriteNumberValue(MaxSizeBytesValue.Value); - } - - if (MinAgeValue is not null) - { - writer.WritePropertyName("min_age"); - JsonSerializer.Serialize(writer, MinAgeValue, options); - } - - if (MinDocsValue.HasValue) - { - writer.WritePropertyName("min_docs"); - writer.WriteNumberValue(MinDocsValue.Value); - } - - if (MinPrimaryShardDocsValue.HasValue) - { - writer.WritePropertyName("min_primary_shard_docs"); - writer.WriteNumberValue(MinPrimaryShardDocsValue.Value); - } - - if (MinPrimaryShardSizeValue is not null) - { - writer.WritePropertyName("min_primary_shard_size"); - JsonSerializer.Serialize(writer, MinPrimaryShardSizeValue, options); - } - - if (MinPrimaryShardSizeBytesValue.HasValue) - { - writer.WritePropertyName("min_primary_shard_size_bytes"); - writer.WriteNumberValue(MinPrimaryShardSizeBytesValue.Value); - } - - if (MinSizeValue is not null) - { - writer.WritePropertyName("min_size"); - JsonSerializer.Serialize(writer, MinSizeValue, options); - } - - if (MinSizeBytesValue.HasValue) - { - writer.WritePropertyName("min_size_bytes"); - writer.WriteNumberValue(MinSizeBytesValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SearchIdle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SearchIdle.g.cs deleted file mode 100644 index aa44abd1845..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SearchIdle.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SearchIdle -{ - [JsonInclude, JsonPropertyName("after")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? After { get; set; } -} - -public sealed partial class SearchIdleDescriptor : SerializableDescriptor -{ - internal SearchIdleDescriptor(Action configure) => configure.Invoke(this); - - public SearchIdleDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? AfterValue { get; set; } - - public SearchIdleDescriptor After(Elastic.Clients.Elasticsearch.Serverless.Duration? after) - { - AfterValue = after; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AfterValue is not null) - { - writer.WritePropertyName("after"); - JsonSerializer.Serialize(writer, AfterValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Segment.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Segment.g.cs deleted file mode 100644 index b99bf6dc123..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Segment.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Segment -{ - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary Attributes { get; init; } - [JsonInclude, JsonPropertyName("committed")] - public bool Committed { get; init; } - [JsonInclude, JsonPropertyName("compound")] - public bool Compound { get; init; } - [JsonInclude, JsonPropertyName("deleted_docs")] - public long DeletedDocs { get; init; } - [JsonInclude, JsonPropertyName("generation")] - public int Generation { get; init; } - [JsonInclude, JsonPropertyName("num_docs")] - public long NumDocs { get; init; } - [JsonInclude, JsonPropertyName("search")] - public bool Search { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public double SizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs deleted file mode 100644 index 0d482192161..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsAnalyze.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsAnalyze -{ - [JsonInclude, JsonPropertyName("max_token_count")] - public int? MaxTokenCount { get; set; } -} - -public sealed partial class SettingsAnalyzeDescriptor : SerializableDescriptor -{ - internal SettingsAnalyzeDescriptor(Action configure) => configure.Invoke(this); - - public SettingsAnalyzeDescriptor() : base() - { - } - - private int? MaxTokenCountValue { get; set; } - - public SettingsAnalyzeDescriptor MaxTokenCount(int? maxTokenCount) - { - MaxTokenCountValue = maxTokenCount; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxTokenCountValue.HasValue) - { - writer.WritePropertyName("max_token_count"); - writer.WriteNumberValue(MaxTokenCountValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsHighlight.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsHighlight.g.cs deleted file mode 100644 index 2f78a48feb4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsHighlight.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsHighlight -{ - [JsonInclude, JsonPropertyName("max_analyzed_offset")] - public int? MaxAnalyzedOffset { get; set; } -} - -public sealed partial class SettingsHighlightDescriptor : SerializableDescriptor -{ - internal SettingsHighlightDescriptor(Action configure) => configure.Invoke(this); - - public SettingsHighlightDescriptor() : base() - { - } - - private int? MaxAnalyzedOffsetValue { get; set; } - - public SettingsHighlightDescriptor MaxAnalyzedOffset(int? maxAnalyzedOffset) - { - MaxAnalyzedOffsetValue = maxAnalyzedOffset; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxAnalyzedOffsetValue.HasValue) - { - writer.WritePropertyName("max_analyzed_offset"); - writer.WriteNumberValue(MaxAnalyzedOffsetValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsQueryString.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsQueryString.g.cs deleted file mode 100644 index 94126f89791..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsQueryString.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsQueryString -{ - [JsonInclude, JsonPropertyName("lenient")] - public bool Lenient { get; set; } -} - -public sealed partial class SettingsQueryStringDescriptor : SerializableDescriptor -{ - internal SettingsQueryStringDescriptor(Action configure) => configure.Invoke(this); - - public SettingsQueryStringDescriptor() : base() - { - } - - private bool LenientValue { get; set; } - - public SettingsQueryStringDescriptor Lenient(bool lenient = true) - { - LenientValue = lenient; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSearch.g.cs deleted file mode 100644 index 2cc44700515..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSearch.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSearch -{ - [JsonInclude, JsonPropertyName("idle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SearchIdle? Idle { get; set; } - [JsonInclude, JsonPropertyName("slowlog")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogSettings? Slowlog { get; set; } -} - -public sealed partial class SettingsSearchDescriptor : SerializableDescriptor -{ - internal SettingsSearchDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSearchDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SearchIdle? IdleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SearchIdleDescriptor IdleDescriptor { get; set; } - private Action IdleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogSettings? SlowlogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogSettingsDescriptor SlowlogDescriptor { get; set; } - private Action SlowlogDescriptorAction { get; set; } - - public SettingsSearchDescriptor Idle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SearchIdle? idle) - { - IdleDescriptor = null; - IdleDescriptorAction = null; - IdleValue = idle; - return Self; - } - - public SettingsSearchDescriptor Idle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SearchIdleDescriptor descriptor) - { - IdleValue = null; - IdleDescriptorAction = null; - IdleDescriptor = descriptor; - return Self; - } - - public SettingsSearchDescriptor Idle(Action configure) - { - IdleValue = null; - IdleDescriptor = null; - IdleDescriptorAction = configure; - return Self; - } - - public SettingsSearchDescriptor Slowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogSettings? slowlog) - { - SlowlogDescriptor = null; - SlowlogDescriptorAction = null; - SlowlogValue = slowlog; - return Self; - } - - public SettingsSearchDescriptor Slowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogSettingsDescriptor descriptor) - { - SlowlogValue = null; - SlowlogDescriptorAction = null; - SlowlogDescriptor = descriptor; - return Self; - } - - public SettingsSearchDescriptor Slowlog(Action configure) - { - SlowlogValue = null; - SlowlogDescriptor = null; - SlowlogDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdleDescriptor is not null) - { - writer.WritePropertyName("idle"); - JsonSerializer.Serialize(writer, IdleDescriptor, options); - } - else if (IdleDescriptorAction is not null) - { - writer.WritePropertyName("idle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SearchIdleDescriptor(IdleDescriptorAction), options); - } - else if (IdleValue is not null) - { - writer.WritePropertyName("idle"); - JsonSerializer.Serialize(writer, IdleValue, options); - } - - if (SlowlogDescriptor is not null) - { - writer.WritePropertyName("slowlog"); - JsonSerializer.Serialize(writer, SlowlogDescriptor, options); - } - else if (SlowlogDescriptorAction is not null) - { - writer.WritePropertyName("slowlog"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogSettingsDescriptor(SlowlogDescriptorAction), options); - } - else if (SlowlogValue is not null) - { - writer.WritePropertyName("slowlog"); - JsonSerializer.Serialize(writer, SlowlogValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarities.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarities.g.cs deleted file mode 100644 index bbbc27724bc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarities.g.cs +++ /dev/null @@ -1,177 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public partial class SettingsSimilarities : IsADictionary -{ - public SettingsSimilarities() - { - } - - public SettingsSimilarities(IDictionary container) : base(container) - { - } - - public void Add(string name, ISettingsSimilarity settingsSimilarity) => BackingDictionary.Add(Sanitize(name), settingsSimilarity); - public bool TryGetSettingsSimilarity(string name, [NotNullWhen(returnValue: true)] out ISettingsSimilarity settingsSimilarity) => BackingDictionary.TryGetValue(Sanitize(name), out settingsSimilarity); - - public bool TryGetSettingsSimilarity(string name, [NotNullWhen(returnValue: true)] out T? settingsSimilarity) where T : class, ISettingsSimilarity - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - settingsSimilarity = finalValue; - return true; - } - - settingsSimilarity = null; - return false; - } -} - -public sealed partial class SettingsSimilaritiesDescriptor : IsADictionaryDescriptor -{ - public SettingsSimilaritiesDescriptor() : base(new SettingsSimilarities()) - { - } - - public SettingsSimilaritiesDescriptor(SettingsSimilarities settingsSimilarities) : base(settingsSimilarities ?? new SettingsSimilarities()) - { - } - - public SettingsSimilaritiesDescriptor Bm25(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Bm25(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Bm25(string settingsSimilarityName, SettingsSimilarityBm25 settingsSimilarityBm25) => AssignVariant(settingsSimilarityName, settingsSimilarityBm25); - public SettingsSimilaritiesDescriptor Boolean(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Boolean(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Boolean(string settingsSimilarityName, SettingsSimilarityBoolean settingsSimilarityBoolean) => AssignVariant(settingsSimilarityName, settingsSimilarityBoolean); - public SettingsSimilaritiesDescriptor Dfi(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Dfi(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Dfi(string settingsSimilarityName, SettingsSimilarityDfi settingsSimilarityDfi) => AssignVariant(settingsSimilarityName, settingsSimilarityDfi); - public SettingsSimilaritiesDescriptor Dfr(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Dfr(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Dfr(string settingsSimilarityName, SettingsSimilarityDfr settingsSimilarityDfr) => AssignVariant(settingsSimilarityName, settingsSimilarityDfr); - public SettingsSimilaritiesDescriptor Ib(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Ib(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Ib(string settingsSimilarityName, SettingsSimilarityIb settingsSimilarityIb) => AssignVariant(settingsSimilarityName, settingsSimilarityIb); - public SettingsSimilaritiesDescriptor Lmd(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Lmd(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Lmd(string settingsSimilarityName, SettingsSimilarityLmd settingsSimilarityLmd) => AssignVariant(settingsSimilarityName, settingsSimilarityLmd); - public SettingsSimilaritiesDescriptor Lmj(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Lmj(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Lmj(string settingsSimilarityName, SettingsSimilarityLmj settingsSimilarityLmj) => AssignVariant(settingsSimilarityName, settingsSimilarityLmj); - public SettingsSimilaritiesDescriptor Scripted(string settingsSimilarityName) => AssignVariant(settingsSimilarityName, null); - public SettingsSimilaritiesDescriptor Scripted(string settingsSimilarityName, Action configure) => AssignVariant(settingsSimilarityName, configure); - public SettingsSimilaritiesDescriptor Scripted(string settingsSimilarityName, SettingsSimilarityScripted settingsSimilarityScripted) => AssignVariant(settingsSimilarityName, settingsSimilarityScripted); -} - -internal sealed partial class SettingsSimilarityInterfaceConverter : JsonConverter -{ - public override ISettingsSimilarity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "BM25": - return JsonSerializer.Deserialize(ref reader, options); - case "boolean": - return JsonSerializer.Deserialize(ref reader, options); - case "DFI": - return JsonSerializer.Deserialize(ref reader, options); - case "DFR": - return JsonSerializer.Deserialize(ref reader, options); - case "IB": - return JsonSerializer.Deserialize(ref reader, options); - case "LMDirichlet": - return JsonSerializer.Deserialize(ref reader, options); - case "LMJelinekMercer": - return JsonSerializer.Deserialize(ref reader, options); - case "scripted": - return JsonSerializer.Deserialize(ref reader, options); - default: - ThrowHelper.ThrowUnknownTaggedUnionVariantJsonException(type, typeof(ISettingsSimilarity)); - return null; - } - } - - public override void Write(Utf8JsonWriter writer, ISettingsSimilarity value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "BM25": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityBm25), options); - return; - case "boolean": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityBoolean), options); - return; - case "DFI": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityDfi), options); - return; - case "DFR": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityDfr), options); - return; - case "IB": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityIb), options); - return; - case "LMDirichlet": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityLmd), options); - return; - case "LMJelinekMercer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityLmj), options); - return; - case "scripted": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarityScripted), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(SettingsSimilarityInterfaceConverter))] -public partial interface ISettingsSimilarity -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs deleted file mode 100644 index e4fffc4fc9e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityBm25 : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("b")] - public double? b { get; set; } - [JsonInclude, JsonPropertyName("discount_overlaps")] - public bool? DiscountOverlaps { get; set; } - [JsonInclude, JsonPropertyName("k1")] - public double? K1 { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "BM25"; -} - -public sealed partial class SettingsSimilarityBm25Descriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityBm25Descriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityBm25Descriptor() : base() - { - } - - private double? bValue { get; set; } - private bool? DiscountOverlapsValue { get; set; } - private double? K1Value { get; set; } - - public SettingsSimilarityBm25Descriptor b(double? b) - { - bValue = b; - return Self; - } - - public SettingsSimilarityBm25Descriptor DiscountOverlaps(bool? discountOverlaps = true) - { - DiscountOverlapsValue = discountOverlaps; - return Self; - } - - public SettingsSimilarityBm25Descriptor K1(double? k1) - { - K1Value = k1; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (bValue.HasValue) - { - writer.WritePropertyName("b"); - writer.WriteNumberValue(bValue.Value); - } - - if (DiscountOverlapsValue.HasValue) - { - writer.WritePropertyName("discount_overlaps"); - writer.WriteBooleanValue(DiscountOverlapsValue.Value); - } - - if (K1Value.HasValue) - { - writer.WritePropertyName("k1"); - writer.WriteNumberValue(K1Value.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("BM25"); - writer.WriteEndObject(); - } - - SettingsSimilarityBm25 IBuildableDescriptor.Build() => new() - { - b = bValue, - DiscountOverlaps = DiscountOverlapsValue, - K1 = K1Value - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBoolean.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBoolean.g.cs deleted file mode 100644 index f30ecd4760c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityBoolean.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityBoolean : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("type")] - public string Type => "boolean"; -} - -public sealed partial class SettingsSimilarityBooleanDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityBooleanDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityBooleanDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue("boolean"); - writer.WriteEndObject(); - } - - SettingsSimilarityBoolean IBuildableDescriptor.Build() => new() - { - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfi.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfi.g.cs deleted file mode 100644 index 3d28c4cd67d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfi.g.cs +++ /dev/null @@ -1,69 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityDfi : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("independence_measure")] - public Elastic.Clients.Elasticsearch.Serverless.DFIIndependenceMeasure IndependenceMeasure { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "DFI"; -} - -public sealed partial class SettingsSimilarityDfiDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityDfiDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityDfiDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.DFIIndependenceMeasure IndependenceMeasureValue { get; set; } - - public SettingsSimilarityDfiDescriptor IndependenceMeasure(Elastic.Clients.Elasticsearch.Serverless.DFIIndependenceMeasure independenceMeasure) - { - IndependenceMeasureValue = independenceMeasure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("independence_measure"); - JsonSerializer.Serialize(writer, IndependenceMeasureValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("DFI"); - writer.WriteEndObject(); - } - - SettingsSimilarityDfi IBuildableDescriptor.Build() => new() - { - IndependenceMeasure = IndependenceMeasureValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfr.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfr.g.cs deleted file mode 100644 index 86bc6723748..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityDfr.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityDfr : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("after_effect")] - public Elastic.Clients.Elasticsearch.Serverless.DFRAfterEffect AfterEffect { get; set; } - [JsonInclude, JsonPropertyName("basic_model")] - public Elastic.Clients.Elasticsearch.Serverless.DFRBasicModel BasicModel { get; set; } - [JsonInclude, JsonPropertyName("normalization")] - public Elastic.Clients.Elasticsearch.Serverless.Normalization Normalization { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "DFR"; -} - -public sealed partial class SettingsSimilarityDfrDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityDfrDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityDfrDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.DFRAfterEffect AfterEffectValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DFRBasicModel BasicModelValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Normalization NormalizationValue { get; set; } - - public SettingsSimilarityDfrDescriptor AfterEffect(Elastic.Clients.Elasticsearch.Serverless.DFRAfterEffect afterEffect) - { - AfterEffectValue = afterEffect; - return Self; - } - - public SettingsSimilarityDfrDescriptor BasicModel(Elastic.Clients.Elasticsearch.Serverless.DFRBasicModel basicModel) - { - BasicModelValue = basicModel; - return Self; - } - - public SettingsSimilarityDfrDescriptor Normalization(Elastic.Clients.Elasticsearch.Serverless.Normalization normalization) - { - NormalizationValue = normalization; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("after_effect"); - JsonSerializer.Serialize(writer, AfterEffectValue, options); - writer.WritePropertyName("basic_model"); - JsonSerializer.Serialize(writer, BasicModelValue, options); - writer.WritePropertyName("normalization"); - JsonSerializer.Serialize(writer, NormalizationValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("DFR"); - writer.WriteEndObject(); - } - - SettingsSimilarityDfr IBuildableDescriptor.Build() => new() - { - AfterEffect = AfterEffectValue, - BasicModel = BasicModelValue, - Normalization = NormalizationValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityIb.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityIb.g.cs deleted file mode 100644 index bc6b77fa451..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityIb.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityIb : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("distribution")] - public Elastic.Clients.Elasticsearch.Serverless.IBDistribution Distribution { get; set; } - [JsonInclude, JsonPropertyName("lambda")] - public Elastic.Clients.Elasticsearch.Serverless.IBLambda Lambda { get; set; } - [JsonInclude, JsonPropertyName("normalization")] - public Elastic.Clients.Elasticsearch.Serverless.Normalization Normalization { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "IB"; -} - -public sealed partial class SettingsSimilarityIbDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityIbDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityIbDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IBDistribution DistributionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IBLambda LambdaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Normalization NormalizationValue { get; set; } - - public SettingsSimilarityIbDescriptor Distribution(Elastic.Clients.Elasticsearch.Serverless.IBDistribution distribution) - { - DistributionValue = distribution; - return Self; - } - - public SettingsSimilarityIbDescriptor Lambda(Elastic.Clients.Elasticsearch.Serverless.IBLambda lambda) - { - LambdaValue = lambda; - return Self; - } - - public SettingsSimilarityIbDescriptor Normalization(Elastic.Clients.Elasticsearch.Serverless.Normalization normalization) - { - NormalizationValue = normalization; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("distribution"); - JsonSerializer.Serialize(writer, DistributionValue, options); - writer.WritePropertyName("lambda"); - JsonSerializer.Serialize(writer, LambdaValue, options); - writer.WritePropertyName("normalization"); - JsonSerializer.Serialize(writer, NormalizationValue, options); - writer.WritePropertyName("type"); - writer.WriteStringValue("IB"); - writer.WriteEndObject(); - } - - SettingsSimilarityIb IBuildableDescriptor.Build() => new() - { - Distribution = DistributionValue, - Lambda = LambdaValue, - Normalization = NormalizationValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs deleted file mode 100644 index b5bc8d4dd27..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityLmd : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("mu")] - public double? Mu { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "LMDirichlet"; -} - -public sealed partial class SettingsSimilarityLmdDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityLmdDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityLmdDescriptor() : base() - { - } - - private double? MuValue { get; set; } - - public SettingsSimilarityLmdDescriptor Mu(double? mu) - { - MuValue = mu; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MuValue.HasValue) - { - writer.WritePropertyName("mu"); - writer.WriteNumberValue(MuValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("LMDirichlet"); - writer.WriteEndObject(); - } - - SettingsSimilarityLmd IBuildableDescriptor.Build() => new() - { - Mu = MuValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs deleted file mode 100644 index 9399095bf55..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityLmj : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("lambda")] - public double? Lambda { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "LMJelinekMercer"; -} - -public sealed partial class SettingsSimilarityLmjDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityLmjDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityLmjDescriptor() : base() - { - } - - private double? LambdaValue { get; set; } - - public SettingsSimilarityLmjDescriptor Lambda(double? lambda) - { - LambdaValue = lambda; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LambdaValue.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(LambdaValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("LMJelinekMercer"); - writer.WriteEndObject(); - } - - SettingsSimilarityLmj IBuildableDescriptor.Build() => new() - { - Lambda = LambdaValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityScripted.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityScripted.g.cs deleted file mode 100644 index 67895c00710..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SettingsSimilarityScripted.g.cs +++ /dev/null @@ -1,198 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SettingsSimilarityScripted : ISettingsSimilarity -{ - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "scripted"; - - [JsonInclude, JsonPropertyName("weight_script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? WeightScript { get; set; } -} - -public sealed partial class SettingsSimilarityScriptedDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SettingsSimilarityScriptedDescriptor(Action configure) => configure.Invoke(this); - - public SettingsSimilarityScriptedDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? WeightScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor WeightScriptDescriptor { get; set; } - private Action WeightScriptDescriptorAction { get; set; } - - public SettingsSimilarityScriptedDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public SettingsSimilarityScriptedDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public SettingsSimilarityScriptedDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public SettingsSimilarityScriptedDescriptor WeightScript(Elastic.Clients.Elasticsearch.Serverless.Script? weightScript) - { - WeightScriptDescriptor = null; - WeightScriptDescriptorAction = null; - WeightScriptValue = weightScript; - return Self; - } - - public SettingsSimilarityScriptedDescriptor WeightScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - WeightScriptValue = null; - WeightScriptDescriptorAction = null; - WeightScriptDescriptor = descriptor; - return Self; - } - - public SettingsSimilarityScriptedDescriptor WeightScript(Action configure) - { - WeightScriptValue = null; - WeightScriptDescriptor = null; - WeightScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("scripted"); - if (WeightScriptDescriptor is not null) - { - writer.WritePropertyName("weight_script"); - JsonSerializer.Serialize(writer, WeightScriptDescriptor, options); - } - else if (WeightScriptDescriptorAction is not null) - { - writer.WritePropertyName("weight_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(WeightScriptDescriptorAction), options); - } - else if (WeightScriptValue is not null) - { - writer.WritePropertyName("weight_script"); - JsonSerializer.Serialize(writer, WeightScriptValue, options); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildWeightScript() - { - if (WeightScriptValue is not null) - { - return WeightScriptValue; - } - - if ((object)WeightScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (WeightScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(WeightScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - SettingsSimilarityScripted IBuildableDescriptor.Build() => new() - { - Script = BuildScript(), - WeightScript = BuildWeightScript() - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardCommit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardCommit.g.cs deleted file mode 100644 index 69c1039b6f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardCommit.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardCommit -{ - [JsonInclude, JsonPropertyName("generation")] - public int Generation { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("num_docs")] - public long NumDocs { get; init; } - [JsonInclude, JsonPropertyName("user_data")] - public IReadOnlyDictionary UserData { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs deleted file mode 100644 index f437e50f6ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardFileSizeInfo -{ - [JsonInclude, JsonPropertyName("average_size_in_bytes")] - public long? AverageSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("max_size_in_bytes")] - public long? MaxSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("min_size_in_bytes")] - public long? MinSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardLease.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardLease.g.cs deleted file mode 100644 index 0c2e555d599..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardLease.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardLease -{ - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("retaining_seq_no")] - public long RetainingSeqNo { get; init; } - [JsonInclude, JsonPropertyName("source")] - public string Source { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardPath.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardPath.g.cs deleted file mode 100644 index 27d82a2818b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardPath.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardPath -{ - [JsonInclude, JsonPropertyName("data_path")] - public string DataPath { get; init; } - [JsonInclude, JsonPropertyName("is_custom_data_path")] - public bool IsCustomDataPath { get; init; } - [JsonInclude, JsonPropertyName("state_path")] - public string StatePath { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardQueryCache.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardQueryCache.g.cs deleted file mode 100644 index b5f277c442d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardQueryCache.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardQueryCache -{ - [JsonInclude, JsonPropertyName("cache_count")] - public long CacheCount { get; init; } - [JsonInclude, JsonPropertyName("cache_size")] - public long CacheSize { get; init; } - [JsonInclude, JsonPropertyName("evictions")] - public long Evictions { get; init; } - [JsonInclude, JsonPropertyName("hit_count")] - public long HitCount { get; init; } - [JsonInclude, JsonPropertyName("memory_size_in_bytes")] - public long MemorySizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("miss_count")] - public long MissCount { get; init; } - [JsonInclude, JsonPropertyName("total_count")] - public long TotalCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRecovery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRecovery.g.cs deleted file mode 100644 index f5830874bfb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRecovery.g.cs +++ /dev/null @@ -1,64 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardRecovery -{ - [JsonInclude, JsonPropertyName("id")] - public long Id { get; init; } - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryIndexStatus Index { get; init; } - [JsonInclude, JsonPropertyName("primary")] - public bool Primary { get; init; } - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryOrigin Source { get; init; } - [JsonInclude, JsonPropertyName("stage")] - public string Stage { get; init; } - [JsonInclude, JsonPropertyName("start")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryStartStatus? Start { get; init; } - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset? StartTime { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("stop_time")] - public DateTimeOffset? StopTime { get; init; } - [JsonInclude, JsonPropertyName("stop_time_in_millis")] - public long? StopTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("target")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RecoveryOrigin Target { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("translog")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogStatus Translog { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } - [JsonInclude, JsonPropertyName("verify_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.VerifyIndex VerifyIndex { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRetentionLeases.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRetentionLeases.g.cs deleted file mode 100644 index 8b42e634c8f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRetentionLeases.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardRetentionLeases -{ - [JsonInclude, JsonPropertyName("leases")] - public IReadOnlyCollection Leases { get; init; } - [JsonInclude, JsonPropertyName("primary_term")] - public long PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRouting.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRouting.g.cs deleted file mode 100644 index c07c2615e56..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardRouting.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardRouting -{ - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } - [JsonInclude, JsonPropertyName("primary")] - public bool Primary { get; init; } - [JsonInclude, JsonPropertyName("relocating_node")] - public string? RelocatingNode { get; init; } - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardRoutingState State { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSegmentRouting.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSegmentRouting.g.cs deleted file mode 100644 index 1bb2d1c9baa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSegmentRouting.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardSegmentRouting -{ - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } - [JsonInclude, JsonPropertyName("primary")] - public bool Primary { get; init; } - [JsonInclude, JsonPropertyName("state")] - public string State { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSequenceNumber.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSequenceNumber.g.cs deleted file mode 100644 index 4b7e5a26ad4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardSequenceNumber.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardSequenceNumber -{ - [JsonInclude, JsonPropertyName("global_checkpoint")] - public long GlobalCheckpoint { get; init; } - [JsonInclude, JsonPropertyName("local_checkpoint")] - public long LocalCheckpoint { get; init; } - [JsonInclude, JsonPropertyName("max_seq_no")] - public long MaxSeqNo { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardStats.g.cs deleted file mode 100644 index ff095a57b5e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardStats.g.cs +++ /dev/null @@ -1,85 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardStats -{ - [JsonInclude, JsonPropertyName("bulk")] - public Elastic.Clients.Elasticsearch.Serverless.BulkStats? Bulk { get; init; } - [JsonInclude, JsonPropertyName("commit")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardCommit? Commit { get; init; } - [JsonInclude, JsonPropertyName("completion")] - public Elastic.Clients.Elasticsearch.Serverless.CompletionStats? Completion { get; init; } - [JsonInclude, JsonPropertyName("docs")] - public Elastic.Clients.Elasticsearch.Serverless.DocStats? Docs { get; init; } - [JsonInclude, JsonPropertyName("fielddata")] - public Elastic.Clients.Elasticsearch.Serverless.FielddataStats? Fielddata { get; init; } - [JsonInclude, JsonPropertyName("flush")] - public Elastic.Clients.Elasticsearch.Serverless.FlushStats? Flush { get; init; } - [JsonInclude, JsonPropertyName("get")] - public Elastic.Clients.Elasticsearch.Serverless.GetStats? Get { get; init; } - [JsonInclude, JsonPropertyName("indexing")] - public Elastic.Clients.Elasticsearch.Serverless.IndexingStats? Indexing { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndicesStats? Indices { get; init; } - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingStats? Mappings { get; init; } - [JsonInclude, JsonPropertyName("merges")] - public Elastic.Clients.Elasticsearch.Serverless.MergesStats? Merges { get; init; } - [JsonInclude, JsonPropertyName("query_cache")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardQueryCache? QueryCache { get; init; } - [JsonInclude, JsonPropertyName("recovery")] - public Elastic.Clients.Elasticsearch.Serverless.RecoveryStats? Recovery { get; init; } - [JsonInclude, JsonPropertyName("refresh")] - public Elastic.Clients.Elasticsearch.Serverless.RefreshStats? Refresh { get; init; } - [JsonInclude, JsonPropertyName("request_cache")] - public Elastic.Clients.Elasticsearch.Serverless.RequestCacheStats? RequestCache { get; init; } - [JsonInclude, JsonPropertyName("retention_leases")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardRetentionLeases? RetentionLeases { get; init; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardRouting? Routing { get; init; } - [JsonInclude, JsonPropertyName("search")] - public Elastic.Clients.Elasticsearch.Serverless.SearchStats? Search { get; init; } - [JsonInclude, JsonPropertyName("segments")] - public Elastic.Clients.Elasticsearch.Serverless.SegmentsStats? Segments { get; init; } - [JsonInclude, JsonPropertyName("seq_no")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardSequenceNumber? SeqNo { get; init; } - [JsonInclude, JsonPropertyName("shard_path")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardPath? ShardPath { get; init; } - [JsonInclude, JsonPropertyName("shards")] - [ReadOnlyIndexNameDictionaryConverter(typeof(object))] - public IReadOnlyDictionary? Shards { get; init; } - [JsonInclude, JsonPropertyName("shard_stats")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardsTotalStats? ShardStats2 { get; init; } - [JsonInclude, JsonPropertyName("store")] - public Elastic.Clients.Elasticsearch.Serverless.StoreStats? Store { get; init; } - [JsonInclude, JsonPropertyName("translog")] - public Elastic.Clients.Elasticsearch.Serverless.TranslogStats? Translog { get; init; } - [JsonInclude, JsonPropertyName("warmer")] - public Elastic.Clients.Elasticsearch.Serverless.WarmerStats? Warmer { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsSegment.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsSegment.g.cs deleted file mode 100644 index bac024e1c59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsSegment.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardsSegment -{ - [JsonInclude, JsonPropertyName("num_committed_segments")] - public int NumCommittedSegments { get; init; } - [JsonInclude, JsonPropertyName("num_search_segments")] - public int NumSearchSegments { get; init; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardSegmentRouting Routing { get; init; } - [JsonInclude, JsonPropertyName("segments")] - public IReadOnlyDictionary Segments { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsTotalStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsTotalStats.g.cs deleted file mode 100644 index c75a82ef45e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/ShardsTotalStats.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class ShardsTotalStats -{ - [JsonInclude, JsonPropertyName("total_count")] - public long TotalCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogSettings.g.cs deleted file mode 100644 index 55a56911276..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogSettings.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SlowlogSettings -{ - [JsonInclude, JsonPropertyName("level")] - public string? Level { get; set; } - [JsonInclude, JsonPropertyName("reformat")] - public bool? Reformat { get; set; } - [JsonInclude, JsonPropertyName("source")] - public int? Source { get; set; } - [JsonInclude, JsonPropertyName("threshold")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholds? Threshold { get; set; } -} - -public sealed partial class SlowlogSettingsDescriptor : SerializableDescriptor -{ - internal SlowlogSettingsDescriptor(Action configure) => configure.Invoke(this); - - public SlowlogSettingsDescriptor() : base() - { - } - - private string? LevelValue { get; set; } - private bool? ReformatValue { get; set; } - private int? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholds? ThresholdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdsDescriptor ThresholdDescriptor { get; set; } - private Action ThresholdDescriptorAction { get; set; } - - public SlowlogSettingsDescriptor Level(string? level) - { - LevelValue = level; - return Self; - } - - public SlowlogSettingsDescriptor Reformat(bool? reformat = true) - { - ReformatValue = reformat; - return Self; - } - - public SlowlogSettingsDescriptor Source(int? source) - { - SourceValue = source; - return Self; - } - - public SlowlogSettingsDescriptor Threshold(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholds? threshold) - { - ThresholdDescriptor = null; - ThresholdDescriptorAction = null; - ThresholdValue = threshold; - return Self; - } - - public SlowlogSettingsDescriptor Threshold(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdsDescriptor descriptor) - { - ThresholdValue = null; - ThresholdDescriptorAction = null; - ThresholdDescriptor = descriptor; - return Self; - } - - public SlowlogSettingsDescriptor Threshold(Action configure) - { - ThresholdValue = null; - ThresholdDescriptor = null; - ThresholdDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(LevelValue)) - { - writer.WritePropertyName("level"); - writer.WriteStringValue(LevelValue); - } - - if (ReformatValue.HasValue) - { - writer.WritePropertyName("reformat"); - writer.WriteBooleanValue(ReformatValue.Value); - } - - if (SourceValue.HasValue) - { - writer.WritePropertyName("source"); - writer.WriteNumberValue(SourceValue.Value); - } - - if (ThresholdDescriptor is not null) - { - writer.WritePropertyName("threshold"); - JsonSerializer.Serialize(writer, ThresholdDescriptor, options); - } - else if (ThresholdDescriptorAction is not null) - { - writer.WritePropertyName("threshold"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdsDescriptor(ThresholdDescriptorAction), options); - } - else if (ThresholdValue is not null) - { - writer.WritePropertyName("threshold"); - JsonSerializer.Serialize(writer, ThresholdValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholdLevels.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholdLevels.g.cs deleted file mode 100644 index 21a955e447e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholdLevels.g.cs +++ /dev/null @@ -1,108 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SlowlogTresholdLevels -{ - [JsonInclude, JsonPropertyName("debug")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Debug { get; set; } - [JsonInclude, JsonPropertyName("info")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Info { get; set; } - [JsonInclude, JsonPropertyName("trace")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Trace { get; set; } - [JsonInclude, JsonPropertyName("warn")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Warn { get; set; } -} - -public sealed partial class SlowlogTresholdLevelsDescriptor : SerializableDescriptor -{ - internal SlowlogTresholdLevelsDescriptor(Action configure) => configure.Invoke(this); - - public SlowlogTresholdLevelsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? DebugValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? InfoValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TraceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? WarnValue { get; set; } - - public SlowlogTresholdLevelsDescriptor Debug(Elastic.Clients.Elasticsearch.Serverless.Duration? debug) - { - DebugValue = debug; - return Self; - } - - public SlowlogTresholdLevelsDescriptor Info(Elastic.Clients.Elasticsearch.Serverless.Duration? info) - { - InfoValue = info; - return Self; - } - - public SlowlogTresholdLevelsDescriptor Trace(Elastic.Clients.Elasticsearch.Serverless.Duration? trace) - { - TraceValue = trace; - return Self; - } - - public SlowlogTresholdLevelsDescriptor Warn(Elastic.Clients.Elasticsearch.Serverless.Duration? warn) - { - WarnValue = warn; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DebugValue is not null) - { - writer.WritePropertyName("debug"); - JsonSerializer.Serialize(writer, DebugValue, options); - } - - if (InfoValue is not null) - { - writer.WritePropertyName("info"); - JsonSerializer.Serialize(writer, InfoValue, options); - } - - if (TraceValue is not null) - { - writer.WritePropertyName("trace"); - JsonSerializer.Serialize(writer, TraceValue, options); - } - - if (WarnValue is not null) - { - writer.WritePropertyName("warn"); - JsonSerializer.Serialize(writer, WarnValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholds.g.cs deleted file mode 100644 index 33bd4dddd97..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SlowlogTresholds.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SlowlogTresholds -{ - [JsonInclude, JsonPropertyName("fetch")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? Fetch { get; set; } - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? Query { get; set; } -} - -public sealed partial class SlowlogTresholdsDescriptor : SerializableDescriptor -{ - internal SlowlogTresholdsDescriptor(Action configure) => configure.Invoke(this); - - public SlowlogTresholdsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? FetchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor FetchDescriptor { get; set; } - private Action FetchDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - - public SlowlogTresholdsDescriptor Fetch(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? fetch) - { - FetchDescriptor = null; - FetchDescriptorAction = null; - FetchValue = fetch; - return Self; - } - - public SlowlogTresholdsDescriptor Fetch(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor descriptor) - { - FetchValue = null; - FetchDescriptorAction = null; - FetchDescriptor = descriptor; - return Self; - } - - public SlowlogTresholdsDescriptor Fetch(Action configure) - { - FetchValue = null; - FetchDescriptor = null; - FetchDescriptorAction = configure; - return Self; - } - - public SlowlogTresholdsDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevels? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SlowlogTresholdsDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SlowlogTresholdsDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FetchDescriptor is not null) - { - writer.WritePropertyName("fetch"); - JsonSerializer.Serialize(writer, FetchDescriptor, options); - } - else if (FetchDescriptorAction is not null) - { - writer.WritePropertyName("fetch"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor(FetchDescriptorAction), options); - } - else if (FetchValue is not null) - { - writer.WritePropertyName("fetch"); - JsonSerializer.Serialize(writer, FetchValue, options); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SlowlogTresholdLevelsDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SoftDeletes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SoftDeletes.g.cs deleted file mode 100644 index 7a86dfc4ff6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/SoftDeletes.g.cs +++ /dev/null @@ -1,135 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class SoftDeletes -{ - /// - /// - /// Indicates whether soft deletes are enabled on the index. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - - /// - /// - /// The maximum period to retain a shard history retention lease before it is considered expired. - /// Shard history retention leases ensure that soft deletes are retained during merges on the Lucene - /// index. If a soft delete is merged away before it can be replicated to a follower the following - /// process will fail due to incomplete history on the leader. - /// - /// - [JsonInclude, JsonPropertyName("retention_lease")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RetentionLease? RetentionLease { get; set; } -} - -public sealed partial class SoftDeletesDescriptor : SerializableDescriptor -{ - internal SoftDeletesDescriptor(Action configure) => configure.Invoke(this); - - public SoftDeletesDescriptor() : base() - { - } - - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RetentionLease? RetentionLeaseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RetentionLeaseDescriptor RetentionLeaseDescriptor { get; set; } - private Action RetentionLeaseDescriptorAction { get; set; } - - /// - /// - /// Indicates whether soft deletes are enabled on the index. - /// - /// - public SoftDeletesDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - /// - /// - /// The maximum period to retain a shard history retention lease before it is considered expired. - /// Shard history retention leases ensure that soft deletes are retained during merges on the Lucene - /// index. If a soft delete is merged away before it can be replicated to a follower the following - /// process will fail due to incomplete history on the leader. - /// - /// - public SoftDeletesDescriptor RetentionLease(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RetentionLease? retentionLease) - { - RetentionLeaseDescriptor = null; - RetentionLeaseDescriptorAction = null; - RetentionLeaseValue = retentionLease; - return Self; - } - - public SoftDeletesDescriptor RetentionLease(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RetentionLeaseDescriptor descriptor) - { - RetentionLeaseValue = null; - RetentionLeaseDescriptorAction = null; - RetentionLeaseDescriptor = descriptor; - return Self; - } - - public SoftDeletesDescriptor RetentionLease(Action configure) - { - RetentionLeaseValue = null; - RetentionLeaseDescriptor = null; - RetentionLeaseDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (RetentionLeaseDescriptor is not null) - { - writer.WritePropertyName("retention_lease"); - JsonSerializer.Serialize(writer, RetentionLeaseDescriptor, options); - } - else if (RetentionLeaseDescriptorAction is not null) - { - writer.WritePropertyName("retention_lease"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.RetentionLeaseDescriptor(RetentionLeaseDescriptorAction), options); - } - else if (RetentionLeaseValue is not null) - { - writer.WritePropertyName("retention_lease"); - JsonSerializer.Serialize(writer, RetentionLeaseValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Storage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Storage.g.cs deleted file mode 100644 index d24cf487179..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Storage.g.cs +++ /dev/null @@ -1,90 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Storage -{ - /// - /// - /// You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap. - /// This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This - /// setting is useful, for example, if you are in an environment where you can not control the ability to create a lot - /// of memory maps so you need disable the ability to use memory-mapping. - /// - /// - [JsonInclude, JsonPropertyName("allow_mmap")] - public bool? AllowMmap { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageType Type { get; set; } -} - -public sealed partial class StorageDescriptor : SerializableDescriptor -{ - internal StorageDescriptor(Action configure) => configure.Invoke(this); - - public StorageDescriptor() : base() - { - } - - private bool? AllowMmapValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageType TypeValue { get; set; } - - /// - /// - /// You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap. - /// This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This - /// setting is useful, for example, if you are in an environment where you can not control the ability to create a lot - /// of memory maps so you need disable the ability to use memory-mapping. - /// - /// - public StorageDescriptor AllowMmap(bool? allowMmap = true) - { - AllowMmapValue = allowMmap; - return Self; - } - - public StorageDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowMmapValue.HasValue) - { - writer.WritePropertyName("allow_mmap"); - writer.WriteBooleanValue(AllowMmapValue.Value); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Template.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Template.g.cs deleted file mode 100644 index d5eee844bc2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Template.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Template -{ - [JsonInclude, JsonPropertyName("aliases")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Alias))] - public IReadOnlyDictionary Aliases { get; init; } - [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping Mappings { get; init; } - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings Settings { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TokenDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TokenDetail.g.cs deleted file mode 100644 index 060b1505a10..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TokenDetail.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class TokenDetail -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("tokens")] - public IReadOnlyCollection Tokens { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Translog.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Translog.g.cs deleted file mode 100644 index 5d44519a217..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/Translog.g.cs +++ /dev/null @@ -1,180 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class Translog -{ - /// - /// - /// Whether or not to fsync and commit the translog after every index, delete, update, or bulk request. - /// - /// - [JsonInclude, JsonPropertyName("durability")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDurability? Durability { get; set; } - - /// - /// - /// The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not - /// part of a Lucene commit point). Although these operations are available for reads, they will need - /// to be replayed if the shard was stopped and had to be recovered. This setting controls the - /// maximum total size of these operations, to prevent recoveries from taking too long. Once the - /// maximum size has been reached a flush will happen, generating a new Lucene commit point. - /// - /// - [JsonInclude, JsonPropertyName("flush_threshold_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? FlushThresholdSize { get; set; } - [JsonInclude, JsonPropertyName("retention")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogRetention? Retention { get; set; } - - /// - /// - /// How often the translog is fsynced to disk and committed, regardless of write operations. - /// Values less than 100ms are not allowed. - /// - /// - [JsonInclude, JsonPropertyName("sync_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? SyncInterval { get; set; } -} - -public sealed partial class TranslogDescriptor : SerializableDescriptor -{ - internal TranslogDescriptor(Action configure) => configure.Invoke(this); - - public TranslogDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDurability? DurabilityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? FlushThresholdSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogRetention? RetentionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogRetentionDescriptor RetentionDescriptor { get; set; } - private Action RetentionDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? SyncIntervalValue { get; set; } - - /// - /// - /// Whether or not to fsync and commit the translog after every index, delete, update, or bulk request. - /// - /// - public TranslogDescriptor Durability(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDurability? durability) - { - DurabilityValue = durability; - return Self; - } - - /// - /// - /// The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not - /// part of a Lucene commit point). Although these operations are available for reads, they will need - /// to be replayed if the shard was stopped and had to be recovered. This setting controls the - /// maximum total size of these operations, to prevent recoveries from taking too long. Once the - /// maximum size has been reached a flush will happen, generating a new Lucene commit point. - /// - /// - public TranslogDescriptor FlushThresholdSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? flushThresholdSize) - { - FlushThresholdSizeValue = flushThresholdSize; - return Self; - } - - public TranslogDescriptor Retention(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogRetention? retention) - { - RetentionDescriptor = null; - RetentionDescriptorAction = null; - RetentionValue = retention; - return Self; - } - - public TranslogDescriptor Retention(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogRetentionDescriptor descriptor) - { - RetentionValue = null; - RetentionDescriptorAction = null; - RetentionDescriptor = descriptor; - return Self; - } - - public TranslogDescriptor Retention(Action configure) - { - RetentionValue = null; - RetentionDescriptor = null; - RetentionDescriptorAction = configure; - return Self; - } - - /// - /// - /// How often the translog is fsynced to disk and committed, regardless of write operations. - /// Values less than 100ms are not allowed. - /// - /// - public TranslogDescriptor SyncInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? syncInterval) - { - SyncIntervalValue = syncInterval; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DurabilityValue is not null) - { - writer.WritePropertyName("durability"); - JsonSerializer.Serialize(writer, DurabilityValue, options); - } - - if (FlushThresholdSizeValue is not null) - { - writer.WritePropertyName("flush_threshold_size"); - JsonSerializer.Serialize(writer, FlushThresholdSizeValue, options); - } - - if (RetentionDescriptor is not null) - { - writer.WritePropertyName("retention"); - JsonSerializer.Serialize(writer, RetentionDescriptor, options); - } - else if (RetentionDescriptorAction is not null) - { - writer.WritePropertyName("retention"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogRetentionDescriptor(RetentionDescriptorAction), options); - } - else if (RetentionValue is not null) - { - writer.WritePropertyName("retention"); - JsonSerializer.Serialize(writer, RetentionValue, options); - } - - if (SyncIntervalValue is not null) - { - writer.WritePropertyName("sync_interval"); - JsonSerializer.Serialize(writer, SyncIntervalValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogRetention.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogRetention.g.cs deleted file mode 100644 index f75d4f1b16a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogRetention.g.cs +++ /dev/null @@ -1,115 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class TranslogRetention -{ - /// - /// - /// This controls the maximum duration for which translog files are kept by each shard. Keeping more - /// translog files increases the chance of performing an operation based sync when recovering replicas. If - /// the translog files are not sufficient, replica recovery will fall back to a file based sync. This setting - /// is ignored, and should not be set, if soft deletes are enabled. Soft deletes are enabled by default in - /// indices created in Elasticsearch versions 7.0.0 and later. - /// - /// - [JsonInclude, JsonPropertyName("age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Age { get; set; } - - /// - /// - /// This controls the total size of translog files to keep for each shard. Keeping more translog files increases - /// the chance of performing an operation based sync when recovering a replica. If the translog files are not - /// sufficient, replica recovery will fall back to a file based sync. This setting is ignored, and should not be - /// set, if soft deletes are enabled. Soft deletes are enabled by default in indices created in Elasticsearch - /// versions 7.0.0 and later. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Size { get; set; } -} - -public sealed partial class TranslogRetentionDescriptor : SerializableDescriptor -{ - internal TranslogRetentionDescriptor(Action configure) => configure.Invoke(this); - - public TranslogRetentionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? AgeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? SizeValue { get; set; } - - /// - /// - /// This controls the maximum duration for which translog files are kept by each shard. Keeping more - /// translog files increases the chance of performing an operation based sync when recovering replicas. If - /// the translog files are not sufficient, replica recovery will fall back to a file based sync. This setting - /// is ignored, and should not be set, if soft deletes are enabled. Soft deletes are enabled by default in - /// indices created in Elasticsearch versions 7.0.0 and later. - /// - /// - public TranslogRetentionDescriptor Age(Elastic.Clients.Elasticsearch.Serverless.Duration? age) - { - AgeValue = age; - return Self; - } - - /// - /// - /// This controls the total size of translog files to keep for each shard. Keeping more translog files increases - /// the chance of performing an operation based sync when recovering a replica. If the translog files are not - /// sufficient, replica recovery will fall back to a file based sync. This setting is ignored, and should not be - /// set, if soft deletes are enabled. Soft deletes are enabled by default in indices created in Elasticsearch - /// versions 7.0.0 and later. - /// - /// - public TranslogRetentionDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.ByteSize? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AgeValue is not null) - { - writer.WritePropertyName("age"); - JsonSerializer.Serialize(writer, AgeValue, options); - } - - if (SizeValue is not null) - { - writer.WritePropertyName("size"); - JsonSerializer.Serialize(writer, SizeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogStatus.g.cs deleted file mode 100644 index bd66679ffc6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/TranslogStatus.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class TranslogStatus -{ - [JsonInclude, JsonPropertyName("percent")] - public double Percent { get; init; } - [JsonInclude, JsonPropertyName("recovered")] - public long Recovered { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } - [JsonInclude, JsonPropertyName("total_on_start")] - public long TotalOnStart { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/VerifyIndex.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/VerifyIndex.g.cs deleted file mode 100644 index f70d7162de6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/VerifyIndex.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; - -public sealed partial class VerifyIndex -{ - [JsonInclude, JsonPropertyName("check_index_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? CheckIndexTime { get; init; } - [JsonInclude, JsonPropertyName("check_index_time_in_millis")] - public long CheckIndexTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexingStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexingStats.g.cs deleted file mode 100644 index 7b00176e9bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexingStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class IndexingStats -{ - [JsonInclude, JsonPropertyName("delete_current")] - public long DeleteCurrent { get; init; } - [JsonInclude, JsonPropertyName("delete_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? DeleteTime { get; init; } - [JsonInclude, JsonPropertyName("delete_time_in_millis")] - public long DeleteTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("delete_total")] - public long DeleteTotal { get; init; } - [JsonInclude, JsonPropertyName("index_current")] - public long IndexCurrent { get; init; } - [JsonInclude, JsonPropertyName("index_failed")] - public long IndexFailed { get; init; } - [JsonInclude, JsonPropertyName("index_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? IndexTime { get; init; } - [JsonInclude, JsonPropertyName("index_time_in_millis")] - public long IndexTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("index_total")] - public long IndexTotal { get; init; } - [JsonInclude, JsonPropertyName("is_throttled")] - public bool IsThrottled { get; init; } - [JsonInclude, JsonPropertyName("noop_update_total")] - public long NoopUpdateTotal { get; init; } - [JsonInclude, JsonPropertyName("throttle_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ThrottleTime { get; init; } - [JsonInclude, JsonPropertyName("throttle_time_in_millis")] - public long ThrottleTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("types")] - public IReadOnlyDictionary? Types { get; init; } - [JsonInclude, JsonPropertyName("write_load")] - public double? WriteLoad { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndicesOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndicesOptions.g.cs deleted file mode 100644 index a71d5c87c47..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndicesOptions.g.cs +++ /dev/null @@ -1,172 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded -/// to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices. -/// -/// -public sealed partial class IndicesOptions -{ - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only - /// missing or closed indices. This behavior applies even if the request targets other open indices. For example, - /// a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - [JsonInclude, JsonPropertyName("allow_no_indices")] - public bool? AllowNoIndices { get; set; } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument - /// determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - /// such as open,hidden. - /// - /// - [JsonInclude, JsonPropertyName("expand_wildcards")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.ExpandWildcard))] - public ICollection? ExpandWildcards { get; set; } - - /// - /// - /// If true, concrete, expanded or aliased indices are ignored when frozen. - /// - /// - [JsonInclude, JsonPropertyName("ignore_throttled")] - public bool? IgnoreThrottled { get; set; } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unavailable")] - public bool? IgnoreUnavailable { get; set; } -} - -/// -/// -/// Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded -/// to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices. -/// -/// -public sealed partial class IndicesOptionsDescriptor : SerializableDescriptor -{ - internal IndicesOptionsDescriptor(Action configure) => configure.Invoke(this); - - public IndicesOptionsDescriptor() : base() - { - } - - private bool? AllowNoIndicesValue { get; set; } - private ICollection? ExpandWildcardsValue { get; set; } - private bool? IgnoreThrottledValue { get; set; } - private bool? IgnoreUnavailableValue { get; set; } - - /// - /// - /// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only - /// missing or closed indices. This behavior applies even if the request targets other open indices. For example, - /// a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. - /// - /// - public IndicesOptionsDescriptor AllowNoIndices(bool? allowNoIndices = true) - { - AllowNoIndicesValue = allowNoIndices; - return Self; - } - - /// - /// - /// Type of index that wildcard patterns can match. If the request can target data streams, this argument - /// determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - /// such as open,hidden. - /// - /// - public IndicesOptionsDescriptor ExpandWildcards(ICollection? expandWildcards) - { - ExpandWildcardsValue = expandWildcards; - return Self; - } - - /// - /// - /// If true, concrete, expanded or aliased indices are ignored when frozen. - /// - /// - public IndicesOptionsDescriptor IgnoreThrottled(bool? ignoreThrottled = true) - { - IgnoreThrottledValue = ignoreThrottled; - return Self; - } - - /// - /// - /// If true, missing or closed indices are not included in the response. - /// - /// - public IndicesOptionsDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) - { - IgnoreUnavailableValue = ignoreUnavailable; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowNoIndicesValue.HasValue) - { - writer.WritePropertyName("allow_no_indices"); - writer.WriteBooleanValue(AllowNoIndicesValue.Value); - } - - if (ExpandWildcardsValue is not null) - { - writer.WritePropertyName("expand_wildcards"); - SingleOrManySerializationHelper.Serialize(ExpandWildcardsValue, writer, options); - } - - if (IgnoreThrottledValue.HasValue) - { - writer.WritePropertyName("ignore_throttled"); - writer.WriteBooleanValue(IgnoreThrottledValue.Value); - } - - if (IgnoreUnavailableValue.HasValue) - { - writer.WritePropertyName("ignore_unavailable"); - writer.WriteBooleanValue(IgnoreUnavailableValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs deleted file mode 100644 index 3f8912a1069..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs +++ /dev/null @@ -1,127 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -/// -/// -/// Configuration options when storing the inference endpoint -/// -/// -public sealed partial class InferenceEndpoint -{ - /// - /// - /// The service type - /// - /// - [JsonInclude, JsonPropertyName("service")] - public string Service { get; set; } - - /// - /// - /// Settings specific to the service - /// - /// - [JsonInclude, JsonPropertyName("service_settings")] - public object ServiceSettings { get; set; } - - /// - /// - /// Task settings specific to the service and task type - /// - /// - [JsonInclude, JsonPropertyName("task_settings")] - public object? TaskSettings { get; set; } -} - -/// -/// -/// Configuration options when storing the inference endpoint -/// -/// -public sealed partial class InferenceEndpointDescriptor : SerializableDescriptor -{ - internal InferenceEndpointDescriptor(Action configure) => configure.Invoke(this); - - public InferenceEndpointDescriptor() : base() - { - } - - private string ServiceValue { get; set; } - private object ServiceSettingsValue { get; set; } - private object? TaskSettingsValue { get; set; } - - /// - /// - /// The service type - /// - /// - public InferenceEndpointDescriptor Service(string service) - { - ServiceValue = service; - return Self; - } - - /// - /// - /// Settings specific to the service - /// - /// - public InferenceEndpointDescriptor ServiceSettings(object serviceSettings) - { - ServiceSettingsValue = serviceSettings; - return Self; - } - - /// - /// - /// Task settings specific to the service and task type - /// - /// - public InferenceEndpointDescriptor TaskSettings(object? taskSettings) - { - TaskSettingsValue = taskSettings; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("service"); - writer.WriteStringValue(ServiceValue); - writer.WritePropertyName("service_settings"); - JsonSerializer.Serialize(writer, ServiceSettingsValue, options); - if (TaskSettingsValue is not null) - { - writer.WritePropertyName("task_settings"); - JsonSerializer.Serialize(writer, TaskSettingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs deleted file mode 100644 index aee66bad661..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Inference; - -/// -/// -/// Represents an inference endpoint as returned by the GET API -/// -/// -public sealed partial class InferenceEndpointInfo -{ - /// - /// - /// The inference Id - /// - /// - [JsonInclude, JsonPropertyName("inference_id")] - public string InferenceId { get; init; } - - /// - /// - /// The service type - /// - /// - [JsonInclude, JsonPropertyName("service")] - public string Service { get; init; } - - /// - /// - /// Settings specific to the service - /// - /// - [JsonInclude, JsonPropertyName("service_settings")] - public object ServiceSettings { get; init; } - - /// - /// - /// Task settings specific to the service and task type - /// - /// - [JsonInclude, JsonPropertyName("task_settings")] - public object? TaskSettings { get; init; } - - /// - /// - /// The task type - /// - /// - [JsonInclude, JsonPropertyName("task_type")] - public Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType TaskType { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs deleted file mode 100644 index d90d96e78bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AppendProcessor.g.cs +++ /dev/null @@ -1,575 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class AppendProcessor -{ - /// - /// - /// If false, the processor does not append values already present in the field. - /// - /// - [JsonInclude, JsonPropertyName("allow_duplicates")] - public bool? AllowDuplicates { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The value to be appended. Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("value")] - [SingleOrManyCollectionConverter(typeof(object))] - public ICollection Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(AppendProcessor appendProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Append(appendProcessor); -} - -public sealed partial class AppendProcessorDescriptor : SerializableDescriptor> -{ - internal AppendProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public AppendProcessorDescriptor() : base() - { - } - - private bool? AllowDuplicatesValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private ICollection ValueValue { get; set; } - - /// - /// - /// If false, the processor does not append values already present in the field. - /// - /// - public AppendProcessorDescriptor AllowDuplicates(bool? allowDuplicates = true) - { - AllowDuplicatesValue = allowDuplicates; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public AppendProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - public AppendProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - public AppendProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - public AppendProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public AppendProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public AppendProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public AppendProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public AppendProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The value to be appended. Supports template snippets. - /// - /// - public AppendProcessorDescriptor Value(ICollection value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowDuplicatesValue.HasValue) - { - writer.WritePropertyName("allow_duplicates"); - writer.WriteBooleanValue(AllowDuplicatesValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("value"); - SingleOrManySerializationHelper.Serialize(ValueValue, writer, options); - writer.WriteEndObject(); - } -} - -public sealed partial class AppendProcessorDescriptor : SerializableDescriptor -{ - internal AppendProcessorDescriptor(Action configure) => configure.Invoke(this); - - public AppendProcessorDescriptor() : base() - { - } - - private bool? AllowDuplicatesValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private ICollection ValueValue { get; set; } - - /// - /// - /// If false, the processor does not append values already present in the field. - /// - /// - public AppendProcessorDescriptor AllowDuplicates(bool? allowDuplicates = true) - { - AllowDuplicatesValue = allowDuplicates; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public AppendProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - public AppendProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - public AppendProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be appended to. - /// Supports template snippets. - /// - /// - public AppendProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public AppendProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public AppendProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public AppendProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AppendProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AppendProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public AppendProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The value to be appended. Supports template snippets. - /// - /// - public AppendProcessorDescriptor Value(ICollection value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowDuplicatesValue.HasValue) - { - writer.WritePropertyName("allow_duplicates"); - writer.WriteBooleanValue(AllowDuplicatesValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("value"); - SingleOrManySerializationHelper.Serialize(ValueValue, writer, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs deleted file mode 100644 index 0a33244ee82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/AttachmentProcessor.g.cs +++ /dev/null @@ -1,892 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class AttachmentProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// The number of chars being used for extraction to prevent huge fields. - /// Use -1 for no limit. - /// - /// - [JsonInclude, JsonPropertyName("indexed_chars")] - public long? IndexedChars { get; set; } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - [JsonInclude, JsonPropertyName("indexed_chars_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? IndexedCharsField { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Array of properties to select to be stored. - /// Can be content, title, name, author, keywords, date, content_type, content_length, language. - /// - /// - [JsonInclude, JsonPropertyName("properties")] - public ICollection? Properties { get; set; } - - /// - /// - /// If true, the binary field will be removed from the document - /// - /// - [JsonInclude, JsonPropertyName("remove_binary")] - public bool? RemoveBinary { get; set; } - - /// - /// - /// Field containing the name of the resource to decode. - /// If specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection. - /// - /// - [JsonInclude, JsonPropertyName("resource_name")] - public string? ResourceName { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(AttachmentProcessor attachmentProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Attachment(attachmentProcessor); -} - -public sealed partial class AttachmentProcessorDescriptor : SerializableDescriptor> -{ - internal AttachmentProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public AttachmentProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private long? IndexedCharsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IndexedCharsFieldValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private bool? RemoveBinaryValue { get; set; } - private string? ResourceNameValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public AttachmentProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - public AttachmentProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - public AttachmentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - public AttachmentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public AttachmentProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public AttachmentProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public AttachmentProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// The number of chars being used for extraction to prevent huge fields. - /// Use -1 for no limit. - /// - /// - public AttachmentProcessorDescriptor IndexedChars(long? indexedChars) - { - IndexedCharsValue = indexedChars; - return Self; - } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - public AttachmentProcessorDescriptor IndexedCharsField(Elastic.Clients.Elasticsearch.Serverless.Field? indexedCharsField) - { - IndexedCharsFieldValue = indexedCharsField; - return Self; - } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - public AttachmentProcessorDescriptor IndexedCharsField(Expression> indexedCharsField) - { - IndexedCharsFieldValue = indexedCharsField; - return Self; - } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - public AttachmentProcessorDescriptor IndexedCharsField(Expression> indexedCharsField) - { - IndexedCharsFieldValue = indexedCharsField; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Array of properties to select to be stored. - /// Can be content, title, name, author, keywords, date, content_type, content_length, language. - /// - /// - public AttachmentProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// If true, the binary field will be removed from the document - /// - /// - public AttachmentProcessorDescriptor RemoveBinary(bool? removeBinary = true) - { - RemoveBinaryValue = removeBinary; - return Self; - } - - /// - /// - /// Field containing the name of the resource to decode. - /// If specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection. - /// - /// - public AttachmentProcessorDescriptor ResourceName(string? resourceName) - { - ResourceNameValue = resourceName; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public AttachmentProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - public AttachmentProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - public AttachmentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - public AttachmentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (IndexedCharsValue.HasValue) - { - writer.WritePropertyName("indexed_chars"); - writer.WriteNumberValue(IndexedCharsValue.Value); - } - - if (IndexedCharsFieldValue is not null) - { - writer.WritePropertyName("indexed_chars_field"); - JsonSerializer.Serialize(writer, IndexedCharsFieldValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RemoveBinaryValue.HasValue) - { - writer.WritePropertyName("remove_binary"); - writer.WriteBooleanValue(RemoveBinaryValue.Value); - } - - if (!string.IsNullOrEmpty(ResourceNameValue)) - { - writer.WritePropertyName("resource_name"); - writer.WriteStringValue(ResourceNameValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AttachmentProcessorDescriptor : SerializableDescriptor -{ - internal AttachmentProcessorDescriptor(Action configure) => configure.Invoke(this); - - public AttachmentProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private long? IndexedCharsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IndexedCharsFieldValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private bool? RemoveBinaryValue { get; set; } - private string? ResourceNameValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public AttachmentProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - public AttachmentProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - public AttachmentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the base64 encoded field from. - /// - /// - public AttachmentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public AttachmentProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public AttachmentProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public AttachmentProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// The number of chars being used for extraction to prevent huge fields. - /// Use -1 for no limit. - /// - /// - public AttachmentProcessorDescriptor IndexedChars(long? indexedChars) - { - IndexedCharsValue = indexedChars; - return Self; - } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - public AttachmentProcessorDescriptor IndexedCharsField(Elastic.Clients.Elasticsearch.Serverless.Field? indexedCharsField) - { - IndexedCharsFieldValue = indexedCharsField; - return Self; - } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - public AttachmentProcessorDescriptor IndexedCharsField(Expression> indexedCharsField) - { - IndexedCharsFieldValue = indexedCharsField; - return Self; - } - - /// - /// - /// Field name from which you can overwrite the number of chars being used for extraction. - /// - /// - public AttachmentProcessorDescriptor IndexedCharsField(Expression> indexedCharsField) - { - IndexedCharsFieldValue = indexedCharsField; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public AttachmentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public AttachmentProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Array of properties to select to be stored. - /// Can be content, title, name, author, keywords, date, content_type, content_length, language. - /// - /// - public AttachmentProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// If true, the binary field will be removed from the document - /// - /// - public AttachmentProcessorDescriptor RemoveBinary(bool? removeBinary = true) - { - RemoveBinaryValue = removeBinary; - return Self; - } - - /// - /// - /// Field containing the name of the resource to decode. - /// If specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection. - /// - /// - public AttachmentProcessorDescriptor ResourceName(string? resourceName) - { - ResourceNameValue = resourceName; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public AttachmentProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - public AttachmentProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - public AttachmentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the attachment information. - /// - /// - public AttachmentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (IndexedCharsValue.HasValue) - { - writer.WritePropertyName("indexed_chars"); - writer.WriteNumberValue(IndexedCharsValue.Value); - } - - if (IndexedCharsFieldValue is not null) - { - writer.WritePropertyName("indexed_chars_field"); - JsonSerializer.Serialize(writer, IndexedCharsFieldValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RemoveBinaryValue.HasValue) - { - writer.WritePropertyName("remove_binary"); - writer.WriteBooleanValue(RemoveBinaryValue.Value); - } - - if (!string.IsNullOrEmpty(ResourceNameValue)) - { - writer.WritePropertyName("resource_name"); - writer.WriteStringValue(ResourceNameValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/BytesProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/BytesProcessor.g.cs deleted file mode 100644 index 2477837b43a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/BytesProcessor.g.cs +++ /dev/null @@ -1,626 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class BytesProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to convert. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(BytesProcessor bytesProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Bytes(bytesProcessor); -} - -public sealed partial class BytesProcessorDescriptor : SerializableDescriptor> -{ - internal BytesProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public BytesProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public BytesProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to convert. - /// - /// - public BytesProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to convert. - /// - /// - public BytesProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to convert. - /// - /// - public BytesProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public BytesProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public BytesProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public BytesProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public BytesProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public BytesProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public BytesProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public BytesProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public BytesProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class BytesProcessorDescriptor : SerializableDescriptor -{ - internal BytesProcessorDescriptor(Action configure) => configure.Invoke(this); - - public BytesProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public BytesProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to convert. - /// - /// - public BytesProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to convert. - /// - /// - public BytesProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to convert. - /// - /// - public BytesProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public BytesProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public BytesProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public BytesProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public BytesProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public BytesProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public BytesProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public BytesProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public BytesProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public BytesProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public BytesProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CircleProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CircleProcessor.g.cs deleted file mode 100644 index f0ccc3c7d70..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CircleProcessor.g.cs +++ /dev/null @@ -1,698 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class CircleProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The difference between the resulting inscribed distance from center to side and the circle’s radius (measured in meters for geo_shape, unit-less for shape). - /// - /// - [JsonInclude, JsonPropertyName("error_distance")] - public double ErrorDistance { get; set; } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Which field mapping type is to be used when processing the circle: geo_shape or shape. - /// - /// - [JsonInclude, JsonPropertyName("shape_type")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType ShapeType { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(CircleProcessor circleProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Circle(circleProcessor); -} - -public sealed partial class CircleProcessorDescriptor : SerializableDescriptor> -{ - internal CircleProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public CircleProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private double ErrorDistanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType ShapeTypeValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public CircleProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The difference between the resulting inscribed distance from center to side and the circle’s radius (measured in meters for geo_shape, unit-less for shape). - /// - /// - public CircleProcessorDescriptor ErrorDistance(double errorDistance) - { - ErrorDistanceValue = errorDistance; - return Self; - } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - public CircleProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - public CircleProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - public CircleProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public CircleProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public CircleProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public CircleProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public CircleProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Which field mapping type is to be used when processing the circle: geo_shape or shape. - /// - /// - public CircleProcessorDescriptor ShapeType(Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType shapeType) - { - ShapeTypeValue = shapeType; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public CircleProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - public CircleProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - public CircleProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - public CircleProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("error_distance"); - writer.WriteNumberValue(ErrorDistanceValue); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("shape_type"); - JsonSerializer.Serialize(writer, ShapeTypeValue, options); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CircleProcessorDescriptor : SerializableDescriptor -{ - internal CircleProcessorDescriptor(Action configure) => configure.Invoke(this); - - public CircleProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private double ErrorDistanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType ShapeTypeValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public CircleProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The difference between the resulting inscribed distance from center to side and the circle’s radius (measured in meters for geo_shape, unit-less for shape). - /// - /// - public CircleProcessorDescriptor ErrorDistance(double errorDistance) - { - ErrorDistanceValue = errorDistance; - return Self; - } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - public CircleProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - public CircleProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to interpret as a circle. Either a string in WKT format or a map for GeoJSON. - /// - /// - public CircleProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public CircleProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public CircleProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public CircleProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public CircleProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CircleProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CircleProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Which field mapping type is to be used when processing the circle: geo_shape or shape. - /// - /// - public CircleProcessorDescriptor ShapeType(Elastic.Clients.Elasticsearch.Serverless.Ingest.ShapeType shapeType) - { - ShapeTypeValue = shapeType; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public CircleProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - public CircleProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - public CircleProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to - /// By default, the field is updated in-place. - /// - /// - public CircleProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("error_distance"); - writer.WriteNumberValue(ErrorDistanceValue); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("shape_type"); - JsonSerializer.Serialize(writer, ShapeTypeValue, options); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs deleted file mode 100644 index 5bec2b573de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs +++ /dev/null @@ -1,1310 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class CommunityIDProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Field containing the destination IP address. - /// - /// - [JsonInclude, JsonPropertyName("destination_ip")] - public Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIp { get; set; } - - /// - /// - /// Field containing the destination port. - /// - /// - [JsonInclude, JsonPropertyName("destination_port")] - public Elastic.Clients.Elasticsearch.Serverless.Field? DestinationPort { get; set; } - - /// - /// - /// Field containing the IANA number. - /// - /// - [JsonInclude, JsonPropertyName("iana_number")] - public Elastic.Clients.Elasticsearch.Serverless.Field? IanaNumber { get; set; } - - /// - /// - /// Field containing the ICMP code. - /// - /// - [JsonInclude, JsonPropertyName("icmp_code")] - public Elastic.Clients.Elasticsearch.Serverless.Field? IcmpCode { get; set; } - - /// - /// - /// Field containing the ICMP type. - /// - /// - [JsonInclude, JsonPropertyName("icmp_type")] - public Elastic.Clients.Elasticsearch.Serverless.Field? IcmpType { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The - /// seed can prevent hash collisions between network domains, such as a staging - /// and production network that use the same addressing scheme. - /// - /// - [JsonInclude, JsonPropertyName("seed")] - public int? Seed { get; set; } - - /// - /// - /// Field containing the source IP address. - /// - /// - [JsonInclude, JsonPropertyName("source_ip")] - public Elastic.Clients.Elasticsearch.Serverless.Field? SourceIp { get; set; } - - /// - /// - /// Field containing the source port. - /// - /// - [JsonInclude, JsonPropertyName("source_port")] - public Elastic.Clients.Elasticsearch.Serverless.Field? SourcePort { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Output field for the community ID. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - [JsonInclude, JsonPropertyName("transport")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Transport { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(CommunityIDProcessor communityIDProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.CommunityId(communityIDProcessor); -} - -public sealed partial class CommunityIDProcessorDescriptor : SerializableDescriptor> -{ - internal CommunityIDProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public CommunityIDProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIpValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationPortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IanaNumberValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpCodeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpTypeValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private int? SeedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SourceIpValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SourcePortValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TransportValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public CommunityIDProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public CommunityIDProcessorDescriptor DestinationIp(Elastic.Clients.Elasticsearch.Serverless.Field? destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination port. - /// - /// - public CommunityIDProcessorDescriptor DestinationPort(Elastic.Clients.Elasticsearch.Serverless.Field? destinationPort) - { - DestinationPortValue = destinationPort; - return Self; - } - - /// - /// - /// Field containing the destination port. - /// - /// - public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort) - { - DestinationPortValue = destinationPort; - return Self; - } - - /// - /// - /// Field containing the destination port. - /// - /// - public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort) - { - DestinationPortValue = destinationPort; - return Self; - } - - /// - /// - /// Field containing the IANA number. - /// - /// - public CommunityIDProcessorDescriptor IanaNumber(Elastic.Clients.Elasticsearch.Serverless.Field? ianaNumber) - { - IanaNumberValue = ianaNumber; - return Self; - } - - /// - /// - /// Field containing the IANA number. - /// - /// - public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber) - { - IanaNumberValue = ianaNumber; - return Self; - } - - /// - /// - /// Field containing the IANA number. - /// - /// - public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber) - { - IanaNumberValue = ianaNumber; - return Self; - } - - /// - /// - /// Field containing the ICMP code. - /// - /// - public CommunityIDProcessorDescriptor IcmpCode(Elastic.Clients.Elasticsearch.Serverless.Field? icmpCode) - { - IcmpCodeValue = icmpCode; - return Self; - } - - /// - /// - /// Field containing the ICMP code. - /// - /// - public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode) - { - IcmpCodeValue = icmpCode; - return Self; - } - - /// - /// - /// Field containing the ICMP code. - /// - /// - public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode) - { - IcmpCodeValue = icmpCode; - return Self; - } - - /// - /// - /// Field containing the ICMP type. - /// - /// - public CommunityIDProcessorDescriptor IcmpType(Elastic.Clients.Elasticsearch.Serverless.Field? icmpType) - { - IcmpTypeValue = icmpType; - return Self; - } - - /// - /// - /// Field containing the ICMP type. - /// - /// - public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType) - { - IcmpTypeValue = icmpType; - return Self; - } - - /// - /// - /// Field containing the ICMP type. - /// - /// - public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType) - { - IcmpTypeValue = icmpType; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public CommunityIDProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public CommunityIDProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - public CommunityIDProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public CommunityIDProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CommunityIDProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CommunityIDProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CommunityIDProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The - /// seed can prevent hash collisions between network domains, such as a staging - /// and production network that use the same addressing scheme. - /// - /// - public CommunityIDProcessorDescriptor Seed(int? seed) - { - SeedValue = seed; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public CommunityIDProcessorDescriptor SourceIp(Elastic.Clients.Elasticsearch.Serverless.Field? sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source port. - /// - /// - public CommunityIDProcessorDescriptor SourcePort(Elastic.Clients.Elasticsearch.Serverless.Field? sourcePort) - { - SourcePortValue = sourcePort; - return Self; - } - - /// - /// - /// Field containing the source port. - /// - /// - public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort) - { - SourcePortValue = sourcePort; - return Self; - } - - /// - /// - /// Field containing the source port. - /// - /// - public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort) - { - SourcePortValue = sourcePort; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public CommunityIDProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the community ID. - /// - /// - public CommunityIDProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the community ID. - /// - /// - public CommunityIDProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the community ID. - /// - /// - public CommunityIDProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - public CommunityIDProcessorDescriptor Transport(Elastic.Clients.Elasticsearch.Serverless.Field? transport) - { - TransportValue = transport; - return Self; - } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - public CommunityIDProcessorDescriptor Transport(Expression> transport) - { - TransportValue = transport; - return Self; - } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - public CommunityIDProcessorDescriptor Transport(Expression> transport) - { - TransportValue = transport; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestinationIpValue is not null) - { - writer.WritePropertyName("destination_ip"); - JsonSerializer.Serialize(writer, DestinationIpValue, options); - } - - if (DestinationPortValue is not null) - { - writer.WritePropertyName("destination_port"); - JsonSerializer.Serialize(writer, DestinationPortValue, options); - } - - if (IanaNumberValue is not null) - { - writer.WritePropertyName("iana_number"); - JsonSerializer.Serialize(writer, IanaNumberValue, options); - } - - if (IcmpCodeValue is not null) - { - writer.WritePropertyName("icmp_code"); - JsonSerializer.Serialize(writer, IcmpCodeValue, options); - } - - if (IcmpTypeValue is not null) - { - writer.WritePropertyName("icmp_type"); - JsonSerializer.Serialize(writer, IcmpTypeValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (SeedValue.HasValue) - { - writer.WritePropertyName("seed"); - writer.WriteNumberValue(SeedValue.Value); - } - - if (SourceIpValue is not null) - { - writer.WritePropertyName("source_ip"); - JsonSerializer.Serialize(writer, SourceIpValue, options); - } - - if (SourcePortValue is not null) - { - writer.WritePropertyName("source_port"); - JsonSerializer.Serialize(writer, SourcePortValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (TransportValue is not null) - { - writer.WritePropertyName("transport"); - JsonSerializer.Serialize(writer, TransportValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CommunityIDProcessorDescriptor : SerializableDescriptor -{ - internal CommunityIDProcessorDescriptor(Action configure) => configure.Invoke(this); - - public CommunityIDProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIpValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationPortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IanaNumberValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpCodeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpTypeValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private int? SeedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SourceIpValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SourcePortValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TransportValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public CommunityIDProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public CommunityIDProcessorDescriptor DestinationIp(Elastic.Clients.Elasticsearch.Serverless.Field? destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination port. - /// - /// - public CommunityIDProcessorDescriptor DestinationPort(Elastic.Clients.Elasticsearch.Serverless.Field? destinationPort) - { - DestinationPortValue = destinationPort; - return Self; - } - - /// - /// - /// Field containing the destination port. - /// - /// - public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort) - { - DestinationPortValue = destinationPort; - return Self; - } - - /// - /// - /// Field containing the destination port. - /// - /// - public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort) - { - DestinationPortValue = destinationPort; - return Self; - } - - /// - /// - /// Field containing the IANA number. - /// - /// - public CommunityIDProcessorDescriptor IanaNumber(Elastic.Clients.Elasticsearch.Serverless.Field? ianaNumber) - { - IanaNumberValue = ianaNumber; - return Self; - } - - /// - /// - /// Field containing the IANA number. - /// - /// - public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber) - { - IanaNumberValue = ianaNumber; - return Self; - } - - /// - /// - /// Field containing the IANA number. - /// - /// - public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber) - { - IanaNumberValue = ianaNumber; - return Self; - } - - /// - /// - /// Field containing the ICMP code. - /// - /// - public CommunityIDProcessorDescriptor IcmpCode(Elastic.Clients.Elasticsearch.Serverless.Field? icmpCode) - { - IcmpCodeValue = icmpCode; - return Self; - } - - /// - /// - /// Field containing the ICMP code. - /// - /// - public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode) - { - IcmpCodeValue = icmpCode; - return Self; - } - - /// - /// - /// Field containing the ICMP code. - /// - /// - public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode) - { - IcmpCodeValue = icmpCode; - return Self; - } - - /// - /// - /// Field containing the ICMP type. - /// - /// - public CommunityIDProcessorDescriptor IcmpType(Elastic.Clients.Elasticsearch.Serverless.Field? icmpType) - { - IcmpTypeValue = icmpType; - return Self; - } - - /// - /// - /// Field containing the ICMP type. - /// - /// - public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType) - { - IcmpTypeValue = icmpType; - return Self; - } - - /// - /// - /// Field containing the ICMP type. - /// - /// - public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType) - { - IcmpTypeValue = icmpType; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public CommunityIDProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public CommunityIDProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - public CommunityIDProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public CommunityIDProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CommunityIDProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CommunityIDProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CommunityIDProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The - /// seed can prevent hash collisions between network domains, such as a staging - /// and production network that use the same addressing scheme. - /// - /// - public CommunityIDProcessorDescriptor Seed(int? seed) - { - SeedValue = seed; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public CommunityIDProcessorDescriptor SourceIp(Elastic.Clients.Elasticsearch.Serverless.Field? sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source port. - /// - /// - public CommunityIDProcessorDescriptor SourcePort(Elastic.Clients.Elasticsearch.Serverless.Field? sourcePort) - { - SourcePortValue = sourcePort; - return Self; - } - - /// - /// - /// Field containing the source port. - /// - /// - public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort) - { - SourcePortValue = sourcePort; - return Self; - } - - /// - /// - /// Field containing the source port. - /// - /// - public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort) - { - SourcePortValue = sourcePort; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public CommunityIDProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the community ID. - /// - /// - public CommunityIDProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the community ID. - /// - /// - public CommunityIDProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the community ID. - /// - /// - public CommunityIDProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - public CommunityIDProcessorDescriptor Transport(Elastic.Clients.Elasticsearch.Serverless.Field? transport) - { - TransportValue = transport; - return Self; - } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - public CommunityIDProcessorDescriptor Transport(Expression> transport) - { - TransportValue = transport; - return Self; - } - - /// - /// - /// Field containing the transport protocol name or number. Used only when the - /// iana_number field is not present. The following protocol names are currently - /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp - /// - /// - public CommunityIDProcessorDescriptor Transport(Expression> transport) - { - TransportValue = transport; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestinationIpValue is not null) - { - writer.WritePropertyName("destination_ip"); - JsonSerializer.Serialize(writer, DestinationIpValue, options); - } - - if (DestinationPortValue is not null) - { - writer.WritePropertyName("destination_port"); - JsonSerializer.Serialize(writer, DestinationPortValue, options); - } - - if (IanaNumberValue is not null) - { - writer.WritePropertyName("iana_number"); - JsonSerializer.Serialize(writer, IanaNumberValue, options); - } - - if (IcmpCodeValue is not null) - { - writer.WritePropertyName("icmp_code"); - JsonSerializer.Serialize(writer, IcmpCodeValue, options); - } - - if (IcmpTypeValue is not null) - { - writer.WritePropertyName("icmp_type"); - JsonSerializer.Serialize(writer, IcmpTypeValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (SeedValue.HasValue) - { - writer.WritePropertyName("seed"); - writer.WriteNumberValue(SeedValue.Value); - } - - if (SourceIpValue is not null) - { - writer.WritePropertyName("source_ip"); - JsonSerializer.Serialize(writer, SourceIpValue, options); - } - - if (SourcePortValue is not null) - { - writer.WritePropertyName("source_port"); - JsonSerializer.Serialize(writer, SourcePortValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (TransportValue is not null) - { - writer.WritePropertyName("transport"); - JsonSerializer.Serialize(writer, TransportValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ConvertProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ConvertProcessor.g.cs deleted file mode 100644 index e5fbdcfca4c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ConvertProcessor.g.cs +++ /dev/null @@ -1,662 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class ConvertProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field whose value is to be converted. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - /// - /// - /// The type to convert the existing value to. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(ConvertProcessor convertProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Convert(convertProcessor); -} - -public sealed partial class ConvertProcessorDescriptor : SerializableDescriptor> -{ - internal ConvertProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public ConvertProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType TypeValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public ConvertProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field whose value is to be converted. - /// - /// - public ConvertProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field whose value is to be converted. - /// - /// - public ConvertProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field whose value is to be converted. - /// - /// - public ConvertProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public ConvertProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public ConvertProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public ConvertProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public ConvertProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public ConvertProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public ConvertProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public ConvertProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The type to convert the existing value to. - /// - /// - public ConvertProcessorDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class ConvertProcessorDescriptor : SerializableDescriptor -{ - internal ConvertProcessorDescriptor(Action configure) => configure.Invoke(this); - - public ConvertProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType TypeValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public ConvertProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field whose value is to be converted. - /// - /// - public ConvertProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field whose value is to be converted. - /// - /// - public ConvertProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field whose value is to be converted. - /// - /// - public ConvertProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public ConvertProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public ConvertProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public ConvertProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public ConvertProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ConvertProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public ConvertProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public ConvertProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public ConvertProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public ConvertProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The type to convert the existing value to. - /// - /// - public ConvertProcessorDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs deleted file mode 100644 index 697cf8aa26e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CsvProcessor.g.cs +++ /dev/null @@ -1,750 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class CsvProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Value used to fill empty fields. - /// Empty fields are skipped if this is not provided. - /// An empty field is one with no value (2 consecutive separators) or empty quotes (""). - /// - /// - [JsonInclude, JsonPropertyName("empty_value")] - public object? EmptyValue { get; set; } - - /// - /// - /// The field to extract data from. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Quote used in CSV, has to be single character string. - /// - /// - [JsonInclude, JsonPropertyName("quote")] - public string? Quote { get; set; } - - /// - /// - /// Separator used in CSV, has to be single character string. - /// - /// - [JsonInclude, JsonPropertyName("separator")] - public string? Separator { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The array of fields to assign extracted values to. - /// - /// - [JsonInclude, JsonPropertyName("target_fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields TargetFields { get; set; } - - /// - /// - /// Trim whitespaces in unquoted fields. - /// - /// - [JsonInclude, JsonPropertyName("trim")] - public bool? Trim { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(CsvProcessor csvProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Csv(csvProcessor); -} - -public sealed partial class CsvProcessorDescriptor : SerializableDescriptor> -{ - internal CsvProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public CsvProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private object? EmptyValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? QuoteValue { get; set; } - private string? SeparatorValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields TargetFieldsValue { get; set; } - private bool? TrimValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public CsvProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Value used to fill empty fields. - /// Empty fields are skipped if this is not provided. - /// An empty field is one with no value (2 consecutive separators) or empty quotes (""). - /// - /// - public CsvProcessorDescriptor EmptyValue(object? emptyValue) - { - EmptyValueValue = emptyValue; - return Self; - } - - /// - /// - /// The field to extract data from. - /// - /// - public CsvProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to extract data from. - /// - /// - public CsvProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to extract data from. - /// - /// - public CsvProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public CsvProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public CsvProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public CsvProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public CsvProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Quote used in CSV, has to be single character string. - /// - /// - public CsvProcessorDescriptor Quote(string? quote) - { - QuoteValue = quote; - return Self; - } - - /// - /// - /// Separator used in CSV, has to be single character string. - /// - /// - public CsvProcessorDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public CsvProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The array of fields to assign extracted values to. - /// - /// - public CsvProcessorDescriptor TargetFields(Elastic.Clients.Elasticsearch.Serverless.Fields targetFields) - { - TargetFieldsValue = targetFields; - return Self; - } - - /// - /// - /// Trim whitespaces in unquoted fields. - /// - /// - public CsvProcessorDescriptor Trim(bool? trim = true) - { - TrimValue = trim; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (EmptyValueValue is not null) - { - writer.WritePropertyName("empty_value"); - JsonSerializer.Serialize(writer, EmptyValueValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(QuoteValue)) - { - writer.WritePropertyName("quote"); - writer.WriteStringValue(QuoteValue); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("target_fields"); - JsonSerializer.Serialize(writer, TargetFieldsValue, options); - if (TrimValue.HasValue) - { - writer.WritePropertyName("trim"); - writer.WriteBooleanValue(TrimValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CsvProcessorDescriptor : SerializableDescriptor -{ - internal CsvProcessorDescriptor(Action configure) => configure.Invoke(this); - - public CsvProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private object? EmptyValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? QuoteValue { get; set; } - private string? SeparatorValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields TargetFieldsValue { get; set; } - private bool? TrimValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public CsvProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Value used to fill empty fields. - /// Empty fields are skipped if this is not provided. - /// An empty field is one with no value (2 consecutive separators) or empty quotes (""). - /// - /// - public CsvProcessorDescriptor EmptyValue(object? emptyValue) - { - EmptyValueValue = emptyValue; - return Self; - } - - /// - /// - /// The field to extract data from. - /// - /// - public CsvProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to extract data from. - /// - /// - public CsvProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to extract data from. - /// - /// - public CsvProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public CsvProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public CsvProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public CsvProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public CsvProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public CsvProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public CsvProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Quote used in CSV, has to be single character string. - /// - /// - public CsvProcessorDescriptor Quote(string? quote) - { - QuoteValue = quote; - return Self; - } - - /// - /// - /// Separator used in CSV, has to be single character string. - /// - /// - public CsvProcessorDescriptor Separator(string? separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public CsvProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The array of fields to assign extracted values to. - /// - /// - public CsvProcessorDescriptor TargetFields(Elastic.Clients.Elasticsearch.Serverless.Fields targetFields) - { - TargetFieldsValue = targetFields; - return Self; - } - - /// - /// - /// Trim whitespaces in unquoted fields. - /// - /// - public CsvProcessorDescriptor Trim(bool? trim = true) - { - TrimValue = trim; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (EmptyValueValue is not null) - { - writer.WritePropertyName("empty_value"); - JsonSerializer.Serialize(writer, EmptyValueValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(QuoteValue)) - { - writer.WritePropertyName("quote"); - writer.WriteStringValue(QuoteValue); - } - - if (!string.IsNullOrEmpty(SeparatorValue)) - { - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("target_fields"); - JsonSerializer.Serialize(writer, TargetFieldsValue, options); - if (TrimValue.HasValue) - { - writer.WritePropertyName("trim"); - writer.WriteBooleanValue(TrimValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfiguration.g.cs deleted file mode 100644 index bbe957c526a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfiguration.g.cs +++ /dev/null @@ -1,309 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -/// -/// -/// The configuration necessary to identify which IP geolocation provider to use to download a database, as well as any provider-specific configuration necessary for such downloading. -/// At present, the only supported providers are maxmind and ipinfo, and the maxmind provider requires that an account_id (string) is configured. -/// A provider (either maxmind or ipinfo) must be specified. The web and local providers can be returned as read only configurations. -/// -/// -[JsonConverter(typeof(DatabaseConfigurationConverter))] -public sealed partial class DatabaseConfiguration -{ - internal DatabaseConfiguration(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 DatabaseConfiguration Ipinfo(Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo ipinfo) => new DatabaseConfiguration("ipinfo", ipinfo); - public static DatabaseConfiguration Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) => new DatabaseConfiguration("maxmind", maxmind); - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name Name { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class DatabaseConfigurationConverter : JsonConverter -{ - public override DatabaseConfiguration 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; - Elastic.Clients.Elasticsearch.Serverless.Name nameValue = 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 == "ipinfo") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "maxmind") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'DatabaseConfiguration' from the response."); - } - - var result = new DatabaseConfiguration(variantNameValue, variantValue); - result.Name = nameValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, DatabaseConfiguration value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Name is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, value.Name, options); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "ipinfo": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo)value.Variant, options); - break; - case "maxmind": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DatabaseConfigurationDescriptor : SerializableDescriptor> -{ - internal DatabaseConfigurationDescriptor(Action> configure) => configure.Invoke(this); - - public DatabaseConfigurationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DatabaseConfigurationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DatabaseConfigurationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - public DatabaseConfigurationDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - public DatabaseConfigurationDescriptor Ipinfo(Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo ipinfo) => Set(ipinfo, "ipinfo"); - public DatabaseConfigurationDescriptor Ipinfo(Action configure) => Set(configure, "ipinfo"); - public DatabaseConfigurationDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) => Set(maxmind, "maxmind"); - public DatabaseConfigurationDescriptor Maxmind(Action configure) => Set(configure, "maxmind"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DatabaseConfigurationDescriptor : SerializableDescriptor -{ - internal DatabaseConfigurationDescriptor(Action configure) => configure.Invoke(this); - - public DatabaseConfigurationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DatabaseConfigurationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DatabaseConfigurationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - public DatabaseConfigurationDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - public DatabaseConfigurationDescriptor Ipinfo(Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo ipinfo) => Set(ipinfo, "ipinfo"); - public DatabaseConfigurationDescriptor Ipinfo(Action configure) => Set(configure, "ipinfo"); - public DatabaseConfigurationDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) => Set(maxmind, "maxmind"); - public DatabaseConfigurationDescriptor Maxmind(Action configure) => Set(configure, "maxmind"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationFull.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationFull.g.cs deleted file mode 100644 index 74ed0662918..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationFull.g.cs +++ /dev/null @@ -1,332 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -[JsonConverter(typeof(DatabaseConfigurationFullConverter))] -public sealed partial class DatabaseConfigurationFull -{ - internal DatabaseConfigurationFull(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 DatabaseConfigurationFull Ipinfo(Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo ipinfo) => new DatabaseConfigurationFull("ipinfo", ipinfo); - public static DatabaseConfigurationFull Local(Elastic.Clients.Elasticsearch.Serverless.Ingest.Local local) => new DatabaseConfigurationFull("local", local); - public static DatabaseConfigurationFull Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) => new DatabaseConfigurationFull("maxmind", maxmind); - public static DatabaseConfigurationFull Web(Elastic.Clients.Elasticsearch.Serverless.Ingest.Web web) => new DatabaseConfigurationFull("web", web); - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class DatabaseConfigurationFullConverter : JsonConverter -{ - public override DatabaseConfigurationFull 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; - 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 == "ipinfo") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "local") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "maxmind") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "web") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'DatabaseConfigurationFull' from the response."); - } - - var result = new DatabaseConfigurationFull(variantNameValue, variantValue); - result.Name = nameValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, DatabaseConfigurationFull value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(value.Name); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "ipinfo": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo)value.Variant, options); - break; - case "local": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.Local)value.Variant, options); - break; - case "maxmind": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind)value.Variant, options); - break; - case "web": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.Web)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DatabaseConfigurationFullDescriptor : SerializableDescriptor> -{ - internal DatabaseConfigurationFullDescriptor(Action> configure) => configure.Invoke(this); - - public DatabaseConfigurationFullDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DatabaseConfigurationFullDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DatabaseConfigurationFullDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private string NameValue { get; set; } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - public DatabaseConfigurationFullDescriptor Name(string name) - { - NameValue = name; - return Self; - } - - public DatabaseConfigurationFullDescriptor Ipinfo(Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo ipinfo) => Set(ipinfo, "ipinfo"); - public DatabaseConfigurationFullDescriptor Ipinfo(Action configure) => Set(configure, "ipinfo"); - public DatabaseConfigurationFullDescriptor Local(Elastic.Clients.Elasticsearch.Serverless.Ingest.Local local) => Set(local, "local"); - public DatabaseConfigurationFullDescriptor Local(Action configure) => Set(configure, "local"); - public DatabaseConfigurationFullDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) => Set(maxmind, "maxmind"); - public DatabaseConfigurationFullDescriptor Maxmind(Action configure) => Set(configure, "maxmind"); - public DatabaseConfigurationFullDescriptor Web(Elastic.Clients.Elasticsearch.Serverless.Ingest.Web web) => Set(web, "web"); - public DatabaseConfigurationFullDescriptor Web(Action configure) => Set(configure, "web"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DatabaseConfigurationFullDescriptor : SerializableDescriptor -{ - internal DatabaseConfigurationFullDescriptor(Action configure) => configure.Invoke(this); - - public DatabaseConfigurationFullDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DatabaseConfigurationFullDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DatabaseConfigurationFullDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private string NameValue { get; set; } - - /// - /// - /// The provider-assigned name of the IP geolocation database to download. - /// - /// - public DatabaseConfigurationFullDescriptor Name(string name) - { - NameValue = name; - return Self; - } - - public DatabaseConfigurationFullDescriptor Ipinfo(Elastic.Clients.Elasticsearch.Serverless.Ingest.Ipinfo ipinfo) => Set(ipinfo, "ipinfo"); - public DatabaseConfigurationFullDescriptor Ipinfo(Action configure) => Set(configure, "ipinfo"); - public DatabaseConfigurationFullDescriptor Local(Elastic.Clients.Elasticsearch.Serverless.Ingest.Local local) => Set(local, "local"); - public DatabaseConfigurationFullDescriptor Local(Action configure) => Set(configure, "local"); - public DatabaseConfigurationFullDescriptor Maxmind(Elastic.Clients.Elasticsearch.Serverless.Ingest.Maxmind maxmind) => Set(maxmind, "maxmind"); - public DatabaseConfigurationFullDescriptor Maxmind(Action configure) => Set(configure, "maxmind"); - public DatabaseConfigurationFullDescriptor Web(Elastic.Clients.Elasticsearch.Serverless.Ingest.Web web) => Set(web, "web"); - public DatabaseConfigurationFullDescriptor Web(Action configure) => Set(configure, "web"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationMetadata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationMetadata.g.cs deleted file mode 100644 index 2df0f06fda8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DatabaseConfigurationMetadata.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DatabaseConfigurationMetadata -{ - [JsonInclude, JsonPropertyName("database")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration Database { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("modified_date_millis")] - public long ModifiedDateMillis { get; init; } - [JsonInclude, JsonPropertyName("version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs deleted file mode 100644 index 283d93d762b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs +++ /dev/null @@ -1,753 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DateIndexNameProcessor -{ - /// - /// - /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed. - /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. - /// - /// - [JsonInclude, JsonPropertyName("date_formats")] - public ICollection DateFormats { get; set; } - - /// - /// - /// How to round the date when formatting the date into the index name. Valid values are: - /// y (year), M (month), w (week), d (day), h (hour), m (minute) and s (second). - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("date_rounding")] - public string DateRounding { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// The format to be used when printing the parsed date into the index name. - /// A valid java time pattern is expected here. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("index_name_format")] - public string? IndexNameFormat { get; set; } - - /// - /// - /// A prefix of the index name to be prepended before the printed date. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("index_name_prefix")] - public string? IndexNamePrefix { get; set; } - - /// - /// - /// The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days. - /// - /// - [JsonInclude, JsonPropertyName("locale")] - public string? Locale { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names. - /// - /// - [JsonInclude, JsonPropertyName("timezone")] - public string? Timezone { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(DateIndexNameProcessor dateIndexNameProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.DateIndexName(dateIndexNameProcessor); -} - -public sealed partial class DateIndexNameProcessorDescriptor : SerializableDescriptor> -{ - internal DateIndexNameProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public DateIndexNameProcessorDescriptor() : base() - { - } - - private ICollection DateFormatsValue { get; set; } - private string DateRoundingValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? IndexNameFormatValue { get; set; } - private string? IndexNamePrefixValue { get; set; } - private string? LocaleValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private string? TimezoneValue { get; set; } - - /// - /// - /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed. - /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. - /// - /// - public DateIndexNameProcessorDescriptor DateFormats(ICollection dateFormats) - { - DateFormatsValue = dateFormats; - return Self; - } - - /// - /// - /// How to round the date when formatting the date into the index name. Valid values are: - /// y (year), M (month), w (week), d (day), h (hour), m (minute) and s (second). - /// Supports template snippets. - /// - /// - public DateIndexNameProcessorDescriptor DateRounding(string dateRounding) - { - DateRoundingValue = dateRounding; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DateIndexNameProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - public DateIndexNameProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - public DateIndexNameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - public DateIndexNameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DateIndexNameProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DateIndexNameProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The format to be used when printing the parsed date into the index name. - /// A valid java time pattern is expected here. - /// Supports template snippets. - /// - /// - public DateIndexNameProcessorDescriptor IndexNameFormat(string? indexNameFormat) - { - IndexNameFormatValue = indexNameFormat; - return Self; - } - - /// - /// - /// A prefix of the index name to be prepended before the printed date. - /// Supports template snippets. - /// - /// - public DateIndexNameProcessorDescriptor IndexNamePrefix(string? indexNamePrefix) - { - IndexNamePrefixValue = indexNamePrefix; - return Self; - } - - /// - /// - /// The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days. - /// - /// - public DateIndexNameProcessorDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DateIndexNameProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names. - /// - /// - public DateIndexNameProcessorDescriptor Timezone(string? timezone) - { - TimezoneValue = timezone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("date_formats"); - JsonSerializer.Serialize(writer, DateFormatsValue, options); - writer.WritePropertyName("date_rounding"); - writer.WriteStringValue(DateRoundingValue); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(IndexNameFormatValue)) - { - writer.WritePropertyName("index_name_format"); - writer.WriteStringValue(IndexNameFormatValue); - } - - if (!string.IsNullOrEmpty(IndexNamePrefixValue)) - { - writer.WritePropertyName("index_name_prefix"); - writer.WriteStringValue(IndexNamePrefixValue); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (!string.IsNullOrEmpty(TimezoneValue)) - { - writer.WritePropertyName("timezone"); - writer.WriteStringValue(TimezoneValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DateIndexNameProcessorDescriptor : SerializableDescriptor -{ - internal DateIndexNameProcessorDescriptor(Action configure) => configure.Invoke(this); - - public DateIndexNameProcessorDescriptor() : base() - { - } - - private ICollection DateFormatsValue { get; set; } - private string DateRoundingValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? IndexNameFormatValue { get; set; } - private string? IndexNamePrefixValue { get; set; } - private string? LocaleValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private string? TimezoneValue { get; set; } - - /// - /// - /// An array of the expected date formats for parsing dates / timestamps in the document being preprocessed. - /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. - /// - /// - public DateIndexNameProcessorDescriptor DateFormats(ICollection dateFormats) - { - DateFormatsValue = dateFormats; - return Self; - } - - /// - /// - /// How to round the date when formatting the date into the index name. Valid values are: - /// y (year), M (month), w (week), d (day), h (hour), m (minute) and s (second). - /// Supports template snippets. - /// - /// - public DateIndexNameProcessorDescriptor DateRounding(string dateRounding) - { - DateRoundingValue = dateRounding; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DateIndexNameProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - public DateIndexNameProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - public DateIndexNameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date or timestamp from. - /// - /// - public DateIndexNameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DateIndexNameProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DateIndexNameProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The format to be used when printing the parsed date into the index name. - /// A valid java time pattern is expected here. - /// Supports template snippets. - /// - /// - public DateIndexNameProcessorDescriptor IndexNameFormat(string? indexNameFormat) - { - IndexNameFormatValue = indexNameFormat; - return Self; - } - - /// - /// - /// A prefix of the index name to be prepended before the printed date. - /// Supports template snippets. - /// - /// - public DateIndexNameProcessorDescriptor IndexNamePrefix(string? indexNamePrefix) - { - IndexNamePrefixValue = indexNamePrefix; - return Self; - } - - /// - /// - /// The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days. - /// - /// - public DateIndexNameProcessorDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DateIndexNameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateIndexNameProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DateIndexNameProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names. - /// - /// - public DateIndexNameProcessorDescriptor Timezone(string? timezone) - { - TimezoneValue = timezone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("date_formats"); - JsonSerializer.Serialize(writer, DateFormatsValue, options); - writer.WritePropertyName("date_rounding"); - writer.WriteStringValue(DateRoundingValue); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(IndexNameFormatValue)) - { - writer.WritePropertyName("index_name_format"); - writer.WriteStringValue(IndexNameFormatValue); - } - - if (!string.IsNullOrEmpty(IndexNamePrefixValue)) - { - writer.WritePropertyName("index_name_prefix"); - writer.WriteStringValue(IndexNamePrefixValue); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (!string.IsNullOrEmpty(TimezoneValue)) - { - writer.WritePropertyName("timezone"); - writer.WriteStringValue(TimezoneValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs deleted file mode 100644 index 4119d07eea1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs +++ /dev/null @@ -1,755 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DateProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to get the date from. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// An array of the expected date formats. - /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. - /// - /// - [JsonInclude, JsonPropertyName("formats")] - public ICollection Formats { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// The locale to use when parsing the date, relevant when parsing month names or week days. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("locale")] - public string? Locale { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// The format to use when writing the date to target_field. Must be a valid - /// java time pattern. - /// - /// - [JsonInclude, JsonPropertyName("output_format")] - public string? OutputFormat { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - /// - /// - /// The timezone to use when parsing the date. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("timezone")] - public string? Timezone { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(DateProcessor dateProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Date(dateProcessor); -} - -public sealed partial class DateProcessorDescriptor : SerializableDescriptor> -{ - internal DateProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public DateProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection FormatsValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? LocaleValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? OutputFormatValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private string? TimezoneValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DateProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to get the date from. - /// - /// - public DateProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date from. - /// - /// - public DateProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date from. - /// - /// - public DateProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// An array of the expected date formats. - /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. - /// - /// - public DateProcessorDescriptor Formats(ICollection formats) - { - FormatsValue = formats; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DateProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DateProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The locale to use when parsing the date, relevant when parsing month names or week days. - /// Supports template snippets. - /// - /// - public DateProcessorDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The format to use when writing the date to target_field. Must be a valid - /// java time pattern. - /// - /// - public DateProcessorDescriptor OutputFormat(string? outputFormat) - { - OutputFormatValue = outputFormat; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DateProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - public DateProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - public DateProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - public DateProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The timezone to use when parsing the date. - /// Supports template snippets. - /// - /// - public DateProcessorDescriptor Timezone(string? timezone) - { - TimezoneValue = timezone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("formats"); - JsonSerializer.Serialize(writer, FormatsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(OutputFormatValue)) - { - writer.WritePropertyName("output_format"); - writer.WriteStringValue(OutputFormatValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (!string.IsNullOrEmpty(TimezoneValue)) - { - writer.WritePropertyName("timezone"); - writer.WriteStringValue(TimezoneValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DateProcessorDescriptor : SerializableDescriptor -{ - internal DateProcessorDescriptor(Action configure) => configure.Invoke(this); - - public DateProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection FormatsValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? LocaleValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? OutputFormatValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private string? TimezoneValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DateProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to get the date from. - /// - /// - public DateProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date from. - /// - /// - public DateProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the date from. - /// - /// - public DateProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// An array of the expected date formats. - /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. - /// - /// - public DateProcessorDescriptor Formats(ICollection formats) - { - FormatsValue = formats; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DateProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DateProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The locale to use when parsing the date, relevant when parsing month names or week days. - /// Supports template snippets. - /// - /// - public DateProcessorDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DateProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DateProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DateProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The format to use when writing the date to target_field. Must be a valid - /// java time pattern. - /// - /// - public DateProcessorDescriptor OutputFormat(string? outputFormat) - { - OutputFormatValue = outputFormat; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DateProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - public DateProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - public DateProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the parsed date. - /// - /// - public DateProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The timezone to use when parsing the date. - /// Supports template snippets. - /// - /// - public DateProcessorDescriptor Timezone(string? timezone) - { - TimezoneValue = timezone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("formats"); - JsonSerializer.Serialize(writer, FormatsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(OutputFormatValue)) - { - writer.WritePropertyName("output_format"); - writer.WriteStringValue(OutputFormatValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (!string.IsNullOrEmpty(TimezoneValue)) - { - writer.WritePropertyName("timezone"); - writer.WriteStringValue(TimezoneValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs deleted file mode 100644 index 0d87b0ad6f6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DissectProcessor.g.cs +++ /dev/null @@ -1,611 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DissectProcessor -{ - /// - /// - /// The character(s) that separate the appended fields. - /// - /// - [JsonInclude, JsonPropertyName("append_separator")] - public string? AppendSeparator { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to dissect. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// The pattern to apply to the field. - /// - /// - [JsonInclude, JsonPropertyName("pattern")] - public string Pattern { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(DissectProcessor dissectProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Dissect(dissectProcessor); -} - -public sealed partial class DissectProcessorDescriptor : SerializableDescriptor> -{ - internal DissectProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public DissectProcessorDescriptor() : base() - { - } - - private string? AppendSeparatorValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string PatternValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// The character(s) that separate the appended fields. - /// - /// - public DissectProcessorDescriptor AppendSeparator(string? appendSeparator) - { - AppendSeparatorValue = appendSeparator; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DissectProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to dissect. - /// - /// - public DissectProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to dissect. - /// - /// - public DissectProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to dissect. - /// - /// - public DissectProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DissectProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DissectProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public DissectProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DissectProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The pattern to apply to the field. - /// - /// - public DissectProcessorDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DissectProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AppendSeparatorValue)) - { - writer.WritePropertyName("append_separator"); - writer.WriteStringValue(AppendSeparatorValue); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DissectProcessorDescriptor : SerializableDescriptor -{ - internal DissectProcessorDescriptor(Action configure) => configure.Invoke(this); - - public DissectProcessorDescriptor() : base() - { - } - - private string? AppendSeparatorValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string PatternValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// The character(s) that separate the appended fields. - /// - /// - public DissectProcessorDescriptor AppendSeparator(string? appendSeparator) - { - AppendSeparatorValue = appendSeparator; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DissectProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to dissect. - /// - /// - public DissectProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to dissect. - /// - /// - public DissectProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to dissect. - /// - /// - public DissectProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DissectProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DissectProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public DissectProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DissectProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DissectProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DissectProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The pattern to apply to the field. - /// - /// - public DissectProcessorDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DissectProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AppendSeparatorValue)) - { - writer.WritePropertyName("append_separator"); - writer.WriteStringValue(AppendSeparatorValue); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Document.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Document.g.cs deleted file mode 100644 index 9b19111ef15..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Document.g.cs +++ /dev/null @@ -1,123 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Document -{ - /// - /// - /// Unique identifier for the document. - /// This ID must be unique within the _index. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Name of the index containing the document. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// JSON body for the document. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public object Source { get; set; } -} - -public sealed partial class DocumentDescriptor : SerializableDescriptor -{ - internal DocumentDescriptor(Action configure) => configure.Invoke(this); - - public DocumentDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private object SourceValue { get; set; } - - /// - /// - /// Unique identifier for the document. - /// This ID must be unique within the _index. - /// - /// - public DocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Name of the index containing the document. - /// - /// - public DocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// JSON body for the document. - /// - /// - public DocumentDescriptor Source(object source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DocumentSimulation.g.cs deleted file mode 100644 index 13bfc8367f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DocumentSimulation.g.cs +++ /dev/null @@ -1,151 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -internal sealed partial class DocumentSimulationConverter : JsonConverter -{ - public override DocumentSimulation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - string id = default; - string index = default; - Elastic.Clients.Elasticsearch.Serverless.Ingest.IngestInfo ingest = default; - string? routing = default; - IReadOnlyDictionary source = default; - long? version = default; - Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "_id") - { - id = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_index") - { - index = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_ingest") - { - ingest = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_routing") - { - routing = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_source") - { - source = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "_version") - { - version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_version_type") - { - versionType = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - return new DocumentSimulation { Id = id, Index = index, Ingest = ingest, Metadata = additionalProperties, Routing = routing, Source = source, Version = version, VersionType = versionType }; - } - - public override void Write(Utf8JsonWriter writer, DocumentSimulation value, JsonSerializerOptions options) - { - throw new NotImplementedException("'DocumentSimulation' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -/// -/// -/// The simulated document, with optional metadata. -/// -/// -[JsonConverter(typeof(DocumentSimulationConverter))] -public sealed partial class DocumentSimulation -{ - /// - /// - /// Unique identifier for the document. This ID must be unique within the _index. - /// - /// - public string Id { get; init; } - - /// - /// - /// Name of the index containing the document. - /// - /// - public string Index { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.Ingest.IngestInfo Ingest { get; init; } - - /// - /// - /// Additional metadata - /// - /// - public IReadOnlyDictionary Metadata { get; init; } - - /// - /// - /// Value used to send the document to a specific primary shard. - /// - /// - public string? Routing { get; init; } - - /// - /// - /// JSON body for the document. - /// - /// - public IReadOnlyDictionary Source { get; init; } - public long? Version { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs deleted file mode 100644 index e0c64014ac1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DotExpanderProcessor.g.cs +++ /dev/null @@ -1,591 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DotExpanderProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. - /// When false, the processor will merge conflicts by combining the old and the new values into an array. - /// When true, the value from the expanded field will overwrite the existing value. - /// - /// - [JsonInclude, JsonPropertyName("override")] - public bool? Override { get; set; } - - /// - /// - /// The field that contains the field to expand. - /// Only required if the field to expand is part another object field, because the field option can only understand leaf fields. - /// - /// - [JsonInclude, JsonPropertyName("path")] - public string? Path { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(DotExpanderProcessor dotExpanderProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.DotExpander(dotExpanderProcessor); -} - -public sealed partial class DotExpanderProcessorDescriptor : SerializableDescriptor> -{ - internal DotExpanderProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public DotExpanderProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private bool? OverrideValue { get; set; } - private string? PathValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DotExpanderProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - public DotExpanderProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - public DotExpanderProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - public DotExpanderProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DotExpanderProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DotExpanderProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. - /// When false, the processor will merge conflicts by combining the old and the new values into an array. - /// When true, the value from the expanded field will overwrite the existing value. - /// - /// - public DotExpanderProcessorDescriptor Override(bool? value = true) - { - OverrideValue = value; - return Self; - } - - /// - /// - /// The field that contains the field to expand. - /// Only required if the field to expand is part another object field, because the field option can only understand leaf fields. - /// - /// - public DotExpanderProcessorDescriptor Path(string? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DotExpanderProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OverrideValue.HasValue) - { - writer.WritePropertyName("override"); - writer.WriteBooleanValue(OverrideValue.Value); - } - - if (!string.IsNullOrEmpty(PathValue)) - { - writer.WritePropertyName("path"); - writer.WriteStringValue(PathValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DotExpanderProcessorDescriptor : SerializableDescriptor -{ - internal DotExpanderProcessorDescriptor(Action configure) => configure.Invoke(this); - - public DotExpanderProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private bool? OverrideValue { get; set; } - private string? PathValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DotExpanderProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - public DotExpanderProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - public DotExpanderProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to expand into an object field. - /// If set to *, all top-level fields will be expanded. - /// - /// - public DotExpanderProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DotExpanderProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DotExpanderProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DotExpanderProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DotExpanderProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls the behavior when there is already an existing nested object that conflicts with the expanded field. - /// When false, the processor will merge conflicts by combining the old and the new values into an array. - /// When true, the value from the expanded field will overwrite the existing value. - /// - /// - public DotExpanderProcessorDescriptor Override(bool? value = true) - { - OverrideValue = value; - return Self; - } - - /// - /// - /// The field that contains the field to expand. - /// Only required if the field to expand is part another object field, because the field option can only understand leaf fields. - /// - /// - public DotExpanderProcessorDescriptor Path(string? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DotExpanderProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OverrideValue.HasValue) - { - writer.WritePropertyName("override"); - writer.WriteBooleanValue(OverrideValue.Value); - } - - if (!string.IsNullOrEmpty(PathValue)) - { - writer.WritePropertyName("path"); - writer.WriteStringValue(PathValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs deleted file mode 100644 index 1b6659d3e63..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DropProcessor.g.cs +++ /dev/null @@ -1,407 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class DropProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(DropProcessor dropProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Drop(dropProcessor); -} - -public sealed partial class DropProcessorDescriptor : SerializableDescriptor> -{ - internal DropProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public DropProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DropProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DropProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DropProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DropProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DropProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DropProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DropProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DropProcessorDescriptor : SerializableDescriptor -{ - internal DropProcessorDescriptor(Action configure) => configure.Invoke(this); - - public DropProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public DropProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public DropProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public DropProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public DropProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public DropProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public DropProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public DropProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public DropProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs deleted file mode 100644 index fa0d6e8c1df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/EnrichProcessor.g.cs +++ /dev/null @@ -1,805 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class EnrichProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// The maximum number of matched documents to include under the configured target field. - /// The target_field will be turned into a json array if max_matches is higher than 1, otherwise target_field will become a json object. - /// In order to avoid documents getting too large, the maximum allowed value is 128. - /// - /// - [JsonInclude, JsonPropertyName("max_matches")] - public int? MaxMatches { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// If processor will update fields with pre-existing non-null-valued field. - /// When set to false, such fields will not be touched. - /// - /// - [JsonInclude, JsonPropertyName("override")] - public bool? Override { get; set; } - - /// - /// - /// The name of the enrich policy to use. - /// - /// - [JsonInclude, JsonPropertyName("policy_name")] - public string PolicyName { get; set; } - - /// - /// - /// A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index. - /// This option is only used for geo_match enrich policy types. - /// - /// - [JsonInclude, JsonPropertyName("shape_relation")] - public Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? ShapeRelation { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(EnrichProcessor enrichProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Enrich(enrichProcessor); -} - -public sealed partial class EnrichProcessorDescriptor : SerializableDescriptor> -{ - internal EnrichProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public EnrichProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private int? MaxMatchesValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private bool? OverrideValue { get; set; } - private string PolicyNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? ShapeRelationValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public EnrichProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public EnrichProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public EnrichProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public EnrichProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// The maximum number of matched documents to include under the configured target field. - /// The target_field will be turned into a json array if max_matches is higher than 1, otherwise target_field will become a json object. - /// In order to avoid documents getting too large, the maximum allowed value is 128. - /// - /// - public EnrichProcessorDescriptor MaxMatches(int? maxMatches) - { - MaxMatchesValue = maxMatches; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If processor will update fields with pre-existing non-null-valued field. - /// When set to false, such fields will not be touched. - /// - /// - public EnrichProcessorDescriptor Override(bool? value = true) - { - OverrideValue = value; - return Self; - } - - /// - /// - /// The name of the enrich policy to use. - /// - /// - public EnrichProcessorDescriptor PolicyName(string policyName) - { - PolicyNameValue = policyName; - return Self; - } - - /// - /// - /// A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index. - /// This option is only used for geo_match enrich policy types. - /// - /// - public EnrichProcessorDescriptor ShapeRelation(Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? shapeRelation) - { - ShapeRelationValue = shapeRelation; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public EnrichProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (MaxMatchesValue.HasValue) - { - writer.WritePropertyName("max_matches"); - writer.WriteNumberValue(MaxMatchesValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OverrideValue.HasValue) - { - writer.WritePropertyName("override"); - writer.WriteBooleanValue(OverrideValue.Value); - } - - writer.WritePropertyName("policy_name"); - writer.WriteStringValue(PolicyNameValue); - if (ShapeRelationValue is not null) - { - writer.WritePropertyName("shape_relation"); - JsonSerializer.Serialize(writer, ShapeRelationValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class EnrichProcessorDescriptor : SerializableDescriptor -{ - internal EnrichProcessorDescriptor(Action configure) => configure.Invoke(this); - - public EnrichProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private int? MaxMatchesValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private bool? OverrideValue { get; set; } - private string PolicyNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? ShapeRelationValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public EnrichProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field in the input document that matches the policies match_field used to retrieve the enrichment data. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public EnrichProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public EnrichProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public EnrichProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// The maximum number of matched documents to include under the configured target field. - /// The target_field will be turned into a json array if max_matches is higher than 1, otherwise target_field will become a json object. - /// In order to avoid documents getting too large, the maximum allowed value is 128. - /// - /// - public EnrichProcessorDescriptor MaxMatches(int? maxMatches) - { - MaxMatchesValue = maxMatches; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public EnrichProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public EnrichProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If processor will update fields with pre-existing non-null-valued field. - /// When set to false, such fields will not be touched. - /// - /// - public EnrichProcessorDescriptor Override(bool? value = true) - { - OverrideValue = value; - return Self; - } - - /// - /// - /// The name of the enrich policy to use. - /// - /// - public EnrichProcessorDescriptor PolicyName(string policyName) - { - PolicyNameValue = policyName; - return Self; - } - - /// - /// - /// A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index. - /// This option is only used for geo_match enrich policy types. - /// - /// - public EnrichProcessorDescriptor ShapeRelation(Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? shapeRelation) - { - ShapeRelationValue = shapeRelation; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public EnrichProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain enrich data. This field contains both the match_field and enrich_fields specified in the enrich policy. - /// Supports template snippets. - /// - /// - public EnrichProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (MaxMatchesValue.HasValue) - { - writer.WritePropertyName("max_matches"); - writer.WriteNumberValue(MaxMatchesValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OverrideValue.HasValue) - { - writer.WritePropertyName("override"); - writer.WriteBooleanValue(OverrideValue.Value); - } - - writer.WritePropertyName("policy_name"); - writer.WriteStringValue(PolicyNameValue); - if (ShapeRelationValue is not null) - { - writer.WritePropertyName("shape_relation"); - JsonSerializer.Serialize(writer, ShapeRelationValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FailProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FailProcessor.g.cs deleted file mode 100644 index 5d77e770c5b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FailProcessor.g.cs +++ /dev/null @@ -1,446 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class FailProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// The error message thrown by the processor. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("message")] - public string Message { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(FailProcessor failProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Fail(failProcessor); -} - -public sealed partial class FailProcessorDescriptor : SerializableDescriptor> -{ - internal FailProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public FailProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string MessageValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public FailProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public FailProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The error message thrown by the processor. - /// Supports template snippets. - /// - /// - public FailProcessorDescriptor Message(string message) - { - MessageValue = message; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public FailProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public FailProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public FailProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public FailProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public FailProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - writer.WritePropertyName("message"); - writer.WriteStringValue(MessageValue); - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FailProcessorDescriptor : SerializableDescriptor -{ - internal FailProcessorDescriptor(Action configure) => configure.Invoke(this); - - public FailProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string MessageValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public FailProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public FailProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public FailProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The error message thrown by the processor. - /// Supports template snippets. - /// - /// - public FailProcessorDescriptor Message(string message) - { - MessageValue = message; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public FailProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public FailProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public FailProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public FailProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public FailProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - writer.WritePropertyName("message"); - writer.WriteStringValue(MessageValue); - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs deleted file mode 100644 index 810dbfa3704..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs +++ /dev/null @@ -1,676 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class FingerprintProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Array of fields to include in the fingerprint. For objects, the processor - /// hashes both the field key and value. For other fields, the processor hashes - /// only the field value. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields Fields { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true, the processor ignores any missing fields. If all fields are - /// missing, the processor silently exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// The hash method used to compute the fingerprint. Must be one of MD5, SHA-1, - /// SHA-256, SHA-512, or MurmurHash3. - /// - /// - [JsonInclude, JsonPropertyName("method")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? Method { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Salt value for the hash function. - /// - /// - [JsonInclude, JsonPropertyName("salt")] - public string? Salt { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Output field for the fingerprint. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(FingerprintProcessor fingerprintProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Fingerprint(fingerprintProcessor); -} - -public sealed partial class FingerprintProcessorDescriptor : SerializableDescriptor> -{ - internal FingerprintProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public FingerprintProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields FieldsValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? MethodValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? SaltValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public FingerprintProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Array of fields to include in the fingerprint. For objects, the processor - /// hashes both the field key and value. For other fields, the processor hashes - /// only the field value. - /// - /// - public FingerprintProcessorDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public FingerprintProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public FingerprintProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true, the processor ignores any missing fields. If all fields are - /// missing, the processor silently exits without modifying the document. - /// - /// - public FingerprintProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// The hash method used to compute the fingerprint. Must be one of MD5, SHA-1, - /// SHA-256, SHA-512, or MurmurHash3. - /// - /// - public FingerprintProcessorDescriptor Method(Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? method) - { - MethodValue = method; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public FingerprintProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public FingerprintProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public FingerprintProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public FingerprintProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Salt value for the hash function. - /// - /// - public FingerprintProcessorDescriptor Salt(string? salt) - { - SaltValue = salt; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public FingerprintProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the fingerprint. - /// - /// - public FingerprintProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the fingerprint. - /// - /// - public FingerprintProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the fingerprint. - /// - /// - public FingerprintProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (MethodValue is not null) - { - writer.WritePropertyName("method"); - JsonSerializer.Serialize(writer, MethodValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(SaltValue)) - { - writer.WritePropertyName("salt"); - writer.WriteStringValue(SaltValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FingerprintProcessorDescriptor : SerializableDescriptor -{ - internal FingerprintProcessorDescriptor(Action configure) => configure.Invoke(this); - - public FingerprintProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields FieldsValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? MethodValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? SaltValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public FingerprintProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Array of fields to include in the fingerprint. For objects, the processor - /// hashes both the field key and value. For other fields, the processor hashes - /// only the field value. - /// - /// - public FingerprintProcessorDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public FingerprintProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public FingerprintProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true, the processor ignores any missing fields. If all fields are - /// missing, the processor silently exits without modifying the document. - /// - /// - public FingerprintProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// The hash method used to compute the fingerprint. Must be one of MD5, SHA-1, - /// SHA-256, SHA-512, or MurmurHash3. - /// - /// - public FingerprintProcessorDescriptor Method(Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? method) - { - MethodValue = method; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public FingerprintProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public FingerprintProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public FingerprintProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public FingerprintProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Salt value for the hash function. - /// - /// - public FingerprintProcessorDescriptor Salt(string? salt) - { - SaltValue = salt; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public FingerprintProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the fingerprint. - /// - /// - public FingerprintProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the fingerprint. - /// - /// - public FingerprintProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the fingerprint. - /// - /// - public FingerprintProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (MethodValue is not null) - { - writer.WritePropertyName("method"); - JsonSerializer.Serialize(writer, MethodValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(SaltValue)) - { - writer.WritePropertyName("salt"); - writer.WriteStringValue(SaltValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs deleted file mode 100644 index 691c22c137e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ForeachProcessor.g.cs +++ /dev/null @@ -1,635 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class ForeachProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Field containing array or object values. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true, the processor silently exits without changing the document if the field is null or missing. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Ingest processor to run on each element. - /// - /// - [JsonInclude, JsonPropertyName("processor")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor Processor { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(ForeachProcessor foreachProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Foreach(foreachProcessor); -} - -public sealed partial class ForeachProcessorDescriptor : SerializableDescriptor> -{ - internal ForeachProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public ForeachProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor ProcessorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor ProcessorDescriptor { get; set; } - private Action> ProcessorDescriptorAction { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public ForeachProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing array or object values. - /// - /// - public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array or object values. - /// - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array or object values. - /// - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public ForeachProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true, the processor silently exits without changing the document if the field is null or missing. - /// - /// - public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public ForeachProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ForeachProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ForeachProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ForeachProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Ingest processor to run on each element. - /// - /// - public ForeachProcessorDescriptor Processor(Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor processor) - { - ProcessorDescriptor = null; - ProcessorDescriptorAction = null; - ProcessorValue = processor; - return Self; - } - - public ForeachProcessorDescriptor Processor(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - ProcessorValue = null; - ProcessorDescriptorAction = null; - ProcessorDescriptor = descriptor; - return Self; - } - - public ForeachProcessorDescriptor Processor(Action> configure) - { - ProcessorValue = null; - ProcessorDescriptor = null; - ProcessorDescriptorAction = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public ForeachProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ProcessorDescriptor is not null) - { - writer.WritePropertyName("processor"); - JsonSerializer.Serialize(writer, ProcessorDescriptor, options); - } - else if (ProcessorDescriptorAction is not null) - { - writer.WritePropertyName("processor"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(ProcessorDescriptorAction), options); - } - else - { - writer.WritePropertyName("processor"); - JsonSerializer.Serialize(writer, ProcessorValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ForeachProcessorDescriptor : SerializableDescriptor -{ - internal ForeachProcessorDescriptor(Action configure) => configure.Invoke(this); - - public ForeachProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor ProcessorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor ProcessorDescriptor { get; set; } - private Action ProcessorDescriptorAction { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public ForeachProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing array or object values. - /// - /// - public ForeachProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array or object values. - /// - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array or object values. - /// - /// - public ForeachProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public ForeachProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public ForeachProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true, the processor silently exits without changing the document if the field is null or missing. - /// - /// - public ForeachProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public ForeachProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ForeachProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ForeachProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ForeachProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Ingest processor to run on each element. - /// - /// - public ForeachProcessorDescriptor Processor(Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor processor) - { - ProcessorDescriptor = null; - ProcessorDescriptorAction = null; - ProcessorValue = processor; - return Self; - } - - public ForeachProcessorDescriptor Processor(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - ProcessorValue = null; - ProcessorDescriptorAction = null; - ProcessorDescriptor = descriptor; - return Self; - } - - public ForeachProcessorDescriptor Processor(Action configure) - { - ProcessorValue = null; - ProcessorDescriptor = null; - ProcessorDescriptorAction = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public ForeachProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ProcessorDescriptor is not null) - { - writer.WritePropertyName("processor"); - JsonSerializer.Serialize(writer, ProcessorDescriptor, options); - } - else if (ProcessorDescriptorAction is not null) - { - writer.WritePropertyName("processor"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(ProcessorDescriptorAction), options); - } - else - { - writer.WritePropertyName("processor"); - JsonSerializer.Serialize(writer, ProcessorValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs deleted file mode 100644 index 869d5a103e6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoGridProcessor.g.cs +++ /dev/null @@ -1,1010 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GeoGridProcessor -{ - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - [JsonInclude, JsonPropertyName("children_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ChildrenField { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to interpret as a geo-tile.= - /// The field format is determined by the tile_type. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public string Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - [JsonInclude, JsonPropertyName("non_children_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? NonChildrenField { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - [JsonInclude, JsonPropertyName("parent_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ParentField { get; set; } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - [JsonInclude, JsonPropertyName("precision_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? PrecisionField { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - /// - /// - /// Which format to save the generated polygon in. - /// - /// - [JsonInclude, JsonPropertyName("target_format")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? TargetFormat { get; set; } - - /// - /// - /// Three tile formats are understood: geohash, geotile and geohex. - /// - /// - [JsonInclude, JsonPropertyName("tile_type")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType TileType { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(GeoGridProcessor geoGridProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.GeoGrid(geoGridProcessor); -} - -public sealed partial class GeoGridProcessorDescriptor : SerializableDescriptor> -{ - internal GeoGridProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public GeoGridProcessorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? ChildrenFieldValue { get; set; } - private string? DescriptionValue { get; set; } - private string FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? NonChildrenFieldValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ParentFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PrecisionFieldValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? TargetFormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType TileTypeValue { get; set; } - - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor ChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? childrenField) - { - ChildrenFieldValue = childrenField; - return Self; - } - - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) - { - ChildrenFieldValue = childrenField; - return Self; - } - - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) - { - ChildrenFieldValue = childrenField; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GeoGridProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to interpret as a geo-tile.= - /// The field format is determined by the tile_type. - /// - /// - public GeoGridProcessorDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GeoGridProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GeoGridProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public GeoGridProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor NonChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? nonChildrenField) - { - NonChildrenFieldValue = nonChildrenField; - return Self; - } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) - { - NonChildrenFieldValue = nonChildrenField; - return Self; - } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) - { - NonChildrenFieldValue = nonChildrenField; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GeoGridProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoGridProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoGridProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoGridProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - public GeoGridProcessorDescriptor ParentField(Elastic.Clients.Elasticsearch.Serverless.Field? parentField) - { - ParentFieldValue = parentField; - return Self; - } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - public GeoGridProcessorDescriptor ParentField(Expression> parentField) - { - ParentFieldValue = parentField; - return Self; - } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - public GeoGridProcessorDescriptor ParentField(Expression> parentField) - { - ParentFieldValue = parentField; - return Self; - } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - public GeoGridProcessorDescriptor PrecisionField(Elastic.Clients.Elasticsearch.Serverless.Field? precisionField) - { - PrecisionFieldValue = precisionField; - return Self; - } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) - { - PrecisionFieldValue = precisionField; - return Self; - } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) - { - PrecisionFieldValue = precisionField; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GeoGridProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - public GeoGridProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - public GeoGridProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - public GeoGridProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Which format to save the generated polygon in. - /// - /// - public GeoGridProcessorDescriptor TargetFormat(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? targetFormat) - { - TargetFormatValue = targetFormat; - return Self; - } - - /// - /// - /// Three tile formats are understood: geohash, geotile and geohex. - /// - /// - public GeoGridProcessorDescriptor TileType(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType tileType) - { - TileTypeValue = tileType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ChildrenFieldValue is not null) - { - writer.WritePropertyName("children_field"); - JsonSerializer.Serialize(writer, ChildrenFieldValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (NonChildrenFieldValue is not null) - { - writer.WritePropertyName("non_children_field"); - JsonSerializer.Serialize(writer, NonChildrenFieldValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ParentFieldValue is not null) - { - writer.WritePropertyName("parent_field"); - JsonSerializer.Serialize(writer, ParentFieldValue, options); - } - - if (PrecisionFieldValue is not null) - { - writer.WritePropertyName("precision_field"); - JsonSerializer.Serialize(writer, PrecisionFieldValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (TargetFormatValue is not null) - { - writer.WritePropertyName("target_format"); - JsonSerializer.Serialize(writer, TargetFormatValue, options); - } - - writer.WritePropertyName("tile_type"); - JsonSerializer.Serialize(writer, TileTypeValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class GeoGridProcessorDescriptor : SerializableDescriptor -{ - internal GeoGridProcessorDescriptor(Action configure) => configure.Invoke(this); - - public GeoGridProcessorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? ChildrenFieldValue { get; set; } - private string? DescriptionValue { get; set; } - private string FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? NonChildrenFieldValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ParentFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PrecisionFieldValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? TargetFormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType TileTypeValue { get; set; } - - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor ChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? childrenField) - { - ChildrenFieldValue = childrenField; - return Self; - } - - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) - { - ChildrenFieldValue = childrenField; - return Self; - } - - /// - /// - /// If specified and children tiles exist, save those tile addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor ChildrenField(Expression> childrenField) - { - ChildrenFieldValue = childrenField; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GeoGridProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to interpret as a geo-tile.= - /// The field format is determined by the tile_type. - /// - /// - public GeoGridProcessorDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GeoGridProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GeoGridProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public GeoGridProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor NonChildrenField(Elastic.Clients.Elasticsearch.Serverless.Field? nonChildrenField) - { - NonChildrenFieldValue = nonChildrenField; - return Self; - } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) - { - NonChildrenFieldValue = nonChildrenField; - return Self; - } - - /// - /// - /// If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings. - /// - /// - public GeoGridProcessorDescriptor NonChildrenField(Expression> nonChildrenField) - { - NonChildrenFieldValue = nonChildrenField; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GeoGridProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoGridProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoGridProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoGridProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - public GeoGridProcessorDescriptor ParentField(Elastic.Clients.Elasticsearch.Serverless.Field? parentField) - { - ParentFieldValue = parentField; - return Self; - } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - public GeoGridProcessorDescriptor ParentField(Expression> parentField) - { - ParentFieldValue = parentField; - return Self; - } - - /// - /// - /// If specified and a parent tile exists, save that tile address to this field. - /// - /// - public GeoGridProcessorDescriptor ParentField(Expression> parentField) - { - ParentFieldValue = parentField; - return Self; - } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - public GeoGridProcessorDescriptor PrecisionField(Elastic.Clients.Elasticsearch.Serverless.Field? precisionField) - { - PrecisionFieldValue = precisionField; - return Self; - } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) - { - PrecisionFieldValue = precisionField; - return Self; - } - - /// - /// - /// If specified, save the tile precision (zoom) as an integer to this field. - /// - /// - public GeoGridProcessorDescriptor PrecisionField(Expression> precisionField) - { - PrecisionFieldValue = precisionField; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GeoGridProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - public GeoGridProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - public GeoGridProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the polygon shape to, by default, the field is updated in-place. - /// - /// - public GeoGridProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Which format to save the generated polygon in. - /// - /// - public GeoGridProcessorDescriptor TargetFormat(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTargetFormat? targetFormat) - { - TargetFormatValue = targetFormat; - return Self; - } - - /// - /// - /// Three tile formats are understood: geohash, geotile and geohex. - /// - /// - public GeoGridProcessorDescriptor TileType(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridTileType tileType) - { - TileTypeValue = tileType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ChildrenFieldValue is not null) - { - writer.WritePropertyName("children_field"); - JsonSerializer.Serialize(writer, ChildrenFieldValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (NonChildrenFieldValue is not null) - { - writer.WritePropertyName("non_children_field"); - JsonSerializer.Serialize(writer, NonChildrenFieldValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ParentFieldValue is not null) - { - writer.WritePropertyName("parent_field"); - JsonSerializer.Serialize(writer, ParentFieldValue, options); - } - - if (PrecisionFieldValue is not null) - { - writer.WritePropertyName("precision_field"); - JsonSerializer.Serialize(writer, PrecisionFieldValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (TargetFormatValue is not null) - { - writer.WritePropertyName("target_format"); - JsonSerializer.Serialize(writer, TargetFormatValue, options); - } - - writer.WritePropertyName("tile_type"); - JsonSerializer.Serialize(writer, TileTypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpDownloadStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpDownloadStatistics.g.cs deleted file mode 100644 index 053f79ee61a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpDownloadStatistics.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GeoIpDownloadStatistics -{ - /// - /// - /// Current number of databases available for use. - /// - /// - [JsonInclude, JsonPropertyName("databases_count")] - public int DatabasesCount { get; init; } - - /// - /// - /// Total number of databases not updated after 30 days - /// - /// - [JsonInclude, JsonPropertyName("expired_databases")] - public int ExpiredDatabases { get; init; } - - /// - /// - /// Total number of failed database downloads. - /// - /// - [JsonInclude, JsonPropertyName("failed_downloads")] - public int FailedDownloads { get; init; } - - /// - /// - /// Total number of database updates skipped. - /// - /// - [JsonInclude, JsonPropertyName("skipped_updates")] - public int SkippedUpdates { get; init; } - - /// - /// - /// Total number of successful database downloads. - /// - /// - [JsonInclude, JsonPropertyName("successful_downloads")] - public int SuccessfulDownloads { get; init; } - - /// - /// - /// Total milliseconds spent downloading databases. - /// - /// - [JsonInclude, JsonPropertyName("total_download_time")] - public long TotalDownloadTime { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabaseName.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabaseName.g.cs deleted file mode 100644 index 4946807577b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabaseName.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GeoIpNodeDatabaseName -{ - /// - /// - /// Name of the database. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabases.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabases.g.cs deleted file mode 100644 index 67416283f12..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpNodeDatabases.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -/// -/// -/// Downloaded databases for the node. The field key is the node ID. -/// -/// -public sealed partial class GeoIpNodeDatabases -{ - /// - /// - /// Downloaded databases for the node. - /// - /// - [JsonInclude, JsonPropertyName("databases")] - public IReadOnlyCollection Databases { get; init; } - - /// - /// - /// Downloaded database files, including related license files. Elasticsearch stores these files in the node’s temporary directory: $ES_TMPDIR/geoip-databases/<node_id>. - /// - /// - [JsonInclude, JsonPropertyName("files_in_temp")] - public IReadOnlyCollection FilesInTemp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs deleted file mode 100644 index 7cb501b0299..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GeoIpProcessor.g.cs +++ /dev/null @@ -1,798 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GeoIpProcessor -{ - /// - /// - /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. - /// - /// - [JsonInclude, JsonPropertyName("database_file")] - public string? DatabaseFile { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. - /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. - /// - /// - [JsonInclude, JsonPropertyName("download_database_on_pipeline_creation")] - public bool? DownloadDatabaseOnPipelineCreation { get; set; } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// If true, only the first found geoip data will be returned, even if the field contains an array. - /// - /// - [JsonInclude, JsonPropertyName("first_only")] - public bool? FirstOnly { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Controls what properties are added to the target_field based on the geoip lookup. - /// - /// - [JsonInclude, JsonPropertyName("properties")] - public ICollection? Properties { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(GeoIpProcessor geoIpProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Geoip(geoIpProcessor); -} - -public sealed partial class GeoIpProcessorDescriptor : SerializableDescriptor> -{ - internal GeoIpProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public GeoIpProcessorDescriptor() : base() - { - } - - private string? DatabaseFileValue { get; set; } - private string? DescriptionValue { get; set; } - private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? FirstOnlyValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. - /// - /// - public GeoIpProcessorDescriptor DatabaseFile(string? databaseFile) - { - DatabaseFileValue = databaseFile; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GeoIpProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. - /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. - /// - /// - public GeoIpProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) - { - DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public GeoIpProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public GeoIpProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public GeoIpProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// If true, only the first found geoip data will be returned, even if the field contains an array. - /// - /// - public GeoIpProcessorDescriptor FirstOnly(bool? firstOnly = true) - { - FirstOnlyValue = firstOnly; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GeoIpProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GeoIpProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public GeoIpProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what properties are added to the target_field based on the geoip lookup. - /// - /// - public GeoIpProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GeoIpProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public GeoIpProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public GeoIpProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public GeoIpProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DatabaseFileValue)) - { - writer.WritePropertyName("database_file"); - writer.WriteStringValue(DatabaseFileValue); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DownloadDatabaseOnPipelineCreationValue.HasValue) - { - writer.WritePropertyName("download_database_on_pipeline_creation"); - writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FirstOnlyValue.HasValue) - { - writer.WritePropertyName("first_only"); - writer.WriteBooleanValue(FirstOnlyValue.Value); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoIpProcessorDescriptor : SerializableDescriptor -{ - internal GeoIpProcessorDescriptor(Action configure) => configure.Invoke(this); - - public GeoIpProcessorDescriptor() : base() - { - } - - private string? DatabaseFileValue { get; set; } - private string? DescriptionValue { get; set; } - private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? FirstOnlyValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. - /// - /// - public GeoIpProcessorDescriptor DatabaseFile(string? databaseFile) - { - DatabaseFileValue = databaseFile; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GeoIpProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. - /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. - /// - /// - public GeoIpProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) - { - DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public GeoIpProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public GeoIpProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public GeoIpProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// If true, only the first found geoip data will be returned, even if the field contains an array. - /// - /// - public GeoIpProcessorDescriptor FirstOnly(bool? firstOnly = true) - { - FirstOnlyValue = firstOnly; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GeoIpProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GeoIpProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public GeoIpProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GeoIpProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GeoIpProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what properties are added to the target_field based on the geoip lookup. - /// - /// - public GeoIpProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GeoIpProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public GeoIpProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public GeoIpProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public GeoIpProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DatabaseFileValue)) - { - writer.WritePropertyName("database_file"); - writer.WriteStringValue(DatabaseFileValue); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DownloadDatabaseOnPipelineCreationValue.HasValue) - { - writer.WritePropertyName("download_database_on_pipeline_creation"); - writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FirstOnlyValue.HasValue) - { - writer.WritePropertyName("first_only"); - writer.WriteBooleanValue(FirstOnlyValue.Value); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GrokProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GrokProcessor.g.cs deleted file mode 100644 index 4a802178b76..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GrokProcessor.g.cs +++ /dev/null @@ -1,708 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GrokProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Must be disabled or v1. If v1, the processor uses patterns with Elastic - /// Common Schema (ECS) field names. - /// - /// - [JsonInclude, JsonPropertyName("ecs_compatibility")] - public string? EcsCompatibility { get; set; } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. - /// Patterns matching existing names will override the pre-existing definition. - /// - /// - [JsonInclude, JsonPropertyName("pattern_definitions")] - public IDictionary? PatternDefinitions { get; set; } - - /// - /// - /// An ordered list of grok expression to match and extract named captures with. - /// Returns on the first expression in the list that matches. - /// - /// - [JsonInclude, JsonPropertyName("patterns")] - public ICollection Patterns { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// When true, _ingest._grok_match_index will be inserted into your matched document’s metadata with the index into the pattern found in patterns that matched. - /// - /// - [JsonInclude, JsonPropertyName("trace_match")] - public bool? TraceMatch { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(GrokProcessor grokProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Grok(grokProcessor); -} - -public sealed partial class GrokProcessorDescriptor : SerializableDescriptor> -{ - internal GrokProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public GrokProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? EcsCompatibilityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private IDictionary? PatternDefinitionsValue { get; set; } - private ICollection PatternsValue { get; set; } - private string? TagValue { get; set; } - private bool? TraceMatchValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GrokProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Must be disabled or v1. If v1, the processor uses patterns with Elastic - /// Common Schema (ECS) field names. - /// - /// - public GrokProcessorDescriptor EcsCompatibility(string? ecsCompatibility) - { - EcsCompatibilityValue = ecsCompatibility; - return Self; - } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - public GrokProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - public GrokProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - public GrokProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GrokProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GrokProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public GrokProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GrokProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. - /// Patterns matching existing names will override the pre-existing definition. - /// - /// - public GrokProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) - { - PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// An ordered list of grok expression to match and extract named captures with. - /// Returns on the first expression in the list that matches. - /// - /// - public GrokProcessorDescriptor Patterns(ICollection patterns) - { - PatternsValue = patterns; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GrokProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// When true, _ingest._grok_match_index will be inserted into your matched document’s metadata with the index into the pattern found in patterns that matched. - /// - /// - public GrokProcessorDescriptor TraceMatch(bool? traceMatch = true) - { - TraceMatchValue = traceMatch; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(EcsCompatibilityValue)) - { - writer.WritePropertyName("ecs_compatibility"); - writer.WriteStringValue(EcsCompatibilityValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PatternDefinitionsValue is not null) - { - writer.WritePropertyName("pattern_definitions"); - JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); - } - - writer.WritePropertyName("patterns"); - JsonSerializer.Serialize(writer, PatternsValue, options); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TraceMatchValue.HasValue) - { - writer.WritePropertyName("trace_match"); - writer.WriteBooleanValue(TraceMatchValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GrokProcessorDescriptor : SerializableDescriptor -{ - internal GrokProcessorDescriptor(Action configure) => configure.Invoke(this); - - public GrokProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? EcsCompatibilityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private IDictionary? PatternDefinitionsValue { get; set; } - private ICollection PatternsValue { get; set; } - private string? TagValue { get; set; } - private bool? TraceMatchValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GrokProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Must be disabled or v1. If v1, the processor uses patterns with Elastic - /// Common Schema (ECS) field names. - /// - /// - public GrokProcessorDescriptor EcsCompatibility(string? ecsCompatibility) - { - EcsCompatibilityValue = ecsCompatibility; - return Self; - } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - public GrokProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - public GrokProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to use for grok expression parsing. - /// - /// - public GrokProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GrokProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GrokProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public GrokProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GrokProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GrokProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GrokProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. - /// Patterns matching existing names will override the pre-existing definition. - /// - /// - public GrokProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) - { - PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// An ordered list of grok expression to match and extract named captures with. - /// Returns on the first expression in the list that matches. - /// - /// - public GrokProcessorDescriptor Patterns(ICollection patterns) - { - PatternsValue = patterns; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GrokProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// When true, _ingest._grok_match_index will be inserted into your matched document’s metadata with the index into the pattern found in patterns that matched. - /// - /// - public GrokProcessorDescriptor TraceMatch(bool? traceMatch = true) - { - TraceMatchValue = traceMatch; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(EcsCompatibilityValue)) - { - writer.WritePropertyName("ecs_compatibility"); - writer.WriteStringValue(EcsCompatibilityValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PatternDefinitionsValue is not null) - { - writer.WritePropertyName("pattern_definitions"); - JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); - } - - writer.WritePropertyName("patterns"); - JsonSerializer.Serialize(writer, PatternsValue, options); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TraceMatchValue.HasValue) - { - writer.WritePropertyName("trace_match"); - writer.WriteBooleanValue(TraceMatchValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs deleted file mode 100644 index 5982f39403c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/GsubProcessor.g.cs +++ /dev/null @@ -1,698 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class GsubProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to apply the replacement to. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// The pattern to be replaced. - /// - /// - [JsonInclude, JsonPropertyName("pattern")] - public string Pattern { get; set; } - - /// - /// - /// The string to replace the matching patterns with. - /// - /// - [JsonInclude, JsonPropertyName("replacement")] - public string Replacement { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(GsubProcessor gsubProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Gsub(gsubProcessor); -} - -public sealed partial class GsubProcessorDescriptor : SerializableDescriptor> -{ - internal GsubProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public GsubProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string PatternValue { get; set; } - private string ReplacementValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GsubProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to apply the replacement to. - /// - /// - public GsubProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to apply the replacement to. - /// - /// - public GsubProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to apply the replacement to. - /// - /// - public GsubProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GsubProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GsubProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public GsubProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GsubProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The pattern to be replaced. - /// - /// - public GsubProcessorDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - /// - /// - /// The string to replace the matching patterns with. - /// - /// - public GsubProcessorDescriptor Replacement(string replacement) - { - ReplacementValue = replacement; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GsubProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public GsubProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public GsubProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public GsubProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GsubProcessorDescriptor : SerializableDescriptor -{ - internal GsubProcessorDescriptor(Action configure) => configure.Invoke(this); - - public GsubProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string PatternValue { get; set; } - private string ReplacementValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public GsubProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to apply the replacement to. - /// - /// - public GsubProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to apply the replacement to. - /// - /// - public GsubProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to apply the replacement to. - /// - /// - public GsubProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public GsubProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public GsubProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public GsubProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public GsubProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public GsubProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public GsubProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The pattern to be replaced. - /// - /// - public GsubProcessorDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - /// - /// - /// The string to replace the matching patterns with. - /// - /// - public GsubProcessorDescriptor Replacement(string replacement) - { - ReplacementValue = replacement; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public GsubProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public GsubProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public GsubProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public GsubProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - writer.WritePropertyName("replacement"); - writer.WriteStringValue(ReplacementValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/HtmlStripProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/HtmlStripProcessor.g.cs deleted file mode 100644 index 82fd1b22c1a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/HtmlStripProcessor.g.cs +++ /dev/null @@ -1,626 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class HtmlStripProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document, - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(HtmlStripProcessor htmlStripProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.HtmlStrip(htmlStripProcessor); -} - -public sealed partial class HtmlStripProcessorDescriptor : SerializableDescriptor> -{ - internal HtmlStripProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public HtmlStripProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public HtmlStripProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - public HtmlStripProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - public HtmlStripProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - public HtmlStripProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public HtmlStripProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public HtmlStripProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document, - /// - /// - public HtmlStripProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public HtmlStripProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public HtmlStripProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public HtmlStripProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public HtmlStripProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public HtmlStripProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public HtmlStripProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public HtmlStripProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public HtmlStripProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class HtmlStripProcessorDescriptor : SerializableDescriptor -{ - internal HtmlStripProcessorDescriptor(Action configure) => configure.Invoke(this); - - public HtmlStripProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public HtmlStripProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - public HtmlStripProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - public HtmlStripProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to remove HTML tags from. - /// - /// - public HtmlStripProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public HtmlStripProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public HtmlStripProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document, - /// - /// - public HtmlStripProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public HtmlStripProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public HtmlStripProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public HtmlStripProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public HtmlStripProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public HtmlStripProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public HtmlStripProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public HtmlStripProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to - /// By default, the field is updated in-place. - /// - /// - public HtmlStripProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfig.g.cs deleted file mode 100644 index 7d79f093d47..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfig.g.cs +++ /dev/null @@ -1,242 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -[JsonConverter(typeof(InferenceConfigConverter))] -public sealed partial class InferenceConfig -{ - internal InferenceConfig(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 InferenceConfig Classification(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigClassification inferenceConfigClassification) => new InferenceConfig("classification", inferenceConfigClassification); - public static InferenceConfig Regression(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigRegression inferenceConfigRegression) => new InferenceConfig("regression", inferenceConfigRegression); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class InferenceConfigConverter : JsonConverter -{ - public override InferenceConfig 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; - 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 == "classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regression") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'InferenceConfig' from the response."); - } - - var result = new InferenceConfig(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, InferenceConfig value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigClassification)value.Variant, options); - break; - case "regression": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigRegression)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigDescriptor : SerializableDescriptor> -{ - internal InferenceConfigDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceConfigDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigClassification inferenceConfigClassification) => Set(inferenceConfigClassification, "classification"); - public InferenceConfigDescriptor Classification(Action> configure) => Set(configure, "classification"); - public InferenceConfigDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigRegression inferenceConfigRegression) => Set(inferenceConfigRegression, "regression"); - public InferenceConfigDescriptor Regression(Action> configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigDescriptor : SerializableDescriptor -{ - internal InferenceConfigDescriptor(Action configure) => configure.Invoke(this); - - public InferenceConfigDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigClassification inferenceConfigClassification) => Set(inferenceConfigClassification, "classification"); - public InferenceConfigDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigRegression inferenceConfigRegression) => Set(inferenceConfigRegression, "regression"); - public InferenceConfigDescriptor Regression(Action configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigClassification.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigClassification.g.cs deleted file mode 100644 index 226e73d3d6a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigClassification.g.cs +++ /dev/null @@ -1,376 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class InferenceConfigClassification -{ - /// - /// - /// Specifies the number of top class predictions to return. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - [JsonInclude, JsonPropertyName("num_top_feature_importance_values")] - public int? NumTopFeatureImportanceValues { get; set; } - - /// - /// - /// Specifies the type of the predicted field to write. - /// Valid values are: string, number, boolean. - /// - /// - [JsonInclude, JsonPropertyName("prediction_field_type")] - public string? PredictionFieldType { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ResultsField { get; set; } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - [JsonInclude, JsonPropertyName("top_classes_results_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TopClassesResultsField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig(InferenceConfigClassification inferenceConfigClassification) => Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig.Classification(inferenceConfigClassification); -} - -public sealed partial class InferenceConfigClassificationDescriptor : SerializableDescriptor> -{ - internal InferenceConfigClassificationDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceConfigClassificationDescriptor() : base() - { - } - - private int? NumTopClassesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private string? PredictionFieldTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TopClassesResultsFieldValue { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. - /// - /// - public InferenceConfigClassificationDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public InferenceConfigClassificationDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Specifies the type of the predicted field to write. - /// Valid values are: string, number, boolean. - /// - /// - public InferenceConfigClassificationDescriptor PredictionFieldType(string? predictionFieldType) - { - PredictionFieldTypeValue = predictionFieldType; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigClassificationDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigClassificationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigClassificationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - public InferenceConfigClassificationDescriptor TopClassesResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - public InferenceConfigClassificationDescriptor TopClassesResultsField(Expression> topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - public InferenceConfigClassificationDescriptor TopClassesResultsField(Expression> topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (!string.IsNullOrEmpty(PredictionFieldTypeValue)) - { - writer.WritePropertyName("prediction_field_type"); - writer.WriteStringValue(PredictionFieldTypeValue); - } - - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - if (TopClassesResultsFieldValue is not null) - { - writer.WritePropertyName("top_classes_results_field"); - JsonSerializer.Serialize(writer, TopClassesResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigClassificationDescriptor : SerializableDescriptor -{ - internal InferenceConfigClassificationDescriptor(Action configure) => configure.Invoke(this); - - public InferenceConfigClassificationDescriptor() : base() - { - } - - private int? NumTopClassesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private string? PredictionFieldTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TopClassesResultsFieldValue { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. - /// - /// - public InferenceConfigClassificationDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public InferenceConfigClassificationDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Specifies the type of the predicted field to write. - /// Valid values are: string, number, boolean. - /// - /// - public InferenceConfigClassificationDescriptor PredictionFieldType(string? predictionFieldType) - { - PredictionFieldTypeValue = predictionFieldType; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigClassificationDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigClassificationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigClassificationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - public InferenceConfigClassificationDescriptor TopClassesResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - public InferenceConfigClassificationDescriptor TopClassesResultsField(Expression> topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. - /// - /// - public InferenceConfigClassificationDescriptor TopClassesResultsField(Expression> topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (!string.IsNullOrEmpty(PredictionFieldTypeValue)) - { - writer.WritePropertyName("prediction_field_type"); - writer.WriteStringValue(PredictionFieldTypeValue); - } - - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - if (TopClassesResultsFieldValue is not null) - { - writer.WritePropertyName("top_classes_results_field"); - JsonSerializer.Serialize(writer, TopClassesResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigRegression.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigRegression.g.cs deleted file mode 100644 index 7cff6fb9ae8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceConfigRegression.g.cs +++ /dev/null @@ -1,197 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class InferenceConfigRegression -{ - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - [JsonInclude, JsonPropertyName("num_top_feature_importance_values")] - public int? NumTopFeatureImportanceValues { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ResultsField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig(InferenceConfigRegression inferenceConfigRegression) => Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig.Regression(inferenceConfigRegression); -} - -public sealed partial class InferenceConfigRegressionDescriptor : SerializableDescriptor> -{ - internal InferenceConfigRegressionDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceConfigRegressionDescriptor() : base() - { - } - - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public InferenceConfigRegressionDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigRegressionDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigRegressionDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigRegressionDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigRegressionDescriptor : SerializableDescriptor -{ - internal InferenceConfigRegressionDescriptor(Action configure) => configure.Invoke(this); - - public InferenceConfigRegressionDescriptor() : base() - { - } - - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public InferenceConfigRegressionDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigRegressionDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigRegressionDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. - /// - /// - public InferenceConfigRegressionDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceProcessor.g.cs deleted file mode 100644 index 402c858e867..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/InferenceProcessor.g.cs +++ /dev/null @@ -1,682 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class InferenceProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Maps the document field names to the known field names of the model. - /// This mapping takes precedence over any default mappings provided in the model configuration. - /// - /// - [JsonInclude, JsonPropertyName("field_map")] - public IDictionary? FieldMap { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Contains the inference type and its options. - /// - /// - [JsonInclude, JsonPropertyName("inference_config")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? InferenceConfig { get; set; } - - /// - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id ModelId { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(InferenceProcessor inferenceProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Inference(inferenceProcessor); -} - -public sealed partial class InferenceProcessorDescriptor : SerializableDescriptor> -{ - internal InferenceProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private IDictionary? FieldMapValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action> InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id ModelIdValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public InferenceProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Maps the document field names to the known field names of the model. - /// This mapping takes precedence over any default mappings provided in the model configuration. - /// - /// - public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) - { - FieldMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public InferenceProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Contains the inference type and its options. - /// - /// - public InferenceProcessorDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public InferenceProcessorDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public InferenceProcessorDescriptor InferenceConfig(Action> configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - /// - public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - ModelIdValue = modelId; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public InferenceProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public InferenceProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public InferenceProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public InferenceProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public InferenceProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - public InferenceProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - public InferenceProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - public InferenceProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (FieldMapValue is not null) - { - writer.WritePropertyName("field_map"); - JsonSerializer.Serialize(writer, FieldMapValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - writer.WritePropertyName("model_id"); - JsonSerializer.Serialize(writer, ModelIdValue, options); - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceProcessorDescriptor : SerializableDescriptor -{ - internal InferenceProcessorDescriptor(Action configure) => configure.Invoke(this); - - public InferenceProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private IDictionary? FieldMapValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? InferenceConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } - private Action InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id ModelIdValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public InferenceProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Maps the document field names to the known field names of the model. - /// This mapping takes precedence over any default mappings provided in the model configuration. - /// - /// - public InferenceProcessorDescriptor FieldMap(Func, FluentDictionary> selector) - { - FieldMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public InferenceProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public InferenceProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Contains the inference type and its options. - /// - /// - public InferenceProcessorDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfig? inferenceConfig) - { - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = null; - InferenceConfigValue = inferenceConfig; - return Self; - } - - public InferenceProcessorDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigDescriptor descriptor) - { - InferenceConfigValue = null; - InferenceConfigDescriptorAction = null; - InferenceConfigDescriptor = descriptor; - return Self; - } - - public InferenceProcessorDescriptor InferenceConfig(Action configure) - { - InferenceConfigValue = null; - InferenceConfigDescriptor = null; - InferenceConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ID or alias for the trained model, or the ID of the deployment. - /// - /// - public InferenceProcessorDescriptor ModelId(Elastic.Clients.Elasticsearch.Serverless.Id modelId) - { - ModelIdValue = modelId; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public InferenceProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public InferenceProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public InferenceProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public InferenceProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public InferenceProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - public InferenceProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - public InferenceProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Field added to incoming documents to contain results objects. - /// - /// - public InferenceProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (FieldMapValue is not null) - { - writer.WritePropertyName("field_map"); - JsonSerializer.Serialize(writer, FieldMapValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (InferenceConfigDescriptor is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigDescriptor, options); - } - else if (InferenceConfigDescriptorAction is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceConfigDescriptor(InferenceConfigDescriptorAction), options); - } - else if (InferenceConfigValue is not null) - { - writer.WritePropertyName("inference_config"); - JsonSerializer.Serialize(writer, InferenceConfigValue, options); - } - - writer.WritePropertyName("model_id"); - JsonSerializer.Serialize(writer, ModelIdValue, options); - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IngestInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IngestInfo.g.cs deleted file mode 100644 index 121ef723da6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IngestInfo.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class IngestInfo -{ - [JsonInclude, JsonPropertyName("pipeline")] - public string? Pipeline { get; init; } - [JsonInclude, JsonPropertyName("_redact")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.Redact? Redact { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public DateTimeOffset Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs deleted file mode 100644 index d69946484e2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class IpDatabaseConfigurationMetadata -{ - [JsonInclude, JsonPropertyName("database")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationFull Database { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("modified_date")] - public long? ModifiedDate { get; init; } - [JsonInclude, JsonPropertyName("modified_date_millis")] - public long? ModifiedDateMillis { get; init; } - [JsonInclude, JsonPropertyName("version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpLocationProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpLocationProcessor.g.cs deleted file mode 100644 index 0f8ec6efefe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/IpLocationProcessor.g.cs +++ /dev/null @@ -1,798 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class IpLocationProcessor -{ - /// - /// - /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. - /// - /// - [JsonInclude, JsonPropertyName("database_file")] - public string? DatabaseFile { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. - /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. - /// - /// - [JsonInclude, JsonPropertyName("download_database_on_pipeline_creation")] - public bool? DownloadDatabaseOnPipelineCreation { get; set; } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// If true, only the first found IP location data will be returned, even if the field contains an array. - /// - /// - [JsonInclude, JsonPropertyName("first_only")] - public bool? FirstOnly { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Controls what properties are added to the target_field based on the IP location lookup. - /// - /// - [JsonInclude, JsonPropertyName("properties")] - public ICollection? Properties { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(IpLocationProcessor ipLocationProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.IpLocation(ipLocationProcessor); -} - -public sealed partial class IpLocationProcessorDescriptor : SerializableDescriptor> -{ - internal IpLocationProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public IpLocationProcessorDescriptor() : base() - { - } - - private string? DatabaseFileValue { get; set; } - private string? DescriptionValue { get; set; } - private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? FirstOnlyValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. - /// - /// - public IpLocationProcessorDescriptor DatabaseFile(string? databaseFile) - { - DatabaseFileValue = databaseFile; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public IpLocationProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. - /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. - /// - /// - public IpLocationProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) - { - DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public IpLocationProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public IpLocationProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public IpLocationProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// If true, only the first found IP location data will be returned, even if the field contains an array. - /// - /// - public IpLocationProcessorDescriptor FirstOnly(bool? firstOnly = true) - { - FirstOnlyValue = firstOnly; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public IpLocationProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public IpLocationProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public IpLocationProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public IpLocationProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public IpLocationProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public IpLocationProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public IpLocationProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what properties are added to the target_field based on the IP location lookup. - /// - /// - public IpLocationProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public IpLocationProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public IpLocationProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public IpLocationProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public IpLocationProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DatabaseFileValue)) - { - writer.WritePropertyName("database_file"); - writer.WriteStringValue(DatabaseFileValue); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DownloadDatabaseOnPipelineCreationValue.HasValue) - { - writer.WritePropertyName("download_database_on_pipeline_creation"); - writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FirstOnlyValue.HasValue) - { - writer.WritePropertyName("first_only"); - writer.WriteBooleanValue(FirstOnlyValue.Value); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IpLocationProcessorDescriptor : SerializableDescriptor -{ - internal IpLocationProcessorDescriptor(Action configure) => configure.Invoke(this); - - public IpLocationProcessorDescriptor() : base() - { - } - - private string? DatabaseFileValue { get; set; } - private string? DescriptionValue { get; set; } - private bool? DownloadDatabaseOnPipelineCreationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? FirstOnlyValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. - /// - /// - public IpLocationProcessorDescriptor DatabaseFile(string? databaseFile) - { - DatabaseFileValue = databaseFile; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public IpLocationProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. - /// Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index. - /// - /// - public IpLocationProcessorDescriptor DownloadDatabaseOnPipelineCreation(bool? downloadDatabaseOnPipelineCreation = true) - { - DownloadDatabaseOnPipelineCreationValue = downloadDatabaseOnPipelineCreation; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public IpLocationProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public IpLocationProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to get the ip address from for the geographical lookup. - /// - /// - public IpLocationProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// If true, only the first found IP location data will be returned, even if the field contains an array. - /// - /// - public IpLocationProcessorDescriptor FirstOnly(bool? firstOnly = true) - { - FirstOnlyValue = firstOnly; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public IpLocationProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public IpLocationProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public IpLocationProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public IpLocationProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public IpLocationProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public IpLocationProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public IpLocationProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what properties are added to the target_field based on the IP location lookup. - /// - /// - public IpLocationProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public IpLocationProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public IpLocationProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public IpLocationProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will hold the geographical information looked up from the MaxMind database. - /// - /// - public IpLocationProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DatabaseFileValue)) - { - writer.WritePropertyName("database_file"); - writer.WriteStringValue(DatabaseFileValue); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DownloadDatabaseOnPipelineCreationValue.HasValue) - { - writer.WritePropertyName("download_database_on_pipeline_creation"); - writer.WriteBooleanValue(DownloadDatabaseOnPipelineCreationValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FirstOnlyValue.HasValue) - { - writer.WritePropertyName("first_only"); - writer.WriteBooleanValue(FirstOnlyValue.Value); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Ipinfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Ipinfo.g.cs deleted file mode 100644 index 997db6852de..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Ipinfo.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Ipinfo -{ -} - -public sealed partial class IpinfoDescriptor : SerializableDescriptor -{ - internal IpinfoDescriptor(Action configure) => configure.Invoke(this); - - public IpinfoDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JoinProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JoinProcessor.g.cs deleted file mode 100644 index 67a06195c8a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JoinProcessor.g.cs +++ /dev/null @@ -1,618 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class JoinProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Field containing array values to join. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// The separator character. - /// - /// - [JsonInclude, JsonPropertyName("separator")] - public string Separator { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(JoinProcessor joinProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Join(joinProcessor); -} - -public sealed partial class JoinProcessorDescriptor : SerializableDescriptor> -{ - internal JoinProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public JoinProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string SeparatorValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public JoinProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing array values to join. - /// - /// - public JoinProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array values to join. - /// - /// - public JoinProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array values to join. - /// - /// - public JoinProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public JoinProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public JoinProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public JoinProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The separator character. - /// - /// - public JoinProcessorDescriptor Separator(string separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public JoinProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - public JoinProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - public JoinProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - public JoinProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class JoinProcessorDescriptor : SerializableDescriptor -{ - internal JoinProcessorDescriptor(Action configure) => configure.Invoke(this); - - public JoinProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string SeparatorValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public JoinProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing array values to join. - /// - /// - public JoinProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array values to join. - /// - /// - public JoinProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing array values to join. - /// - /// - public JoinProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public JoinProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public JoinProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public JoinProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JoinProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JoinProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The separator character. - /// - /// - public JoinProcessorDescriptor Separator(string separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public JoinProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - public JoinProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - public JoinProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the joined value to. - /// By default, the field is updated in-place. - /// - /// - public JoinProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JsonProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JsonProcessor.g.cs deleted file mode 100644 index 92b4f24297a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/JsonProcessor.g.cs +++ /dev/null @@ -1,726 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class JsonProcessor -{ - /// - /// - /// Flag that forces the parsed JSON to be added at the top level of the document. - /// target_field must not be set when this option is chosen. - /// - /// - [JsonInclude, JsonPropertyName("add_to_root")] - public bool? AddToRoot { get; set; } - - /// - /// - /// When set to replace, root fields that conflict with fields from the parsed JSON will be overridden. - /// When set to merge, conflicting fields will be merged. - /// Only applicable if add_to_root is set to true. - /// - /// - [JsonInclude, JsonPropertyName("add_to_root_conflict_strategy")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategy { get; set; } - - /// - /// - /// When set to true, the JSON parser will not fail if the JSON contains duplicate keys. - /// Instead, the last encountered value for any duplicate key wins. - /// - /// - [JsonInclude, JsonPropertyName("allow_duplicate_keys")] - public bool? AllowDuplicateKeys { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to be parsed. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(JsonProcessor jsonProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Json(jsonProcessor); -} - -public sealed partial class JsonProcessorDescriptor : SerializableDescriptor> -{ - internal JsonProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public JsonProcessorDescriptor() : base() - { - } - - private bool? AddToRootValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategyValue { get; set; } - private bool? AllowDuplicateKeysValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Flag that forces the parsed JSON to be added at the top level of the document. - /// target_field must not be set when this option is chosen. - /// - /// - public JsonProcessorDescriptor AddToRoot(bool? addToRoot = true) - { - AddToRootValue = addToRoot; - return Self; - } - - /// - /// - /// When set to replace, root fields that conflict with fields from the parsed JSON will be overridden. - /// When set to merge, conflicting fields will be merged. - /// Only applicable if add_to_root is set to true. - /// - /// - public JsonProcessorDescriptor AddToRootConflictStrategy(Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? addToRootConflictStrategy) - { - AddToRootConflictStrategyValue = addToRootConflictStrategy; - return Self; - } - - /// - /// - /// When set to true, the JSON parser will not fail if the JSON contains duplicate keys. - /// Instead, the last encountered value for any duplicate key wins. - /// - /// - public JsonProcessorDescriptor AllowDuplicateKeys(bool? allowDuplicateKeys = true) - { - AllowDuplicateKeysValue = allowDuplicateKeys; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public JsonProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be parsed. - /// - /// - public JsonProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// - /// - public JsonProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// - /// - public JsonProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public JsonProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public JsonProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public JsonProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public JsonProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - public JsonProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - public JsonProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - public JsonProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AddToRootValue.HasValue) - { - writer.WritePropertyName("add_to_root"); - writer.WriteBooleanValue(AddToRootValue.Value); - } - - if (AddToRootConflictStrategyValue is not null) - { - writer.WritePropertyName("add_to_root_conflict_strategy"); - JsonSerializer.Serialize(writer, AddToRootConflictStrategyValue, options); - } - - if (AllowDuplicateKeysValue.HasValue) - { - writer.WritePropertyName("allow_duplicate_keys"); - writer.WriteBooleanValue(AllowDuplicateKeysValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class JsonProcessorDescriptor : SerializableDescriptor -{ - internal JsonProcessorDescriptor(Action configure) => configure.Invoke(this); - - public JsonProcessorDescriptor() : base() - { - } - - private bool? AddToRootValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? AddToRootConflictStrategyValue { get; set; } - private bool? AllowDuplicateKeysValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Flag that forces the parsed JSON to be added at the top level of the document. - /// target_field must not be set when this option is chosen. - /// - /// - public JsonProcessorDescriptor AddToRoot(bool? addToRoot = true) - { - AddToRootValue = addToRoot; - return Self; - } - - /// - /// - /// When set to replace, root fields that conflict with fields from the parsed JSON will be overridden. - /// When set to merge, conflicting fields will be merged. - /// Only applicable if add_to_root is set to true. - /// - /// - public JsonProcessorDescriptor AddToRootConflictStrategy(Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessorConflictStrategy? addToRootConflictStrategy) - { - AddToRootConflictStrategyValue = addToRootConflictStrategy; - return Self; - } - - /// - /// - /// When set to true, the JSON parser will not fail if the JSON contains duplicate keys. - /// Instead, the last encountered value for any duplicate key wins. - /// - /// - public JsonProcessorDescriptor AllowDuplicateKeys(bool? allowDuplicateKeys = true) - { - AllowDuplicateKeysValue = allowDuplicateKeys; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public JsonProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be parsed. - /// - /// - public JsonProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// - /// - public JsonProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// - /// - public JsonProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public JsonProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public JsonProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public JsonProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public JsonProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public JsonProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public JsonProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - public JsonProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - public JsonProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that the converted structured object will be written into. - /// Any existing content in this field will be overwritten. - /// - /// - public JsonProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AddToRootValue.HasValue) - { - writer.WritePropertyName("add_to_root"); - writer.WriteBooleanValue(AddToRootValue.Value); - } - - if (AddToRootConflictStrategyValue is not null) - { - writer.WritePropertyName("add_to_root_conflict_strategy"); - JsonSerializer.Serialize(writer, AddToRootConflictStrategyValue, options); - } - - if (AllowDuplicateKeysValue.HasValue) - { - writer.WritePropertyName("allow_duplicate_keys"); - writer.WriteBooleanValue(AllowDuplicateKeysValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/KeyValueProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/KeyValueProcessor.g.cs deleted file mode 100644 index 010d194bd82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/KeyValueProcessor.g.cs +++ /dev/null @@ -1,979 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class KeyValueProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// List of keys to exclude from document. - /// - /// - [JsonInclude, JsonPropertyName("exclude_keys")] - public ICollection? ExcludeKeys { get; set; } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Regex pattern to use for splitting key-value pairs. - /// - /// - [JsonInclude, JsonPropertyName("field_split")] - public string FieldSplit { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// List of keys to filter and insert into document. - /// Defaults to including all keys. - /// - /// - [JsonInclude, JsonPropertyName("include_keys")] - public ICollection? IncludeKeys { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Prefix to be added to extracted keys. - /// - /// - [JsonInclude, JsonPropertyName("prefix")] - public string? Prefix { get; set; } - - /// - /// - /// If true. strip brackets (), <>, [] as well as quotes ' and " from extracted values. - /// - /// - [JsonInclude, JsonPropertyName("strip_brackets")] - public bool? StripBrackets { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - /// - /// - /// String of characters to trim from extracted keys. - /// - /// - [JsonInclude, JsonPropertyName("trim_key")] - public string? TrimKey { get; set; } - - /// - /// - /// String of characters to trim from extracted values. - /// - /// - [JsonInclude, JsonPropertyName("trim_value")] - public string? TrimValue { get; set; } - - /// - /// - /// Regex pattern to use for splitting the key from the value within a key-value pair. - /// - /// - [JsonInclude, JsonPropertyName("value_split")] - public string ValueSplit { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(KeyValueProcessor keyValueProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Kv(keyValueProcessor); -} - -public sealed partial class KeyValueProcessorDescriptor : SerializableDescriptor> -{ - internal KeyValueProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public KeyValueProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private ICollection? ExcludeKeysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string FieldSplitValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? IncludeKeysValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? PrefixValue { get; set; } - private bool? StripBracketsValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private string? TrimKeyValue { get; set; } - private string? TrimValueValue { get; set; } - private string ValueSplitValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public KeyValueProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// List of keys to exclude from document. - /// - /// - public KeyValueProcessorDescriptor ExcludeKeys(ICollection? excludeKeys) - { - ExcludeKeysValue = excludeKeys; - return Self; - } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Regex pattern to use for splitting key-value pairs. - /// - /// - public KeyValueProcessorDescriptor FieldSplit(string fieldSplit) - { - FieldSplitValue = fieldSplit; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public KeyValueProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public KeyValueProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public KeyValueProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// List of keys to filter and insert into document. - /// Defaults to including all keys. - /// - /// - public KeyValueProcessorDescriptor IncludeKeys(ICollection? includeKeys) - { - IncludeKeysValue = includeKeys; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Prefix to be added to extracted keys. - /// - /// - public KeyValueProcessorDescriptor Prefix(string? prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// If true. strip brackets (), <>, [] as well as quotes ' and " from extracted values. - /// - /// - public KeyValueProcessorDescriptor StripBrackets(bool? stripBrackets = true) - { - StripBracketsValue = stripBrackets; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public KeyValueProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// String of characters to trim from extracted keys. - /// - /// - public KeyValueProcessorDescriptor TrimKey(string? trimKey) - { - TrimKeyValue = trimKey; - return Self; - } - - /// - /// - /// String of characters to trim from extracted values. - /// - /// - public KeyValueProcessorDescriptor TrimValue(string? trimValue) - { - TrimValueValue = trimValue; - return Self; - } - - /// - /// - /// Regex pattern to use for splitting the key from the value within a key-value pair. - /// - /// - public KeyValueProcessorDescriptor ValueSplit(string valueSplit) - { - ValueSplitValue = valueSplit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (ExcludeKeysValue is not null) - { - writer.WritePropertyName("exclude_keys"); - JsonSerializer.Serialize(writer, ExcludeKeysValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("field_split"); - writer.WriteStringValue(FieldSplitValue); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (IncludeKeysValue is not null) - { - writer.WritePropertyName("include_keys"); - JsonSerializer.Serialize(writer, IncludeKeysValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(PrefixValue)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - } - - if (StripBracketsValue.HasValue) - { - writer.WritePropertyName("strip_brackets"); - writer.WriteBooleanValue(StripBracketsValue.Value); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (!string.IsNullOrEmpty(TrimKeyValue)) - { - writer.WritePropertyName("trim_key"); - writer.WriteStringValue(TrimKeyValue); - } - - if (!string.IsNullOrEmpty(TrimValueValue)) - { - writer.WritePropertyName("trim_value"); - writer.WriteStringValue(TrimValueValue); - } - - writer.WritePropertyName("value_split"); - writer.WriteStringValue(ValueSplitValue); - writer.WriteEndObject(); - } -} - -public sealed partial class KeyValueProcessorDescriptor : SerializableDescriptor -{ - internal KeyValueProcessorDescriptor(Action configure) => configure.Invoke(this); - - public KeyValueProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private ICollection? ExcludeKeysValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string FieldSplitValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? IncludeKeysValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? PrefixValue { get; set; } - private bool? StripBracketsValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private string? TrimKeyValue { get; set; } - private string? TrimValueValue { get; set; } - private string ValueSplitValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public KeyValueProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// List of keys to exclude from document. - /// - /// - public KeyValueProcessorDescriptor ExcludeKeys(ICollection? excludeKeys) - { - ExcludeKeysValue = excludeKeys; - return Self; - } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be parsed. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Regex pattern to use for splitting key-value pairs. - /// - /// - public KeyValueProcessorDescriptor FieldSplit(string fieldSplit) - { - FieldSplitValue = fieldSplit; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public KeyValueProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public KeyValueProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public KeyValueProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// List of keys to filter and insert into document. - /// Defaults to including all keys. - /// - /// - public KeyValueProcessorDescriptor IncludeKeys(ICollection? includeKeys) - { - IncludeKeysValue = includeKeys; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public KeyValueProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public KeyValueProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Prefix to be added to extracted keys. - /// - /// - public KeyValueProcessorDescriptor Prefix(string? prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// If true. strip brackets (), <>, [] as well as quotes ' and " from extracted values. - /// - /// - public KeyValueProcessorDescriptor StripBrackets(bool? stripBrackets = true) - { - StripBracketsValue = stripBrackets; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public KeyValueProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to insert the extracted keys into. - /// Defaults to the root of the document. - /// Supports template snippets. - /// - /// - public KeyValueProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// String of characters to trim from extracted keys. - /// - /// - public KeyValueProcessorDescriptor TrimKey(string? trimKey) - { - TrimKeyValue = trimKey; - return Self; - } - - /// - /// - /// String of characters to trim from extracted values. - /// - /// - public KeyValueProcessorDescriptor TrimValue(string? trimValue) - { - TrimValueValue = trimValue; - return Self; - } - - /// - /// - /// Regex pattern to use for splitting the key from the value within a key-value pair. - /// - /// - public KeyValueProcessorDescriptor ValueSplit(string valueSplit) - { - ValueSplitValue = valueSplit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (ExcludeKeysValue is not null) - { - writer.WritePropertyName("exclude_keys"); - JsonSerializer.Serialize(writer, ExcludeKeysValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("field_split"); - writer.WriteStringValue(FieldSplitValue); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (IncludeKeysValue is not null) - { - writer.WritePropertyName("include_keys"); - JsonSerializer.Serialize(writer, IncludeKeysValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(PrefixValue)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - } - - if (StripBracketsValue.HasValue) - { - writer.WritePropertyName("strip_brackets"); - writer.WriteBooleanValue(StripBracketsValue.Value); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (!string.IsNullOrEmpty(TrimKeyValue)) - { - writer.WritePropertyName("trim_key"); - writer.WriteStringValue(TrimKeyValue); - } - - if (!string.IsNullOrEmpty(TrimValueValue)) - { - writer.WritePropertyName("trim_value"); - writer.WriteStringValue(TrimValueValue); - } - - writer.WritePropertyName("value_split"); - writer.WriteStringValue(ValueSplitValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Local.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Local.g.cs deleted file mode 100644 index 0e9e69c0020..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Local.g.cs +++ /dev/null @@ -1,61 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Local -{ - [JsonInclude, JsonPropertyName("type")] - public string Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationFull(Local local) => Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationFull.Local(local); -} - -public sealed partial class LocalDescriptor : SerializableDescriptor -{ - internal LocalDescriptor(Action configure) => configure.Invoke(this); - - public LocalDescriptor() : base() - { - } - - private string TypeValue { get; set; } - - public LocalDescriptor Type(string type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs deleted file mode 100644 index c47b32d7f60..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/LowercaseProcessor.g.cs +++ /dev/null @@ -1,626 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class LowercaseProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to make lowercase. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(LowercaseProcessor lowercaseProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Lowercase(lowercaseProcessor); -} - -public sealed partial class LowercaseProcessorDescriptor : SerializableDescriptor> -{ - internal LowercaseProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public LowercaseProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public LowercaseProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to make lowercase. - /// - /// - public LowercaseProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make lowercase. - /// - /// - public LowercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make lowercase. - /// - /// - public LowercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public LowercaseProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public LowercaseProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public LowercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public LowercaseProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public LowercaseProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public LowercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public LowercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class LowercaseProcessorDescriptor : SerializableDescriptor -{ - internal LowercaseProcessorDescriptor(Action configure) => configure.Invoke(this); - - public LowercaseProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public LowercaseProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to make lowercase. - /// - /// - public LowercaseProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make lowercase. - /// - /// - public LowercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make lowercase. - /// - /// - public LowercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public LowercaseProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public LowercaseProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public LowercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public LowercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public LowercaseProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public LowercaseProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public LowercaseProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public LowercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public LowercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Maxmind.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Maxmind.g.cs deleted file mode 100644 index 565994e790c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Maxmind.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Maxmind -{ - [JsonInclude, JsonPropertyName("account_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id AccountId { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration(Maxmind maxmind) => Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfiguration.Maxmind(maxmind); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationFull(Maxmind maxmind) => Elastic.Clients.Elasticsearch.Serverless.Ingest.DatabaseConfigurationFull.Maxmind(maxmind); -} - -public sealed partial class MaxmindDescriptor : SerializableDescriptor -{ - internal MaxmindDescriptor(Action configure) => configure.Invoke(this); - - public MaxmindDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id AccountIdValue { get; set; } - - public MaxmindDescriptor AccountId(Elastic.Clients.Elasticsearch.Serverless.Id accountId) - { - AccountIdValue = accountId; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("account_id"); - JsonSerializer.Serialize(writer, AccountIdValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs deleted file mode 100644 index 4f17825cabc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs +++ /dev/null @@ -1,866 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class NetworkDirectionProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Field containing the destination IP address. - /// - /// - [JsonInclude, JsonPropertyName("destination_ip")] - public Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIp { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// List of internal networks. Supports IPv4 and IPv6 addresses and ranges in - /// CIDR notation. Also supports the named ranges listed below. These may be - /// constructed with template snippets. Must specify only one of - /// internal_networks or internal_networks_field. - /// - /// - [JsonInclude, JsonPropertyName("internal_networks")] - public ICollection? InternalNetworks { get; set; } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - [JsonInclude, JsonPropertyName("internal_networks_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? InternalNetworksField { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Field containing the source IP address. - /// - /// - [JsonInclude, JsonPropertyName("source_ip")] - public Elastic.Clients.Elasticsearch.Serverless.Field? SourceIp { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Output field for the network direction. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(NetworkDirectionProcessor networkDirectionProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.NetworkDirection(networkDirectionProcessor); -} - -public sealed partial class NetworkDirectionProcessorDescriptor : SerializableDescriptor> -{ - internal NetworkDirectionProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public NetworkDirectionProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIpValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? InternalNetworksValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? InternalNetworksFieldValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SourceIpValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public NetworkDirectionProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public NetworkDirectionProcessorDescriptor DestinationIp(Elastic.Clients.Elasticsearch.Serverless.Field? destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public NetworkDirectionProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public NetworkDirectionProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public NetworkDirectionProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public NetworkDirectionProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - public NetworkDirectionProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// List of internal networks. Supports IPv4 and IPv6 addresses and ranges in - /// CIDR notation. Also supports the named ranges listed below. These may be - /// constructed with template snippets. Must specify only one of - /// internal_networks or internal_networks_field. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworks(ICollection? internalNetworks) - { - InternalNetworksValue = internalNetworks; - return Self; - } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworksField(Elastic.Clients.Elasticsearch.Serverless.Field? internalNetworksField) - { - InternalNetworksFieldValue = internalNetworksField; - return Self; - } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworksField(Expression> internalNetworksField) - { - InternalNetworksFieldValue = internalNetworksField; - return Self; - } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworksField(Expression> internalNetworksField) - { - InternalNetworksFieldValue = internalNetworksField; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public NetworkDirectionProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public NetworkDirectionProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public NetworkDirectionProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public NetworkDirectionProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public NetworkDirectionProcessorDescriptor SourceIp(Elastic.Clients.Elasticsearch.Serverless.Field? sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public NetworkDirectionProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public NetworkDirectionProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public NetworkDirectionProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the network direction. - /// - /// - public NetworkDirectionProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the network direction. - /// - /// - public NetworkDirectionProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the network direction. - /// - /// - public NetworkDirectionProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestinationIpValue is not null) - { - writer.WritePropertyName("destination_ip"); - JsonSerializer.Serialize(writer, DestinationIpValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (InternalNetworksValue is not null) - { - writer.WritePropertyName("internal_networks"); - JsonSerializer.Serialize(writer, InternalNetworksValue, options); - } - - if (InternalNetworksFieldValue is not null) - { - writer.WritePropertyName("internal_networks_field"); - JsonSerializer.Serialize(writer, InternalNetworksFieldValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (SourceIpValue is not null) - { - writer.WritePropertyName("source_ip"); - JsonSerializer.Serialize(writer, SourceIpValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class NetworkDirectionProcessorDescriptor : SerializableDescriptor -{ - internal NetworkDirectionProcessorDescriptor(Action configure) => configure.Invoke(this); - - public NetworkDirectionProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIpValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? InternalNetworksValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? InternalNetworksFieldValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SourceIpValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public NetworkDirectionProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public NetworkDirectionProcessorDescriptor DestinationIp(Elastic.Clients.Elasticsearch.Serverless.Field? destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public NetworkDirectionProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Field containing the destination IP address. - /// - /// - public NetworkDirectionProcessorDescriptor DestinationIp(Expression> destinationIp) - { - DestinationIpValue = destinationIp; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public NetworkDirectionProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public NetworkDirectionProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - public NetworkDirectionProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// List of internal networks. Supports IPv4 and IPv6 addresses and ranges in - /// CIDR notation. Also supports the named ranges listed below. These may be - /// constructed with template snippets. Must specify only one of - /// internal_networks or internal_networks_field. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworks(ICollection? internalNetworks) - { - InternalNetworksValue = internalNetworks; - return Self; - } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworksField(Elastic.Clients.Elasticsearch.Serverless.Field? internalNetworksField) - { - InternalNetworksFieldValue = internalNetworksField; - return Self; - } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworksField(Expression> internalNetworksField) - { - InternalNetworksFieldValue = internalNetworksField; - return Self; - } - - /// - /// - /// A field on the given document to read the internal_networks configuration - /// from. - /// - /// - public NetworkDirectionProcessorDescriptor InternalNetworksField(Expression> internalNetworksField) - { - InternalNetworksFieldValue = internalNetworksField; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public NetworkDirectionProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public NetworkDirectionProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public NetworkDirectionProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public NetworkDirectionProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public NetworkDirectionProcessorDescriptor SourceIp(Elastic.Clients.Elasticsearch.Serverless.Field? sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public NetworkDirectionProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Field containing the source IP address. - /// - /// - public NetworkDirectionProcessorDescriptor SourceIp(Expression> sourceIp) - { - SourceIpValue = sourceIp; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public NetworkDirectionProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the network direction. - /// - /// - public NetworkDirectionProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the network direction. - /// - /// - public NetworkDirectionProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the network direction. - /// - /// - public NetworkDirectionProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (DestinationIpValue is not null) - { - writer.WritePropertyName("destination_ip"); - JsonSerializer.Serialize(writer, DestinationIpValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (InternalNetworksValue is not null) - { - writer.WritePropertyName("internal_networks"); - JsonSerializer.Serialize(writer, InternalNetworksValue, options); - } - - if (InternalNetworksFieldValue is not null) - { - writer.WritePropertyName("internal_networks_field"); - JsonSerializer.Serialize(writer, InternalNetworksFieldValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (SourceIpValue is not null) - { - writer.WritePropertyName("source_ip"); - JsonSerializer.Serialize(writer, SourceIpValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs deleted file mode 100644 index 7cbfd0a3e85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Pipeline.g.cs +++ /dev/null @@ -1,565 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Pipeline -{ - /// - /// - /// Marks this ingest pipeline as deprecated. - /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. - /// - /// - [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; set; } - - /// - /// - /// Description of the ingest pipeline. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// - /// Processors to run immediately after a processor failure. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Processors used to perform transformations on documents before indexing. - /// Processors run sequentially in the order specified. - /// - /// - [JsonInclude, JsonPropertyName("processors")] - public ICollection? Processors { get; set; } - - /// - /// - /// Version number used by external systems to track ingest pipelines. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -public sealed partial class PipelineDescriptor : SerializableDescriptor> -{ - internal PipelineDescriptor(Action> configure) => configure.Invoke(this); - - public PipelineDescriptor() : base() - { - } - - private bool? DeprecatedValue { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? MetaValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? ProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor ProcessorsDescriptor { get; set; } - private Action> ProcessorsDescriptorAction { get; set; } - private Action>[] ProcessorsDescriptorActions { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Marks this ingest pipeline as deprecated. - /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. - /// - /// - public PipelineDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// Description of the ingest pipeline. - /// - /// - public PipelineDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. - /// - /// - public PipelineDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Processors to run immediately after a processor failure. - /// - /// - public PipelineDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Processors used to perform transformations on documents before indexing. - /// Processors run sequentially in the order specified. - /// - /// - public PipelineDescriptor Processors(ICollection? processors) - { - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsValue = processors; - return Self; - } - - public PipelineDescriptor Processors(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - ProcessorsValue = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptor = descriptor; - return Self; - } - - public PipelineDescriptor Processors(Action> configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptorAction = configure; - return Self; - } - - public PipelineDescriptor Processors(params Action>[] configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Version number used by external systems to track ingest pipelines. - /// - /// - public PipelineDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ProcessorsDescriptor is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(ProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - foreach (var action in ProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ProcessorsValue is not null) - { - writer.WritePropertyName("processors"); - JsonSerializer.Serialize(writer, ProcessorsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PipelineDescriptor : SerializableDescriptor -{ - internal PipelineDescriptor(Action configure) => configure.Invoke(this); - - public PipelineDescriptor() : base() - { - } - - private bool? DeprecatedValue { get; set; } - private string? DescriptionValue { get; set; } - private IDictionary? MetaValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? ProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor ProcessorsDescriptor { get; set; } - private Action ProcessorsDescriptorAction { get; set; } - private Action[] ProcessorsDescriptorActions { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Marks this ingest pipeline as deprecated. - /// When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. - /// - /// - public PipelineDescriptor Deprecated(bool? deprecated = true) - { - DeprecatedValue = deprecated; - return Self; - } - - /// - /// - /// Description of the ingest pipeline. - /// - /// - public PipelineDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. - /// - /// - public PipelineDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Processors to run immediately after a processor failure. - /// - /// - public PipelineDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Processors used to perform transformations on documents before indexing. - /// Processors run sequentially in the order specified. - /// - /// - public PipelineDescriptor Processors(ICollection? processors) - { - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsValue = processors; - return Self; - } - - public PipelineDescriptor Processors(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - ProcessorsValue = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptor = descriptor; - return Self; - } - - public PipelineDescriptor Processors(Action configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorActions = null; - ProcessorsDescriptorAction = configure; - return Self; - } - - public PipelineDescriptor Processors(params Action[] configure) - { - ProcessorsValue = null; - ProcessorsDescriptor = null; - ProcessorsDescriptorAction = null; - ProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Version number used by external systems to track ingest pipelines. - /// - /// - public PipelineDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeprecatedValue.HasValue) - { - writer.WritePropertyName("deprecated"); - writer.WriteBooleanValue(DeprecatedValue.Value); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ProcessorsDescriptor is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(ProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("processors"); - writer.WriteStartArray(); - foreach (var action in ProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ProcessorsValue is not null) - { - writer.WritePropertyName("processors"); - JsonSerializer.Serialize(writer, ProcessorsValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs deleted file mode 100644 index 057b1640722..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineProcessor.g.cs +++ /dev/null @@ -1,490 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PipelineProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Whether to ignore missing pipelines instead of failing. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing_pipeline")] - public bool? IgnoreMissingPipeline { get; set; } - - /// - /// - /// The name of the pipeline to execute. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name Name { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(PipelineProcessor pipelineProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Pipeline(pipelineProcessor); -} - -public sealed partial class PipelineProcessorDescriptor : SerializableDescriptor> -{ - internal PipelineProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public PipelineProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingPipelineValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public PipelineProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public PipelineProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public PipelineProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Whether to ignore missing pipelines instead of failing. - /// - /// - public PipelineProcessorDescriptor IgnoreMissingPipeline(bool? ignoreMissingPipeline = true) - { - IgnoreMissingPipelineValue = ignoreMissingPipeline; - return Self; - } - - /// - /// - /// The name of the pipeline to execute. - /// Supports template snippets. - /// - /// - public PipelineProcessorDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public PipelineProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingPipelineValue.HasValue) - { - writer.WritePropertyName("ignore_missing_pipeline"); - writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PipelineProcessorDescriptor : SerializableDescriptor -{ - internal PipelineProcessorDescriptor(Action configure) => configure.Invoke(this); - - public PipelineProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingPipelineValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public PipelineProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public PipelineProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public PipelineProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Whether to ignore missing pipelines instead of failing. - /// - /// - public PipelineProcessorDescriptor IgnoreMissingPipeline(bool? ignoreMissingPipeline = true) - { - IgnoreMissingPipelineValue = ignoreMissingPipeline; - return Self; - } - - /// - /// - /// The name of the pipeline to execute. - /// Supports template snippets. - /// - /// - public PipelineProcessorDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public PipelineProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public PipelineProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public PipelineProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingPipelineValue.HasValue) - { - writer.WritePropertyName("ignore_missing_pipeline"); - writer.WriteBooleanValue(IgnoreMissingPipelineValue.Value); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineSimulation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineSimulation.g.cs deleted file mode 100644 index 085de550619..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/PipelineSimulation.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class PipelineSimulation -{ - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("doc")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentSimulation? Doc { get; init; } - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? Error { get; init; } - [JsonInclude, JsonPropertyName("ignored_error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? IgnoredError { get; init; } - [JsonInclude, JsonPropertyName("processor_type")] - public string? ProcessorType { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.Watcher.ActionStatusOptions? Status { get; init; } - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs deleted file mode 100644 index f464444d218..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Processor.g.cs +++ /dev/null @@ -1,887 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -[JsonConverter(typeof(ProcessorConverter))] -public sealed partial class Processor -{ - internal Processor(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 Processor Append(Elastic.Clients.Elasticsearch.Serverless.Ingest.AppendProcessor appendProcessor) => new Processor("append", appendProcessor); - public static Processor Attachment(Elastic.Clients.Elasticsearch.Serverless.Ingest.AttachmentProcessor attachmentProcessor) => new Processor("attachment", attachmentProcessor); - public static Processor Bytes(Elastic.Clients.Elasticsearch.Serverless.Ingest.BytesProcessor bytesProcessor) => new Processor("bytes", bytesProcessor); - public static Processor Circle(Elastic.Clients.Elasticsearch.Serverless.Ingest.CircleProcessor circleProcessor) => new Processor("circle", circleProcessor); - public static Processor CommunityId(Elastic.Clients.Elasticsearch.Serverless.Ingest.CommunityIDProcessor communityIDProcessor) => new Processor("community_id", communityIDProcessor); - public static Processor Convert(Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertProcessor convertProcessor) => new Processor("convert", convertProcessor); - public static Processor Csv(Elastic.Clients.Elasticsearch.Serverless.Ingest.CsvProcessor csvProcessor) => new Processor("csv", csvProcessor); - public static Processor Date(Elastic.Clients.Elasticsearch.Serverless.Ingest.DateProcessor dateProcessor) => new Processor("date", dateProcessor); - public static Processor DateIndexName(Elastic.Clients.Elasticsearch.Serverless.Ingest.DateIndexNameProcessor dateIndexNameProcessor) => new Processor("date_index_name", dateIndexNameProcessor); - public static Processor Dissect(Elastic.Clients.Elasticsearch.Serverless.Ingest.DissectProcessor dissectProcessor) => new Processor("dissect", dissectProcessor); - public static Processor DotExpander(Elastic.Clients.Elasticsearch.Serverless.Ingest.DotExpanderProcessor dotExpanderProcessor) => new Processor("dot_expander", dotExpanderProcessor); - public static Processor Drop(Elastic.Clients.Elasticsearch.Serverless.Ingest.DropProcessor dropProcessor) => new Processor("drop", dropProcessor); - public static Processor Enrich(Elastic.Clients.Elasticsearch.Serverless.Ingest.EnrichProcessor enrichProcessor) => new Processor("enrich", enrichProcessor); - public static Processor Fail(Elastic.Clients.Elasticsearch.Serverless.Ingest.FailProcessor failProcessor) => new Processor("fail", failProcessor); - public static Processor Fingerprint(Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintProcessor fingerprintProcessor) => new Processor("fingerprint", fingerprintProcessor); - public static Processor Foreach(Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor foreachProcessor) => new Processor("foreach", foreachProcessor); - public static Processor GeoGrid(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor geoGridProcessor) => new Processor("geo_grid", geoGridProcessor); - public static Processor Geoip(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor geoIpProcessor) => new Processor("geoip", geoIpProcessor); - public static Processor Grok(Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor grokProcessor) => new Processor("grok", grokProcessor); - public static Processor Gsub(Elastic.Clients.Elasticsearch.Serverless.Ingest.GsubProcessor gsubProcessor) => new Processor("gsub", gsubProcessor); - public static Processor HtmlStrip(Elastic.Clients.Elasticsearch.Serverless.Ingest.HtmlStripProcessor htmlStripProcessor) => new Processor("html_strip", htmlStripProcessor); - public static Processor Inference(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceProcessor inferenceProcessor) => new Processor("inference", inferenceProcessor); - public static Processor IpLocation(Elastic.Clients.Elasticsearch.Serverless.Ingest.IpLocationProcessor ipLocationProcessor) => new Processor("ip_location", ipLocationProcessor); - public static Processor Join(Elastic.Clients.Elasticsearch.Serverless.Ingest.JoinProcessor joinProcessor) => new Processor("join", joinProcessor); - public static Processor Json(Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessor jsonProcessor) => new Processor("json", jsonProcessor); - public static Processor Kv(Elastic.Clients.Elasticsearch.Serverless.Ingest.KeyValueProcessor keyValueProcessor) => new Processor("kv", keyValueProcessor); - public static Processor Lowercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.LowercaseProcessor lowercaseProcessor) => new Processor("lowercase", lowercaseProcessor); - public static Processor NetworkDirection(Elastic.Clients.Elasticsearch.Serverless.Ingest.NetworkDirectionProcessor networkDirectionProcessor) => new Processor("network_direction", networkDirectionProcessor); - public static Processor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => new Processor("pipeline", pipelineProcessor); - public static Processor Redact(Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor redactProcessor) => new Processor("redact", redactProcessor); - public static Processor RegisteredDomain(Elastic.Clients.Elasticsearch.Serverless.Ingest.RegisteredDomainProcessor registeredDomainProcessor) => new Processor("registered_domain", registeredDomainProcessor); - public static Processor Remove(Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor removeProcessor) => new Processor("remove", removeProcessor); - public static Processor Rename(Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor renameProcessor) => new Processor("rename", renameProcessor); - public static Processor Reroute(Elastic.Clients.Elasticsearch.Serverless.Ingest.RerouteProcessor rerouteProcessor) => new Processor("reroute", rerouteProcessor); - public static Processor Script(Elastic.Clients.Elasticsearch.Serverless.Ingest.ScriptProcessor scriptProcessor) => new Processor("script", scriptProcessor); - public static Processor Set(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetProcessor setProcessor) => new Processor("set", setProcessor); - public static Processor SetSecurityUser(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetSecurityUserProcessor setSecurityUserProcessor) => new Processor("set_security_user", setSecurityUserProcessor); - public static Processor Sort(Elastic.Clients.Elasticsearch.Serverless.Ingest.SortProcessor sortProcessor) => new Processor("sort", sortProcessor); - public static Processor Split(Elastic.Clients.Elasticsearch.Serverless.Ingest.SplitProcessor splitProcessor) => new Processor("split", splitProcessor); - public static Processor Terminate(Elastic.Clients.Elasticsearch.Serverless.Ingest.TerminateProcessor terminateProcessor) => new Processor("terminate", terminateProcessor); - public static Processor Trim(Elastic.Clients.Elasticsearch.Serverless.Ingest.TrimProcessor trimProcessor) => new Processor("trim", trimProcessor); - public static Processor Uppercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.UppercaseProcessor uppercaseProcessor) => new Processor("uppercase", uppercaseProcessor); - public static Processor UriParts(Elastic.Clients.Elasticsearch.Serverless.Ingest.UriPartsProcessor uriPartsProcessor) => new Processor("uri_parts", uriPartsProcessor); - public static Processor UrlDecode(Elastic.Clients.Elasticsearch.Serverless.Ingest.UrlDecodeProcessor urlDecodeProcessor) => new Processor("urldecode", urlDecodeProcessor); - public static Processor UserAgent(Elastic.Clients.Elasticsearch.Serverless.Ingest.UserAgentProcessor userAgentProcessor) => new Processor("user_agent", userAgentProcessor); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class ProcessorConverter : JsonConverter -{ - public override Processor 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; - 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 == "append") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "attachment") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "bytes") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "circle") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "community_id") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "convert") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "csv") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "date") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "date_index_name") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "dissect") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "dot_expander") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "drop") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "enrich") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fail") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fingerprint") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "foreach") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_grid") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geoip") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "grok") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "gsub") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "html_strip") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "inference") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ip_location") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "join") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "json") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "kv") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "lowercase") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "network_direction") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "pipeline") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "redact") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "registered_domain") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "remove") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rename") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "reroute") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "script") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "set") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "set_security_user") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "sort") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "split") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terminate") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "trim") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "uppercase") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "uri_parts") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "urldecode") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "user_agent") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Processor' from the response."); - } - - var result = new Processor(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Processor value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "append": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.AppendProcessor)value.Variant, options); - break; - case "attachment": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.AttachmentProcessor)value.Variant, options); - break; - case "bytes": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.BytesProcessor)value.Variant, options); - break; - case "circle": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.CircleProcessor)value.Variant, options); - break; - case "community_id": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.CommunityIDProcessor)value.Variant, options); - break; - case "convert": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertProcessor)value.Variant, options); - break; - case "csv": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.CsvProcessor)value.Variant, options); - break; - case "date": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.DateProcessor)value.Variant, options); - break; - case "date_index_name": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.DateIndexNameProcessor)value.Variant, options); - break; - case "dissect": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.DissectProcessor)value.Variant, options); - break; - case "dot_expander": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.DotExpanderProcessor)value.Variant, options); - break; - case "drop": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.DropProcessor)value.Variant, options); - break; - case "enrich": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.EnrichProcessor)value.Variant, options); - break; - case "fail": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.FailProcessor)value.Variant, options); - break; - case "fingerprint": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintProcessor)value.Variant, options); - break; - case "foreach": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor)value.Variant, options); - break; - case "geo_grid": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor)value.Variant, options); - break; - case "geoip": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor)value.Variant, options); - break; - case "grok": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor)value.Variant, options); - break; - case "gsub": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.GsubProcessor)value.Variant, options); - break; - case "html_strip": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.HtmlStripProcessor)value.Variant, options); - break; - case "inference": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceProcessor)value.Variant, options); - break; - case "ip_location": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.IpLocationProcessor)value.Variant, options); - break; - case "join": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.JoinProcessor)value.Variant, options); - break; - case "json": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessor)value.Variant, options); - break; - case "kv": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.KeyValueProcessor)value.Variant, options); - break; - case "lowercase": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.LowercaseProcessor)value.Variant, options); - break; - case "network_direction": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.NetworkDirectionProcessor)value.Variant, options); - break; - case "pipeline": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor)value.Variant, options); - break; - case "redact": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor)value.Variant, options); - break; - case "registered_domain": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RegisteredDomainProcessor)value.Variant, options); - break; - case "remove": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor)value.Variant, options); - break; - case "rename": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor)value.Variant, options); - break; - case "reroute": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.RerouteProcessor)value.Variant, options); - break; - case "script": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.ScriptProcessor)value.Variant, options); - break; - case "set": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.SetProcessor)value.Variant, options); - break; - case "set_security_user": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.SetSecurityUserProcessor)value.Variant, options); - break; - case "sort": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.SortProcessor)value.Variant, options); - break; - case "split": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.SplitProcessor)value.Variant, options); - break; - case "terminate": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.TerminateProcessor)value.Variant, options); - break; - case "trim": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.TrimProcessor)value.Variant, options); - break; - case "uppercase": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.UppercaseProcessor)value.Variant, options); - break; - case "uri_parts": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.UriPartsProcessor)value.Variant, options); - break; - case "urldecode": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.UrlDecodeProcessor)value.Variant, options); - break; - case "user_agent": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Ingest.UserAgentProcessor)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ProcessorDescriptor : SerializableDescriptor> -{ - internal ProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public ProcessorDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private ProcessorDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private ProcessorDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public ProcessorDescriptor Append(Elastic.Clients.Elasticsearch.Serverless.Ingest.AppendProcessor appendProcessor) => Set(appendProcessor, "append"); - public ProcessorDescriptor Append(Action> configure) => Set(configure, "append"); - public ProcessorDescriptor Attachment(Elastic.Clients.Elasticsearch.Serverless.Ingest.AttachmentProcessor attachmentProcessor) => Set(attachmentProcessor, "attachment"); - public ProcessorDescriptor Attachment(Action> configure) => Set(configure, "attachment"); - public ProcessorDescriptor Bytes(Elastic.Clients.Elasticsearch.Serverless.Ingest.BytesProcessor bytesProcessor) => Set(bytesProcessor, "bytes"); - public ProcessorDescriptor Bytes(Action> configure) => Set(configure, "bytes"); - public ProcessorDescriptor Circle(Elastic.Clients.Elasticsearch.Serverless.Ingest.CircleProcessor circleProcessor) => Set(circleProcessor, "circle"); - public ProcessorDescriptor Circle(Action> configure) => Set(configure, "circle"); - public ProcessorDescriptor CommunityId(Elastic.Clients.Elasticsearch.Serverless.Ingest.CommunityIDProcessor communityIDProcessor) => Set(communityIDProcessor, "community_id"); - public ProcessorDescriptor CommunityId(Action> configure) => Set(configure, "community_id"); - public ProcessorDescriptor Convert(Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertProcessor convertProcessor) => Set(convertProcessor, "convert"); - public ProcessorDescriptor Convert(Action> configure) => Set(configure, "convert"); - public ProcessorDescriptor Csv(Elastic.Clients.Elasticsearch.Serverless.Ingest.CsvProcessor csvProcessor) => Set(csvProcessor, "csv"); - public ProcessorDescriptor Csv(Action> configure) => Set(configure, "csv"); - public ProcessorDescriptor Date(Elastic.Clients.Elasticsearch.Serverless.Ingest.DateProcessor dateProcessor) => Set(dateProcessor, "date"); - public ProcessorDescriptor Date(Action> configure) => Set(configure, "date"); - public ProcessorDescriptor DateIndexName(Elastic.Clients.Elasticsearch.Serverless.Ingest.DateIndexNameProcessor dateIndexNameProcessor) => Set(dateIndexNameProcessor, "date_index_name"); - public ProcessorDescriptor DateIndexName(Action> configure) => Set(configure, "date_index_name"); - public ProcessorDescriptor Dissect(Elastic.Clients.Elasticsearch.Serverless.Ingest.DissectProcessor dissectProcessor) => Set(dissectProcessor, "dissect"); - public ProcessorDescriptor Dissect(Action> configure) => Set(configure, "dissect"); - public ProcessorDescriptor DotExpander(Elastic.Clients.Elasticsearch.Serverless.Ingest.DotExpanderProcessor dotExpanderProcessor) => Set(dotExpanderProcessor, "dot_expander"); - public ProcessorDescriptor DotExpander(Action> configure) => Set(configure, "dot_expander"); - public ProcessorDescriptor Drop(Elastic.Clients.Elasticsearch.Serverless.Ingest.DropProcessor dropProcessor) => Set(dropProcessor, "drop"); - public ProcessorDescriptor Drop(Action> configure) => Set(configure, "drop"); - public ProcessorDescriptor Enrich(Elastic.Clients.Elasticsearch.Serverless.Ingest.EnrichProcessor enrichProcessor) => Set(enrichProcessor, "enrich"); - public ProcessorDescriptor Enrich(Action> configure) => Set(configure, "enrich"); - public ProcessorDescriptor Fail(Elastic.Clients.Elasticsearch.Serverless.Ingest.FailProcessor failProcessor) => Set(failProcessor, "fail"); - public ProcessorDescriptor Fail(Action> configure) => Set(configure, "fail"); - public ProcessorDescriptor Fingerprint(Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintProcessor fingerprintProcessor) => Set(fingerprintProcessor, "fingerprint"); - public ProcessorDescriptor Fingerprint(Action> configure) => Set(configure, "fingerprint"); - public ProcessorDescriptor Foreach(Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor foreachProcessor) => Set(foreachProcessor, "foreach"); - public ProcessorDescriptor Foreach(Action> configure) => Set(configure, "foreach"); - public ProcessorDescriptor GeoGrid(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor geoGridProcessor) => Set(geoGridProcessor, "geo_grid"); - public ProcessorDescriptor GeoGrid(Action> configure) => Set(configure, "geo_grid"); - public ProcessorDescriptor Geoip(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor geoIpProcessor) => Set(geoIpProcessor, "geoip"); - public ProcessorDescriptor Geoip(Action> configure) => Set(configure, "geoip"); - public ProcessorDescriptor Grok(Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor grokProcessor) => Set(grokProcessor, "grok"); - public ProcessorDescriptor Grok(Action> configure) => Set(configure, "grok"); - public ProcessorDescriptor Gsub(Elastic.Clients.Elasticsearch.Serverless.Ingest.GsubProcessor gsubProcessor) => Set(gsubProcessor, "gsub"); - public ProcessorDescriptor Gsub(Action> configure) => Set(configure, "gsub"); - public ProcessorDescriptor HtmlStrip(Elastic.Clients.Elasticsearch.Serverless.Ingest.HtmlStripProcessor htmlStripProcessor) => Set(htmlStripProcessor, "html_strip"); - public ProcessorDescriptor HtmlStrip(Action> configure) => Set(configure, "html_strip"); - public ProcessorDescriptor Inference(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceProcessor inferenceProcessor) => Set(inferenceProcessor, "inference"); - public ProcessorDescriptor Inference(Action> configure) => Set(configure, "inference"); - public ProcessorDescriptor IpLocation(Elastic.Clients.Elasticsearch.Serverless.Ingest.IpLocationProcessor ipLocationProcessor) => Set(ipLocationProcessor, "ip_location"); - public ProcessorDescriptor IpLocation(Action> configure) => Set(configure, "ip_location"); - public ProcessorDescriptor Join(Elastic.Clients.Elasticsearch.Serverless.Ingest.JoinProcessor joinProcessor) => Set(joinProcessor, "join"); - public ProcessorDescriptor Join(Action> configure) => Set(configure, "join"); - public ProcessorDescriptor Json(Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessor jsonProcessor) => Set(jsonProcessor, "json"); - public ProcessorDescriptor Json(Action> configure) => Set(configure, "json"); - public ProcessorDescriptor Kv(Elastic.Clients.Elasticsearch.Serverless.Ingest.KeyValueProcessor keyValueProcessor) => Set(keyValueProcessor, "kv"); - public ProcessorDescriptor Kv(Action> configure) => Set(configure, "kv"); - public ProcessorDescriptor Lowercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.LowercaseProcessor lowercaseProcessor) => Set(lowercaseProcessor, "lowercase"); - public ProcessorDescriptor Lowercase(Action> configure) => Set(configure, "lowercase"); - public ProcessorDescriptor NetworkDirection(Elastic.Clients.Elasticsearch.Serverless.Ingest.NetworkDirectionProcessor networkDirectionProcessor) => Set(networkDirectionProcessor, "network_direction"); - public ProcessorDescriptor NetworkDirection(Action> configure) => Set(configure, "network_direction"); - public ProcessorDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => Set(pipelineProcessor, "pipeline"); - public ProcessorDescriptor Pipeline(Action> configure) => Set(configure, "pipeline"); - public ProcessorDescriptor Redact(Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor redactProcessor) => Set(redactProcessor, "redact"); - public ProcessorDescriptor Redact(Action> configure) => Set(configure, "redact"); - public ProcessorDescriptor RegisteredDomain(Elastic.Clients.Elasticsearch.Serverless.Ingest.RegisteredDomainProcessor registeredDomainProcessor) => Set(registeredDomainProcessor, "registered_domain"); - public ProcessorDescriptor RegisteredDomain(Action> configure) => Set(configure, "registered_domain"); - public ProcessorDescriptor Remove(Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor removeProcessor) => Set(removeProcessor, "remove"); - public ProcessorDescriptor Remove(Action> configure) => Set(configure, "remove"); - public ProcessorDescriptor Rename(Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); - public ProcessorDescriptor Rename(Action> configure) => Set(configure, "rename"); - public ProcessorDescriptor Reroute(Elastic.Clients.Elasticsearch.Serverless.Ingest.RerouteProcessor rerouteProcessor) => Set(rerouteProcessor, "reroute"); - public ProcessorDescriptor Reroute(Action> configure) => Set(configure, "reroute"); - public ProcessorDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Ingest.ScriptProcessor scriptProcessor) => Set(scriptProcessor, "script"); - public ProcessorDescriptor Script(Action> configure) => Set(configure, "script"); - public ProcessorDescriptor Set(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetProcessor setProcessor) => Set(setProcessor, "set"); - public ProcessorDescriptor Set(Action> configure) => Set(configure, "set"); - public ProcessorDescriptor SetSecurityUser(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetSecurityUserProcessor setSecurityUserProcessor) => Set(setSecurityUserProcessor, "set_security_user"); - public ProcessorDescriptor SetSecurityUser(Action> configure) => Set(configure, "set_security_user"); - public ProcessorDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Ingest.SortProcessor sortProcessor) => Set(sortProcessor, "sort"); - public ProcessorDescriptor Sort(Action> configure) => Set(configure, "sort"); - public ProcessorDescriptor Split(Elastic.Clients.Elasticsearch.Serverless.Ingest.SplitProcessor splitProcessor) => Set(splitProcessor, "split"); - public ProcessorDescriptor Split(Action> configure) => Set(configure, "split"); - public ProcessorDescriptor Terminate(Elastic.Clients.Elasticsearch.Serverless.Ingest.TerminateProcessor terminateProcessor) => Set(terminateProcessor, "terminate"); - public ProcessorDescriptor Terminate(Action> configure) => Set(configure, "terminate"); - public ProcessorDescriptor Trim(Elastic.Clients.Elasticsearch.Serverless.Ingest.TrimProcessor trimProcessor) => Set(trimProcessor, "trim"); - public ProcessorDescriptor Trim(Action> configure) => Set(configure, "trim"); - public ProcessorDescriptor Uppercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.UppercaseProcessor uppercaseProcessor) => Set(uppercaseProcessor, "uppercase"); - public ProcessorDescriptor Uppercase(Action> configure) => Set(configure, "uppercase"); - public ProcessorDescriptor UriParts(Elastic.Clients.Elasticsearch.Serverless.Ingest.UriPartsProcessor uriPartsProcessor) => Set(uriPartsProcessor, "uri_parts"); - public ProcessorDescriptor UriParts(Action> configure) => Set(configure, "uri_parts"); - public ProcessorDescriptor UrlDecode(Elastic.Clients.Elasticsearch.Serverless.Ingest.UrlDecodeProcessor urlDecodeProcessor) => Set(urlDecodeProcessor, "urldecode"); - public ProcessorDescriptor UrlDecode(Action> configure) => Set(configure, "urldecode"); - public ProcessorDescriptor UserAgent(Elastic.Clients.Elasticsearch.Serverless.Ingest.UserAgentProcessor userAgentProcessor) => Set(userAgentProcessor, "user_agent"); - public ProcessorDescriptor UserAgent(Action> configure) => Set(configure, "user_agent"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ProcessorDescriptor : SerializableDescriptor -{ - internal ProcessorDescriptor(Action configure) => configure.Invoke(this); - - public ProcessorDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private ProcessorDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private ProcessorDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public ProcessorDescriptor Append(Elastic.Clients.Elasticsearch.Serverless.Ingest.AppendProcessor appendProcessor) => Set(appendProcessor, "append"); - public ProcessorDescriptor Append(Action configure) => Set(configure, "append"); - public ProcessorDescriptor Attachment(Elastic.Clients.Elasticsearch.Serverless.Ingest.AttachmentProcessor attachmentProcessor) => Set(attachmentProcessor, "attachment"); - public ProcessorDescriptor Attachment(Action configure) => Set(configure, "attachment"); - public ProcessorDescriptor Bytes(Elastic.Clients.Elasticsearch.Serverless.Ingest.BytesProcessor bytesProcessor) => Set(bytesProcessor, "bytes"); - public ProcessorDescriptor Bytes(Action configure) => Set(configure, "bytes"); - public ProcessorDescriptor Circle(Elastic.Clients.Elasticsearch.Serverless.Ingest.CircleProcessor circleProcessor) => Set(circleProcessor, "circle"); - public ProcessorDescriptor Circle(Action configure) => Set(configure, "circle"); - public ProcessorDescriptor CommunityId(Elastic.Clients.Elasticsearch.Serverless.Ingest.CommunityIDProcessor communityIDProcessor) => Set(communityIDProcessor, "community_id"); - public ProcessorDescriptor CommunityId(Action configure) => Set(configure, "community_id"); - public ProcessorDescriptor Convert(Elastic.Clients.Elasticsearch.Serverless.Ingest.ConvertProcessor convertProcessor) => Set(convertProcessor, "convert"); - public ProcessorDescriptor Convert(Action configure) => Set(configure, "convert"); - public ProcessorDescriptor Csv(Elastic.Clients.Elasticsearch.Serverless.Ingest.CsvProcessor csvProcessor) => Set(csvProcessor, "csv"); - public ProcessorDescriptor Csv(Action configure) => Set(configure, "csv"); - public ProcessorDescriptor Date(Elastic.Clients.Elasticsearch.Serverless.Ingest.DateProcessor dateProcessor) => Set(dateProcessor, "date"); - public ProcessorDescriptor Date(Action configure) => Set(configure, "date"); - public ProcessorDescriptor DateIndexName(Elastic.Clients.Elasticsearch.Serverless.Ingest.DateIndexNameProcessor dateIndexNameProcessor) => Set(dateIndexNameProcessor, "date_index_name"); - public ProcessorDescriptor DateIndexName(Action configure) => Set(configure, "date_index_name"); - public ProcessorDescriptor Dissect(Elastic.Clients.Elasticsearch.Serverless.Ingest.DissectProcessor dissectProcessor) => Set(dissectProcessor, "dissect"); - public ProcessorDescriptor Dissect(Action configure) => Set(configure, "dissect"); - public ProcessorDescriptor DotExpander(Elastic.Clients.Elasticsearch.Serverless.Ingest.DotExpanderProcessor dotExpanderProcessor) => Set(dotExpanderProcessor, "dot_expander"); - public ProcessorDescriptor DotExpander(Action configure) => Set(configure, "dot_expander"); - public ProcessorDescriptor Drop(Elastic.Clients.Elasticsearch.Serverless.Ingest.DropProcessor dropProcessor) => Set(dropProcessor, "drop"); - public ProcessorDescriptor Drop(Action configure) => Set(configure, "drop"); - public ProcessorDescriptor Enrich(Elastic.Clients.Elasticsearch.Serverless.Ingest.EnrichProcessor enrichProcessor) => Set(enrichProcessor, "enrich"); - public ProcessorDescriptor Enrich(Action configure) => Set(configure, "enrich"); - public ProcessorDescriptor Fail(Elastic.Clients.Elasticsearch.Serverless.Ingest.FailProcessor failProcessor) => Set(failProcessor, "fail"); - public ProcessorDescriptor Fail(Action configure) => Set(configure, "fail"); - public ProcessorDescriptor Fingerprint(Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintProcessor fingerprintProcessor) => Set(fingerprintProcessor, "fingerprint"); - public ProcessorDescriptor Fingerprint(Action configure) => Set(configure, "fingerprint"); - public ProcessorDescriptor Foreach(Elastic.Clients.Elasticsearch.Serverless.Ingest.ForeachProcessor foreachProcessor) => Set(foreachProcessor, "foreach"); - public ProcessorDescriptor Foreach(Action configure) => Set(configure, "foreach"); - public ProcessorDescriptor GeoGrid(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoGridProcessor geoGridProcessor) => Set(geoGridProcessor, "geo_grid"); - public ProcessorDescriptor GeoGrid(Action configure) => Set(configure, "geo_grid"); - public ProcessorDescriptor Geoip(Elastic.Clients.Elasticsearch.Serverless.Ingest.GeoIpProcessor geoIpProcessor) => Set(geoIpProcessor, "geoip"); - public ProcessorDescriptor Geoip(Action configure) => Set(configure, "geoip"); - public ProcessorDescriptor Grok(Elastic.Clients.Elasticsearch.Serverless.Ingest.GrokProcessor grokProcessor) => Set(grokProcessor, "grok"); - public ProcessorDescriptor Grok(Action configure) => Set(configure, "grok"); - public ProcessorDescriptor Gsub(Elastic.Clients.Elasticsearch.Serverless.Ingest.GsubProcessor gsubProcessor) => Set(gsubProcessor, "gsub"); - public ProcessorDescriptor Gsub(Action configure) => Set(configure, "gsub"); - public ProcessorDescriptor HtmlStrip(Elastic.Clients.Elasticsearch.Serverless.Ingest.HtmlStripProcessor htmlStripProcessor) => Set(htmlStripProcessor, "html_strip"); - public ProcessorDescriptor HtmlStrip(Action configure) => Set(configure, "html_strip"); - public ProcessorDescriptor Inference(Elastic.Clients.Elasticsearch.Serverless.Ingest.InferenceProcessor inferenceProcessor) => Set(inferenceProcessor, "inference"); - public ProcessorDescriptor Inference(Action configure) => Set(configure, "inference"); - public ProcessorDescriptor IpLocation(Elastic.Clients.Elasticsearch.Serverless.Ingest.IpLocationProcessor ipLocationProcessor) => Set(ipLocationProcessor, "ip_location"); - public ProcessorDescriptor IpLocation(Action configure) => Set(configure, "ip_location"); - public ProcessorDescriptor Join(Elastic.Clients.Elasticsearch.Serverless.Ingest.JoinProcessor joinProcessor) => Set(joinProcessor, "join"); - public ProcessorDescriptor Join(Action configure) => Set(configure, "join"); - public ProcessorDescriptor Json(Elastic.Clients.Elasticsearch.Serverless.Ingest.JsonProcessor jsonProcessor) => Set(jsonProcessor, "json"); - public ProcessorDescriptor Json(Action configure) => Set(configure, "json"); - public ProcessorDescriptor Kv(Elastic.Clients.Elasticsearch.Serverless.Ingest.KeyValueProcessor keyValueProcessor) => Set(keyValueProcessor, "kv"); - public ProcessorDescriptor Kv(Action configure) => Set(configure, "kv"); - public ProcessorDescriptor Lowercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.LowercaseProcessor lowercaseProcessor) => Set(lowercaseProcessor, "lowercase"); - public ProcessorDescriptor Lowercase(Action configure) => Set(configure, "lowercase"); - public ProcessorDescriptor NetworkDirection(Elastic.Clients.Elasticsearch.Serverless.Ingest.NetworkDirectionProcessor networkDirectionProcessor) => Set(networkDirectionProcessor, "network_direction"); - public ProcessorDescriptor NetworkDirection(Action configure) => Set(configure, "network_direction"); - public ProcessorDescriptor Pipeline(Elastic.Clients.Elasticsearch.Serverless.Ingest.PipelineProcessor pipelineProcessor) => Set(pipelineProcessor, "pipeline"); - public ProcessorDescriptor Pipeline(Action configure) => Set(configure, "pipeline"); - public ProcessorDescriptor Redact(Elastic.Clients.Elasticsearch.Serverless.Ingest.RedactProcessor redactProcessor) => Set(redactProcessor, "redact"); - public ProcessorDescriptor Redact(Action configure) => Set(configure, "redact"); - public ProcessorDescriptor RegisteredDomain(Elastic.Clients.Elasticsearch.Serverless.Ingest.RegisteredDomainProcessor registeredDomainProcessor) => Set(registeredDomainProcessor, "registered_domain"); - public ProcessorDescriptor RegisteredDomain(Action configure) => Set(configure, "registered_domain"); - public ProcessorDescriptor Remove(Elastic.Clients.Elasticsearch.Serverless.Ingest.RemoveProcessor removeProcessor) => Set(removeProcessor, "remove"); - public ProcessorDescriptor Remove(Action configure) => Set(configure, "remove"); - public ProcessorDescriptor Rename(Elastic.Clients.Elasticsearch.Serverless.Ingest.RenameProcessor renameProcessor) => Set(renameProcessor, "rename"); - public ProcessorDescriptor Rename(Action configure) => Set(configure, "rename"); - public ProcessorDescriptor Reroute(Elastic.Clients.Elasticsearch.Serverless.Ingest.RerouteProcessor rerouteProcessor) => Set(rerouteProcessor, "reroute"); - public ProcessorDescriptor Reroute(Action configure) => Set(configure, "reroute"); - public ProcessorDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Ingest.ScriptProcessor scriptProcessor) => Set(scriptProcessor, "script"); - public ProcessorDescriptor Script(Action configure) => Set(configure, "script"); - public ProcessorDescriptor Set(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetProcessor setProcessor) => Set(setProcessor, "set"); - public ProcessorDescriptor Set(Action configure) => Set(configure, "set"); - public ProcessorDescriptor SetSecurityUser(Elastic.Clients.Elasticsearch.Serverless.Ingest.SetSecurityUserProcessor setSecurityUserProcessor) => Set(setSecurityUserProcessor, "set_security_user"); - public ProcessorDescriptor SetSecurityUser(Action configure) => Set(configure, "set_security_user"); - public ProcessorDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Ingest.SortProcessor sortProcessor) => Set(sortProcessor, "sort"); - public ProcessorDescriptor Sort(Action configure) => Set(configure, "sort"); - public ProcessorDescriptor Split(Elastic.Clients.Elasticsearch.Serverless.Ingest.SplitProcessor splitProcessor) => Set(splitProcessor, "split"); - public ProcessorDescriptor Split(Action configure) => Set(configure, "split"); - public ProcessorDescriptor Terminate(Elastic.Clients.Elasticsearch.Serverless.Ingest.TerminateProcessor terminateProcessor) => Set(terminateProcessor, "terminate"); - public ProcessorDescriptor Terminate(Action configure) => Set(configure, "terminate"); - public ProcessorDescriptor Trim(Elastic.Clients.Elasticsearch.Serverless.Ingest.TrimProcessor trimProcessor) => Set(trimProcessor, "trim"); - public ProcessorDescriptor Trim(Action configure) => Set(configure, "trim"); - public ProcessorDescriptor Uppercase(Elastic.Clients.Elasticsearch.Serverless.Ingest.UppercaseProcessor uppercaseProcessor) => Set(uppercaseProcessor, "uppercase"); - public ProcessorDescriptor Uppercase(Action configure) => Set(configure, "uppercase"); - public ProcessorDescriptor UriParts(Elastic.Clients.Elasticsearch.Serverless.Ingest.UriPartsProcessor uriPartsProcessor) => Set(uriPartsProcessor, "uri_parts"); - public ProcessorDescriptor UriParts(Action configure) => Set(configure, "uri_parts"); - public ProcessorDescriptor UrlDecode(Elastic.Clients.Elasticsearch.Serverless.Ingest.UrlDecodeProcessor urlDecodeProcessor) => Set(urlDecodeProcessor, "urldecode"); - public ProcessorDescriptor UrlDecode(Action configure) => Set(configure, "urldecode"); - public ProcessorDescriptor UserAgent(Elastic.Clients.Elasticsearch.Serverless.Ingest.UserAgentProcessor userAgentProcessor) => Set(userAgentProcessor, "user_agent"); - public ProcessorDescriptor UserAgent(Action configure) => Set(configure, "user_agent"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Redact.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Redact.g.cs deleted file mode 100644 index ab6867a45e6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Redact.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Redact -{ - /// - /// - /// indicates if document has been redacted - /// - /// - [JsonInclude, JsonPropertyName("_is_redacted")] - public bool IsRedacted { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs deleted file mode 100644 index 3fd46a7ab96..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RedactProcessor.g.cs +++ /dev/null @@ -1,771 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class RedactProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to be redacted - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - [JsonInclude, JsonPropertyName("pattern_definitions")] - public IDictionary? PatternDefinitions { get; set; } - - /// - /// - /// A list of grok expressions to match and redact named captures with - /// - /// - [JsonInclude, JsonPropertyName("patterns")] - public ICollection Patterns { get; set; } - - /// - /// - /// Start a redacted section with this token - /// - /// - [JsonInclude, JsonPropertyName("prefix")] - public string? Prefix { get; set; } - - /// - /// - /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document - /// - /// - [JsonInclude, JsonPropertyName("skip_if_unlicensed")] - public bool? SkipIfUnlicensed { get; set; } - - /// - /// - /// End a redacted section with this token - /// - /// - [JsonInclude, JsonPropertyName("suffix")] - public string? Suffix { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// If true then ingest metadata _ingest._redact._is_redacted is set to true if the document has been redacted - /// - /// - [JsonInclude, JsonPropertyName("trace_redact")] - public bool? TraceRedact { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(RedactProcessor redactProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Redact(redactProcessor); -} - -public sealed partial class RedactProcessorDescriptor : SerializableDescriptor> -{ - internal RedactProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public RedactProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private IDictionary? PatternDefinitionsValue { get; set; } - private ICollection PatternsValue { get; set; } - private string? PrefixValue { get; set; } - private bool? SkipIfUnlicensedValue { get; set; } - private string? SuffixValue { get; set; } - private string? TagValue { get; set; } - private bool? TraceRedactValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RedactProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be redacted - /// - /// - public RedactProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be redacted - /// - /// - public RedactProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be redacted - /// - /// - public RedactProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RedactProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RedactProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public RedactProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RedactProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RedactProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RedactProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RedactProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - public RedactProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) - { - PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// A list of grok expressions to match and redact named captures with - /// - /// - public RedactProcessorDescriptor Patterns(ICollection patterns) - { - PatternsValue = patterns; - return Self; - } - - /// - /// - /// Start a redacted section with this token - /// - /// - public RedactProcessorDescriptor Prefix(string? prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document - /// - /// - public RedactProcessorDescriptor SkipIfUnlicensed(bool? skipIfUnlicensed = true) - { - SkipIfUnlicensedValue = skipIfUnlicensed; - return Self; - } - - /// - /// - /// End a redacted section with this token - /// - /// - public RedactProcessorDescriptor Suffix(string? suffix) - { - SuffixValue = suffix; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RedactProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// If true then ingest metadata _ingest._redact._is_redacted is set to true if the document has been redacted - /// - /// - public RedactProcessorDescriptor TraceRedact(bool? traceRedact = true) - { - TraceRedactValue = traceRedact; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PatternDefinitionsValue is not null) - { - writer.WritePropertyName("pattern_definitions"); - JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); - } - - writer.WritePropertyName("patterns"); - JsonSerializer.Serialize(writer, PatternsValue, options); - if (!string.IsNullOrEmpty(PrefixValue)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - } - - if (SkipIfUnlicensedValue.HasValue) - { - writer.WritePropertyName("skip_if_unlicensed"); - writer.WriteBooleanValue(SkipIfUnlicensedValue.Value); - } - - if (!string.IsNullOrEmpty(SuffixValue)) - { - writer.WritePropertyName("suffix"); - writer.WriteStringValue(SuffixValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TraceRedactValue.HasValue) - { - writer.WritePropertyName("trace_redact"); - writer.WriteBooleanValue(TraceRedactValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RedactProcessorDescriptor : SerializableDescriptor -{ - internal RedactProcessorDescriptor(Action configure) => configure.Invoke(this); - - public RedactProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private IDictionary? PatternDefinitionsValue { get; set; } - private ICollection PatternsValue { get; set; } - private string? PrefixValue { get; set; } - private bool? SkipIfUnlicensedValue { get; set; } - private string? SuffixValue { get; set; } - private string? TagValue { get; set; } - private bool? TraceRedactValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RedactProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be redacted - /// - /// - public RedactProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be redacted - /// - /// - public RedactProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be redacted - /// - /// - public RedactProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RedactProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RedactProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public RedactProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RedactProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RedactProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RedactProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RedactProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - public RedactProcessorDescriptor PatternDefinitions(Func, FluentDictionary> selector) - { - PatternDefinitionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// A list of grok expressions to match and redact named captures with - /// - /// - public RedactProcessorDescriptor Patterns(ICollection patterns) - { - PatternsValue = patterns; - return Self; - } - - /// - /// - /// Start a redacted section with this token - /// - /// - public RedactProcessorDescriptor Prefix(string? prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// If true and the current license does not support running redact processors, then the processor quietly exits without modifying the document - /// - /// - public RedactProcessorDescriptor SkipIfUnlicensed(bool? skipIfUnlicensed = true) - { - SkipIfUnlicensedValue = skipIfUnlicensed; - return Self; - } - - /// - /// - /// End a redacted section with this token - /// - /// - public RedactProcessorDescriptor Suffix(string? suffix) - { - SuffixValue = suffix; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RedactProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// If true then ingest metadata _ingest._redact._is_redacted is set to true if the document has been redacted - /// - /// - public RedactProcessorDescriptor TraceRedact(bool? traceRedact = true) - { - TraceRedactValue = traceRedact; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PatternDefinitionsValue is not null) - { - writer.WritePropertyName("pattern_definitions"); - JsonSerializer.Serialize(writer, PatternDefinitionsValue, options); - } - - writer.WritePropertyName("patterns"); - JsonSerializer.Serialize(writer, PatternsValue, options); - if (!string.IsNullOrEmpty(PrefixValue)) - { - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - } - - if (SkipIfUnlicensedValue.HasValue) - { - writer.WritePropertyName("skip_if_unlicensed"); - writer.WriteBooleanValue(SkipIfUnlicensedValue.Value); - } - - if (!string.IsNullOrEmpty(SuffixValue)) - { - writer.WritePropertyName("suffix"); - writer.WriteStringValue(SuffixValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TraceRedactValue.HasValue) - { - writer.WritePropertyName("trace_redact"); - writer.WriteBooleanValue(TraceRedactValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs deleted file mode 100644 index 5edced6ebd3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs +++ /dev/null @@ -1,629 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class RegisteredDomainProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Field containing the source FQDN. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(RegisteredDomainProcessor registeredDomainProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.RegisteredDomain(registeredDomainProcessor); -} - -public sealed partial class RegisteredDomainProcessorDescriptor : SerializableDescriptor> -{ - internal RegisteredDomainProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public RegisteredDomainProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RegisteredDomainProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the source FQDN. - /// - /// - public RegisteredDomainProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the source FQDN. - /// - /// - public RegisteredDomainProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the source FQDN. - /// - /// - public RegisteredDomainProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RegisteredDomainProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RegisteredDomainProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - public RegisteredDomainProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RegisteredDomainProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RegisteredDomainProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RegisteredDomainProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RegisteredDomainProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RegisteredDomainProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - public RegisteredDomainProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - public RegisteredDomainProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - public RegisteredDomainProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RegisteredDomainProcessorDescriptor : SerializableDescriptor -{ - internal RegisteredDomainProcessorDescriptor(Action configure) => configure.Invoke(this); - - public RegisteredDomainProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RegisteredDomainProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the source FQDN. - /// - /// - public RegisteredDomainProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the source FQDN. - /// - /// - public RegisteredDomainProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the source FQDN. - /// - /// - public RegisteredDomainProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RegisteredDomainProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RegisteredDomainProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and any required fields are missing, the processor quietly exits - /// without modifying the document. - /// - /// - public RegisteredDomainProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RegisteredDomainProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RegisteredDomainProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RegisteredDomainProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RegisteredDomainProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RegisteredDomainProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - public RegisteredDomainProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - public RegisteredDomainProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Object field containing extracted domain components. If an empty string, - /// the processor adds components to the document’s root. - /// - /// - public RegisteredDomainProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs deleted file mode 100644 index f6f877bc357..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RemoveProcessor.g.cs +++ /dev/null @@ -1,533 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class RemoveProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Fields to be removed. Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("field")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Fields to be kept. When set, all fields other than those specified are removed. - /// - /// - [JsonInclude, JsonPropertyName("keep")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Keep { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(RemoveProcessor removeProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Remove(removeProcessor); -} - -public sealed partial class RemoveProcessorDescriptor : SerializableDescriptor> -{ - internal RemoveProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public RemoveProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? KeepValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RemoveProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Fields to be removed. Supports template snippets. - /// - /// - public RemoveProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Fields field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RemoveProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RemoveProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public RemoveProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Fields to be kept. When set, all fields other than those specified are removed. - /// - /// - public RemoveProcessorDescriptor Keep(Elastic.Clients.Elasticsearch.Serverless.Fields? keep) - { - KeepValue = keep; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RemoveProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (KeepValue is not null) - { - writer.WritePropertyName("keep"); - JsonSerializer.Serialize(writer, KeepValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RemoveProcessorDescriptor : SerializableDescriptor -{ - internal RemoveProcessorDescriptor(Action configure) => configure.Invoke(this); - - public RemoveProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? KeepValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RemoveProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Fields to be removed. Supports template snippets. - /// - /// - public RemoveProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Fields field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RemoveProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RemoveProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public RemoveProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Fields to be kept. When set, all fields other than those specified are removed. - /// - /// - public RemoveProcessorDescriptor Keep(Elastic.Clients.Elasticsearch.Serverless.Fields? keep) - { - KeepValue = keep; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RemoveProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RemoveProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RemoveProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (KeepValue is not null) - { - writer.WritePropertyName("keep"); - JsonSerializer.Serialize(writer, KeepValue, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs deleted file mode 100644 index 36c0ee328ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RenameProcessor.g.cs +++ /dev/null @@ -1,625 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class RenameProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(RenameProcessor renameProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Rename(renameProcessor); -} - -public sealed partial class RenameProcessorDescriptor : SerializableDescriptor> -{ - internal RenameProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public RenameProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RenameProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RenameProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RenameProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public RenameProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RenameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RenameProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class RenameProcessorDescriptor : SerializableDescriptor -{ - internal RenameProcessorDescriptor(Action configure) => configure.Invoke(this); - - public RenameProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RenameProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be renamed. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RenameProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RenameProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public RenameProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RenameProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RenameProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RenameProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RenameProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The new name of the field. - /// Supports template snippets. - /// - /// - public RenameProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RerouteProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RerouteProcessor.g.cs deleted file mode 100644 index 1e865f6735a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/RerouteProcessor.g.cs +++ /dev/null @@ -1,598 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class RerouteProcessor -{ - /// - /// - /// Field references or a static value for the dataset part of the data stream name. - /// In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters. - /// Example values are nginx.access and nginx.error. - /// - /// - /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces). - /// When resolving field references, the processor replaces invalid characters with _. Uses the <dataset> part - /// of the index name as a fallback if all field references resolve to a null, missing, or non-string value. - /// - /// - /// default {{data_stream.dataset}} - /// - /// - [JsonInclude, JsonPropertyName("dataset")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Dataset { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// A static value for the target. Can’t be set when the dataset or namespace option is set. - /// - /// - [JsonInclude, JsonPropertyName("destination")] - public string? Destination { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Field references or a static value for the namespace part of the data stream name. See the criteria for - /// index names for allowed characters. Must be no longer than 100 characters. - /// - /// - /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces). - /// When resolving field references, the processor replaces invalid characters with _. Uses the <namespace> part - /// of the index name as a fallback if all field references resolve to a null, missing, or non-string value. - /// - /// - /// default {{data_stream.namespace}} - /// - /// - [JsonInclude, JsonPropertyName("namespace")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? Namespace { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(RerouteProcessor rerouteProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Reroute(rerouteProcessor); -} - -public sealed partial class RerouteProcessorDescriptor : SerializableDescriptor> -{ - internal RerouteProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public RerouteProcessorDescriptor() : base() - { - } - - private ICollection? DatasetValue { get; set; } - private string? DescriptionValue { get; set; } - private string? DestinationValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? NamespaceValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Field references or a static value for the dataset part of the data stream name. - /// In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters. - /// Example values are nginx.access and nginx.error. - /// - /// - /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces). - /// When resolving field references, the processor replaces invalid characters with _. Uses the <dataset> part - /// of the index name as a fallback if all field references resolve to a null, missing, or non-string value. - /// - /// - /// default {{data_stream.dataset}} - /// - /// - public RerouteProcessorDescriptor Dataset(ICollection? dataset) - { - DatasetValue = dataset; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RerouteProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A static value for the target. Can’t be set when the dataset or namespace option is set. - /// - /// - public RerouteProcessorDescriptor Destination(string? destination) - { - DestinationValue = destination; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RerouteProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RerouteProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Field references or a static value for the namespace part of the data stream name. See the criteria for - /// index names for allowed characters. Must be no longer than 100 characters. - /// - /// - /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces). - /// When resolving field references, the processor replaces invalid characters with _. Uses the <namespace> part - /// of the index name as a fallback if all field references resolve to a null, missing, or non-string value. - /// - /// - /// default {{data_stream.namespace}} - /// - /// - public RerouteProcessorDescriptor Namespace(ICollection? value) - { - NamespaceValue = value; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RerouteProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RerouteProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RerouteProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RerouteProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RerouteProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DatasetValue is not null) - { - writer.WritePropertyName("dataset"); - SingleOrManySerializationHelper.Serialize(DatasetValue, writer, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(DestinationValue)) - { - writer.WritePropertyName("destination"); - writer.WriteStringValue(DestinationValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (NamespaceValue is not null) - { - writer.WritePropertyName("namespace"); - SingleOrManySerializationHelper.Serialize(NamespaceValue, writer, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RerouteProcessorDescriptor : SerializableDescriptor -{ - internal RerouteProcessorDescriptor(Action configure) => configure.Invoke(this); - - public RerouteProcessorDescriptor() : base() - { - } - - private ICollection? DatasetValue { get; set; } - private string? DescriptionValue { get; set; } - private string? DestinationValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? NamespaceValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Field references or a static value for the dataset part of the data stream name. - /// In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters. - /// Example values are nginx.access and nginx.error. - /// - /// - /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces). - /// When resolving field references, the processor replaces invalid characters with _. Uses the <dataset> part - /// of the index name as a fallback if all field references resolve to a null, missing, or non-string value. - /// - /// - /// default {{data_stream.dataset}} - /// - /// - public RerouteProcessorDescriptor Dataset(ICollection? dataset) - { - DatasetValue = dataset; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public RerouteProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A static value for the target. Can’t be set when the dataset or namespace option is set. - /// - /// - public RerouteProcessorDescriptor Destination(string? destination) - { - DestinationValue = destination; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public RerouteProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public RerouteProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Field references or a static value for the namespace part of the data stream name. See the criteria for - /// index names for allowed characters. Must be no longer than 100 characters. - /// - /// - /// Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces). - /// When resolving field references, the processor replaces invalid characters with _. Uses the <namespace> part - /// of the index name as a fallback if all field references resolve to a null, missing, or non-string value. - /// - /// - /// default {{data_stream.namespace}} - /// - /// - public RerouteProcessorDescriptor Namespace(ICollection? value) - { - NamespaceValue = value; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public RerouteProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public RerouteProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public RerouteProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public RerouteProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public RerouteProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DatasetValue is not null) - { - writer.WritePropertyName("dataset"); - SingleOrManySerializationHelper.Serialize(DatasetValue, writer, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(DestinationValue)) - { - writer.WritePropertyName("destination"); - writer.WriteStringValue(DestinationValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (NamespaceValue is not null) - { - writer.WritePropertyName("namespace"); - SingleOrManySerializationHelper.Serialize(NamespaceValue, writer, options); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ScriptProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ScriptProcessor.g.cs deleted file mode 100644 index a3cb8bc52ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/ScriptProcessor.g.cs +++ /dev/null @@ -1,589 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class ScriptProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// ID of a stored script. - /// If no source is specified, this parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Script language. - /// - /// - [JsonInclude, JsonPropertyName("lang")] - public string? Lang { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Object containing parameters for the script. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// Inline script. - /// If no id is specified, this parameter is required. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string? Source { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(ScriptProcessor scriptProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Script(scriptProcessor); -} - -public sealed partial class ScriptProcessorDescriptor : SerializableDescriptor> -{ - internal ScriptProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public ScriptProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? LangValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? SourceValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public ScriptProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// ID of a stored script. - /// If no source is specified, this parameter is required. - /// - /// - public ScriptProcessorDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public ScriptProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public ScriptProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Script language. - /// - /// - public ScriptProcessorDescriptor Lang(string? lang) - { - LangValue = lang; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public ScriptProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ScriptProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ScriptProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ScriptProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Object containing parameters for the script. - /// - /// - public ScriptProcessorDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Inline script. - /// If no id is specified, this parameter is required. - /// - /// - public ScriptProcessorDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public ScriptProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LangValue)) - { - writer.WritePropertyName("lang"); - writer.WriteStringValue(LangValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ScriptProcessorDescriptor : SerializableDescriptor -{ - internal ScriptProcessorDescriptor(Action configure) => configure.Invoke(this); - - public ScriptProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? LangValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? SourceValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public ScriptProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// ID of a stored script. - /// If no source is specified, this parameter is required. - /// - /// - public ScriptProcessorDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public ScriptProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public ScriptProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Script language. - /// - /// - public ScriptProcessorDescriptor Lang(string? lang) - { - LangValue = lang; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public ScriptProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public ScriptProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public ScriptProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public ScriptProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Object containing parameters for the script. - /// - /// - public ScriptProcessorDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Inline script. - /// If no id is specified, this parameter is required. - /// - /// - public ScriptProcessorDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public ScriptProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(LangValue)) - { - writer.WritePropertyName("lang"); - writer.WriteStringValue(LangValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs deleted file mode 100644 index c48440c59f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetProcessor.g.cs +++ /dev/null @@ -1,780 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SetProcessor -{ - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - [JsonInclude, JsonPropertyName("copy_from")] - public Elastic.Clients.Elasticsearch.Serverless.Field? CopyFrom { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// If true and value is a template snippet that evaluates to null or the empty string, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_empty_value")] - public bool? IgnoreEmptyValue { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// The media type for encoding value. - /// Applies only when value is a template snippet. - /// Must be one of application/json, text/plain, or application/x-www-form-urlencoded. - /// - /// - [JsonInclude, JsonPropertyName("media_type")] - public string? MediaType { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// If true processor will update fields with pre-existing non-null-valued field. - /// When set to false, such fields will not be touched. - /// - /// - [JsonInclude, JsonPropertyName("override")] - public bool? Override { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The value to be set for the field. - /// Supports template snippets. - /// May specify only one of value or copy_from. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public object? Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(SetProcessor setProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Set(setProcessor); -} - -public sealed partial class SetProcessorDescriptor : SerializableDescriptor> -{ - internal SetProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public SetProcessorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? CopyFromValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreEmptyValueValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? MediaTypeValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private bool? OverrideValue { get; set; } - private string? TagValue { get; set; } - private object? ValueValue { get; set; } - - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - public SetProcessorDescriptor CopyFrom(Elastic.Clients.Elasticsearch.Serverless.Field? copyFrom) - { - CopyFromValue = copyFrom; - return Self; - } - - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - public SetProcessorDescriptor CopyFrom(Expression> copyFrom) - { - CopyFromValue = copyFrom; - return Self; - } - - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - public SetProcessorDescriptor CopyFrom(Expression> copyFrom) - { - CopyFromValue = copyFrom; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SetProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - public SetProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - public SetProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - public SetProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SetProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// If true and value is a template snippet that evaluates to null or the empty string, the processor quietly exits without modifying the document. - /// - /// - public SetProcessorDescriptor IgnoreEmptyValue(bool? ignoreEmptyValue = true) - { - IgnoreEmptyValueValue = ignoreEmptyValue; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SetProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The media type for encoding value. - /// Applies only when value is a template snippet. - /// Must be one of application/json, text/plain, or application/x-www-form-urlencoded. - /// - /// - public SetProcessorDescriptor MediaType(string? mediaType) - { - MediaTypeValue = mediaType; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SetProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true processor will update fields with pre-existing non-null-valued field. - /// When set to false, such fields will not be touched. - /// - /// - public SetProcessorDescriptor Override(bool? value = true) - { - OverrideValue = value; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SetProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The value to be set for the field. - /// Supports template snippets. - /// May specify only one of value or copy_from. - /// - /// - public SetProcessorDescriptor Value(object? value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyFromValue is not null) - { - writer.WritePropertyName("copy_from"); - JsonSerializer.Serialize(writer, CopyFromValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreEmptyValueValue.HasValue) - { - writer.WritePropertyName("ignore_empty_value"); - writer.WriteBooleanValue(IgnoreEmptyValueValue.Value); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(MediaTypeValue)) - { - writer.WritePropertyName("media_type"); - writer.WriteStringValue(MediaTypeValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OverrideValue.HasValue) - { - writer.WritePropertyName("override"); - writer.WriteBooleanValue(OverrideValue.Value); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (ValueValue is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SetProcessorDescriptor : SerializableDescriptor -{ - internal SetProcessorDescriptor(Action configure) => configure.Invoke(this); - - public SetProcessorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? CopyFromValue { get; set; } - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreEmptyValueValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private string? MediaTypeValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private bool? OverrideValue { get; set; } - private string? TagValue { get; set; } - private object? ValueValue { get; set; } - - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - public SetProcessorDescriptor CopyFrom(Elastic.Clients.Elasticsearch.Serverless.Field? copyFrom) - { - CopyFromValue = copyFrom; - return Self; - } - - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - public SetProcessorDescriptor CopyFrom(Expression> copyFrom) - { - CopyFromValue = copyFrom; - return Self; - } - - /// - /// - /// The origin field which will be copied to field, cannot set value simultaneously. - /// Supported data types are boolean, number, array, object, string, date, etc. - /// - /// - public SetProcessorDescriptor CopyFrom(Expression> copyFrom) - { - CopyFromValue = copyFrom; - return Self; - } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SetProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - public SetProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - public SetProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to insert, upsert, or update. - /// Supports template snippets. - /// - /// - public SetProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SetProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// If true and value is a template snippet that evaluates to null or the empty string, the processor quietly exits without modifying the document. - /// - /// - public SetProcessorDescriptor IgnoreEmptyValue(bool? ignoreEmptyValue = true) - { - IgnoreEmptyValueValue = ignoreEmptyValue; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SetProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// The media type for encoding value. - /// Applies only when value is a template snippet. - /// Must be one of application/json, text/plain, or application/x-www-form-urlencoded. - /// - /// - public SetProcessorDescriptor MediaType(string? mediaType) - { - MediaTypeValue = mediaType; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SetProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true processor will update fields with pre-existing non-null-valued field. - /// When set to false, such fields will not be touched. - /// - /// - public SetProcessorDescriptor Override(bool? value = true) - { - OverrideValue = value; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SetProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The value to be set for the field. - /// Supports template snippets. - /// May specify only one of value or copy_from. - /// - /// - public SetProcessorDescriptor Value(object? value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyFromValue is not null) - { - writer.WritePropertyName("copy_from"); - JsonSerializer.Serialize(writer, CopyFromValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreEmptyValueValue.HasValue) - { - writer.WritePropertyName("ignore_empty_value"); - writer.WriteBooleanValue(IgnoreEmptyValueValue.Value); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (!string.IsNullOrEmpty(MediaTypeValue)) - { - writer.WritePropertyName("media_type"); - writer.WriteStringValue(MediaTypeValue); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OverrideValue.HasValue) - { - writer.WritePropertyName("override"); - writer.WriteBooleanValue(OverrideValue.Value); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (ValueValue is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs deleted file mode 100644 index d4c853f4013..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs +++ /dev/null @@ -1,531 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SetSecurityUserProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to store the user information into. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Controls what user related properties are added to the field. - /// - /// - [JsonInclude, JsonPropertyName("properties")] - public ICollection? Properties { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(SetSecurityUserProcessor setSecurityUserProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.SetSecurityUser(setSecurityUserProcessor); -} - -public sealed partial class SetSecurityUserProcessorDescriptor : SerializableDescriptor> -{ - internal SetSecurityUserProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public SetSecurityUserProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SetSecurityUserProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to store the user information into. - /// - /// - public SetSecurityUserProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to store the user information into. - /// - /// - public SetSecurityUserProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to store the user information into. - /// - /// - public SetSecurityUserProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SetSecurityUserProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SetSecurityUserProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what user related properties are added to the field. - /// - /// - public SetSecurityUserProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SetSecurityUserProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SetSecurityUserProcessorDescriptor : SerializableDescriptor -{ - internal SetSecurityUserProcessorDescriptor(Action configure) => configure.Invoke(this); - - public SetSecurityUserProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SetSecurityUserProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to store the user information into. - /// - /// - public SetSecurityUserProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to store the user information into. - /// - /// - public SetSecurityUserProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to store the user information into. - /// - /// - public SetSecurityUserProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SetSecurityUserProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SetSecurityUserProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SetSecurityUserProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SetSecurityUserProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what user related properties are added to the field. - /// - /// - public SetSecurityUserProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SetSecurityUserProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SimulateDocumentResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SimulateDocumentResult.g.cs deleted file mode 100644 index 81d5e102c06..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SimulateDocumentResult.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SimulateDocumentResult -{ - [JsonInclude, JsonPropertyName("doc")] - public Elastic.Clients.Elasticsearch.Serverless.Ingest.DocumentSimulation? Doc { get; init; } - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? Error { get; init; } - [JsonInclude, JsonPropertyName("processor_results")] - public IReadOnlyCollection? ProcessorResults { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs deleted file mode 100644 index 5967180b7ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SortProcessor.g.cs +++ /dev/null @@ -1,629 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SortProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to be sorted. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// The sort order to use. - /// Accepts "asc" or "desc". - /// - /// - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(SortProcessor sortProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Sort(sortProcessor); -} - -public sealed partial class SortProcessorDescriptor : SerializableDescriptor> -{ - internal SortProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public SortProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SortProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be sorted. - /// - /// - public SortProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be sorted. - /// - /// - public SortProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be sorted. - /// - /// - public SortProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SortProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SortProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SortProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SortProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SortProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SortProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The sort order to use. - /// Accepts "asc" or "desc". - /// - /// - public SortProcessorDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SortProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - public SortProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - public SortProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - public SortProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SortProcessorDescriptor : SerializableDescriptor -{ - internal SortProcessorDescriptor(Action configure) => configure.Invoke(this); - - public SortProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SortProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to be sorted. - /// - /// - public SortProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be sorted. - /// - /// - public SortProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to be sorted. - /// - /// - public SortProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SortProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SortProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SortProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SortProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SortProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SortProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// The sort order to use. - /// Accepts "asc" or "desc". - /// - /// - public SortProcessorDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SortProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - public SortProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - public SortProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the sorted value to. - /// By default, the field is updated in-place. - /// - /// - public SortProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SplitProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SplitProcessor.g.cs deleted file mode 100644 index 37004038f5e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/SplitProcessor.g.cs +++ /dev/null @@ -1,706 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class SplitProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to split. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Preserves empty trailing fields, if any. - /// - /// - [JsonInclude, JsonPropertyName("preserve_trailing")] - public bool? PreserveTrailing { get; set; } - - /// - /// - /// A regex which matches the separator, for example, , or \s+. - /// - /// - [JsonInclude, JsonPropertyName("separator")] - public string Separator { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(SplitProcessor splitProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Split(splitProcessor); -} - -public sealed partial class SplitProcessorDescriptor : SerializableDescriptor> -{ - internal SplitProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public SplitProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private bool? PreserveTrailingValue { get; set; } - private string SeparatorValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SplitProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to split. - /// - /// - public SplitProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to split. - /// - /// - public SplitProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to split. - /// - /// - public SplitProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SplitProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SplitProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public SplitProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SplitProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Preserves empty trailing fields, if any. - /// - /// - public SplitProcessorDescriptor PreserveTrailing(bool? preserveTrailing = true) - { - PreserveTrailingValue = preserveTrailing; - return Self; - } - - /// - /// - /// A regex which matches the separator, for example, , or \s+. - /// - /// - public SplitProcessorDescriptor Separator(string separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SplitProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - public SplitProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - public SplitProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - public SplitProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PreserveTrailingValue.HasValue) - { - writer.WritePropertyName("preserve_trailing"); - writer.WriteBooleanValue(PreserveTrailingValue.Value); - } - - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SplitProcessorDescriptor : SerializableDescriptor -{ - internal SplitProcessorDescriptor(Action configure) => configure.Invoke(this); - - public SplitProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private bool? PreserveTrailingValue { get; set; } - private string SeparatorValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public SplitProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to split. - /// - /// - public SplitProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to split. - /// - /// - public SplitProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to split. - /// - /// - public SplitProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public SplitProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public SplitProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public SplitProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public SplitProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public SplitProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public SplitProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Preserves empty trailing fields, if any. - /// - /// - public SplitProcessorDescriptor PreserveTrailing(bool? preserveTrailing = true) - { - PreserveTrailingValue = preserveTrailing; - return Self; - } - - /// - /// - /// A regex which matches the separator, for example, , or \s+. - /// - /// - public SplitProcessorDescriptor Separator(string separator) - { - SeparatorValue = separator; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public SplitProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - public SplitProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - public SplitProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the split value to. - /// By default, the field is updated in-place. - /// - /// - public SplitProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PreserveTrailingValue.HasValue) - { - writer.WritePropertyName("preserve_trailing"); - writer.WriteBooleanValue(PreserveTrailingValue.Value); - } - - writer.WritePropertyName("separator"); - writer.WriteStringValue(SeparatorValue); - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TerminateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TerminateProcessor.g.cs deleted file mode 100644 index 70b2df4e941..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TerminateProcessor.g.cs +++ /dev/null @@ -1,407 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class TerminateProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(TerminateProcessor terminateProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Terminate(terminateProcessor); -} - -public sealed partial class TerminateProcessorDescriptor : SerializableDescriptor> -{ - internal TerminateProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public TerminateProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public TerminateProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public TerminateProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public TerminateProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public TerminateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TerminateProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TerminateProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TerminateProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public TerminateProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TerminateProcessorDescriptor : SerializableDescriptor -{ - internal TerminateProcessorDescriptor(Action configure) => configure.Invoke(this); - - public TerminateProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public TerminateProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public TerminateProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public TerminateProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public TerminateProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TerminateProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TerminateProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TerminateProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public TerminateProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TrimProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TrimProcessor.g.cs deleted file mode 100644 index aa3c91d70e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/TrimProcessor.g.cs +++ /dev/null @@ -1,626 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class TrimProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(TrimProcessor trimProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Trim(trimProcessor); -} - -public sealed partial class TrimProcessorDescriptor : SerializableDescriptor> -{ - internal TrimProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public TrimProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public TrimProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - public TrimProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - public TrimProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - public TrimProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public TrimProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public TrimProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public TrimProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public TrimProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public TrimProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - public TrimProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - public TrimProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - public TrimProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TrimProcessorDescriptor : SerializableDescriptor -{ - internal TrimProcessorDescriptor(Action configure) => configure.Invoke(this); - - public TrimProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public TrimProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - public TrimProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - public TrimProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The string-valued field to trim whitespace from. - /// - /// - public TrimProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public TrimProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public TrimProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public TrimProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public TrimProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public TrimProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public TrimProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public TrimProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - public TrimProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - public TrimProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the trimmed value to. - /// By default, the field is updated in-place. - /// - /// - public TrimProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UppercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UppercaseProcessor.g.cs deleted file mode 100644 index 0ac5bc4040a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UppercaseProcessor.g.cs +++ /dev/null @@ -1,626 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class UppercaseProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to make uppercase. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(UppercaseProcessor uppercaseProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Uppercase(uppercaseProcessor); -} - -public sealed partial class UppercaseProcessorDescriptor : SerializableDescriptor> -{ - internal UppercaseProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public UppercaseProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UppercaseProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to make uppercase. - /// - /// - public UppercaseProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make uppercase. - /// - /// - public UppercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make uppercase. - /// - /// - public UppercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UppercaseProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UppercaseProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public UppercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UppercaseProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UppercaseProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UppercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UppercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UppercaseProcessorDescriptor : SerializableDescriptor -{ - internal UppercaseProcessorDescriptor(Action configure) => configure.Invoke(this); - - public UppercaseProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UppercaseProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to make uppercase. - /// - /// - public UppercaseProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make uppercase. - /// - /// - public UppercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to make uppercase. - /// - /// - public UppercaseProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UppercaseProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UppercaseProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public UppercaseProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UppercaseProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UppercaseProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UppercaseProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UppercaseProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UppercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UppercaseProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UriPartsProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UriPartsProcessor.g.cs deleted file mode 100644 index 10b91f78d0c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UriPartsProcessor.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class UriPartsProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Field containing the URI string. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// If true, the processor copies the unparsed URI to <target_field>.original. - /// - /// - [JsonInclude, JsonPropertyName("keep_original")] - public bool? KeepOriginal { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// If true, the processor removes the field after parsing the URI string. - /// If parsing fails, the processor does not remove the field. - /// - /// - [JsonInclude, JsonPropertyName("remove_if_successful")] - public bool? RemoveIfSuccessful { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// Output field for the URI object. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(UriPartsProcessor uriPartsProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.UriParts(uriPartsProcessor); -} - -public sealed partial class UriPartsProcessorDescriptor : SerializableDescriptor> -{ - internal UriPartsProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public UriPartsProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private bool? KeepOriginalValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private bool? RemoveIfSuccessfulValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UriPartsProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the URI string. - /// - /// - public UriPartsProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the URI string. - /// - /// - public UriPartsProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the URI string. - /// - /// - public UriPartsProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UriPartsProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UriPartsProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public UriPartsProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// If true, the processor copies the unparsed URI to <target_field>.original. - /// - /// - public UriPartsProcessorDescriptor KeepOriginal(bool? keepOriginal = true) - { - KeepOriginalValue = keepOriginal; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UriPartsProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UriPartsProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UriPartsProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UriPartsProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, the processor removes the field after parsing the URI string. - /// If parsing fails, the processor does not remove the field. - /// - /// - public UriPartsProcessorDescriptor RemoveIfSuccessful(bool? removeIfSuccessful = true) - { - RemoveIfSuccessfulValue = removeIfSuccessful; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UriPartsProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the URI object. - /// - /// - public UriPartsProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the URI object. - /// - /// - public UriPartsProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the URI object. - /// - /// - public UriPartsProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (KeepOriginalValue.HasValue) - { - writer.WritePropertyName("keep_original"); - writer.WriteBooleanValue(KeepOriginalValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (RemoveIfSuccessfulValue.HasValue) - { - writer.WritePropertyName("remove_if_successful"); - writer.WriteBooleanValue(RemoveIfSuccessfulValue.Value); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UriPartsProcessorDescriptor : SerializableDescriptor -{ - internal UriPartsProcessorDescriptor(Action configure) => configure.Invoke(this); - - public UriPartsProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private bool? KeepOriginalValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private bool? RemoveIfSuccessfulValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UriPartsProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Field containing the URI string. - /// - /// - public UriPartsProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the URI string. - /// - /// - public UriPartsProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field containing the URI string. - /// - /// - public UriPartsProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UriPartsProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UriPartsProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public UriPartsProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// If true, the processor copies the unparsed URI to <target_field>.original. - /// - /// - public UriPartsProcessorDescriptor KeepOriginal(bool? keepOriginal = true) - { - KeepOriginalValue = keepOriginal; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UriPartsProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UriPartsProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UriPartsProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UriPartsProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// If true, the processor removes the field after parsing the URI string. - /// If parsing fails, the processor does not remove the field. - /// - /// - public UriPartsProcessorDescriptor RemoveIfSuccessful(bool? removeIfSuccessful = true) - { - RemoveIfSuccessfulValue = removeIfSuccessful; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UriPartsProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// Output field for the URI object. - /// - /// - public UriPartsProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the URI object. - /// - /// - public UriPartsProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// Output field for the URI object. - /// - /// - public UriPartsProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (KeepOriginalValue.HasValue) - { - writer.WritePropertyName("keep_original"); - writer.WriteBooleanValue(KeepOriginalValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (RemoveIfSuccessfulValue.HasValue) - { - writer.WritePropertyName("remove_if_successful"); - writer.WriteBooleanValue(RemoveIfSuccessfulValue.Value); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs deleted file mode 100644 index e9fa9e640bd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs +++ /dev/null @@ -1,626 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class UrlDecodeProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// The field to decode. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(UrlDecodeProcessor urlDecodeProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.UrlDecode(urlDecodeProcessor); -} - -public sealed partial class UrlDecodeProcessorDescriptor : SerializableDescriptor> -{ - internal UrlDecodeProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public UrlDecodeProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UrlDecodeProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to decode. - /// - /// - public UrlDecodeProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to decode. - /// - /// - public UrlDecodeProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to decode. - /// - /// - public UrlDecodeProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UrlDecodeProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UrlDecodeProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public UrlDecodeProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UrlDecodeProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UrlDecodeProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UrlDecodeProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UrlDecodeProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UrlDecodeProcessorDescriptor : SerializableDescriptor -{ - internal UrlDecodeProcessorDescriptor(Action configure) => configure.Invoke(this); - - public UrlDecodeProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UrlDecodeProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The field to decode. - /// - /// - public UrlDecodeProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to decode. - /// - /// - public UrlDecodeProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field to decode. - /// - /// - public UrlDecodeProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UrlDecodeProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UrlDecodeProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist or is null, the processor quietly exits without modifying the document. - /// - /// - public UrlDecodeProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UrlDecodeProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UrlDecodeProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UrlDecodeProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UrlDecodeProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UrlDecodeProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field to assign the converted value to. - /// By default, the field is updated in-place. - /// - /// - public UrlDecodeProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs deleted file mode 100644 index d3686cd1ac9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/UserAgentProcessor.g.cs +++ /dev/null @@ -1,751 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class UserAgentProcessor -{ - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// Extracts device type from the user agent string on a best-effort basis. - /// - /// - [JsonInclude, JsonPropertyName("extract_device_type")] - public bool? ExtractDeviceType { get; set; } - - /// - /// - /// The field containing the user agent string. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Conditionally execute the processor. - /// - /// - [JsonInclude, JsonPropertyName("if")] - public string? If { get; set; } - - /// - /// - /// Ignore failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - [JsonInclude, JsonPropertyName("ignore_missing")] - public bool? IgnoreMissing { get; set; } - - /// - /// - /// Handle failures for the processor. - /// - /// - [JsonInclude, JsonPropertyName("on_failure")] - public ICollection? OnFailure { get; set; } - - /// - /// - /// Controls what properties are added to target_field. - /// - /// - [JsonInclude, JsonPropertyName("properties")] - public ICollection? Properties { get; set; } - - /// - /// - /// The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the regexes.yaml from uap-core it ships with. - /// - /// - [JsonInclude, JsonPropertyName("regex_file")] - public string? RegexFile { get; set; } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - [JsonInclude, JsonPropertyName("tag")] - public string? Tag { get; set; } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(UserAgentProcessor userAgentProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.UserAgent(userAgentProcessor); -} - -public sealed partial class UserAgentProcessorDescriptor : SerializableDescriptor> -{ - internal UserAgentProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public UserAgentProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private bool? ExtractDeviceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action> OnFailureDescriptorAction { get; set; } - private Action>[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? RegexFileValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UserAgentProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Extracts device type from the user agent string on a best-effort basis. - /// - /// - public UserAgentProcessorDescriptor ExtractDeviceType(bool? extractDeviceType = true) - { - ExtractDeviceTypeValue = extractDeviceType; - return Self; - } - - /// - /// - /// The field containing the user agent string. - /// - /// - public UserAgentProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field containing the user agent string. - /// - /// - public UserAgentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field containing the user agent string. - /// - /// - public UserAgentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UserAgentProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UserAgentProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public UserAgentProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Action> configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(params Action>[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what properties are added to target_field. - /// - /// - public UserAgentProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the regexes.yaml from uap-core it ships with. - /// - /// - public UserAgentProcessorDescriptor RegexFile(string? regexFile) - { - RegexFileValue = regexFile; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UserAgentProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - public UserAgentProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - public UserAgentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - public UserAgentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (ExtractDeviceTypeValue.HasValue) - { - writer.WritePropertyName("extract_device_type"); - writer.WriteBooleanValue(ExtractDeviceTypeValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(RegexFileValue)) - { - writer.WritePropertyName("regex_file"); - writer.WriteStringValue(RegexFileValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UserAgentProcessorDescriptor : SerializableDescriptor -{ - internal UserAgentProcessorDescriptor(Action configure) => configure.Invoke(this); - - public UserAgentProcessorDescriptor() : base() - { - } - - private string? DescriptionValue { get; set; } - private bool? ExtractDeviceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? IfValue { get; set; } - private bool? IgnoreFailureValue { get; set; } - private bool? IgnoreMissingValue { get; set; } - private ICollection? OnFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; } - private Action OnFailureDescriptorAction { get; set; } - private Action[] OnFailureDescriptorActions { get; set; } - private ICollection? PropertiesValue { get; set; } - private string? RegexFileValue { get; set; } - private string? TagValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - - /// - /// - /// Description of the processor. - /// Useful for describing the purpose of the processor or its configuration. - /// - /// - public UserAgentProcessorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// Extracts device type from the user agent string on a best-effort basis. - /// - /// - public UserAgentProcessorDescriptor ExtractDeviceType(bool? extractDeviceType = true) - { - ExtractDeviceTypeValue = extractDeviceType; - return Self; - } - - /// - /// - /// The field containing the user agent string. - /// - /// - public UserAgentProcessorDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field containing the user agent string. - /// - /// - public UserAgentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field containing the user agent string. - /// - /// - public UserAgentProcessorDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public UserAgentProcessorDescriptor If(string? value) - { - IfValue = value; - return Self; - } - - /// - /// - /// Ignore failures for the processor. - /// - /// - public UserAgentProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - /// - /// - /// If true and field does not exist, the processor quietly exits without modifying the document. - /// - /// - public UserAgentProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true) - { - IgnoreMissingValue = ignoreMissing; - return Self; - } - - /// - /// - /// Handle failures for the processor. - /// - /// - public UserAgentProcessorDescriptor OnFailure(ICollection? onFailure) - { - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureValue = onFailure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor) - { - OnFailureValue = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = null; - OnFailureDescriptor = descriptor; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(Action configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorActions = null; - OnFailureDescriptorAction = configure; - return Self; - } - - public UserAgentProcessorDescriptor OnFailure(params Action[] configure) - { - OnFailureValue = null; - OnFailureDescriptor = null; - OnFailureDescriptorAction = null; - OnFailureDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls what properties are added to target_field. - /// - /// - public UserAgentProcessorDescriptor Properties(ICollection? properties) - { - PropertiesValue = properties; - return Self; - } - - /// - /// - /// The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the regexes.yaml from uap-core it ships with. - /// - /// - public UserAgentProcessorDescriptor RegexFile(string? regexFile) - { - RegexFileValue = regexFile; - return Self; - } - - /// - /// - /// Identifier for the processor. - /// Useful for debugging and metrics. - /// - /// - public UserAgentProcessorDescriptor Tag(string? tag) - { - TagValue = tag; - return Self; - } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - public UserAgentProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - public UserAgentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// The field that will be filled with the user agent details. - /// - /// - public UserAgentProcessorDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (ExtractDeviceTypeValue.HasValue) - { - writer.WritePropertyName("extract_device_type"); - writer.WriteBooleanValue(ExtractDeviceTypeValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(IfValue)) - { - writer.WritePropertyName("if"); - writer.WriteStringValue(IfValue); - } - - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (IgnoreMissingValue.HasValue) - { - writer.WritePropertyName("ignore_missing"); - writer.WriteBooleanValue(IgnoreMissingValue.Value); - } - - if (OnFailureDescriptor is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, OnFailureDescriptor, options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorAction is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (OnFailureDescriptorActions is not null) - { - writer.WritePropertyName("on_failure"); - writer.WriteStartArray(); - foreach (var action in OnFailureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (OnFailureValue is not null) - { - writer.WritePropertyName("on_failure"); - JsonSerializer.Serialize(writer, OnFailureValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(RegexFileValue)) - { - writer.WritePropertyName("regex_file"); - writer.WriteStringValue(RegexFileValue); - } - - if (!string.IsNullOrEmpty(TagValue)) - { - writer.WritePropertyName("tag"); - writer.WriteStringValue(TagValue); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Web.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Web.g.cs deleted file mode 100644 index 6783a58f9d6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/Web.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; - -public sealed partial class Web -{ -} - -public sealed partial class WebDescriptor : SerializableDescriptor -{ - internal WebDescriptor(Action configure) => configure.Invoke(this); - - public WebDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/InlineGet.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/InlineGet.g.cs deleted file mode 100644 index 0ecc654b5b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/InlineGet.g.cs +++ /dev/null @@ -1,115 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -internal sealed partial class InlineGetConverter : JsonConverter> -{ - public override InlineGet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyDictionary? fields = default; - bool found = default; - long? primaryTerm = default; - string? routing = default; - long? seqNo = default; - TDocument? source = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "fields") - { - fields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "found") - { - found = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_primary_term") - { - primaryTerm = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_routing") - { - routing = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_seq_no") - { - seqNo = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_source") - { - source = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - return new InlineGet { Fields = fields, Found = found, Metadata = additionalProperties, PrimaryTerm = primaryTerm, Routing = routing, SeqNo = seqNo, Source = source }; - } - - public override void Write(Utf8JsonWriter writer, InlineGet value, JsonSerializerOptions options) - { - throw new NotImplementedException("'InlineGet' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[GenericConverter(typeof(InlineGetConverter<>), unwrap: true)] -public sealed partial class InlineGet -{ - public IReadOnlyDictionary? Fields { get; init; } - public bool Found { get; init; } - - /// - /// - /// Document metadata - /// - /// - public IReadOnlyDictionary Metadata { get; init; } - public long? PrimaryTerm { get; init; } - public string? Routing { get; init; } - public long? SeqNo { get; init; } - public TDocument? Source { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs deleted file mode 100644 index 5c7e205c5ae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs +++ /dev/null @@ -1,663 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class KnnQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The name of the vector field to search against - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Filters for the kNN search query - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// The final number of nearest neighbors to return as top hits - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// The number of nearest neighbor candidates to consider per shard - /// - /// - [JsonInclude, JsonPropertyName("num_candidates")] - public int? NumCandidates { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// The query vector - /// - /// - [JsonInclude, JsonPropertyName("query_vector")] - public ICollection? QueryVector { get; set; } - - /// - /// - /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - [JsonInclude, JsonPropertyName("query_vector_builder")] - public Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilder { get; set; } - - /// - /// - /// The minimum similarity for a vector to be considered a match - /// - /// - [JsonInclude, JsonPropertyName("similarity")] - public float? Similarity { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(KnnQuery knnQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Knn(knnQuery); -} - -public sealed partial class KnnQueryDescriptor : SerializableDescriptor> -{ - internal KnnQueryDescriptor(Action> configure) => configure.Invoke(this); - - public KnnQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private int? kValue { get; set; } - private int? NumCandidatesValue { get; set; } - private string? QueryNameValue { get; set; } - private ICollection? QueryVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } - private Action QueryVectorBuilderDescriptorAction { get; set; } - private float? SimilarityValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public KnnQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Filters for the kNN search query - /// - /// - public KnnQueryDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public KnnQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public KnnQueryDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// The final number of nearest neighbors to return as top hits - /// - /// - public KnnQueryDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// The number of nearest neighbor candidates to consider per shard - /// - /// - public KnnQueryDescriptor NumCandidates(int? numCandidates) - { - NumCandidatesValue = numCandidates; - return Self; - } - - public KnnQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// The query vector - /// - /// - public KnnQueryDescriptor QueryVector(ICollection? queryVector) - { - QueryVectorValue = queryVector; - return Self; - } - - /// - /// - /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - public KnnQueryDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) - { - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderValue = queryVectorBuilder; - return Self; - } - - public KnnQueryDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor QueryVectorBuilder(Action configure) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum similarity for a vector to be considered a match - /// - /// - public KnnQueryDescriptor Similarity(float? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (NumCandidatesValue.HasValue) - { - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (QueryVectorValue is not null) - { - writer.WritePropertyName("query_vector"); - JsonSerializer.Serialize(writer, QueryVectorValue, options); - } - - if (QueryVectorBuilderDescriptor is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); - } - else if (QueryVectorBuilderDescriptorAction is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); - } - else if (QueryVectorBuilderValue is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); - } - - if (SimilarityValue.HasValue) - { - writer.WritePropertyName("similarity"); - writer.WriteNumberValue(SimilarityValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class KnnQueryDescriptor : SerializableDescriptor -{ - internal KnnQueryDescriptor(Action configure) => configure.Invoke(this); - - public KnnQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private int? kValue { get; set; } - private int? NumCandidatesValue { get; set; } - private string? QueryNameValue { get; set; } - private ICollection? QueryVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } - private Action QueryVectorBuilderDescriptorAction { get; set; } - private float? SimilarityValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public KnnQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Filters for the kNN search query - /// - /// - public KnnQueryDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public KnnQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public KnnQueryDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// The final number of nearest neighbors to return as top hits - /// - /// - public KnnQueryDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// The number of nearest neighbor candidates to consider per shard - /// - /// - public KnnQueryDescriptor NumCandidates(int? numCandidates) - { - NumCandidatesValue = numCandidates; - return Self; - } - - public KnnQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// The query vector - /// - /// - public KnnQueryDescriptor QueryVector(ICollection? queryVector) - { - QueryVectorValue = queryVector; - return Self; - } - - /// - /// - /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - public KnnQueryDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) - { - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderValue = queryVectorBuilder; - return Self; - } - - public KnnQueryDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor QueryVectorBuilder(Action configure) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum similarity for a vector to be considered a match - /// - /// - public KnnQueryDescriptor Similarity(float? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (NumCandidatesValue.HasValue) - { - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (QueryVectorValue is not null) - { - writer.WritePropertyName("query_vector"); - JsonSerializer.Serialize(writer, QueryVectorValue, options); - } - - if (QueryVectorBuilderDescriptor is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); - } - else if (QueryVectorBuilderDescriptorAction is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); - } - else if (QueryVectorBuilderValue is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); - } - - if (SimilarityValue.HasValue) - { - writer.WritePropertyName("similarity"); - writer.WriteNumberValue(SimilarityValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnRetriever.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnRetriever.g.cs deleted file mode 100644 index 12e19169c80..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnRetriever.g.cs +++ /dev/null @@ -1,566 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class KnnRetriever -{ - /// - /// - /// The name of the vector field to search against. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public string Field { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// Number of nearest neighbors to return as top hits. - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int k { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public float? MinScore { get; set; } - - /// - /// - /// Number of nearest neighbor candidates to consider per shard. - /// - /// - [JsonInclude, JsonPropertyName("num_candidates")] - public int NumCandidates { get; set; } - - /// - /// - /// Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - [JsonInclude, JsonPropertyName("query_vector")] - public ICollection? QueryVector { get; set; } - - /// - /// - /// Defines a model to build a query vector. - /// - /// - [JsonInclude, JsonPropertyName("query_vector_builder")] - public Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilder { get; set; } - - /// - /// - /// The minimum similarity required for a document to be considered a match. - /// - /// - [JsonInclude, JsonPropertyName("similarity")] - public float? Similarity { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(KnnRetriever knnRetriever) => Elastic.Clients.Elasticsearch.Serverless.Retriever.Knn(knnRetriever); -} - -public sealed partial class KnnRetrieverDescriptor : SerializableDescriptor> -{ - internal KnnRetrieverDescriptor(Action> configure) => configure.Invoke(this); - - public KnnRetrieverDescriptor() : base() - { - } - - private string FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private int kValue { get; set; } - private float? MinScoreValue { get; set; } - private int NumCandidatesValue { get; set; } - private ICollection? QueryVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } - private Action QueryVectorBuilderDescriptorAction { get; set; } - private float? SimilarityValue { get; set; } - - /// - /// - /// The name of the vector field to search against. - /// - /// - public KnnRetrieverDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public KnnRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public KnnRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public KnnRetrieverDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public KnnRetrieverDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Number of nearest neighbors to return as top hits. - /// - /// - public KnnRetrieverDescriptor k(int k) - { - kValue = k; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public KnnRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Number of nearest neighbor candidates to consider per shard. - /// - /// - public KnnRetrieverDescriptor NumCandidates(int numCandidates) - { - NumCandidatesValue = numCandidates; - return Self; - } - - /// - /// - /// Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - public KnnRetrieverDescriptor QueryVector(ICollection? queryVector) - { - QueryVectorValue = queryVector; - return Self; - } - - /// - /// - /// Defines a model to build a query vector. - /// - /// - public KnnRetrieverDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) - { - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderValue = queryVectorBuilder; - return Self; - } - - public KnnRetrieverDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderDescriptor = descriptor; - return Self; - } - - public KnnRetrieverDescriptor QueryVectorBuilder(Action configure) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum similarity required for a document to be considered a match. - /// - /// - public KnnRetrieverDescriptor Similarity(float? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue); - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue); - if (QueryVectorValue is not null) - { - writer.WritePropertyName("query_vector"); - JsonSerializer.Serialize(writer, QueryVectorValue, options); - } - - if (QueryVectorBuilderDescriptor is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); - } - else if (QueryVectorBuilderDescriptorAction is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); - } - else if (QueryVectorBuilderValue is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); - } - - if (SimilarityValue.HasValue) - { - writer.WritePropertyName("similarity"); - writer.WriteNumberValue(SimilarityValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class KnnRetrieverDescriptor : SerializableDescriptor -{ - internal KnnRetrieverDescriptor(Action configure) => configure.Invoke(this); - - public KnnRetrieverDescriptor() : base() - { - } - - private string FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private int kValue { get; set; } - private float? MinScoreValue { get; set; } - private int NumCandidatesValue { get; set; } - private ICollection? QueryVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } - private Action QueryVectorBuilderDescriptorAction { get; set; } - private float? SimilarityValue { get; set; } - - /// - /// - /// The name of the vector field to search against. - /// - /// - public KnnRetrieverDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public KnnRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public KnnRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public KnnRetrieverDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public KnnRetrieverDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Number of nearest neighbors to return as top hits. - /// - /// - public KnnRetrieverDescriptor k(int k) - { - kValue = k; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public KnnRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Number of nearest neighbor candidates to consider per shard. - /// - /// - public KnnRetrieverDescriptor NumCandidates(int numCandidates) - { - NumCandidatesValue = numCandidates; - return Self; - } - - /// - /// - /// Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - public KnnRetrieverDescriptor QueryVector(ICollection? queryVector) - { - QueryVectorValue = queryVector; - return Self; - } - - /// - /// - /// Defines a model to build a query vector. - /// - /// - public KnnRetrieverDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) - { - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderValue = queryVectorBuilder; - return Self; - } - - public KnnRetrieverDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderDescriptor = descriptor; - return Self; - } - - public KnnRetrieverDescriptor QueryVectorBuilder(Action configure) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum similarity required for a document to be considered a match. - /// - /// - public KnnRetrieverDescriptor Similarity(float? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue); - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue); - if (QueryVectorValue is not null) - { - writer.WritePropertyName("query_vector"); - JsonSerializer.Serialize(writer, QueryVectorValue, options); - } - - if (QueryVectorBuilderDescriptor is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); - } - else if (QueryVectorBuilderDescriptorAction is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); - } - else if (QueryVectorBuilderValue is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); - } - - if (SimilarityValue.HasValue) - { - writer.WritePropertyName("similarity"); - writer.WriteNumberValue(SimilarityValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs deleted file mode 100644 index a1deddb0eb4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs +++ /dev/null @@ -1,728 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class KnnSearch -{ - /// - /// - /// Boost value to apply to kNN scores - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The name of the vector field to search against - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Filters for the kNN search query - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - [JsonInclude, JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHits { get; set; } - - /// - /// - /// The final number of nearest neighbors to return as top hits - /// - /// - [JsonInclude, JsonPropertyName("k")] - public int? k { get; set; } - - /// - /// - /// The number of nearest neighbor candidates to consider per shard - /// - /// - [JsonInclude, JsonPropertyName("num_candidates")] - public int? NumCandidates { get; set; } - - /// - /// - /// The query vector - /// - /// - [JsonInclude, JsonPropertyName("query_vector")] - public ICollection? QueryVector { get; set; } - - /// - /// - /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - [JsonInclude, JsonPropertyName("query_vector_builder")] - public Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilder { get; set; } - - /// - /// - /// The minimum similarity for a vector to be considered a match - /// - /// - [JsonInclude, JsonPropertyName("similarity")] - public float? Similarity { get; set; } -} - -public sealed partial class KnnSearchDescriptor : SerializableDescriptor> -{ - internal KnnSearchDescriptor(Action> configure) => configure.Invoke(this); - - public KnnSearchDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private int? kValue { get; set; } - private int? NumCandidatesValue { get; set; } - private ICollection? QueryVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } - private Action QueryVectorBuilderDescriptorAction { get; set; } - private float? SimilarityValue { get; set; } - - /// - /// - /// Boost value to apply to kNN scores - /// - /// - public KnnSearchDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnSearchDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnSearchDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnSearchDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Filters for the kNN search query - /// - /// - public KnnSearchDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public KnnSearchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public KnnSearchDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public KnnSearchDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public KnnSearchDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The final number of nearest neighbors to return as top hits - /// - /// - public KnnSearchDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// The number of nearest neighbor candidates to consider per shard - /// - /// - public KnnSearchDescriptor NumCandidates(int? numCandidates) - { - NumCandidatesValue = numCandidates; - return Self; - } - - /// - /// - /// The query vector - /// - /// - public KnnSearchDescriptor QueryVector(ICollection? queryVector) - { - QueryVectorValue = queryVector; - return Self; - } - - /// - /// - /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) - { - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderValue = queryVectorBuilder; - return Self; - } - - public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderDescriptor = descriptor; - return Self; - } - - public KnnSearchDescriptor QueryVectorBuilder(Action configure) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum similarity for a vector to be considered a match - /// - /// - public KnnSearchDescriptor Similarity(float? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (NumCandidatesValue.HasValue) - { - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue.Value); - } - - if (QueryVectorValue is not null) - { - writer.WritePropertyName("query_vector"); - JsonSerializer.Serialize(writer, QueryVectorValue, options); - } - - if (QueryVectorBuilderDescriptor is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); - } - else if (QueryVectorBuilderDescriptorAction is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); - } - else if (QueryVectorBuilderValue is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); - } - - if (SimilarityValue.HasValue) - { - writer.WritePropertyName("similarity"); - writer.WriteNumberValue(SimilarityValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class KnnSearchDescriptor : SerializableDescriptor -{ - internal KnnSearchDescriptor(Action configure) => configure.Invoke(this); - - public KnnSearchDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private int? kValue { get; set; } - private int? NumCandidatesValue { get; set; } - private ICollection? QueryVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } - private Action QueryVectorBuilderDescriptorAction { get; set; } - private float? SimilarityValue { get; set; } - - /// - /// - /// Boost value to apply to kNN scores - /// - /// - public KnnSearchDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnSearchDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnSearchDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the vector field to search against - /// - /// - public KnnSearchDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Filters for the kNN search query - /// - /// - public KnnSearchDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public KnnSearchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public KnnSearchDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public KnnSearchDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public KnnSearchDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The final number of nearest neighbors to return as top hits - /// - /// - public KnnSearchDescriptor k(int? k) - { - kValue = k; - return Self; - } - - /// - /// - /// The number of nearest neighbor candidates to consider per shard - /// - /// - public KnnSearchDescriptor NumCandidates(int? numCandidates) - { - NumCandidatesValue = numCandidates; - return Self; - } - - /// - /// - /// The query vector - /// - /// - public KnnSearchDescriptor QueryVector(ICollection? queryVector) - { - QueryVectorValue = queryVector; - return Self; - } - - /// - /// - /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. - /// - /// - public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) - { - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderValue = queryVectorBuilder; - return Self; - } - - public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptorAction = null; - QueryVectorBuilderDescriptor = descriptor; - return Self; - } - - public KnnSearchDescriptor QueryVectorBuilder(Action configure) - { - QueryVectorBuilderValue = null; - QueryVectorBuilderDescriptor = null; - QueryVectorBuilderDescriptorAction = configure; - return Self; - } - - /// - /// - /// The minimum similarity for a vector to be considered a match - /// - /// - public KnnSearchDescriptor Similarity(float? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - if (kValue.HasValue) - { - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue.Value); - } - - if (NumCandidatesValue.HasValue) - { - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue.Value); - } - - if (QueryVectorValue is not null) - { - writer.WritePropertyName("query_vector"); - JsonSerializer.Serialize(writer, QueryVectorValue, options); - } - - if (QueryVectorBuilderDescriptor is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); - } - else if (QueryVectorBuilderDescriptorAction is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); - } - else if (QueryVectorBuilderValue is not null) - { - writer.WritePropertyName("query_vector_builder"); - JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); - } - - if (SimilarityValue.HasValue) - { - writer.WritePropertyName("similarity"); - writer.WriteNumberValue(SimilarityValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LatLonGeoLocation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LatLonGeoLocation.g.cs deleted file mode 100644 index 66d09482af8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LatLonGeoLocation.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class LatLonGeoLocation -{ - /// - /// - /// Latitude - /// - /// - [JsonInclude, JsonPropertyName("lat")] - public double Lat { get; set; } - - /// - /// - /// Longitude - /// - /// - [JsonInclude, JsonPropertyName("lon")] - public double Lon { get; set; } -} - -public sealed partial class LatLonGeoLocationDescriptor : SerializableDescriptor -{ - internal LatLonGeoLocationDescriptor(Action configure) => configure.Invoke(this); - - public LatLonGeoLocationDescriptor() : base() - { - } - - private double LatValue { get; set; } - private double LonValue { get; set; } - - /// - /// - /// Latitude - /// - /// - public LatLonGeoLocationDescriptor Lat(double lat) - { - LatValue = lat; - return Self; - } - - /// - /// - /// Longitude - /// - /// - 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.Serverless/_Generated/Types/LicenseManagement/LicenseInformation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LicenseManagement/LicenseInformation.g.cs deleted file mode 100644 index 5dbfc2c1e0e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/LicenseManagement/LicenseInformation.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.LicenseManagement; - -public sealed partial class LicenseInformation -{ - [JsonInclude, JsonPropertyName("expiry_date")] - public DateTimeOffset? ExpiryDate { get; init; } - [JsonInclude, JsonPropertyName("expiry_date_in_millis")] - public long? ExpiryDateInMillis { get; init; } - [JsonInclude, JsonPropertyName("issue_date")] - public DateTimeOffset IssueDate { get; init; } - [JsonInclude, JsonPropertyName("issue_date_in_millis")] - public long IssueDateInMillis { get; init; } - [JsonInclude, JsonPropertyName("issued_to")] - public string IssuedTo { get; init; } - [JsonInclude, JsonPropertyName("issuer")] - public string Issuer { get; init; } - [JsonInclude, JsonPropertyName("max_nodes")] - public long? MaxNodes { get; init; } - [JsonInclude, JsonPropertyName("max_resource_units")] - public int? MaxResourceUnits { get; init; } - [JsonInclude, JsonPropertyName("start_date_in_millis")] - public long StartDateInMillis { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.LicenseManagement.LicenseStatus Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.LicenseManagement.LicenseType Type { get; init; } - [JsonInclude, JsonPropertyName("uid")] - public string Uid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs deleted file mode 100644 index 8ad7a3359a5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AdaptiveAllocationsSettings -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("max_number_of_allocations")] - public int? MaxNumberOfAllocations { get; init; } - [JsonInclude, JsonPropertyName("min_number_of_allocations")] - public int? MinNumberOfAllocations { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AggregateOutput.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AggregateOutput.g.cs deleted file mode 100644 index 468993cb908..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AggregateOutput.g.cs +++ /dev/null @@ -1,228 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AggregateOutput -{ - [JsonInclude, JsonPropertyName("exponent")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? Exponent { get; set; } - [JsonInclude, JsonPropertyName("logistic_regression")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? LogisticRegression { get; set; } - [JsonInclude, JsonPropertyName("weighted_mode")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? WeightedMode { get; set; } - [JsonInclude, JsonPropertyName("weighted_sum")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? WeightedSum { get; set; } -} - -public sealed partial class AggregateOutputDescriptor : SerializableDescriptor -{ - internal AggregateOutputDescriptor(Action configure) => configure.Invoke(this); - - public AggregateOutputDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? ExponentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor ExponentDescriptor { get; set; } - private Action ExponentDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? LogisticRegressionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor LogisticRegressionDescriptor { get; set; } - private Action LogisticRegressionDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? WeightedModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor WeightedModeDescriptor { get; set; } - private Action WeightedModeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? WeightedSumValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor WeightedSumDescriptor { get; set; } - private Action WeightedSumDescriptorAction { get; set; } - - public AggregateOutputDescriptor Exponent(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? exponent) - { - ExponentDescriptor = null; - ExponentDescriptorAction = null; - ExponentValue = exponent; - return Self; - } - - public AggregateOutputDescriptor Exponent(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor descriptor) - { - ExponentValue = null; - ExponentDescriptorAction = null; - ExponentDescriptor = descriptor; - return Self; - } - - public AggregateOutputDescriptor Exponent(Action configure) - { - ExponentValue = null; - ExponentDescriptor = null; - ExponentDescriptorAction = configure; - return Self; - } - - public AggregateOutputDescriptor LogisticRegression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? logisticRegression) - { - LogisticRegressionDescriptor = null; - LogisticRegressionDescriptorAction = null; - LogisticRegressionValue = logisticRegression; - return Self; - } - - public AggregateOutputDescriptor LogisticRegression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor descriptor) - { - LogisticRegressionValue = null; - LogisticRegressionDescriptorAction = null; - LogisticRegressionDescriptor = descriptor; - return Self; - } - - public AggregateOutputDescriptor LogisticRegression(Action configure) - { - LogisticRegressionValue = null; - LogisticRegressionDescriptor = null; - LogisticRegressionDescriptorAction = configure; - return Self; - } - - public AggregateOutputDescriptor WeightedMode(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? weightedMode) - { - WeightedModeDescriptor = null; - WeightedModeDescriptorAction = null; - WeightedModeValue = weightedMode; - return Self; - } - - public AggregateOutputDescriptor WeightedMode(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor descriptor) - { - WeightedModeValue = null; - WeightedModeDescriptorAction = null; - WeightedModeDescriptor = descriptor; - return Self; - } - - public AggregateOutputDescriptor WeightedMode(Action configure) - { - WeightedModeValue = null; - WeightedModeDescriptor = null; - WeightedModeDescriptorAction = configure; - return Self; - } - - public AggregateOutputDescriptor WeightedSum(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Weights? weightedSum) - { - WeightedSumDescriptor = null; - WeightedSumDescriptorAction = null; - WeightedSumValue = weightedSum; - return Self; - } - - public AggregateOutputDescriptor WeightedSum(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor descriptor) - { - WeightedSumValue = null; - WeightedSumDescriptorAction = null; - WeightedSumDescriptor = descriptor; - return Self; - } - - public AggregateOutputDescriptor WeightedSum(Action configure) - { - WeightedSumValue = null; - WeightedSumDescriptor = null; - WeightedSumDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExponentDescriptor is not null) - { - writer.WritePropertyName("exponent"); - JsonSerializer.Serialize(writer, ExponentDescriptor, options); - } - else if (ExponentDescriptorAction is not null) - { - writer.WritePropertyName("exponent"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor(ExponentDescriptorAction), options); - } - else if (ExponentValue is not null) - { - writer.WritePropertyName("exponent"); - JsonSerializer.Serialize(writer, ExponentValue, options); - } - - if (LogisticRegressionDescriptor is not null) - { - writer.WritePropertyName("logistic_regression"); - JsonSerializer.Serialize(writer, LogisticRegressionDescriptor, options); - } - else if (LogisticRegressionDescriptorAction is not null) - { - writer.WritePropertyName("logistic_regression"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor(LogisticRegressionDescriptorAction), options); - } - else if (LogisticRegressionValue is not null) - { - writer.WritePropertyName("logistic_regression"); - JsonSerializer.Serialize(writer, LogisticRegressionValue, options); - } - - if (WeightedModeDescriptor is not null) - { - writer.WritePropertyName("weighted_mode"); - JsonSerializer.Serialize(writer, WeightedModeDescriptor, options); - } - else if (WeightedModeDescriptorAction is not null) - { - writer.WritePropertyName("weighted_mode"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor(WeightedModeDescriptorAction), options); - } - else if (WeightedModeValue is not null) - { - writer.WritePropertyName("weighted_mode"); - JsonSerializer.Serialize(writer, WeightedModeValue, options); - } - - if (WeightedSumDescriptor is not null) - { - writer.WritePropertyName("weighted_sum"); - JsonSerializer.Serialize(writer, WeightedSumDescriptor, options); - } - else if (WeightedSumDescriptorAction is not null) - { - writer.WritePropertyName("weighted_sum"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.WeightsDescriptor(WeightedSumDescriptorAction), options); - } - else if (WeightedSumValue is not null) - { - writer.WritePropertyName("weighted_sum"); - JsonSerializer.Serialize(writer, WeightedSumValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfig.g.cs deleted file mode 100644 index 9335a95cc9c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfig.g.cs +++ /dev/null @@ -1,815 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnalysisConfig -{ - /// - /// - /// The size of the interval that the analysis is aggregated into, typically between 5m and 1h. This value should be either a whole number of days or equate to a - /// whole number of buckets in one day. If the anomaly detection job uses a datafeed with aggregations, this value must also be divisible by the interval of the date histogram aggregation. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BucketSpan { get; set; } - - /// - /// - /// If categorization_field_name is specified, you can also define the analyzer that is used to interpret the categorization field. This property cannot be used at the same time as categorization_filters. The categorization analyzer specifies how the categorization_field is interpreted by the categorization process. The categorization_analyzer field can be specified either as a string or as an object. If it is a string, it must refer to a built-in analyzer or one added by another plugin. - /// - /// - [JsonInclude, JsonPropertyName("categorization_analyzer")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer? CategorizationAnalyzer { get; set; } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - [JsonInclude, JsonPropertyName("categorization_field_name")] - public Elastic.Clients.Elasticsearch.Serverless.Field? CategorizationFieldName { get; set; } - - /// - /// - /// If categorization_field_name is specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time as categorization_analyzer. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use the categorization_analyzer property instead and include the filters as pattern_replace character filters. The effect is exactly the same. - /// - /// - [JsonInclude, JsonPropertyName("categorization_filters")] - public ICollection? CategorizationFilters { get; set; } - - /// - /// - /// Detector configuration objects specify which data fields a job analyzes. They also specify which analytical functions are used. You can specify multiple detectors for a job. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned. - /// - /// - [JsonInclude, JsonPropertyName("detectors")] - public ICollection Detectors { get; set; } - - /// - /// - /// A comma separated list of influencer field names. Typically these can be the by, over, or partition fields that are used in the detector configuration. You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity. - /// - /// - [JsonInclude, JsonPropertyName("influencers")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Influencers { get; set; } - - /// - /// - /// The size of the window in which to expect data that is out of time order. If you specify a non-zero value, it must be greater than or equal to one second. NOTE: Latency is applicable only when you send data by using the post data API. - /// - /// - [JsonInclude, JsonPropertyName("latency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Latency { get; set; } - - /// - /// - /// Advanced configuration option. Affects the pruning of models that have not been updated for the given time duration. The value must be set to a multiple of the bucket_span. If set too low, important information may be removed from the model. For jobs created in 8.1 and later, the default value is the greater of 30d or 20 times bucket_span. - /// - /// - [JsonInclude, JsonPropertyName("model_prune_window")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindow { get; set; } - - /// - /// - /// This functionality is reserved for internal use. It is not supported for use in customer environments and is not subject to the support SLA of official GA features. If set to true, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. For example, suppose CPU and memory usage on host A is usually highly correlated with the same metrics on host B. Perhaps this correlation occurs because they are running a load-balanced application. If you enable this property, anomalies will be reported when, for example, CPU usage on host A is high and the value of CPU usage on host B is low. That is to say, you’ll see an anomaly when the CPU of host A is unusual given the CPU of host B. To use the multivariate_by_fields property, you must also specify by_field_name in your detector. - /// - /// - [JsonInclude, JsonPropertyName("multivariate_by_fields")] - public bool? MultivariateByFields { get; set; } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - [JsonInclude, JsonPropertyName("per_partition_categorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorization { get; set; } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - [JsonInclude, JsonPropertyName("summary_count_field_name")] - public Elastic.Clients.Elasticsearch.Serverless.Field? SummaryCountFieldName { get; set; } -} - -public sealed partial class AnalysisConfigDescriptor : SerializableDescriptor> -{ - internal AnalysisConfigDescriptor(Action> configure) => configure.Invoke(this); - - public AnalysisConfigDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? BucketSpanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer? CategorizationAnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? CategorizationFieldNameValue { get; set; } - private ICollection? CategorizationFiltersValue { get; set; } - private ICollection DetectorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor DetectorsDescriptor { get; set; } - private Action> DetectorsDescriptorAction { get; set; } - private Action>[] DetectorsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? InfluencersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? LatencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindowValue { get; set; } - private bool? MultivariateByFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor PerPartitionCategorizationDescriptor { get; set; } - private Action PerPartitionCategorizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SummaryCountFieldNameValue { get; set; } - - /// - /// - /// The size of the interval that the analysis is aggregated into, typically between 5m and 1h. This value should be either a whole number of days or equate to a - /// whole number of buckets in one day. If the anomaly detection job uses a datafeed with aggregations, this value must also be divisible by the interval of the date histogram aggregation. - /// - /// - public AnalysisConfigDescriptor BucketSpan(Elastic.Clients.Elasticsearch.Serverless.Duration? bucketSpan) - { - BucketSpanValue = bucketSpan; - return Self; - } - - /// - /// - /// If categorization_field_name is specified, you can also define the analyzer that is used to interpret the categorization field. This property cannot be used at the same time as categorization_filters. The categorization analyzer specifies how the categorization_field is interpreted by the categorization process. The categorization_analyzer field can be specified either as a string or as an object. If it is a string, it must refer to a built-in analyzer or one added by another plugin. - /// - /// - public AnalysisConfigDescriptor CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer? categorizationAnalyzer) - { - CategorizationAnalyzerValue = categorizationAnalyzer; - return Self; - } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - public AnalysisConfigDescriptor CategorizationFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? categorizationFieldName) - { - CategorizationFieldNameValue = categorizationFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - public AnalysisConfigDescriptor CategorizationFieldName(Expression> categorizationFieldName) - { - CategorizationFieldNameValue = categorizationFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - public AnalysisConfigDescriptor CategorizationFieldName(Expression> categorizationFieldName) - { - CategorizationFieldNameValue = categorizationFieldName; - return Self; - } - - /// - /// - /// If categorization_field_name is specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time as categorization_analyzer. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use the categorization_analyzer property instead and include the filters as pattern_replace character filters. The effect is exactly the same. - /// - /// - public AnalysisConfigDescriptor CategorizationFilters(ICollection? categorizationFilters) - { - CategorizationFiltersValue = categorizationFilters; - return Self; - } - - /// - /// - /// Detector configuration objects specify which data fields a job analyzes. They also specify which analytical functions are used. You can specify multiple detectors for a job. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned. - /// - /// - public AnalysisConfigDescriptor Detectors(ICollection detectors) - { - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsValue = detectors; - return Self; - } - - public AnalysisConfigDescriptor Detectors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor descriptor) - { - DetectorsValue = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsDescriptor = descriptor; - return Self; - } - - public AnalysisConfigDescriptor Detectors(Action> configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorActions = null; - DetectorsDescriptorAction = configure; - return Self; - } - - public AnalysisConfigDescriptor Detectors(params Action>[] configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A comma separated list of influencer field names. Typically these can be the by, over, or partition fields that are used in the detector configuration. You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity. - /// - /// - public AnalysisConfigDescriptor Influencers(Elastic.Clients.Elasticsearch.Serverless.Fields? influencers) - { - InfluencersValue = influencers; - return Self; - } - - /// - /// - /// The size of the window in which to expect data that is out of time order. If you specify a non-zero value, it must be greater than or equal to one second. NOTE: Latency is applicable only when you send data by using the post data API. - /// - /// - public AnalysisConfigDescriptor Latency(Elastic.Clients.Elasticsearch.Serverless.Duration? latency) - { - LatencyValue = latency; - return Self; - } - - /// - /// - /// Advanced configuration option. Affects the pruning of models that have not been updated for the given time duration. The value must be set to a multiple of the bucket_span. If set too low, important information may be removed from the model. For jobs created in 8.1 and later, the default value is the greater of 30d or 20 times bucket_span. - /// - /// - public AnalysisConfigDescriptor ModelPruneWindow(Elastic.Clients.Elasticsearch.Serverless.Duration? modelPruneWindow) - { - ModelPruneWindowValue = modelPruneWindow; - return Self; - } - - /// - /// - /// This functionality is reserved for internal use. It is not supported for use in customer environments and is not subject to the support SLA of official GA features. If set to true, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. For example, suppose CPU and memory usage on host A is usually highly correlated with the same metrics on host B. Perhaps this correlation occurs because they are running a load-balanced application. If you enable this property, anomalies will be reported when, for example, CPU usage on host A is high and the value of CPU usage on host B is low. That is to say, you’ll see an anomaly when the CPU of host A is unusual given the CPU of host B. To use the multivariate_by_fields property, you must also specify by_field_name in your detector. - /// - /// - public AnalysisConfigDescriptor MultivariateByFields(bool? multivariateByFields = true) - { - MultivariateByFieldsValue = multivariateByFields; - return Self; - } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - public AnalysisConfigDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? perPartitionCategorization) - { - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationValue = perPartitionCategorization; - return Self; - } - - public AnalysisConfigDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor descriptor) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationDescriptor = descriptor; - return Self; - } - - public AnalysisConfigDescriptor PerPartitionCategorization(Action configure) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = configure; - return Self; - } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - public AnalysisConfigDescriptor SummaryCountFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? summaryCountFieldName) - { - SummaryCountFieldNameValue = summaryCountFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - public AnalysisConfigDescriptor SummaryCountFieldName(Expression> summaryCountFieldName) - { - SummaryCountFieldNameValue = summaryCountFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - public AnalysisConfigDescriptor SummaryCountFieldName(Expression> summaryCountFieldName) - { - SummaryCountFieldNameValue = summaryCountFieldName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketSpanValue is not null) - { - writer.WritePropertyName("bucket_span"); - JsonSerializer.Serialize(writer, BucketSpanValue, options); - } - - if (CategorizationAnalyzerValue is not null) - { - writer.WritePropertyName("categorization_analyzer"); - JsonSerializer.Serialize(writer, CategorizationAnalyzerValue, options); - } - - if (CategorizationFieldNameValue is not null) - { - writer.WritePropertyName("categorization_field_name"); - JsonSerializer.Serialize(writer, CategorizationFieldNameValue, options); - } - - if (CategorizationFiltersValue is not null) - { - writer.WritePropertyName("categorization_filters"); - JsonSerializer.Serialize(writer, CategorizationFiltersValue, options); - } - - if (DetectorsDescriptor is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DetectorsDescriptor, options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorAction is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor(DetectorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorActions is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - foreach (var action in DetectorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("detectors"); - JsonSerializer.Serialize(writer, DetectorsValue, options); - } - - if (InfluencersValue is not null) - { - writer.WritePropertyName("influencers"); - JsonSerializer.Serialize(writer, InfluencersValue, options); - } - - if (LatencyValue is not null) - { - writer.WritePropertyName("latency"); - JsonSerializer.Serialize(writer, LatencyValue, options); - } - - if (ModelPruneWindowValue is not null) - { - writer.WritePropertyName("model_prune_window"); - JsonSerializer.Serialize(writer, ModelPruneWindowValue, options); - } - - if (MultivariateByFieldsValue.HasValue) - { - writer.WritePropertyName("multivariate_by_fields"); - writer.WriteBooleanValue(MultivariateByFieldsValue.Value); - } - - if (PerPartitionCategorizationDescriptor is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationDescriptor, options); - } - else if (PerPartitionCategorizationDescriptorAction is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor(PerPartitionCategorizationDescriptorAction), options); - } - else if (PerPartitionCategorizationValue is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationValue, options); - } - - if (SummaryCountFieldNameValue is not null) - { - writer.WritePropertyName("summary_count_field_name"); - JsonSerializer.Serialize(writer, SummaryCountFieldNameValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class AnalysisConfigDescriptor : SerializableDescriptor -{ - internal AnalysisConfigDescriptor(Action configure) => configure.Invoke(this); - - public AnalysisConfigDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? BucketSpanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer? CategorizationAnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? CategorizationFieldNameValue { get; set; } - private ICollection? CategorizationFiltersValue { get; set; } - private ICollection DetectorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor DetectorsDescriptor { get; set; } - private Action DetectorsDescriptorAction { get; set; } - private Action[] DetectorsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? InfluencersValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? LatencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindowValue { get; set; } - private bool? MultivariateByFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor PerPartitionCategorizationDescriptor { get; set; } - private Action PerPartitionCategorizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? SummaryCountFieldNameValue { get; set; } - - /// - /// - /// The size of the interval that the analysis is aggregated into, typically between 5m and 1h. This value should be either a whole number of days or equate to a - /// whole number of buckets in one day. If the anomaly detection job uses a datafeed with aggregations, this value must also be divisible by the interval of the date histogram aggregation. - /// - /// - public AnalysisConfigDescriptor BucketSpan(Elastic.Clients.Elasticsearch.Serverless.Duration? bucketSpan) - { - BucketSpanValue = bucketSpan; - return Self; - } - - /// - /// - /// If categorization_field_name is specified, you can also define the analyzer that is used to interpret the categorization field. This property cannot be used at the same time as categorization_filters. The categorization analyzer specifies how the categorization_field is interpreted by the categorization process. The categorization_analyzer field can be specified either as a string or as an object. If it is a string, it must refer to a built-in analyzer or one added by another plugin. - /// - /// - public AnalysisConfigDescriptor CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer? categorizationAnalyzer) - { - CategorizationAnalyzerValue = categorizationAnalyzer; - return Self; - } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - public AnalysisConfigDescriptor CategorizationFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? categorizationFieldName) - { - CategorizationFieldNameValue = categorizationFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - public AnalysisConfigDescriptor CategorizationFieldName(Expression> categorizationFieldName) - { - CategorizationFieldNameValue = categorizationFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - public AnalysisConfigDescriptor CategorizationFieldName(Expression> categorizationFieldName) - { - CategorizationFieldNameValue = categorizationFieldName; - return Self; - } - - /// - /// - /// If categorization_field_name is specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time as categorization_analyzer. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use the categorization_analyzer property instead and include the filters as pattern_replace character filters. The effect is exactly the same. - /// - /// - public AnalysisConfigDescriptor CategorizationFilters(ICollection? categorizationFilters) - { - CategorizationFiltersValue = categorizationFilters; - return Self; - } - - /// - /// - /// Detector configuration objects specify which data fields a job analyzes. They also specify which analytical functions are used. You can specify multiple detectors for a job. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned. - /// - /// - public AnalysisConfigDescriptor Detectors(ICollection detectors) - { - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsValue = detectors; - return Self; - } - - public AnalysisConfigDescriptor Detectors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor descriptor) - { - DetectorsValue = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = null; - DetectorsDescriptor = descriptor; - return Self; - } - - public AnalysisConfigDescriptor Detectors(Action configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorActions = null; - DetectorsDescriptorAction = configure; - return Self; - } - - public AnalysisConfigDescriptor Detectors(params Action[] configure) - { - DetectorsValue = null; - DetectorsDescriptor = null; - DetectorsDescriptorAction = null; - DetectorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A comma separated list of influencer field names. Typically these can be the by, over, or partition fields that are used in the detector configuration. You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity. - /// - /// - public AnalysisConfigDescriptor Influencers(Elastic.Clients.Elasticsearch.Serverless.Fields? influencers) - { - InfluencersValue = influencers; - return Self; - } - - /// - /// - /// The size of the window in which to expect data that is out of time order. If you specify a non-zero value, it must be greater than or equal to one second. NOTE: Latency is applicable only when you send data by using the post data API. - /// - /// - public AnalysisConfigDescriptor Latency(Elastic.Clients.Elasticsearch.Serverless.Duration? latency) - { - LatencyValue = latency; - return Self; - } - - /// - /// - /// Advanced configuration option. Affects the pruning of models that have not been updated for the given time duration. The value must be set to a multiple of the bucket_span. If set too low, important information may be removed from the model. For jobs created in 8.1 and later, the default value is the greater of 30d or 20 times bucket_span. - /// - /// - public AnalysisConfigDescriptor ModelPruneWindow(Elastic.Clients.Elasticsearch.Serverless.Duration? modelPruneWindow) - { - ModelPruneWindowValue = modelPruneWindow; - return Self; - } - - /// - /// - /// This functionality is reserved for internal use. It is not supported for use in customer environments and is not subject to the support SLA of official GA features. If set to true, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. For example, suppose CPU and memory usage on host A is usually highly correlated with the same metrics on host B. Perhaps this correlation occurs because they are running a load-balanced application. If you enable this property, anomalies will be reported when, for example, CPU usage on host A is high and the value of CPU usage on host B is low. That is to say, you’ll see an anomaly when the CPU of host A is unusual given the CPU of host B. To use the multivariate_by_fields property, you must also specify by_field_name in your detector. - /// - /// - public AnalysisConfigDescriptor MultivariateByFields(bool? multivariateByFields = true) - { - MultivariateByFieldsValue = multivariateByFields; - return Self; - } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - public AnalysisConfigDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? perPartitionCategorization) - { - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationValue = perPartitionCategorization; - return Self; - } - - public AnalysisConfigDescriptor PerPartitionCategorization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor descriptor) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptorAction = null; - PerPartitionCategorizationDescriptor = descriptor; - return Self; - } - - public AnalysisConfigDescriptor PerPartitionCategorization(Action configure) - { - PerPartitionCategorizationValue = null; - PerPartitionCategorizationDescriptor = null; - PerPartitionCategorizationDescriptorAction = configure; - return Self; - } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - public AnalysisConfigDescriptor SummaryCountFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? summaryCountFieldName) - { - SummaryCountFieldNameValue = summaryCountFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - public AnalysisConfigDescriptor SummaryCountFieldName(Expression> summaryCountFieldName) - { - SummaryCountFieldNameValue = summaryCountFieldName; - return Self; - } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job. NOTE: The summary_count_field_name property cannot be used with the metric function. - /// - /// - public AnalysisConfigDescriptor SummaryCountFieldName(Expression> summaryCountFieldName) - { - SummaryCountFieldNameValue = summaryCountFieldName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BucketSpanValue is not null) - { - writer.WritePropertyName("bucket_span"); - JsonSerializer.Serialize(writer, BucketSpanValue, options); - } - - if (CategorizationAnalyzerValue is not null) - { - writer.WritePropertyName("categorization_analyzer"); - JsonSerializer.Serialize(writer, CategorizationAnalyzerValue, options); - } - - if (CategorizationFieldNameValue is not null) - { - writer.WritePropertyName("categorization_field_name"); - JsonSerializer.Serialize(writer, CategorizationFieldNameValue, options); - } - - if (CategorizationFiltersValue is not null) - { - writer.WritePropertyName("categorization_filters"); - JsonSerializer.Serialize(writer, CategorizationFiltersValue, options); - } - - if (DetectorsDescriptor is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DetectorsDescriptor, options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorAction is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor(DetectorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DetectorsDescriptorActions is not null) - { - writer.WritePropertyName("detectors"); - writer.WriteStartArray(); - foreach (var action in DetectorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("detectors"); - JsonSerializer.Serialize(writer, DetectorsValue, options); - } - - if (InfluencersValue is not null) - { - writer.WritePropertyName("influencers"); - JsonSerializer.Serialize(writer, InfluencersValue, options); - } - - if (LatencyValue is not null) - { - writer.WritePropertyName("latency"); - JsonSerializer.Serialize(writer, LatencyValue, options); - } - - if (ModelPruneWindowValue is not null) - { - writer.WritePropertyName("model_prune_window"); - JsonSerializer.Serialize(writer, ModelPruneWindowValue, options); - } - - if (MultivariateByFieldsValue.HasValue) - { - writer.WritePropertyName("multivariate_by_fields"); - writer.WriteBooleanValue(MultivariateByFieldsValue.Value); - } - - if (PerPartitionCategorizationDescriptor is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationDescriptor, options); - } - else if (PerPartitionCategorizationDescriptorAction is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorizationDescriptor(PerPartitionCategorizationDescriptorAction), options); - } - else if (PerPartitionCategorizationValue is not null) - { - writer.WritePropertyName("per_partition_categorization"); - JsonSerializer.Serialize(writer, PerPartitionCategorizationValue, options); - } - - if (SummaryCountFieldNameValue is not null) - { - writer.WritePropertyName("summary_count_field_name"); - JsonSerializer.Serialize(writer, SummaryCountFieldNameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs deleted file mode 100644 index daa30381300..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs +++ /dev/null @@ -1,142 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnalysisConfigRead -{ - /// - /// - /// The size of the interval that the analysis is aggregated into, typically between 5m and 1h. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public Elastic.Clients.Elasticsearch.Serverless.Duration BucketSpan { get; init; } - - /// - /// - /// If categorization_field_name is specified, you can also define the analyzer that is used to interpret the categorization field. - /// This property cannot be used at the same time as categorization_filters. - /// The categorization analyzer specifies how the categorization_field is interpreted by the categorization process. - /// - /// - [JsonInclude, JsonPropertyName("categorization_analyzer")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer? CategorizationAnalyzer { get; init; } - - /// - /// - /// If this property is specified, the values of the specified field will be categorized. - /// The resulting categories must be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory. - /// - /// - [JsonInclude, JsonPropertyName("categorization_field_name")] - public string? CategorizationFieldName { get; init; } - - /// - /// - /// If categorization_field_name is specified, you can also define optional filters. - /// This property expects an array of regular expressions. - /// The expressions are used to filter out matching sequences from the categorization field values. - /// - /// - [JsonInclude, JsonPropertyName("categorization_filters")] - public IReadOnlyCollection? CategorizationFilters { get; init; } - - /// - /// - /// An array of detector configuration objects. - /// Detector configuration objects specify which data fields a job analyzes. - /// They also specify which analytical functions are used. - /// You can specify multiple detectors for a job. - /// - /// - [JsonInclude, JsonPropertyName("detectors")] - public IReadOnlyCollection Detectors { get; init; } - - /// - /// - /// A comma separated list of influencer field names. - /// Typically these can be the by, over, or partition fields that are used in the detector configuration. - /// You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. - /// When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity. - /// - /// - [JsonInclude, JsonPropertyName("influencers")] - public IReadOnlyCollection Influencers { get; init; } - - /// - /// - /// The size of the window in which to expect data that is out of time order. - /// Defaults to no latency. - /// If you specify a non-zero value, it must be greater than or equal to one second. - /// - /// - [JsonInclude, JsonPropertyName("latency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Latency { get; init; } - - /// - /// - /// Advanced configuration option. - /// Affects the pruning of models that have not been updated for the given time duration. - /// The value must be set to a multiple of the bucket_span. - /// If set too low, important information may be removed from the model. - /// Typically, set to 30d or longer. - /// If not set, model pruning only occurs if the model memory status reaches the soft limit or the hard limit. - /// For jobs created in 8.1 and later, the default value is the greater of 30d or 20 times bucket_span. - /// - /// - [JsonInclude, JsonPropertyName("model_prune_window")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ModelPruneWindow { get; init; } - - /// - /// - /// This functionality is reserved for internal use. - /// It is not supported for use in customer environments and is not subject to the support SLA of official GA features. - /// If set to true, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. - /// - /// - [JsonInclude, JsonPropertyName("multivariate_by_fields")] - public bool? MultivariateByFields { get; init; } - - /// - /// - /// Settings related to how categorization interacts with partition fields. - /// - /// - [JsonInclude, JsonPropertyName("per_partition_categorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PerPartitionCategorization? PerPartitionCategorization { get; init; } - - /// - /// - /// If this property is specified, the data that is fed to the job is expected to be pre-summarized. - /// This property value is the name of the field that contains the count of raw data points that have been summarized. - /// The same summary_count_field_name applies to all detectors in the job. - /// - /// - [JsonInclude, JsonPropertyName("summary_count_field_name")] - public string? SummaryCountFieldName { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisLimits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisLimits.g.cs deleted file mode 100644 index 2f42117df7a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisLimits.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnalysisLimits -{ - /// - /// - /// The maximum number of examples stored per category in memory and in the results data store. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored. NOTE: The categorization_examples_limit applies only to analysis that uses categorization. - /// - /// - [JsonInclude, JsonPropertyName("categorization_examples_limit")] - public long? CategorizationExamplesLimit { get; set; } - - /// - /// - /// The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. If the xpack.ml.max_model_memory_limit setting has a value greater than 0 and less than 1024mb, that value is used instead of the default. The default value is relatively small to ensure that high resource usage is a conscious decision. If you have jobs that are expected to analyze high cardinality fields, you will likely need to use a higher value. If you specify a number instead of a string, the units are assumed to be MiB. Specifying a string is recommended for clarity. If you specify a byte size unit of b or kb and the number does not equate to a discrete number of megabytes, it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you specify a value less than 1 MiB, an error occurs. If you specify a value for the xpack.ml.max_model_memory_limit setting, an error occurs when you try to create jobs that have model_memory_limit values greater than that setting value. - /// - /// - [JsonInclude, JsonPropertyName("model_memory_limit")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ModelMemoryLimit { get; set; } -} - -public sealed partial class AnalysisLimitsDescriptor : SerializableDescriptor -{ - internal AnalysisLimitsDescriptor(Action configure) => configure.Invoke(this); - - public AnalysisLimitsDescriptor() : base() - { - } - - private long? CategorizationExamplesLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ModelMemoryLimitValue { get; set; } - - /// - /// - /// The maximum number of examples stored per category in memory and in the results data store. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored. NOTE: The categorization_examples_limit applies only to analysis that uses categorization. - /// - /// - public AnalysisLimitsDescriptor CategorizationExamplesLimit(long? categorizationExamplesLimit) - { - CategorizationExamplesLimitValue = categorizationExamplesLimit; - return Self; - } - - /// - /// - /// The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. If the xpack.ml.max_model_memory_limit setting has a value greater than 0 and less than 1024mb, that value is used instead of the default. The default value is relatively small to ensure that high resource usage is a conscious decision. If you have jobs that are expected to analyze high cardinality fields, you will likely need to use a higher value. If you specify a number instead of a string, the units are assumed to be MiB. Specifying a string is recommended for clarity. If you specify a byte size unit of b or kb and the number does not equate to a discrete number of megabytes, it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you specify a value less than 1 MiB, an error occurs. If you specify a value for the xpack.ml.max_model_memory_limit setting, an error occurs when you try to create jobs that have model_memory_limit values greater than that setting value. - /// - /// - public AnalysisLimitsDescriptor ModelMemoryLimit(Elastic.Clients.Elasticsearch.Serverless.ByteSize? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CategorizationExamplesLimitValue.HasValue) - { - writer.WritePropertyName("categorization_examples_limit"); - writer.WriteNumberValue(CategorizationExamplesLimitValue.Value); - } - - if (ModelMemoryLimitValue is not null) - { - writer.WritePropertyName("model_memory_limit"); - JsonSerializer.Serialize(writer, ModelMemoryLimitValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisMemoryLimit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisMemoryLimit.g.cs deleted file mode 100644 index 5a66ccef7e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnalysisMemoryLimit.g.cs +++ /dev/null @@ -1,69 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnalysisMemoryLimit -{ - /// - /// - /// Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. - /// - /// - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string ModelMemoryLimit { get; set; } -} - -public sealed partial class AnalysisMemoryLimitDescriptor : SerializableDescriptor -{ - internal AnalysisMemoryLimitDescriptor(Action configure) => configure.Invoke(this); - - public AnalysisMemoryLimitDescriptor() : base() - { - } - - private string ModelMemoryLimitValue { get; set; } - - /// - /// - /// Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. - /// - /// - public AnalysisMemoryLimitDescriptor ModelMemoryLimit(string modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Anomaly.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Anomaly.g.cs deleted file mode 100644 index 088efbe19a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Anomaly.g.cs +++ /dev/null @@ -1,223 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Anomaly -{ - /// - /// - /// The actual value for the bucket. - /// - /// - [JsonInclude, JsonPropertyName("actual")] - public IReadOnlyCollection? Actual { get; init; } - - /// - /// - /// Information about the factors impacting the initial anomaly score. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_score_explanation")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnomalyExplanation? AnomalyScoreExplanation { get; init; } - - /// - /// - /// The length of the bucket in seconds. This value matches the bucket_span that is specified in the job. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public long BucketSpan { get; init; } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - [JsonInclude, JsonPropertyName("by_field_name")] - public string? ByFieldName { get; init; } - - /// - /// - /// The value of by_field_name. - /// - /// - [JsonInclude, JsonPropertyName("by_field_value")] - public string? ByFieldValue { get; init; } - - /// - /// - /// For population analysis, an over field must be specified in the detector. This property contains an array of anomaly records that are the causes for the anomaly that has been identified for the over field. This sub-resource contains the most anomalous records for the over_field_name. For scalability reasons, a maximum of the 10 most significant causes of the anomaly are returned. As part of the core analytical modeling, these low-level anomaly records are aggregated for their parent over field record. The causes resource contains similar elements to the record resource, namely actual, typical, geo_results.actual_point, geo_results.typical_point, *_field_name and *_field_value. Probability and scores are not applicable to causes. - /// - /// - [JsonInclude, JsonPropertyName("causes")] - public IReadOnlyCollection? Causes { get; init; } - - /// - /// - /// A unique identifier for the detector. - /// - /// - [JsonInclude, JsonPropertyName("detector_index")] - public int DetectorIndex { get; init; } - - /// - /// - /// Certain functions require a field to operate on, for example, sum(). For those functions, this value is the name of the field to be analyzed. - /// - /// - [JsonInclude, JsonPropertyName("field_name")] - public string? FieldName { get; init; } - - /// - /// - /// The function in which the anomaly occurs, as specified in the detector configuration. For example, max. - /// - /// - [JsonInclude, JsonPropertyName("function")] - public string? Function { get; init; } - - /// - /// - /// The description of the function in which the anomaly occurs, as specified in the detector configuration. - /// - /// - [JsonInclude, JsonPropertyName("function_description")] - public string? FunctionDescription { get; init; } - - /// - /// - /// If the detector function is lat_long, this object contains comma delimited strings for the latitude and longitude of the actual and typical values. - /// - /// - [JsonInclude, JsonPropertyName("geo_results")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.GeoResults? GeoResults { get; init; } - - /// - /// - /// If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly. - /// - /// - [JsonInclude, JsonPropertyName("influencers")] - public IReadOnlyCollection? Influencers { get; init; } - - /// - /// - /// A normalized score between 0-100, which is based on the probability of the anomalousness of this record. This is the initial value that was calculated at the time the bucket was processed. - /// - /// - [JsonInclude, JsonPropertyName("initial_record_score")] - public double InitialRecordScore { get; init; } - - /// - /// - /// If true, this is an interim result. In other words, the results are calculated based on partial input data. - /// - /// - [JsonInclude, JsonPropertyName("is_interim")] - public bool IsInterim { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - [JsonInclude, JsonPropertyName("over_field_name")] - public string? OverFieldName { get; init; } - - /// - /// - /// The value of over_field_name. - /// - /// - [JsonInclude, JsonPropertyName("over_field_value")] - public string? OverFieldValue { get; init; } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - [JsonInclude, JsonPropertyName("partition_field_name")] - public string? PartitionFieldName { get; init; } - - /// - /// - /// The value of partition_field_name. - /// - /// - [JsonInclude, JsonPropertyName("partition_field_value")] - public string? PartitionFieldValue { get; init; } - - /// - /// - /// The probability of the individual anomaly occurring, in the range 0 to 1. For example, 0.0000772031. This value can be held to a high precision of over 300 decimal places, so the record_score is provided as a human-readable and friendly interpretation of this. - /// - /// - [JsonInclude, JsonPropertyName("probability")] - public double Probability { get; init; } - - /// - /// - /// A normalized score between 0-100, which is based on the probability of the anomalousness of this record. Unlike initial_record_score, this value will be updated by a re-normalization process as new data is analyzed. - /// - /// - [JsonInclude, JsonPropertyName("record_score")] - public double RecordScore { get; init; } - - /// - /// - /// Internal. This is always set to record. - /// - /// - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - - /// - /// - /// The start time of the bucket for which these results were calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } - - /// - /// - /// The typical value for the bucket, according to analytical modeling. - /// - /// - [JsonInclude, JsonPropertyName("typical")] - public IReadOnlyCollection? Typical { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyCause.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyCause.g.cs deleted file mode 100644 index f6be27c0c37..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyCause.g.cs +++ /dev/null @@ -1,60 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnomalyCause -{ - [JsonInclude, JsonPropertyName("actual")] - public IReadOnlyCollection Actual { get; init; } - [JsonInclude, JsonPropertyName("by_field_name")] - public string ByFieldName { get; init; } - [JsonInclude, JsonPropertyName("by_field_value")] - public string ByFieldValue { get; init; } - [JsonInclude, JsonPropertyName("correlated_by_field_value")] - public string CorrelatedByFieldValue { get; init; } - [JsonInclude, JsonPropertyName("field_name")] - public string FieldName { get; init; } - [JsonInclude, JsonPropertyName("function")] - public string Function { get; init; } - [JsonInclude, JsonPropertyName("function_description")] - public string FunctionDescription { get; init; } - [JsonInclude, JsonPropertyName("influencers")] - public IReadOnlyCollection Influencers { get; init; } - [JsonInclude, JsonPropertyName("over_field_name")] - public string OverFieldName { get; init; } - [JsonInclude, JsonPropertyName("over_field_value")] - public string OverFieldValue { get; init; } - [JsonInclude, JsonPropertyName("partition_field_name")] - public string PartitionFieldName { get; init; } - [JsonInclude, JsonPropertyName("partition_field_value")] - public string PartitionFieldValue { get; init; } - [JsonInclude, JsonPropertyName("probability")] - public double Probability { get; init; } - [JsonInclude, JsonPropertyName("typical")] - public IReadOnlyCollection Typical { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyDetectors.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyDetectors.g.cs deleted file mode 100644 index cbea71ec7ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyDetectors.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnomalyDetectors -{ - [JsonInclude, JsonPropertyName("categorization_analyzer")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzer CategorizationAnalyzer { get; init; } - [JsonInclude, JsonPropertyName("categorization_examples_limit")] - public int CategorizationExamplesLimit { get; init; } - [JsonInclude, JsonPropertyName("daily_model_snapshot_retention_after_days")] - public int DailyModelSnapshotRetentionAfterDays { get; init; } - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string ModelMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public int ModelSnapshotRetentionDays { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs deleted file mode 100644 index 84be9c2d3c6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/AnomalyExplanation.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class AnomalyExplanation -{ - /// - /// - /// Impact from the duration and magnitude of the detected anomaly relative to the historical average. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_characteristics_impact")] - public int? AnomalyCharacteristicsImpact { get; init; } - - /// - /// - /// Length of the detected anomaly in the number of buckets. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_length")] - public int? AnomalyLength { get; init; } - - /// - /// - /// Type of the detected anomaly: spike or dip. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_type")] - public string? AnomalyType { get; init; } - - /// - /// - /// Indicates reduction of anomaly score for the bucket with large confidence intervals. If a bucket has large confidence intervals, the score is reduced. - /// - /// - [JsonInclude, JsonPropertyName("high_variance_penalty")] - public bool? HighVariancePenalty { get; init; } - - /// - /// - /// If the bucket contains fewer samples than expected, the score is reduced. - /// - /// - [JsonInclude, JsonPropertyName("incomplete_bucket_penalty")] - public bool? IncompleteBucketPenalty { get; init; } - - /// - /// - /// Lower bound of the 95% confidence interval. - /// - /// - [JsonInclude, JsonPropertyName("lower_confidence_bound")] - public double? LowerConfidenceBound { get; init; } - - /// - /// - /// Impact of the deviation between actual and typical values in the past 12 buckets. - /// - /// - [JsonInclude, JsonPropertyName("multi_bucket_impact")] - public int? MultiBucketImpact { get; init; } - - /// - /// - /// Impact of the deviation between actual and typical values in the current bucket. - /// - /// - [JsonInclude, JsonPropertyName("single_bucket_impact")] - public int? SingleBucketImpact { get; init; } - - /// - /// - /// Typical (expected) value for this bucket. - /// - /// - [JsonInclude, JsonPropertyName("typical_value")] - public double? TypicalValue { get; init; } - - /// - /// - /// Upper bound of the 95% confidence interval. - /// - /// - [JsonInclude, JsonPropertyName("upper_confidence_bound")] - public double? UpperConfidenceBound { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ApiKeyAuthorization.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ApiKeyAuthorization.g.cs deleted file mode 100644 index 642af49f7fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ApiKeyAuthorization.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ApiKeyAuthorization -{ - /// - /// - /// The identifier for the API key. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// The name of the API key. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketInfluencer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketInfluencer.g.cs deleted file mode 100644 index 1cb782fb7fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketInfluencer.g.cs +++ /dev/null @@ -1,123 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class BucketInfluencer -{ - /// - /// - /// A normalized score between 0-100, which is calculated for each bucket influencer. This score might be updated as - /// newer data is analyzed. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_score")] - public double AnomalyScore { get; init; } - - /// - /// - /// The length of the bucket in seconds. This value matches the bucket span that is specified in the job. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public long BucketSpan { get; init; } - - /// - /// - /// The field name of the influencer. - /// - /// - [JsonInclude, JsonPropertyName("influencer_field_name")] - public string InfluencerFieldName { get; init; } - - /// - /// - /// The score between 0-100 for each bucket influencer. This score is the initial value that was calculated at the - /// time the bucket was processed. - /// - /// - [JsonInclude, JsonPropertyName("initial_anomaly_score")] - public double InitialAnomalyScore { get; init; } - - /// - /// - /// If true, this is an interim result. In other words, the results are calculated based on partial input data. - /// - /// - [JsonInclude, JsonPropertyName("is_interim")] - public bool IsInterim { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The probability that the bucket has this behavior, in the range 0 to 1. This value can be held to a high precision - /// of over 300 decimal places, so the anomaly_score is provided as a human-readable and friendly interpretation of - /// this. - /// - /// - [JsonInclude, JsonPropertyName("probability")] - public double Probability { get; init; } - - /// - /// - /// Internal. - /// - /// - [JsonInclude, JsonPropertyName("raw_anomaly_score")] - public double RawAnomalyScore { get; init; } - - /// - /// - /// Internal. This value is always set to bucket_influencer. - /// - /// - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - - /// - /// - /// The start time of the bucket for which these results were calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } - - /// - /// - /// The start time of the bucket for which these results were calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp_string")] - public DateTimeOffset? TimestampString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketSummary.g.cs deleted file mode 100644 index 3b10161130f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/BucketSummary.g.cs +++ /dev/null @@ -1,118 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class BucketSummary -{ - /// - /// - /// The maximum anomaly score, between 0-100, for any of the bucket influencers. This is an overall, rate-limited - /// score for the job. All the anomaly records in the bucket contribute to this score. This value might be updated as - /// new data is analyzed. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_score")] - public double AnomalyScore { get; init; } - [JsonInclude, JsonPropertyName("bucket_influencers")] - public IReadOnlyCollection BucketInfluencers { get; init; } - - /// - /// - /// The length of the bucket in seconds. This value matches the bucket span that is specified in the job. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public long BucketSpan { get; init; } - - /// - /// - /// The number of input data records processed in this bucket. - /// - /// - [JsonInclude, JsonPropertyName("event_count")] - public long EventCount { get; init; } - - /// - /// - /// The maximum anomaly score for any of the bucket influencers. This is the initial value that was calculated at the - /// time the bucket was processed. - /// - /// - [JsonInclude, JsonPropertyName("initial_anomaly_score")] - public double InitialAnomalyScore { get; init; } - - /// - /// - /// If true, this is an interim result. In other words, the results are calculated based on partial input data. - /// - /// - [JsonInclude, JsonPropertyName("is_interim")] - public bool IsInterim { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The amount of time, in milliseconds, that it took to analyze the bucket contents and calculate results. - /// - /// - [JsonInclude, JsonPropertyName("processing_time_ms")] - public long ProcessingTimeMs { get; init; } - - /// - /// - /// Internal. This value is always set to bucket. - /// - /// - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - - /// - /// - /// The start time of the bucket. This timestamp uniquely identifies the bucket. Events that occur exactly at the - /// timestamp of the bucket are included in the results for the bucket. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } - - /// - /// - /// The start time of the bucket. This timestamp uniquely identifies the bucket. Events that occur exactly at the - /// timestamp of the bucket are included in the results for the bucket. - /// - /// - [JsonInclude, JsonPropertyName("timestamp_string")] - public DateTimeOffset? TimestampString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Calendar.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Calendar.g.cs deleted file mode 100644 index bd02e5c5c7a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Calendar.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Calendar -{ - /// - /// - /// A string that uniquely identifies a calendar. - /// - /// - [JsonInclude, JsonPropertyName("calendar_id")] - public string CalendarId { get; init; } - - /// - /// - /// A description of the calendar. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// An array of anomaly detection job identifiers. - /// - /// - [JsonInclude, JsonPropertyName("job_ids")] - public IReadOnlyCollection JobIds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs deleted file mode 100644 index 1adb1897de4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CalendarEvent.g.cs +++ /dev/null @@ -1,232 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class CalendarEvent -{ - /// - /// - /// A string that uniquely identifies a calendar. - /// - /// - [JsonInclude, JsonPropertyName("calendar_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? CalendarId { get; set; } - - /// - /// - /// A description of the scheduled event. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string Description { get; set; } - - /// - /// - /// The timestamp for the end of the scheduled event in milliseconds since the epoch or ISO 8601 format. - /// - /// - [JsonInclude, JsonPropertyName("end_time")] - public DateTimeOffset EndTime { get; set; } - [JsonInclude, JsonPropertyName("event_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? EventId { get; set; } - - /// - /// - /// Shift time by this many seconds. For example adjust time for daylight savings changes - /// - /// - [JsonInclude, JsonPropertyName("force_time_shift")] - public int? ForceTimeShift { get; set; } - - /// - /// - /// When true the model will not be updated for this calendar period. - /// - /// - [JsonInclude, JsonPropertyName("skip_model_update")] - public bool? SkipModelUpdate { get; set; } - - /// - /// - /// When true the model will not create results for this calendar period. - /// - /// - [JsonInclude, JsonPropertyName("skip_result")] - public bool? SkipResult { get; set; } - - /// - /// - /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. - /// - /// - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset StartTime { get; set; } -} - -public sealed partial class CalendarEventDescriptor : SerializableDescriptor -{ - internal CalendarEventDescriptor(Action configure) => configure.Invoke(this); - - public CalendarEventDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? CalendarIdValue { get; set; } - private string DescriptionValue { get; set; } - private DateTimeOffset EndTimeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? EventIdValue { get; set; } - private int? ForceTimeShiftValue { get; set; } - private bool? SkipModelUpdateValue { get; set; } - private bool? SkipResultValue { get; set; } - private DateTimeOffset StartTimeValue { get; set; } - - /// - /// - /// A string that uniquely identifies a calendar. - /// - /// - public CalendarEventDescriptor CalendarId(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId) - { - CalendarIdValue = calendarId; - return Self; - } - - /// - /// - /// A description of the scheduled event. - /// - /// - public CalendarEventDescriptor Description(string description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// The timestamp for the end of the scheduled event in milliseconds since the epoch or ISO 8601 format. - /// - /// - public CalendarEventDescriptor EndTime(DateTimeOffset endTime) - { - EndTimeValue = endTime; - return Self; - } - - public CalendarEventDescriptor EventId(Elastic.Clients.Elasticsearch.Serverless.Id? eventId) - { - EventIdValue = eventId; - return Self; - } - - /// - /// - /// Shift time by this many seconds. For example adjust time for daylight savings changes - /// - /// - public CalendarEventDescriptor ForceTimeShift(int? forceTimeShift) - { - ForceTimeShiftValue = forceTimeShift; - return Self; - } - - /// - /// - /// When true the model will not be updated for this calendar period. - /// - /// - public CalendarEventDescriptor SkipModelUpdate(bool? skipModelUpdate = true) - { - SkipModelUpdateValue = skipModelUpdate; - return Self; - } - - /// - /// - /// When true the model will not create results for this calendar period. - /// - /// - public CalendarEventDescriptor SkipResult(bool? skipResult = true) - { - SkipResultValue = skipResult; - return Self; - } - - /// - /// - /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. - /// - /// - public CalendarEventDescriptor StartTime(DateTimeOffset startTime) - { - StartTimeValue = startTime; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CalendarIdValue is not null) - { - writer.WritePropertyName("calendar_id"); - JsonSerializer.Serialize(writer, CalendarIdValue, options); - } - - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - writer.WritePropertyName("end_time"); - JsonSerializer.Serialize(writer, EndTimeValue, options); - if (EventIdValue is not null) - { - writer.WritePropertyName("event_id"); - JsonSerializer.Serialize(writer, EventIdValue, options); - } - - if (ForceTimeShiftValue.HasValue) - { - writer.WritePropertyName("force_time_shift"); - writer.WriteNumberValue(ForceTimeShiftValue.Value); - } - - if (SkipModelUpdateValue.HasValue) - { - writer.WritePropertyName("skip_model_update"); - writer.WriteBooleanValue(SkipModelUpdateValue.Value); - } - - if (SkipResultValue.HasValue) - { - writer.WritePropertyName("skip_result"); - writer.WriteBooleanValue(SkipResultValue.Value); - } - - writer.WritePropertyName("start_time"); - JsonSerializer.Serialize(writer, StartTimeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzer.g.cs deleted file mode 100644 index 9f2dfeb68df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzer.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class CategorizationAnalyzer : Union -{ - public CategorizationAnalyzer(string Name) : base(Name) - { - } - - public CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationAnalyzerDefinition Definition) : base(Definition) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzerDefinition.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzerDefinition.g.cs deleted file mode 100644 index f52a8cc6d7a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/CategorizationAnalyzerDefinition.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class CategorizationAnalyzerDefinition -{ - /// - /// - /// One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of categorization_filters (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters. - /// - /// - [JsonInclude, JsonPropertyName("char_filter")] - public ICollection? CharFilter { get; set; } - - /// - /// - /// One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public ICollection? Filter { get; set; } - - /// - /// - /// The name or definition of the tokenizer to use after character filters are applied. This property is compulsory if categorization_analyzer is specified as an object. Machine learning provides a tokenizer called ml_standard that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English. If you want to use that tokenizer but change the character or token filters, specify "tokenizer": "ml_standard" in your categorization_analyzer. Additionally, the ml_classic tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2). ml_classic was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify "tokenizer": "ml_classic" in your categorization_analyzer. - /// - /// - [JsonInclude, JsonPropertyName("tokenizer")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? Tokenizer { get; set; } -} - -public sealed partial class CategorizationAnalyzerDefinitionDescriptor : SerializableDescriptor -{ - internal CategorizationAnalyzerDefinitionDescriptor(Action configure) => configure.Invoke(this); - - public CategorizationAnalyzerDefinitionDescriptor() : base() - { - } - - private ICollection? CharFilterValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? TokenizerValue { get; set; } - - /// - /// - /// One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of categorization_filters (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters. - /// - /// - public CategorizationAnalyzerDefinitionDescriptor CharFilter(ICollection? charFilter) - { - CharFilterValue = charFilter; - return Self; - } - - /// - /// - /// One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization. - /// - /// - public CategorizationAnalyzerDefinitionDescriptor Filter(ICollection? filter) - { - FilterValue = filter; - return Self; - } - - /// - /// - /// The name or definition of the tokenizer to use after character filters are applied. This property is compulsory if categorization_analyzer is specified as an object. Machine learning provides a tokenizer called ml_standard that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English. If you want to use that tokenizer but change the character or token filters, specify "tokenizer": "ml_standard" in your categorization_analyzer. Additionally, the ml_classic tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2). ml_classic was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify "tokenizer": "ml_classic" in your categorization_analyzer. - /// - /// - public CategorizationAnalyzerDefinitionDescriptor Tokenizer(Elastic.Clients.Elasticsearch.Serverless.Analysis.ITokenizer? tokenizer) - { - TokenizerValue = tokenizer; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CharFilterValue is not null) - { - writer.WritePropertyName("char_filter"); - JsonSerializer.Serialize(writer, CharFilterValue, options); - } - - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (TokenizerValue is not null) - { - writer.WritePropertyName("tokenizer"); - JsonSerializer.Serialize(writer, TokenizerValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Category.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Category.g.cs deleted file mode 100644 index 6dc0faf00f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Category.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Category -{ - /// - /// - /// A unique identifier for the category. category_id is unique at the job level, even when per-partition categorization is enabled. - /// - /// - [JsonInclude, JsonPropertyName("category_id")] - public long CategoryId { get; init; } - - /// - /// - /// A list of examples of actual values that matched the category. - /// - /// - [JsonInclude, JsonPropertyName("examples")] - public IReadOnlyCollection Examples { get; init; } - - /// - /// - /// [experimental] A Grok pattern that could be used in Logstash or an ingest pipeline to extract fields from messages that match the category. This field is experimental and may be changed or removed in a future release. The Grok patterns that are found are not optimal, but are often a good starting point for manual tweaking. - /// - /// - [JsonInclude, JsonPropertyName("grok_pattern")] - public string? GrokPattern { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The maximum length of the fields that matched the category. The value is increased by 10% to enable matching for similar fields that have not been analyzed. - /// - /// - [JsonInclude, JsonPropertyName("max_matching_length")] - public long MaxMatchingLength { get; init; } - [JsonInclude, JsonPropertyName("mlcategory")] - public string Mlcategory { get; init; } - - /// - /// - /// The number of messages that have been matched by this category. This is only guaranteed to have the latest accurate count after a job _flush or _close - /// - /// - [JsonInclude, JsonPropertyName("num_matches")] - public long? NumMatches { get; init; } - [JsonInclude, JsonPropertyName("p")] - public string? p { get; init; } - - /// - /// - /// If per-partition categorization is enabled, this property identifies the field used to segment the categorization. It is not present when per-partition categorization is disabled. - /// - /// - [JsonInclude, JsonPropertyName("partition_field_name")] - public string? PartitionFieldName { get; init; } - - /// - /// - /// If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category. It is not present when per-partition categorization is disabled. - /// - /// - [JsonInclude, JsonPropertyName("partition_field_value")] - public string? PartitionFieldValue { get; init; } - - /// - /// - /// A list of category_id entries that this current category encompasses. Any new message that is processed by the categorizer will match against this category and not any of the categories in this list. This is only guaranteed to have the latest accurate list of categories after a job _flush or _close - /// - /// - [JsonInclude, JsonPropertyName("preferred_to_categories")] - public IReadOnlyCollection? PreferredToCategories { get; init; } - - /// - /// - /// A regular expression that is used to search for values that match the category. - /// - /// - [JsonInclude, JsonPropertyName("regex")] - public string Regex { get; init; } - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - - /// - /// - /// A space separated list of the common tokens that are matched in values of the category. - /// - /// - [JsonInclude, JsonPropertyName("terms")] - public string Terms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ChunkingConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ChunkingConfig.g.cs deleted file mode 100644 index 06f570ede5a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ChunkingConfig.g.cs +++ /dev/null @@ -1,101 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ChunkingConfig -{ - /// - /// - /// If the mode is auto, the chunk size is dynamically calculated; - /// this is the recommended value when the datafeed does not use aggregations. - /// If the mode is manual, chunking is applied according to the specified time_span; - /// use this mode when the datafeed uses aggregations. If the mode is off, no chunking is applied. - /// - /// - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingMode Mode { get; set; } - - /// - /// - /// The time span that each search will be querying. This setting is applicable only when the mode is set to manual. - /// - /// - [JsonInclude, JsonPropertyName("time_span")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TimeSpan { get; set; } -} - -public sealed partial class ChunkingConfigDescriptor : SerializableDescriptor -{ - internal ChunkingConfigDescriptor(Action configure) => configure.Invoke(this); - - public ChunkingConfigDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingMode ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeSpanValue { get; set; } - - /// - /// - /// If the mode is auto, the chunk size is dynamically calculated; - /// this is the recommended value when the datafeed does not use aggregations. - /// If the mode is manual, chunking is applied according to the specified time_span; - /// use this mode when the datafeed uses aggregations. If the mode is off, no chunking is applied. - /// - /// - public ChunkingConfigDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingMode mode) - { - ModeValue = mode; - return Self; - } - - /// - /// - /// The time span that each search will be querying. This setting is applicable only when the mode is set to manual. - /// - /// - public ChunkingConfigDescriptor TimeSpan(Elastic.Clients.Elasticsearch.Serverless.Duration? timeSpan) - { - TimeSpanValue = timeSpan; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - if (TimeSpanValue is not null) - { - writer.WritePropertyName("time_span"); - JsonSerializer.Serialize(writer, TimeSpanValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs deleted file mode 100644 index abd1deaa9f6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs +++ /dev/null @@ -1,181 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ClassificationInferenceOptions -{ - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - [JsonInclude, JsonPropertyName("num_top_feature_importance_values")] - public int? NumTopFeatureImportanceValues { get; set; } - - /// - /// - /// Specifies the type of the predicted field to write. Acceptable values are: string, number, boolean. When boolean is provided 1.0 is transformed to true and 0.0 to false. - /// - /// - [JsonInclude, JsonPropertyName("prediction_field_type")] - public string? PredictionFieldType { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// Specifies the field to which the top classes are written. Defaults to top_classes. - /// - /// - [JsonInclude, JsonPropertyName("top_classes_results_field")] - public string? TopClassesResultsField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig(ClassificationInferenceOptions classificationInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig.Classification(classificationInferenceOptions); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(ClassificationInferenceOptions classificationInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.Classification(classificationInferenceOptions); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(ClassificationInferenceOptions classificationInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.Classification(classificationInferenceOptions); -} - -public sealed partial class ClassificationInferenceOptionsDescriptor : SerializableDescriptor -{ - internal ClassificationInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public ClassificationInferenceOptionsDescriptor() : base() - { - } - - private int? NumTopClassesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private string? PredictionFieldTypeValue { get; set; } - private string? ResultsFieldValue { get; set; } - private string? TopClassesResultsFieldValue { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public ClassificationInferenceOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public ClassificationInferenceOptionsDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Specifies the type of the predicted field to write. Acceptable values are: string, number, boolean. When boolean is provided 1.0 is transformed to true and 0.0 to false. - /// - /// - public ClassificationInferenceOptionsDescriptor PredictionFieldType(string? predictionFieldType) - { - PredictionFieldTypeValue = predictionFieldType; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public ClassificationInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Specifies the field to which the top classes are written. Defaults to top_classes. - /// - /// - public ClassificationInferenceOptionsDescriptor TopClassesResultsField(string? topClassesResultsField) - { - TopClassesResultsFieldValue = topClassesResultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (!string.IsNullOrEmpty(PredictionFieldTypeValue)) - { - writer.WritePropertyName("prediction_field_type"); - writer.WriteStringValue(PredictionFieldTypeValue); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (!string.IsNullOrEmpty(TopClassesResultsFieldValue)) - { - writer.WritePropertyName("top_classes_results_field"); - writer.WriteStringValue(TopClassesResultsFieldValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixItem.g.cs deleted file mode 100644 index ae90441244f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixItem.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ConfusionMatrixItem -{ - [JsonInclude, JsonPropertyName("actual_class")] - public string ActualClass { get; init; } - [JsonInclude, JsonPropertyName("actual_class_doc_count")] - public int ActualClassDocCount { get; init; } - [JsonInclude, JsonPropertyName("other_predicted_class_doc_count")] - public int OtherPredictedClassDocCount { get; init; } - [JsonInclude, JsonPropertyName("predicted_classes")] - public IReadOnlyCollection PredictedClasses { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixPrediction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixPrediction.g.cs deleted file mode 100644 index a3680c1a3e6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixPrediction.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ConfusionMatrixPrediction -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("predicted_class")] - public string PredictedClass { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixThreshold.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixThreshold.g.cs deleted file mode 100644 index 3157696095f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ConfusionMatrixThreshold.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ConfusionMatrixThreshold -{ - /// - /// - /// False Negative - /// - /// - [JsonInclude, JsonPropertyName("fn")] - public int FalseNegative { get; init; } - - /// - /// - /// False Positive - /// - /// - [JsonInclude, JsonPropertyName("fp")] - public int FalsePositive { get; init; } - - /// - /// - /// True Negative - /// - /// - [JsonInclude, JsonPropertyName("tn")] - public int TrueNegative { get; init; } - - /// - /// - /// True Positive - /// - /// - [JsonInclude, JsonPropertyName("tp")] - public int TruePositive { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataCounts.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataCounts.g.cs deleted file mode 100644 index db582b7b1b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataCounts.g.cs +++ /dev/null @@ -1,70 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataCounts -{ - [JsonInclude, JsonPropertyName("bucket_count")] - public long BucketCount { get; init; } - [JsonInclude, JsonPropertyName("earliest_record_timestamp")] - public long? EarliestRecordTimestamp { get; init; } - [JsonInclude, JsonPropertyName("empty_bucket_count")] - public long EmptyBucketCount { get; init; } - [JsonInclude, JsonPropertyName("input_bytes")] - public long InputBytes { get; init; } - [JsonInclude, JsonPropertyName("input_field_count")] - public long InputFieldCount { get; init; } - [JsonInclude, JsonPropertyName("input_record_count")] - public long InputRecordCount { get; init; } - [JsonInclude, JsonPropertyName("invalid_date_count")] - public long InvalidDateCount { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("last_data_time")] - public long? LastDataTime { get; init; } - [JsonInclude, JsonPropertyName("latest_bucket_timestamp")] - public long? LatestBucketTimestamp { get; init; } - [JsonInclude, JsonPropertyName("latest_empty_bucket_timestamp")] - public long? LatestEmptyBucketTimestamp { get; init; } - [JsonInclude, JsonPropertyName("latest_record_timestamp")] - public long? LatestRecordTimestamp { get; init; } - [JsonInclude, JsonPropertyName("latest_sparse_bucket_timestamp")] - public long? LatestSparseBucketTimestamp { get; init; } - [JsonInclude, JsonPropertyName("log_time")] - public long? LogTime { get; init; } - [JsonInclude, JsonPropertyName("missing_field_count")] - public long MissingFieldCount { get; init; } - [JsonInclude, JsonPropertyName("out_of_order_timestamp_count")] - public long OutOfOrderTimestampCount { get; init; } - [JsonInclude, JsonPropertyName("processed_field_count")] - public long ProcessedFieldCount { get; init; } - [JsonInclude, JsonPropertyName("processed_record_count")] - public long ProcessedRecordCount { get; init; } - [JsonInclude, JsonPropertyName("sparse_bucket_count")] - public long SparseBucketCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataDescription.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataDescription.g.cs deleted file mode 100644 index 8fb2f89e752..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataDescription.g.cs +++ /dev/null @@ -1,268 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataDescription -{ - [JsonInclude, JsonPropertyName("field_delimiter")] - public string? FieldDelimiter { get; set; } - - /// - /// - /// Only JSON format is supported at this time. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - [JsonInclude, JsonPropertyName("time_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TimeField { get; set; } - - /// - /// - /// The time format, which can be epoch, epoch_ms, or a custom pattern. The value epoch refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value epoch_ms indicates that time is measured in milliseconds since the epoch. The epoch and epoch_ms time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: yyyy-MM-dd'T'HH:mm:ssX. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails. - /// - /// - [JsonInclude, JsonPropertyName("time_format")] - public string? TimeFormat { get; set; } -} - -public sealed partial class DataDescriptionDescriptor : SerializableDescriptor> -{ - internal DataDescriptionDescriptor(Action> configure) => configure.Invoke(this); - - public DataDescriptionDescriptor() : base() - { - } - - private string? FieldDelimiterValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TimeFieldValue { get; set; } - private string? TimeFormatValue { get; set; } - - public DataDescriptionDescriptor FieldDelimiter(string? fieldDelimiter) - { - FieldDelimiterValue = fieldDelimiter; - return Self; - } - - /// - /// - /// Only JSON format is supported at this time. - /// - /// - public DataDescriptionDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - public DataDescriptionDescriptor TimeField(Elastic.Clients.Elasticsearch.Serverless.Field? timeField) - { - TimeFieldValue = timeField; - return Self; - } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - public DataDescriptionDescriptor TimeField(Expression> timeField) - { - TimeFieldValue = timeField; - return Self; - } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - public DataDescriptionDescriptor TimeField(Expression> timeField) - { - TimeFieldValue = timeField; - return Self; - } - - /// - /// - /// The time format, which can be epoch, epoch_ms, or a custom pattern. The value epoch refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value epoch_ms indicates that time is measured in milliseconds since the epoch. The epoch and epoch_ms time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: yyyy-MM-dd'T'HH:mm:ssX. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails. - /// - /// - public DataDescriptionDescriptor TimeFormat(string? timeFormat) - { - TimeFormatValue = timeFormat; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FieldDelimiterValue)) - { - writer.WritePropertyName("field_delimiter"); - writer.WriteStringValue(FieldDelimiterValue); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (TimeFieldValue is not null) - { - writer.WritePropertyName("time_field"); - JsonSerializer.Serialize(writer, TimeFieldValue, options); - } - - if (!string.IsNullOrEmpty(TimeFormatValue)) - { - writer.WritePropertyName("time_format"); - writer.WriteStringValue(TimeFormatValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataDescriptionDescriptor : SerializableDescriptor -{ - internal DataDescriptionDescriptor(Action configure) => configure.Invoke(this); - - public DataDescriptionDescriptor() : base() - { - } - - private string? FieldDelimiterValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TimeFieldValue { get; set; } - private string? TimeFormatValue { get; set; } - - public DataDescriptionDescriptor FieldDelimiter(string? fieldDelimiter) - { - FieldDelimiterValue = fieldDelimiter; - return Self; - } - - /// - /// - /// Only JSON format is supported at this time. - /// - /// - public DataDescriptionDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - public DataDescriptionDescriptor TimeField(Elastic.Clients.Elasticsearch.Serverless.Field? timeField) - { - TimeFieldValue = timeField; - return Self; - } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - public DataDescriptionDescriptor TimeField(Expression> timeField) - { - TimeFieldValue = timeField; - return Self; - } - - /// - /// - /// The name of the field that contains the timestamp. - /// - /// - public DataDescriptionDescriptor TimeField(Expression> timeField) - { - TimeFieldValue = timeField; - return Self; - } - - /// - /// - /// The time format, which can be epoch, epoch_ms, or a custom pattern. The value epoch refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value epoch_ms indicates that time is measured in milliseconds since the epoch. The epoch and epoch_ms time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: yyyy-MM-dd'T'HH:mm:ssX. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails. - /// - /// - public DataDescriptionDescriptor TimeFormat(string? timeFormat) - { - TimeFormatValue = timeFormat; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FieldDelimiterValue)) - { - writer.WritePropertyName("field_delimiter"); - writer.WriteStringValue(FieldDelimiterValue); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (TimeFieldValue is not null) - { - writer.WritePropertyName("time_field"); - JsonSerializer.Serialize(writer, TimeFieldValue, options); - } - - if (!string.IsNullOrEmpty(TimeFormatValue)) - { - writer.WritePropertyName("time_format"); - writer.WriteStringValue(TimeFormatValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeed.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeed.g.cs deleted file mode 100644 index 2b8886a2e00..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeed.g.cs +++ /dev/null @@ -1,189 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -internal sealed partial class DatafeedConverter : JsonConverter -{ - public override Datafeed Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyDictionary? aggregations = default; - Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedAuthorization? authorization = default; - Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig = default; - string datafeedId = default; - Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig delayedDataCheckConfig = default; - Elastic.Clients.Elasticsearch.Serverless.Duration? frequency = default; - IReadOnlyCollection? indexes = default; - IReadOnlyCollection indices = default; - Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions = default; - string jobId = default; - int? maxEmptySearches = default; - Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query = default; - Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay = default; - IReadOnlyDictionary? runtimeMappings = default; - IReadOnlyDictionary? scriptFields = default; - int? scrollSize = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "authorization") - { - authorization = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "chunking_config") - { - chunkingConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "datafeed_id") - { - datafeedId = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "delayed_data_check_config") - { - delayedDataCheckConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "frequency") - { - frequency = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indexes") - { - indexes = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "indices") - { - indices = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "indices_options") - { - indicesOptions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "job_id") - { - jobId = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_empty_searches") - { - maxEmptySearches = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query_delay") - { - queryDelay = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - runtimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - scriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "scroll_size") - { - scrollSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return new Datafeed { Aggregations = aggregations, Authorization = authorization, ChunkingConfig = chunkingConfig, DatafeedId = datafeedId, DelayedDataCheckConfig = delayedDataCheckConfig, Frequency = frequency, Indexes = indexes, Indices = indices, IndicesOptions = indicesOptions, JobId = jobId, MaxEmptySearches = maxEmptySearches, Query = query, QueryDelay = queryDelay, RuntimeMappings = runtimeMappings, ScriptFields = scriptFields, ScrollSize = scrollSize }; - } - - public override void Write(Utf8JsonWriter writer, Datafeed value, JsonSerializerOptions options) - { - throw new NotImplementedException("'Datafeed' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(DatafeedConverter))] -public sealed partial class Datafeed -{ - public IReadOnlyDictionary? Aggregations { get; init; } - - /// - /// - /// The security privileges that the datafeed uses to run its queries. If Elastic Stack security features were disabled at the time of the most recent update to the datafeed, this property is omitted. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedAuthorization? Authorization { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfig { get; init; } - public string DatafeedId { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig DelayedDataCheckConfig { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; init; } - public IReadOnlyCollection? Indexes { get; init; } - public IReadOnlyCollection Indices { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptions { get; init; } - public string JobId { get; init; } - public int? MaxEmptySearches { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelay { get; init; } - public IReadOnlyDictionary? RuntimeMappings { get; init; } - public IReadOnlyDictionary? ScriptFields { get; init; } - public int? ScrollSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedAuthorization.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedAuthorization.g.cs deleted file mode 100644 index b2fdee79f2e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedAuthorization.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DatafeedAuthorization -{ - /// - /// - /// If an API key was used for the most recent update to the datafeed, its name and identifier are listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("api_key")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ApiKeyAuthorization? ApiKey { get; init; } - - /// - /// - /// If a user ID was used for the most recent update to the datafeed, its roles at the time of the update are listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - - /// - /// - /// If a service account was used for the most recent update to the datafeed, the account name is listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("service_account")] - public string? ServiceAccount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedConfig.g.cs deleted file mode 100644 index fabe268dcb2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedConfig.g.cs +++ /dev/null @@ -1,1082 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -internal sealed partial class DatafeedConfigConverter : JsonConverter -{ - public override DatafeedConfig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new DatafeedConfig(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "chunking_config") - { - variant.ChunkingConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "datafeed_id") - { - variant.DatafeedId = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "delayed_data_check_config") - { - variant.DelayedDataCheckConfig = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "frequency") - { - variant.Frequency = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices" || property == "indexes") - { - variant.Indices = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices_options") - { - variant.IndicesOptions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "job_id") - { - variant.JobId = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_empty_searches") - { - variant.MaxEmptySearches = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query_delay") - { - variant.QueryDelay = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "runtime_mappings") - { - variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "script_fields") - { - variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "scroll_size") - { - variant.ScrollSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, DatafeedConfig value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.ChunkingConfig is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, value.ChunkingConfig, options); - } - - if (value.DatafeedId is not null) - { - writer.WritePropertyName("datafeed_id"); - JsonSerializer.Serialize(writer, value.DatafeedId, options); - } - - if (value.DelayedDataCheckConfig is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, value.DelayedDataCheckConfig, options); - } - - if (value.Frequency is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, value.Frequency, options); - } - - if (value.Indices is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, value.Indices, options); - } - - if (value.IndicesOptions is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, value.IndicesOptions, options); - } - - if (value.JobId is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, value.JobId, options); - } - - if (value.MaxEmptySearches.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(value.MaxEmptySearches.Value); - } - - if (value.Query is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - } - - if (value.QueryDelay is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, value.QueryDelay, options); - } - - if (value.RuntimeMappings is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, value.RuntimeMappings, options); - } - - if (value.ScriptFields is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, value.ScriptFields, options); - } - - if (value.ScrollSize.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(value.ScrollSize.Value); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(DatafeedConfigConverter))] -public sealed partial class DatafeedConfig -{ - /// - /// - /// If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data. - /// - /// - public IDictionary? Aggregations { get; set; } - - /// - /// - /// Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfig { get; set; } - - /// - /// - /// A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. The default value is the job identifier. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Id? DatafeedId { get; set; } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that the query_delay option is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfig { get; set; } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; set; } - - /// - /// - /// An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the remote_cluster_client role. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// Specifies index expansion options that are used during search. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptions { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Id? JobId { get; set; } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after frequency times max_empty_searches of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped. - /// - /// - public int? MaxEmptySearches { get; set; } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between 60s and 120s. This randomness improves the query performance when there are multiple jobs running on the same node. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelay { get; set; } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public IDictionary? ScriptFields { get; set; } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of index.max_result_window, which is 10,000 by default. - /// - /// - public int? ScrollSize { get; set; } -} - -public sealed partial class DatafeedConfigDescriptor : SerializableDescriptor> -{ - internal DatafeedConfigDescriptor(Action> configure) => configure.Invoke(this); - - public DatafeedConfigDescriptor() : base() - { - } - - private IDictionary> AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor ChunkingConfigDescriptor { get; set; } - private Action ChunkingConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? DatafeedIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor DelayedDataCheckConfigDescriptor { get; set; } - private Action DelayedDataCheckConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor IndicesOptionsDescriptor { get; set; } - private Action IndicesOptionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private int? MaxEmptySearchesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelayValue { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private int? ScrollSizeValue { get; set; } - - /// - /// - /// If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data. - /// - /// - public DatafeedConfigDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option. - /// - /// - public DatafeedConfigDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig) - { - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigValue = chunkingConfig; - return Self; - } - - public DatafeedConfigDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor descriptor) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor ChunkingConfig(Action configure) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. The default value is the job identifier. - /// - /// - public DatafeedConfigDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id? datafeedId) - { - DatafeedIdValue = datafeedId; - return Self; - } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that the query_delay option is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds. - /// - /// - public DatafeedConfigDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? delayedDataCheckConfig) - { - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigValue = delayedDataCheckConfig; - return Self; - } - - public DatafeedConfigDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor descriptor) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor DelayedDataCheckConfig(Action configure) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation. - /// - /// - public DatafeedConfigDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the remote_cluster_client role. - /// - /// - public DatafeedConfigDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies index expansion options that are used during search. - /// - /// - public DatafeedConfigDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions) - { - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsValue = indicesOptions; - return Self; - } - - public DatafeedConfigDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor descriptor) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor IndicesOptions(Action configure) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = configure; - return Self; - } - - public DatafeedConfigDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after frequency times max_empty_searches of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped. - /// - /// - public DatafeedConfigDescriptor MaxEmptySearches(int? maxEmptySearches) - { - MaxEmptySearchesValue = maxEmptySearches; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. - /// - /// - public DatafeedConfigDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public DatafeedConfigDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between 60s and 120s. This randomness improves the query performance when there are multiple jobs running on the same node. - /// - /// - public DatafeedConfigDescriptor QueryDelay(Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay) - { - QueryDelayValue = queryDelay; - return Self; - } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public DatafeedConfigDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public DatafeedConfigDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of index.max_result_window, which is 10,000 by default. - /// - /// - public DatafeedConfigDescriptor ScrollSize(int? scrollSize) - { - ScrollSizeValue = scrollSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (ChunkingConfigDescriptor is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigDescriptor, options); - } - else if (ChunkingConfigDescriptorAction is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor(ChunkingConfigDescriptorAction), options); - } - else if (ChunkingConfigValue is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigValue, options); - } - - if (DatafeedIdValue is not null) - { - writer.WritePropertyName("datafeed_id"); - JsonSerializer.Serialize(writer, DatafeedIdValue, options); - } - - if (DelayedDataCheckConfigDescriptor is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigDescriptor, options); - } - else if (DelayedDataCheckConfigDescriptorAction is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor(DelayedDataCheckConfigDescriptorAction), options); - } - else if (DelayedDataCheckConfigValue is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IndicesOptionsDescriptor is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsDescriptor, options); - } - else if (IndicesOptionsDescriptorAction is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor(IndicesOptionsDescriptorAction), options); - } - else if (IndicesOptionsValue is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (MaxEmptySearchesValue.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(MaxEmptySearchesValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryDelayValue is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, QueryDelayValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (ScrollSizeValue.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(ScrollSizeValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DatafeedConfigDescriptor : SerializableDescriptor -{ - internal DatafeedConfigDescriptor(Action configure) => configure.Invoke(this); - - public DatafeedConfigDescriptor() : base() - { - } - - private IDictionary AggregationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? ChunkingConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor ChunkingConfigDescriptor { get; set; } - private Action ChunkingConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? DatafeedIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor DelayedDataCheckConfigDescriptor { get; set; } - private Action DelayedDataCheckConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? FrequencyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? IndicesOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor IndicesOptionsDescriptor { get; set; } - private Action IndicesOptionsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? JobIdValue { get; set; } - private int? MaxEmptySearchesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? QueryDelayValue { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private IDictionary ScriptFieldsValue { get; set; } - private int? ScrollSizeValue { get; set; } - - /// - /// - /// If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data. - /// - /// - public DatafeedConfigDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option. - /// - /// - public DatafeedConfigDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfig? chunkingConfig) - { - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigValue = chunkingConfig; - return Self; - } - - public DatafeedConfigDescriptor ChunkingConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor descriptor) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptorAction = null; - ChunkingConfigDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor ChunkingConfig(Action configure) - { - ChunkingConfigValue = null; - ChunkingConfigDescriptor = null; - ChunkingConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. The default value is the job identifier. - /// - /// - public DatafeedConfigDescriptor DatafeedId(Elastic.Clients.Elasticsearch.Serverless.Id? datafeedId) - { - DatafeedIdValue = datafeedId; - return Self; - } - - /// - /// - /// Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that the query_delay option is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds. - /// - /// - public DatafeedConfigDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfig? delayedDataCheckConfig) - { - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigValue = delayedDataCheckConfig; - return Self; - } - - public DatafeedConfigDescriptor DelayedDataCheckConfig(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor descriptor) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptorAction = null; - DelayedDataCheckConfigDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor DelayedDataCheckConfig(Action configure) - { - DelayedDataCheckConfigValue = null; - DelayedDataCheckConfigDescriptor = null; - DelayedDataCheckConfigDescriptorAction = configure; - return Self; - } - - /// - /// - /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation. - /// - /// - public DatafeedConfigDescriptor Frequency(Elastic.Clients.Elasticsearch.Serverless.Duration? frequency) - { - FrequencyValue = frequency; - return Self; - } - - /// - /// - /// An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the remote_cluster_client role. - /// - /// - public DatafeedConfigDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Specifies index expansion options that are used during search. - /// - /// - public DatafeedConfigDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptions? indicesOptions) - { - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsValue = indicesOptions; - return Self; - } - - public DatafeedConfigDescriptor IndicesOptions(Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor descriptor) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptorAction = null; - IndicesOptionsDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor IndicesOptions(Action configure) - { - IndicesOptionsValue = null; - IndicesOptionsDescriptor = null; - IndicesOptionsDescriptorAction = configure; - return Self; - } - - public DatafeedConfigDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) - { - JobIdValue = jobId; - return Self; - } - - /// - /// - /// If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after frequency times max_empty_searches of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped. - /// - /// - public DatafeedConfigDescriptor MaxEmptySearches(int? maxEmptySearches) - { - MaxEmptySearchesValue = maxEmptySearches; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. - /// - /// - public DatafeedConfigDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public DatafeedConfigDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public DatafeedConfigDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between 60s and 120s. This randomness improves the query performance when there are multiple jobs running on the same node. - /// - /// - public DatafeedConfigDescriptor QueryDelay(Elastic.Clients.Elasticsearch.Serverless.Duration? queryDelay) - { - QueryDelayValue = queryDelay; - return Self; - } - - /// - /// - /// Specifies runtime fields for the datafeed search. - /// - /// - public DatafeedConfigDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields. - /// - /// - public DatafeedConfigDescriptor ScriptFields(Func, FluentDescriptorDictionary> selector) - { - ScriptFieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of index.max_result_window, which is 10,000 by default. - /// - /// - public DatafeedConfigDescriptor ScrollSize(int? scrollSize) - { - ScrollSizeValue = scrollSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (ChunkingConfigDescriptor is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigDescriptor, options); - } - else if (ChunkingConfigDescriptorAction is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ChunkingConfigDescriptor(ChunkingConfigDescriptorAction), options); - } - else if (ChunkingConfigValue is not null) - { - writer.WritePropertyName("chunking_config"); - JsonSerializer.Serialize(writer, ChunkingConfigValue, options); - } - - if (DatafeedIdValue is not null) - { - writer.WritePropertyName("datafeed_id"); - JsonSerializer.Serialize(writer, DatafeedIdValue, options); - } - - if (DelayedDataCheckConfigDescriptor is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigDescriptor, options); - } - else if (DelayedDataCheckConfigDescriptorAction is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DelayedDataCheckConfigDescriptor(DelayedDataCheckConfigDescriptorAction), options); - } - else if (DelayedDataCheckConfigValue is not null) - { - writer.WritePropertyName("delayed_data_check_config"); - JsonSerializer.Serialize(writer, DelayedDataCheckConfigValue, options); - } - - if (FrequencyValue is not null) - { - writer.WritePropertyName("frequency"); - JsonSerializer.Serialize(writer, FrequencyValue, options); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (IndicesOptionsDescriptor is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsDescriptor, options); - } - else if (IndicesOptionsDescriptorAction is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndicesOptionsDescriptor(IndicesOptionsDescriptorAction), options); - } - else if (IndicesOptionsValue is not null) - { - writer.WritePropertyName("indices_options"); - JsonSerializer.Serialize(writer, IndicesOptionsValue, options); - } - - if (JobIdValue is not null) - { - writer.WritePropertyName("job_id"); - JsonSerializer.Serialize(writer, JobIdValue, options); - } - - if (MaxEmptySearchesValue.HasValue) - { - writer.WritePropertyName("max_empty_searches"); - writer.WriteNumberValue(MaxEmptySearchesValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (QueryDelayValue is not null) - { - writer.WritePropertyName("query_delay"); - JsonSerializer.Serialize(writer, QueryDelayValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (ScriptFieldsValue is not null) - { - writer.WritePropertyName("script_fields"); - JsonSerializer.Serialize(writer, ScriptFieldsValue, options); - } - - if (ScrollSizeValue.HasValue) - { - writer.WritePropertyName("scroll_size"); - writer.WriteNumberValue(ScrollSizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedRunningState.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedRunningState.g.cs deleted file mode 100644 index 5cf28e49c33..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedRunningState.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DatafeedRunningState -{ - /// - /// - /// Indicates if the datafeed is "real-time"; meaning that the datafeed has no configured end time. - /// - /// - [JsonInclude, JsonPropertyName("real_time_configured")] - public bool RealTimeConfigured { get; init; } - - /// - /// - /// Indicates whether the datafeed has finished running on the available past data. - /// For datafeeds without a configured end time, this means that the datafeed is now running on "real-time" data. - /// - /// - [JsonInclude, JsonPropertyName("real_time_running")] - public bool RealTimeRunning { get; init; } - - /// - /// - /// Provides the latest time interval the datafeed has searched. - /// - /// - [JsonInclude, JsonPropertyName("search_interval")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RunningStateSearchInterval? SearchInterval { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedStats.g.cs deleted file mode 100644 index 312f0051f07..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedStats.g.cs +++ /dev/null @@ -1,74 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DatafeedStats -{ - /// - /// - /// For started datafeeds only, contains messages relating to the selection of a node. - /// - /// - [JsonInclude, JsonPropertyName("assignment_explanation")] - public string? AssignmentExplanation { get; init; } - - /// - /// - /// A numerical character string that uniquely identifies the datafeed. - /// This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. - /// It must start and end with alphanumeric characters. - /// - /// - [JsonInclude, JsonPropertyName("datafeed_id")] - public string DatafeedId { get; init; } - - /// - /// - /// An object containing the running state for this datafeed. - /// It is only provided if the datafeed is started. - /// - /// - [JsonInclude, JsonPropertyName("running_state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedRunningState? RunningState { get; init; } - - /// - /// - /// The status of the datafeed, which can be one of the following values: starting, started, stopping, stopped. - /// - /// - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedState State { get; init; } - - /// - /// - /// An object that provides statistical information about timing aspect of this datafeed. - /// - /// - [JsonInclude, JsonPropertyName("timing_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DatafeedTimingStats? TimingStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs deleted file mode 100644 index fedc96d9873..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DatafeedTimingStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DatafeedTimingStats -{ - /// - /// - /// The average search time per bucket, in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("average_search_time_per_bucket_ms")] - public double? AverageSearchTimePerBucketMs { get; init; } - - /// - /// - /// The number of buckets processed. - /// - /// - [JsonInclude, JsonPropertyName("bucket_count")] - public long BucketCount { get; init; } - [JsonInclude, JsonPropertyName("exponential_average_calculation_context")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExponentialAverageCalculationContext? ExponentialAverageCalculationContext { get; init; } - - /// - /// - /// The exponential average search time per hour, in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("exponential_average_search_time_per_hour_ms")] - public double ExponentialAverageSearchTimePerHourMs { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The number of searches run by the datafeed. - /// - /// - [JsonInclude, JsonPropertyName("search_count")] - public long SearchCount { get; init; } - - /// - /// - /// The total time the datafeed spent searching, in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("total_search_time_ms")] - public double TotalSearchTimeMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeeds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeeds.g.cs deleted file mode 100644 index 58cedc1b910..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Datafeeds.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Datafeeds -{ - [JsonInclude, JsonPropertyName("scroll_size")] - public int ScrollSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysis.g.cs deleted file mode 100644 index e6b6480fc24..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysis.g.cs +++ /dev/null @@ -1,257 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -[JsonConverter(typeof(DataframeAnalysisConverter))] -public sealed partial class DataframeAnalysis -{ - internal DataframeAnalysis(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 DataframeAnalysis Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisClassification dataframeAnalysisClassification) => new DataframeAnalysis("classification", dataframeAnalysisClassification); - public static DataframeAnalysis OutlierDetection(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisOutlierDetection dataframeAnalysisOutlierDetection) => new DataframeAnalysis("outlier_detection", dataframeAnalysisOutlierDetection); - public static DataframeAnalysis Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisRegression dataframeAnalysisRegression) => new DataframeAnalysis("regression", dataframeAnalysisRegression); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class DataframeAnalysisConverter : JsonConverter -{ - public override DataframeAnalysis 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; - 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 == "classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "outlier_detection") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regression") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'DataframeAnalysis' from the response."); - } - - var result = new DataframeAnalysis(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, DataframeAnalysis value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisClassification)value.Variant, options); - break; - case "outlier_detection": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisOutlierDetection)value.Variant, options); - break; - case "regression": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisRegression)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DataframeAnalysisDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DataframeAnalysisDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public DataframeAnalysisDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisClassification dataframeAnalysisClassification) => Set(dataframeAnalysisClassification, "classification"); - public DataframeAnalysisDescriptor Classification(Action> configure) => Set(configure, "classification"); - public DataframeAnalysisDescriptor OutlierDetection(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisOutlierDetection dataframeAnalysisOutlierDetection) => Set(dataframeAnalysisOutlierDetection, "outlier_detection"); - public DataframeAnalysisDescriptor OutlierDetection(Action configure) => Set(configure, "outlier_detection"); - public DataframeAnalysisDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisRegression dataframeAnalysisRegression) => Set(dataframeAnalysisRegression, "regression"); - public DataframeAnalysisDescriptor Regression(Action> configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DataframeAnalysisDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DataframeAnalysisDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public DataframeAnalysisDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisClassification dataframeAnalysisClassification) => Set(dataframeAnalysisClassification, "classification"); - public DataframeAnalysisDescriptor Classification(Action configure) => Set(configure, "classification"); - public DataframeAnalysisDescriptor OutlierDetection(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisOutlierDetection dataframeAnalysisOutlierDetection) => Set(dataframeAnalysisOutlierDetection, "outlier_detection"); - public DataframeAnalysisDescriptor OutlierDetection(Action configure) => Set(configure, "outlier_detection"); - public DataframeAnalysisDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisRegression dataframeAnalysisRegression) => Set(dataframeAnalysisRegression, "regression"); - public DataframeAnalysisDescriptor Regression(Action configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs deleted file mode 100644 index c4ec45eaae3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisAnalyzedFields -{ - /// - /// - /// An array of strings that defines the fields that will be included in the analysis. - /// - /// - [JsonInclude, JsonPropertyName("excludes")] - public ICollection Excludes { get; set; } - - /// - /// - /// An array of strings that defines the fields that will be excluded from the analysis. You do not need to add fields with unsupported data types to excludes, these fields are excluded from the analysis automatically. - /// - /// - [JsonInclude, JsonPropertyName("includes")] - public ICollection Includes { get; set; } -} - -public sealed partial class DataframeAnalysisAnalyzedFieldsDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisAnalyzedFieldsDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisAnalyzedFieldsDescriptor() : base() - { - } - - private ICollection ExcludesValue { get; set; } - private ICollection IncludesValue { get; set; } - - /// - /// - /// An array of strings that defines the fields that will be included in the analysis. - /// - /// - public DataframeAnalysisAnalyzedFieldsDescriptor Excludes(ICollection excludes) - { - ExcludesValue = excludes; - return Self; - } - - /// - /// - /// An array of strings that defines the fields that will be excluded from the analysis. You do not need to add fields with unsupported data types to excludes, these fields are excluded from the analysis automatically. - /// - /// - public DataframeAnalysisAnalyzedFieldsDescriptor Includes(ICollection includes) - { - IncludesValue = includes; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("excludes"); - JsonSerializer.Serialize(writer, ExcludesValue, options); - writer.WritePropertyName("includes"); - JsonSerializer.Serialize(writer, IncludesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs deleted file mode 100644 index 812e24662e2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs +++ /dev/null @@ -1,1328 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -internal sealed partial class DataframeAnalysisClassificationConverter : JsonConverter -{ - public override DataframeAnalysisClassification Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new DataframeAnalysisClassification(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "alpha") - { - variant.Alpha = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "class_assignment_objective") - { - variant.ClassAssignmentObjective = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "dependent_variable") - { - variant.DependentVariable = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "downsample_factor") - { - variant.DownsampleFactor = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "early_stopping_enabled") - { - variant.EarlyStoppingEnabled = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "eta") - { - variant.Eta = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "eta_growth_rate_per_tree") - { - variant.EtaGrowthRatePerTree = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "feature_bag_fraction") - { - variant.FeatureBagFraction = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "feature_processors") - { - variant.FeatureProcessors = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "gamma") - { - variant.Gamma = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lambda") - { - variant.Lambda = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_optimization_rounds_per_hyperparameter") - { - variant.MaxOptimizationRoundsPerHyperparameter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_trees" || property == "maximum_number_trees") - { - variant.MaxTrees = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "num_top_classes") - { - variant.NumTopClasses = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "num_top_feature_importance_values") - { - variant.NumTopFeatureImportanceValues = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "prediction_field_name") - { - variant.PredictionFieldName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "randomize_seed") - { - variant.RandomizeSeed = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "soft_tree_depth_limit") - { - variant.SoftTreeDepthLimit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "soft_tree_depth_tolerance") - { - variant.SoftTreeDepthTolerance = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "training_percent") - { - variant.TrainingPercent = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, DataframeAnalysisClassification value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Alpha.HasValue) - { - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(value.Alpha.Value); - } - - if (!string.IsNullOrEmpty(value.ClassAssignmentObjective)) - { - writer.WritePropertyName("class_assignment_objective"); - writer.WriteStringValue(value.ClassAssignmentObjective); - } - - writer.WritePropertyName("dependent_variable"); - writer.WriteStringValue(value.DependentVariable); - if (value.DownsampleFactor.HasValue) - { - writer.WritePropertyName("downsample_factor"); - writer.WriteNumberValue(value.DownsampleFactor.Value); - } - - if (value.EarlyStoppingEnabled.HasValue) - { - writer.WritePropertyName("early_stopping_enabled"); - writer.WriteBooleanValue(value.EarlyStoppingEnabled.Value); - } - - if (value.Eta.HasValue) - { - writer.WritePropertyName("eta"); - writer.WriteNumberValue(value.Eta.Value); - } - - if (value.EtaGrowthRatePerTree.HasValue) - { - writer.WritePropertyName("eta_growth_rate_per_tree"); - writer.WriteNumberValue(value.EtaGrowthRatePerTree.Value); - } - - if (value.FeatureBagFraction.HasValue) - { - writer.WritePropertyName("feature_bag_fraction"); - writer.WriteNumberValue(value.FeatureBagFraction.Value); - } - - if (value.FeatureProcessors is not null) - { - writer.WritePropertyName("feature_processors"); - JsonSerializer.Serialize(writer, value.FeatureProcessors, options); - } - - if (value.Gamma.HasValue) - { - writer.WritePropertyName("gamma"); - writer.WriteNumberValue(value.Gamma.Value); - } - - if (value.Lambda.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(value.Lambda.Value); - } - - if (value.MaxOptimizationRoundsPerHyperparameter.HasValue) - { - writer.WritePropertyName("max_optimization_rounds_per_hyperparameter"); - writer.WriteNumberValue(value.MaxOptimizationRoundsPerHyperparameter.Value); - } - - if (value.MaxTrees.HasValue) - { - writer.WritePropertyName("max_trees"); - writer.WriteNumberValue(value.MaxTrees.Value); - } - - if (value.NumTopClasses.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(value.NumTopClasses.Value); - } - - if (value.NumTopFeatureImportanceValues.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(value.NumTopFeatureImportanceValues.Value); - } - - if (value.PredictionFieldName is not null) - { - writer.WritePropertyName("prediction_field_name"); - JsonSerializer.Serialize(writer, value.PredictionFieldName, options); - } - - if (value.RandomizeSeed.HasValue) - { - writer.WritePropertyName("randomize_seed"); - writer.WriteNumberValue(value.RandomizeSeed.Value); - } - - if (value.SoftTreeDepthLimit.HasValue) - { - writer.WritePropertyName("soft_tree_depth_limit"); - writer.WriteNumberValue(value.SoftTreeDepthLimit.Value); - } - - if (value.SoftTreeDepthTolerance.HasValue) - { - writer.WritePropertyName("soft_tree_depth_tolerance"); - writer.WriteNumberValue(value.SoftTreeDepthTolerance.Value); - } - - if (value.TrainingPercent.HasValue) - { - writer.WritePropertyName("training_percent"); - writer.WriteNumberValue(value.TrainingPercent.Value); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(DataframeAnalysisClassificationConverter))] -public sealed partial class DataframeAnalysisClassification -{ - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero. - /// - /// - public double? Alpha { get; set; } - public string? ClassAssignmentObjective { get; set; } - - /// - /// - /// Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable. - /// For classification analysis, the data type of the field must be numeric (integer, short, long, byte), categorical (ip or keyword), or boolean. There must be no more than 30 different values in this field. - /// For regression analysis, the data type of the field must be numeric. - /// - /// - public string DependentVariable { get; set; } - - /// - /// - /// Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1. - /// - /// - public double? DownsampleFactor { get; set; } - - /// - /// - /// Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable. - /// - /// - public bool? EarlyStoppingEnabled { get; set; } - - /// - /// - /// Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1. - /// - /// - public double? Eta { get; set; } - - /// - /// - /// Advanced configuration option. Specifies the rate at which eta increases for each new tree that is added to the forest. For example, a rate of 1.05 increases eta by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2. - /// - /// - public double? EtaGrowthRatePerTree { get; set; } - - /// - /// - /// Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization. - /// - /// - public double? FeatureBagFraction { get; set; } - - /// - /// - /// Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple feature_processors entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields. - /// - /// - public ICollection? FeatureProcessors { get; set; } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public double? Gamma { get; set; } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public double? Lambda { get; set; } - - /// - /// - /// Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization. - /// - /// - public int? MaxOptimizationRoundsPerHyperparameter { get; set; } - - /// - /// - /// Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization. - /// - /// - public int? MaxTrees { get; set; } - - /// - /// - /// Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, num_top_classes must be set to -1 or a value greater than or equal to the total number of categories. - /// - /// - public int? NumTopClasses { get; set; } - - /// - /// - /// Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs. - /// - /// - public int? NumTopFeatureImportanceValues { get; set; } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Field? PredictionFieldName { get; set; } - - /// - /// - /// Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as source and analyzed_fields are the same). - /// - /// - public double? RandomizeSeed { get; set; } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the soft_tree_depth_tolerance to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0. - /// - /// - public int? SoftTreeDepthLimit { get; set; } - - /// - /// - /// Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds soft_tree_depth_limit. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01. - /// - /// - public double? SoftTreeDepthTolerance { get; set; } - - /// - /// - /// Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage. - /// - /// - public double? TrainingPercent { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis(DataframeAnalysisClassification dataframeAnalysisClassification) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis.Classification(dataframeAnalysisClassification); -} - -public sealed partial class DataframeAnalysisClassificationDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisClassificationDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisClassificationDescriptor() : base() - { - } - - private double? AlphaValue { get; set; } - private string? ClassAssignmentObjectiveValue { get; set; } - private string DependentVariableValue { get; set; } - private double? DownsampleFactorValue { get; set; } - private bool? EarlyStoppingEnabledValue { get; set; } - private double? EtaValue { get; set; } - private double? EtaGrowthRatePerTreeValue { get; set; } - private double? FeatureBagFractionValue { get; set; } - private ICollection? FeatureProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor FeatureProcessorsDescriptor { get; set; } - private Action> FeatureProcessorsDescriptorAction { get; set; } - private Action>[] FeatureProcessorsDescriptorActions { get; set; } - private double? GammaValue { get; set; } - private double? LambdaValue { get; set; } - private int? MaxOptimizationRoundsPerHyperparameterValue { get; set; } - private int? MaxTreesValue { get; set; } - private int? NumTopClassesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PredictionFieldNameValue { get; set; } - private double? RandomizeSeedValue { get; set; } - private int? SoftTreeDepthLimitValue { get; set; } - private double? SoftTreeDepthToleranceValue { get; set; } - private double? TrainingPercentValue { get; set; } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero. - /// - /// - public DataframeAnalysisClassificationDescriptor Alpha(double? alpha) - { - AlphaValue = alpha; - return Self; - } - - public DataframeAnalysisClassificationDescriptor ClassAssignmentObjective(string? classAssignmentObjective) - { - ClassAssignmentObjectiveValue = classAssignmentObjective; - return Self; - } - - /// - /// - /// Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable. - /// For classification analysis, the data type of the field must be numeric (integer, short, long, byte), categorical (ip or keyword), or boolean. There must be no more than 30 different values in this field. - /// For regression analysis, the data type of the field must be numeric. - /// - /// - public DataframeAnalysisClassificationDescriptor DependentVariable(string dependentVariable) - { - DependentVariableValue = dependentVariable; - return Self; - } - - /// - /// - /// Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1. - /// - /// - public DataframeAnalysisClassificationDescriptor DownsampleFactor(double? downsampleFactor) - { - DownsampleFactorValue = downsampleFactor; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable. - /// - /// - public DataframeAnalysisClassificationDescriptor EarlyStoppingEnabled(bool? earlyStoppingEnabled = true) - { - EarlyStoppingEnabledValue = earlyStoppingEnabled; - return Self; - } - - /// - /// - /// Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1. - /// - /// - public DataframeAnalysisClassificationDescriptor Eta(double? eta) - { - EtaValue = eta; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the rate at which eta increases for each new tree that is added to the forest. For example, a rate of 1.05 increases eta by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2. - /// - /// - public DataframeAnalysisClassificationDescriptor EtaGrowthRatePerTree(double? etaGrowthRatePerTree) - { - EtaGrowthRatePerTreeValue = etaGrowthRatePerTree; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisClassificationDescriptor FeatureBagFraction(double? featureBagFraction) - { - FeatureBagFractionValue = featureBagFraction; - return Self; - } - - /// - /// - /// Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple feature_processors entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields. - /// - /// - public DataframeAnalysisClassificationDescriptor FeatureProcessors(ICollection? featureProcessors) - { - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsValue = featureProcessors; - return Self; - } - - public DataframeAnalysisClassificationDescriptor FeatureProcessors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor descriptor) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptor = descriptor; - return Self; - } - - public DataframeAnalysisClassificationDescriptor FeatureProcessors(Action> configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptorAction = configure; - return Self; - } - - public DataframeAnalysisClassificationDescriptor FeatureProcessors(params Action>[] configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisClassificationDescriptor Gamma(double? gamma) - { - GammaValue = gamma; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisClassificationDescriptor Lambda(double? lambda) - { - LambdaValue = lambda; - return Self; - } - - /// - /// - /// Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisClassificationDescriptor MaxOptimizationRoundsPerHyperparameter(int? maxOptimizationRoundsPerHyperparameter) - { - MaxOptimizationRoundsPerHyperparameterValue = maxOptimizationRoundsPerHyperparameter; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisClassificationDescriptor MaxTrees(int? maxTrees) - { - MaxTreesValue = maxTrees; - return Self; - } - - /// - /// - /// Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, num_top_classes must be set to -1 or a value greater than or equal to the total number of categories. - /// - /// - public DataframeAnalysisClassificationDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs. - /// - /// - public DataframeAnalysisClassificationDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisClassificationDescriptor PredictionFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisClassificationDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisClassificationDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as source and analyzed_fields are the same). - /// - /// - public DataframeAnalysisClassificationDescriptor RandomizeSeed(double? randomizeSeed) - { - RandomizeSeedValue = randomizeSeed; - return Self; - } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the soft_tree_depth_tolerance to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0. - /// - /// - public DataframeAnalysisClassificationDescriptor SoftTreeDepthLimit(int? softTreeDepthLimit) - { - SoftTreeDepthLimitValue = softTreeDepthLimit; - return Self; - } - - /// - /// - /// Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds soft_tree_depth_limit. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01. - /// - /// - public DataframeAnalysisClassificationDescriptor SoftTreeDepthTolerance(double? softTreeDepthTolerance) - { - SoftTreeDepthToleranceValue = softTreeDepthTolerance; - return Self; - } - - /// - /// - /// Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage. - /// - /// - public DataframeAnalysisClassificationDescriptor TrainingPercent(double? trainingPercent) - { - TrainingPercentValue = trainingPercent; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlphaValue.HasValue) - { - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(AlphaValue.Value); - } - - if (!string.IsNullOrEmpty(ClassAssignmentObjectiveValue)) - { - writer.WritePropertyName("class_assignment_objective"); - writer.WriteStringValue(ClassAssignmentObjectiveValue); - } - - writer.WritePropertyName("dependent_variable"); - writer.WriteStringValue(DependentVariableValue); - if (DownsampleFactorValue.HasValue) - { - writer.WritePropertyName("downsample_factor"); - writer.WriteNumberValue(DownsampleFactorValue.Value); - } - - if (EarlyStoppingEnabledValue.HasValue) - { - writer.WritePropertyName("early_stopping_enabled"); - writer.WriteBooleanValue(EarlyStoppingEnabledValue.Value); - } - - if (EtaValue.HasValue) - { - writer.WritePropertyName("eta"); - writer.WriteNumberValue(EtaValue.Value); - } - - if (EtaGrowthRatePerTreeValue.HasValue) - { - writer.WritePropertyName("eta_growth_rate_per_tree"); - writer.WriteNumberValue(EtaGrowthRatePerTreeValue.Value); - } - - if (FeatureBagFractionValue.HasValue) - { - writer.WritePropertyName("feature_bag_fraction"); - writer.WriteNumberValue(FeatureBagFractionValue.Value); - } - - if (FeatureProcessorsDescriptor is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FeatureProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(FeatureProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - foreach (var action in FeatureProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FeatureProcessorsValue is not null) - { - writer.WritePropertyName("feature_processors"); - JsonSerializer.Serialize(writer, FeatureProcessorsValue, options); - } - - if (GammaValue.HasValue) - { - writer.WritePropertyName("gamma"); - writer.WriteNumberValue(GammaValue.Value); - } - - if (LambdaValue.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(LambdaValue.Value); - } - - if (MaxOptimizationRoundsPerHyperparameterValue.HasValue) - { - writer.WritePropertyName("max_optimization_rounds_per_hyperparameter"); - writer.WriteNumberValue(MaxOptimizationRoundsPerHyperparameterValue.Value); - } - - if (MaxTreesValue.HasValue) - { - writer.WritePropertyName("max_trees"); - writer.WriteNumberValue(MaxTreesValue.Value); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (PredictionFieldNameValue is not null) - { - writer.WritePropertyName("prediction_field_name"); - JsonSerializer.Serialize(writer, PredictionFieldNameValue, options); - } - - if (RandomizeSeedValue.HasValue) - { - writer.WritePropertyName("randomize_seed"); - writer.WriteNumberValue(RandomizeSeedValue.Value); - } - - if (SoftTreeDepthLimitValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_limit"); - writer.WriteNumberValue(SoftTreeDepthLimitValue.Value); - } - - if (SoftTreeDepthToleranceValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_tolerance"); - writer.WriteNumberValue(SoftTreeDepthToleranceValue.Value); - } - - if (TrainingPercentValue.HasValue) - { - writer.WritePropertyName("training_percent"); - writer.WriteNumberValue(TrainingPercentValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisClassificationDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisClassificationDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisClassificationDescriptor() : base() - { - } - - private double? AlphaValue { get; set; } - private string? ClassAssignmentObjectiveValue { get; set; } - private string DependentVariableValue { get; set; } - private double? DownsampleFactorValue { get; set; } - private bool? EarlyStoppingEnabledValue { get; set; } - private double? EtaValue { get; set; } - private double? EtaGrowthRatePerTreeValue { get; set; } - private double? FeatureBagFractionValue { get; set; } - private ICollection? FeatureProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor FeatureProcessorsDescriptor { get; set; } - private Action FeatureProcessorsDescriptorAction { get; set; } - private Action[] FeatureProcessorsDescriptorActions { get; set; } - private double? GammaValue { get; set; } - private double? LambdaValue { get; set; } - private int? MaxOptimizationRoundsPerHyperparameterValue { get; set; } - private int? MaxTreesValue { get; set; } - private int? NumTopClassesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PredictionFieldNameValue { get; set; } - private double? RandomizeSeedValue { get; set; } - private int? SoftTreeDepthLimitValue { get; set; } - private double? SoftTreeDepthToleranceValue { get; set; } - private double? TrainingPercentValue { get; set; } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero. - /// - /// - public DataframeAnalysisClassificationDescriptor Alpha(double? alpha) - { - AlphaValue = alpha; - return Self; - } - - public DataframeAnalysisClassificationDescriptor ClassAssignmentObjective(string? classAssignmentObjective) - { - ClassAssignmentObjectiveValue = classAssignmentObjective; - return Self; - } - - /// - /// - /// Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable. - /// For classification analysis, the data type of the field must be numeric (integer, short, long, byte), categorical (ip or keyword), or boolean. There must be no more than 30 different values in this field. - /// For regression analysis, the data type of the field must be numeric. - /// - /// - public DataframeAnalysisClassificationDescriptor DependentVariable(string dependentVariable) - { - DependentVariableValue = dependentVariable; - return Self; - } - - /// - /// - /// Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1. - /// - /// - public DataframeAnalysisClassificationDescriptor DownsampleFactor(double? downsampleFactor) - { - DownsampleFactorValue = downsampleFactor; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable. - /// - /// - public DataframeAnalysisClassificationDescriptor EarlyStoppingEnabled(bool? earlyStoppingEnabled = true) - { - EarlyStoppingEnabledValue = earlyStoppingEnabled; - return Self; - } - - /// - /// - /// Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1. - /// - /// - public DataframeAnalysisClassificationDescriptor Eta(double? eta) - { - EtaValue = eta; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the rate at which eta increases for each new tree that is added to the forest. For example, a rate of 1.05 increases eta by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2. - /// - /// - public DataframeAnalysisClassificationDescriptor EtaGrowthRatePerTree(double? etaGrowthRatePerTree) - { - EtaGrowthRatePerTreeValue = etaGrowthRatePerTree; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisClassificationDescriptor FeatureBagFraction(double? featureBagFraction) - { - FeatureBagFractionValue = featureBagFraction; - return Self; - } - - /// - /// - /// Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple feature_processors entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields. - /// - /// - public DataframeAnalysisClassificationDescriptor FeatureProcessors(ICollection? featureProcessors) - { - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsValue = featureProcessors; - return Self; - } - - public DataframeAnalysisClassificationDescriptor FeatureProcessors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor descriptor) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptor = descriptor; - return Self; - } - - public DataframeAnalysisClassificationDescriptor FeatureProcessors(Action configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptorAction = configure; - return Self; - } - - public DataframeAnalysisClassificationDescriptor FeatureProcessors(params Action[] configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisClassificationDescriptor Gamma(double? gamma) - { - GammaValue = gamma; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisClassificationDescriptor Lambda(double? lambda) - { - LambdaValue = lambda; - return Self; - } - - /// - /// - /// Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisClassificationDescriptor MaxOptimizationRoundsPerHyperparameter(int? maxOptimizationRoundsPerHyperparameter) - { - MaxOptimizationRoundsPerHyperparameterValue = maxOptimizationRoundsPerHyperparameter; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisClassificationDescriptor MaxTrees(int? maxTrees) - { - MaxTreesValue = maxTrees; - return Self; - } - - /// - /// - /// Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, num_top_classes must be set to -1 or a value greater than or equal to the total number of categories. - /// - /// - public DataframeAnalysisClassificationDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs. - /// - /// - public DataframeAnalysisClassificationDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisClassificationDescriptor PredictionFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisClassificationDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisClassificationDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as source and analyzed_fields are the same). - /// - /// - public DataframeAnalysisClassificationDescriptor RandomizeSeed(double? randomizeSeed) - { - RandomizeSeedValue = randomizeSeed; - return Self; - } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the soft_tree_depth_tolerance to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0. - /// - /// - public DataframeAnalysisClassificationDescriptor SoftTreeDepthLimit(int? softTreeDepthLimit) - { - SoftTreeDepthLimitValue = softTreeDepthLimit; - return Self; - } - - /// - /// - /// Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds soft_tree_depth_limit. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01. - /// - /// - public DataframeAnalysisClassificationDescriptor SoftTreeDepthTolerance(double? softTreeDepthTolerance) - { - SoftTreeDepthToleranceValue = softTreeDepthTolerance; - return Self; - } - - /// - /// - /// Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage. - /// - /// - public DataframeAnalysisClassificationDescriptor TrainingPercent(double? trainingPercent) - { - TrainingPercentValue = trainingPercent; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlphaValue.HasValue) - { - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(AlphaValue.Value); - } - - if (!string.IsNullOrEmpty(ClassAssignmentObjectiveValue)) - { - writer.WritePropertyName("class_assignment_objective"); - writer.WriteStringValue(ClassAssignmentObjectiveValue); - } - - writer.WritePropertyName("dependent_variable"); - writer.WriteStringValue(DependentVariableValue); - if (DownsampleFactorValue.HasValue) - { - writer.WritePropertyName("downsample_factor"); - writer.WriteNumberValue(DownsampleFactorValue.Value); - } - - if (EarlyStoppingEnabledValue.HasValue) - { - writer.WritePropertyName("early_stopping_enabled"); - writer.WriteBooleanValue(EarlyStoppingEnabledValue.Value); - } - - if (EtaValue.HasValue) - { - writer.WritePropertyName("eta"); - writer.WriteNumberValue(EtaValue.Value); - } - - if (EtaGrowthRatePerTreeValue.HasValue) - { - writer.WritePropertyName("eta_growth_rate_per_tree"); - writer.WriteNumberValue(EtaGrowthRatePerTreeValue.Value); - } - - if (FeatureBagFractionValue.HasValue) - { - writer.WritePropertyName("feature_bag_fraction"); - writer.WriteNumberValue(FeatureBagFractionValue.Value); - } - - if (FeatureProcessorsDescriptor is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FeatureProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(FeatureProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - foreach (var action in FeatureProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FeatureProcessorsValue is not null) - { - writer.WritePropertyName("feature_processors"); - JsonSerializer.Serialize(writer, FeatureProcessorsValue, options); - } - - if (GammaValue.HasValue) - { - writer.WritePropertyName("gamma"); - writer.WriteNumberValue(GammaValue.Value); - } - - if (LambdaValue.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(LambdaValue.Value); - } - - if (MaxOptimizationRoundsPerHyperparameterValue.HasValue) - { - writer.WritePropertyName("max_optimization_rounds_per_hyperparameter"); - writer.WriteNumberValue(MaxOptimizationRoundsPerHyperparameterValue.Value); - } - - if (MaxTreesValue.HasValue) - { - writer.WritePropertyName("max_trees"); - writer.WriteNumberValue(MaxTreesValue.Value); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (PredictionFieldNameValue is not null) - { - writer.WritePropertyName("prediction_field_name"); - JsonSerializer.Serialize(writer, PredictionFieldNameValue, options); - } - - if (RandomizeSeedValue.HasValue) - { - writer.WritePropertyName("randomize_seed"); - writer.WriteNumberValue(RandomizeSeedValue.Value); - } - - if (SoftTreeDepthLimitValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_limit"); - writer.WriteNumberValue(SoftTreeDepthLimitValue.Value); - } - - if (SoftTreeDepthToleranceValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_tolerance"); - writer.WriteNumberValue(SoftTreeDepthToleranceValue.Value); - } - - if (TrainingPercentValue.HasValue) - { - writer.WritePropertyName("training_percent"); - writer.WriteNumberValue(TrainingPercentValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessor.g.cs deleted file mode 100644 index f9be4f3ac82..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessor.g.cs +++ /dev/null @@ -1,287 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -[JsonConverter(typeof(DataframeAnalysisFeatureProcessorConverter))] -public sealed partial class DataframeAnalysisFeatureProcessor -{ - internal DataframeAnalysisFeatureProcessor(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 DataframeAnalysisFeatureProcessor FrequencyEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorFrequencyEncoding dataframeAnalysisFeatureProcessorFrequencyEncoding) => new DataframeAnalysisFeatureProcessor("frequency_encoding", dataframeAnalysisFeatureProcessorFrequencyEncoding); - public static DataframeAnalysisFeatureProcessor MultiEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorMultiEncoding dataframeAnalysisFeatureProcessorMultiEncoding) => new DataframeAnalysisFeatureProcessor("multi_encoding", dataframeAnalysisFeatureProcessorMultiEncoding); - public static DataframeAnalysisFeatureProcessor NGramEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorNGramEncoding dataframeAnalysisFeatureProcessorNGramEncoding) => new DataframeAnalysisFeatureProcessor("n_gram_encoding", dataframeAnalysisFeatureProcessorNGramEncoding); - public static DataframeAnalysisFeatureProcessor OneHotEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorOneHotEncoding dataframeAnalysisFeatureProcessorOneHotEncoding) => new DataframeAnalysisFeatureProcessor("one_hot_encoding", dataframeAnalysisFeatureProcessorOneHotEncoding); - public static DataframeAnalysisFeatureProcessor TargetMeanEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorTargetMeanEncoding dataframeAnalysisFeatureProcessorTargetMeanEncoding) => new DataframeAnalysisFeatureProcessor("target_mean_encoding", dataframeAnalysisFeatureProcessorTargetMeanEncoding); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class DataframeAnalysisFeatureProcessorConverter : JsonConverter -{ - public override DataframeAnalysisFeatureProcessor 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; - 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 == "frequency_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "multi_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "n_gram_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "one_hot_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "target_mean_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'DataframeAnalysisFeatureProcessor' from the response."); - } - - var result = new DataframeAnalysisFeatureProcessor(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, DataframeAnalysisFeatureProcessor value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "frequency_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorFrequencyEncoding)value.Variant, options); - break; - case "multi_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorMultiEncoding)value.Variant, options); - break; - case "n_gram_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorNGramEncoding)value.Variant, options); - break; - case "one_hot_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorOneHotEncoding)value.Variant, options); - break; - case "target_mean_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorTargetMeanEncoding)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisFeatureProcessorDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisFeatureProcessorDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DataframeAnalysisFeatureProcessorDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DataframeAnalysisFeatureProcessorDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public DataframeAnalysisFeatureProcessorDescriptor FrequencyEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorFrequencyEncoding dataframeAnalysisFeatureProcessorFrequencyEncoding) => Set(dataframeAnalysisFeatureProcessorFrequencyEncoding, "frequency_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor FrequencyEncoding(Action> configure) => Set(configure, "frequency_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor MultiEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorMultiEncoding dataframeAnalysisFeatureProcessorMultiEncoding) => Set(dataframeAnalysisFeatureProcessorMultiEncoding, "multi_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor MultiEncoding(Action configure) => Set(configure, "multi_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor NGramEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorNGramEncoding dataframeAnalysisFeatureProcessorNGramEncoding) => Set(dataframeAnalysisFeatureProcessorNGramEncoding, "n_gram_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor NGramEncoding(Action> configure) => Set(configure, "n_gram_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor OneHotEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorOneHotEncoding dataframeAnalysisFeatureProcessorOneHotEncoding) => Set(dataframeAnalysisFeatureProcessorOneHotEncoding, "one_hot_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor OneHotEncoding(Action> configure) => Set(configure, "one_hot_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor TargetMeanEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorTargetMeanEncoding dataframeAnalysisFeatureProcessorTargetMeanEncoding) => Set(dataframeAnalysisFeatureProcessorTargetMeanEncoding, "target_mean_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor TargetMeanEncoding(Action> configure) => Set(configure, "target_mean_encoding"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisFeatureProcessorDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisFeatureProcessorDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DataframeAnalysisFeatureProcessorDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DataframeAnalysisFeatureProcessorDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public DataframeAnalysisFeatureProcessorDescriptor FrequencyEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorFrequencyEncoding dataframeAnalysisFeatureProcessorFrequencyEncoding) => Set(dataframeAnalysisFeatureProcessorFrequencyEncoding, "frequency_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor FrequencyEncoding(Action configure) => Set(configure, "frequency_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor MultiEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorMultiEncoding dataframeAnalysisFeatureProcessorMultiEncoding) => Set(dataframeAnalysisFeatureProcessorMultiEncoding, "multi_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor MultiEncoding(Action configure) => Set(configure, "multi_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor NGramEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorNGramEncoding dataframeAnalysisFeatureProcessorNGramEncoding) => Set(dataframeAnalysisFeatureProcessorNGramEncoding, "n_gram_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor NGramEncoding(Action configure) => Set(configure, "n_gram_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor OneHotEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorOneHotEncoding dataframeAnalysisFeatureProcessorOneHotEncoding) => Set(dataframeAnalysisFeatureProcessorOneHotEncoding, "one_hot_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor OneHotEncoding(Action configure) => Set(configure, "one_hot_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor TargetMeanEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorTargetMeanEncoding dataframeAnalysisFeatureProcessorTargetMeanEncoding) => Set(dataframeAnalysisFeatureProcessorTargetMeanEncoding, "target_mean_encoding"); - public DataframeAnalysisFeatureProcessorDescriptor TargetMeanEncoding(Action configure) => Set(configure, "target_mean_encoding"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorFrequencyEncoding.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorFrequencyEncoding.g.cs deleted file mode 100644 index 77877ebd80b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorFrequencyEncoding.g.cs +++ /dev/null @@ -1,181 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisFeatureProcessorFrequencyEncoding -{ - /// - /// - /// The resulting feature name. - /// - /// - [JsonInclude, JsonPropertyName("feature_name")] - public Elastic.Clients.Elasticsearch.Serverless.Name FeatureName { get; set; } - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The resulting frequency map for the field value. If the field value is missing from the frequency_map, the resulting value is 0. - /// - /// - [JsonInclude, JsonPropertyName("frequency_map")] - public IDictionary FrequencyMap { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor(DataframeAnalysisFeatureProcessorFrequencyEncoding dataframeAnalysisFeatureProcessorFrequencyEncoding) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor.FrequencyEncoding(dataframeAnalysisFeatureProcessorFrequencyEncoding); -} - -public sealed partial class DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Name FeatureNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private IDictionary FrequencyMapValue { get; set; } - - /// - /// - /// The resulting feature name. - /// - /// - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor FeatureName(Elastic.Clients.Elasticsearch.Serverless.Name featureName) - { - FeatureNameValue = featureName; - return Self; - } - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The resulting frequency map for the field value. If the field value is missing from the frequency_map, the resulting value is 0. - /// - /// - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor FrequencyMap(Func, FluentDictionary> selector) - { - FrequencyMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("feature_name"); - JsonSerializer.Serialize(writer, FeatureNameValue, options); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("frequency_map"); - JsonSerializer.Serialize(writer, FrequencyMapValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Name FeatureNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private IDictionary FrequencyMapValue { get; set; } - - /// - /// - /// The resulting feature name. - /// - /// - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor FeatureName(Elastic.Clients.Elasticsearch.Serverless.Name featureName) - { - FeatureNameValue = featureName; - return Self; - } - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The resulting frequency map for the field value. If the field value is missing from the frequency_map, the resulting value is 0. - /// - /// - public DataframeAnalysisFeatureProcessorFrequencyEncodingDescriptor FrequencyMap(Func, FluentDictionary> selector) - { - FrequencyMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("feature_name"); - JsonSerializer.Serialize(writer, FeatureNameValue, options); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("frequency_map"); - JsonSerializer.Serialize(writer, FrequencyMapValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorMultiEncoding.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorMultiEncoding.g.cs deleted file mode 100644 index 82cdc66c1be..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorMultiEncoding.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisFeatureProcessorMultiEncoding -{ - /// - /// - /// The ordered array of custom processors to execute. Must be more than 1. - /// - /// - [JsonInclude, JsonPropertyName("processors")] - public ICollection Processors { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor(DataframeAnalysisFeatureProcessorMultiEncoding dataframeAnalysisFeatureProcessorMultiEncoding) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor.MultiEncoding(dataframeAnalysisFeatureProcessorMultiEncoding); -} - -public sealed partial class DataframeAnalysisFeatureProcessorMultiEncodingDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisFeatureProcessorMultiEncodingDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorMultiEncodingDescriptor() : base() - { - } - - private ICollection ProcessorsValue { get; set; } - - /// - /// - /// The ordered array of custom processors to execute. Must be more than 1. - /// - /// - public DataframeAnalysisFeatureProcessorMultiEncodingDescriptor Processors(ICollection processors) - { - ProcessorsValue = processors; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("processors"); - JsonSerializer.Serialize(writer, ProcessorsValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs deleted file mode 100644 index 348742af9c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs +++ /dev/null @@ -1,342 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisFeatureProcessorNGramEncoding -{ - [JsonInclude, JsonPropertyName("custom")] - public bool? Custom { get; set; } - - /// - /// - /// The feature name prefix. Defaults to ngram_<start>_<length>. - /// - /// - [JsonInclude, JsonPropertyName("feature_prefix")] - public string? FeaturePrefix { get; set; } - - /// - /// - /// The name of the text field to encode. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Specifies the length of the n-gram substring. Defaults to 50. Must be greater than 0. - /// - /// - [JsonInclude, JsonPropertyName("length")] - public int? Length { get; set; } - - /// - /// - /// Specifies which n-grams to gather. It’s an array of integer values where the minimum value is 1, and a maximum value is 5. - /// - /// - [JsonInclude, JsonPropertyName("n_grams")] - public ICollection NGrams { get; set; } - - /// - /// - /// Specifies the zero-indexed start of the n-gram substring. Negative values are allowed for encoding n-grams of string suffixes. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public int? Start { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor(DataframeAnalysisFeatureProcessorNGramEncoding dataframeAnalysisFeatureProcessorNGramEncoding) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor.NGramEncoding(dataframeAnalysisFeatureProcessorNGramEncoding); -} - -public sealed partial class DataframeAnalysisFeatureProcessorNGramEncodingDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisFeatureProcessorNGramEncodingDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor() : base() - { - } - - private bool? CustomValue { get; set; } - private string? FeaturePrefixValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? LengthValue { get; set; } - private ICollection NGramsValue { get; set; } - private int? StartValue { get; set; } - - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Custom(bool? custom = true) - { - CustomValue = custom; - return Self; - } - - /// - /// - /// The feature name prefix. Defaults to ngram_<start>_<length>. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor FeaturePrefix(string? featurePrefix) - { - FeaturePrefixValue = featurePrefix; - return Self; - } - - /// - /// - /// The name of the text field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the text field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the text field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specifies the length of the n-gram substring. Defaults to 50. Must be greater than 0. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Length(int? length) - { - LengthValue = length; - return Self; - } - - /// - /// - /// Specifies which n-grams to gather. It’s an array of integer values where the minimum value is 1, and a maximum value is 5. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor NGrams(ICollection nGrams) - { - NGramsValue = nGrams; - return Self; - } - - /// - /// - /// Specifies the zero-indexed start of the n-gram substring. Negative values are allowed for encoding n-grams of string suffixes. Defaults to 0. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Start(int? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CustomValue.HasValue) - { - writer.WritePropertyName("custom"); - writer.WriteBooleanValue(CustomValue.Value); - } - - if (!string.IsNullOrEmpty(FeaturePrefixValue)) - { - writer.WritePropertyName("feature_prefix"); - writer.WriteStringValue(FeaturePrefixValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (LengthValue.HasValue) - { - writer.WritePropertyName("length"); - writer.WriteNumberValue(LengthValue.Value); - } - - writer.WritePropertyName("n_grams"); - JsonSerializer.Serialize(writer, NGramsValue, options); - if (StartValue.HasValue) - { - writer.WritePropertyName("start"); - writer.WriteNumberValue(StartValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisFeatureProcessorNGramEncodingDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisFeatureProcessorNGramEncodingDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor() : base() - { - } - - private bool? CustomValue { get; set; } - private string? FeaturePrefixValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? LengthValue { get; set; } - private ICollection NGramsValue { get; set; } - private int? StartValue { get; set; } - - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Custom(bool? custom = true) - { - CustomValue = custom; - return Self; - } - - /// - /// - /// The feature name prefix. Defaults to ngram_<start>_<length>. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor FeaturePrefix(string? featurePrefix) - { - FeaturePrefixValue = featurePrefix; - return Self; - } - - /// - /// - /// The name of the text field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the text field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the text field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specifies the length of the n-gram substring. Defaults to 50. Must be greater than 0. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Length(int? length) - { - LengthValue = length; - return Self; - } - - /// - /// - /// Specifies which n-grams to gather. It’s an array of integer values where the minimum value is 1, and a maximum value is 5. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor NGrams(ICollection nGrams) - { - NGramsValue = nGrams; - return Self; - } - - /// - /// - /// Specifies the zero-indexed start of the n-gram substring. Negative values are allowed for encoding n-grams of string suffixes. Defaults to 0. - /// - /// - public DataframeAnalysisFeatureProcessorNGramEncodingDescriptor Start(int? start) - { - StartValue = start; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CustomValue.HasValue) - { - writer.WritePropertyName("custom"); - writer.WriteBooleanValue(CustomValue.Value); - } - - if (!string.IsNullOrEmpty(FeaturePrefixValue)) - { - writer.WritePropertyName("feature_prefix"); - writer.WriteStringValue(FeaturePrefixValue); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (LengthValue.HasValue) - { - writer.WritePropertyName("length"); - writer.WriteNumberValue(LengthValue.Value); - } - - writer.WritePropertyName("n_grams"); - JsonSerializer.Serialize(writer, NGramsValue, options); - if (StartValue.HasValue) - { - writer.WritePropertyName("start"); - writer.WriteNumberValue(StartValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorOneHotEncoding.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorOneHotEncoding.g.cs deleted file mode 100644 index c30935c7521..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorOneHotEncoding.g.cs +++ /dev/null @@ -1,181 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisFeatureProcessorOneHotEncoding -{ - /// - /// - /// The name of the field to encode. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The one hot map mapping the field value with the column name. - /// - /// - [JsonInclude, JsonPropertyName("hot_map")] - public string HotMap { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor(DataframeAnalysisFeatureProcessorOneHotEncoding dataframeAnalysisFeatureProcessorOneHotEncoding) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor.OneHotEncoding(dataframeAnalysisFeatureProcessorOneHotEncoding); -} - -public sealed partial class DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string HotMapValue { get; set; } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The one hot map mapping the field value with the column name. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor HotMap(string hotMap) - { - HotMapValue = hotMap; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("hot_map"); - writer.WriteStringValue(HotMapValue); - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string HotMapValue { get; set; } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The one hot map mapping the field value with the column name. - /// - /// - public DataframeAnalysisFeatureProcessorOneHotEncodingDescriptor HotMap(string hotMap) - { - HotMapValue = hotMap; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("hot_map"); - writer.WriteStringValue(HotMapValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorTargetMeanEncoding.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorTargetMeanEncoding.g.cs deleted file mode 100644 index 68086c92e87..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorTargetMeanEncoding.g.cs +++ /dev/null @@ -1,253 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisFeatureProcessorTargetMeanEncoding -{ - /// - /// - /// The default value if field value is not found in the target_map. - /// - /// - [JsonInclude, JsonPropertyName("default_value")] - public int DefaultValue { get; set; } - - /// - /// - /// The resulting feature name. - /// - /// - [JsonInclude, JsonPropertyName("feature_name")] - public Elastic.Clients.Elasticsearch.Serverless.Name FeatureName { get; set; } - - /// - /// - /// The name of the field to encode. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The field value to target mean transition map. - /// - /// - [JsonInclude, JsonPropertyName("target_map")] - public IDictionary TargetMap { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor(DataframeAnalysisFeatureProcessorTargetMeanEncoding dataframeAnalysisFeatureProcessorTargetMeanEncoding) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessor.TargetMeanEncoding(dataframeAnalysisFeatureProcessorTargetMeanEncoding); -} - -public sealed partial class DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor() : base() - { - } - - private int DefaultValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name FeatureNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private IDictionary TargetMapValue { get; set; } - - /// - /// - /// The default value if field value is not found in the target_map. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor DefaultValue(int defaultValue) - { - DefaultValueValue = defaultValue; - return Self; - } - - /// - /// - /// The resulting feature name. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor FeatureName(Elastic.Clients.Elasticsearch.Serverless.Name featureName) - { - FeatureNameValue = featureName; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field value to target mean transition map. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor TargetMap(Func, FluentDictionary> selector) - { - TargetMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("default_value"); - writer.WriteNumberValue(DefaultValueValue); - writer.WritePropertyName("feature_name"); - JsonSerializer.Serialize(writer, FeatureNameValue, options); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("target_map"); - JsonSerializer.Serialize(writer, TargetMapValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor() : base() - { - } - - private int DefaultValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name FeatureNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private IDictionary TargetMapValue { get; set; } - - /// - /// - /// The default value if field value is not found in the target_map. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor DefaultValue(int defaultValue) - { - DefaultValueValue = defaultValue; - return Self; - } - - /// - /// - /// The resulting feature name. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor FeatureName(Elastic.Clients.Elasticsearch.Serverless.Name featureName) - { - FeatureNameValue = featureName; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field to encode. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The field value to target mean transition map. - /// - /// - public DataframeAnalysisFeatureProcessorTargetMeanEncodingDescriptor TargetMap(Func, FluentDictionary> selector) - { - TargetMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("default_value"); - writer.WriteNumberValue(DefaultValueValue); - writer.WritePropertyName("feature_name"); - JsonSerializer.Serialize(writer, FeatureNameValue, options); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("target_map"); - JsonSerializer.Serialize(writer, TargetMapValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs deleted file mode 100644 index 3331daf6d3b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs +++ /dev/null @@ -1,205 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalysisOutlierDetection -{ - /// - /// - /// Specifies whether the feature influence calculation is enabled. - /// - /// - [JsonInclude, JsonPropertyName("compute_feature_influence")] - public bool? ComputeFeatureInfluence { get; set; } - - /// - /// - /// The minimum outlier score that a document needs to have in order to calculate its feature influence score. Value range: 0-1. - /// - /// - [JsonInclude, JsonPropertyName("feature_influence_threshold")] - public double? FeatureInfluenceThreshold { get; set; } - - /// - /// - /// The method that outlier detection uses. Available methods are lof, ldof, distance_kth_nn, distance_knn, and ensemble. The default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score. - /// - /// - [JsonInclude, JsonPropertyName("method")] - public string? Method { get; set; } - - /// - /// - /// Defines the value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score. When the value is not set, different values are used for different ensemble members. This default behavior helps improve the diversity in the ensemble; only override it if you are confident that the value you choose is appropriate for the data set. - /// - /// - [JsonInclude, JsonPropertyName("n_neighbors")] - public int? NNeighbors { get; set; } - - /// - /// - /// The proportion of the data set that is assumed to be outlying prior to outlier detection. For example, 0.05 means it is assumed that 5% of values are real outliers and 95% are inliers. - /// - /// - [JsonInclude, JsonPropertyName("outlier_fraction")] - public double? OutlierFraction { get; set; } - - /// - /// - /// If true, the following operation is performed on the columns before computing outlier scores: (x_i - mean(x_i)) / sd(x_i). - /// - /// - [JsonInclude, JsonPropertyName("standardization_enabled")] - public bool? StandardizationEnabled { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis(DataframeAnalysisOutlierDetection dataframeAnalysisOutlierDetection) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis.OutlierDetection(dataframeAnalysisOutlierDetection); -} - -public sealed partial class DataframeAnalysisOutlierDetectionDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisOutlierDetectionDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisOutlierDetectionDescriptor() : base() - { - } - - private bool? ComputeFeatureInfluenceValue { get; set; } - private double? FeatureInfluenceThresholdValue { get; set; } - private string? MethodValue { get; set; } - private int? NNeighborsValue { get; set; } - private double? OutlierFractionValue { get; set; } - private bool? StandardizationEnabledValue { get; set; } - - /// - /// - /// Specifies whether the feature influence calculation is enabled. - /// - /// - public DataframeAnalysisOutlierDetectionDescriptor ComputeFeatureInfluence(bool? computeFeatureInfluence = true) - { - ComputeFeatureInfluenceValue = computeFeatureInfluence; - return Self; - } - - /// - /// - /// The minimum outlier score that a document needs to have in order to calculate its feature influence score. Value range: 0-1. - /// - /// - public DataframeAnalysisOutlierDetectionDescriptor FeatureInfluenceThreshold(double? featureInfluenceThreshold) - { - FeatureInfluenceThresholdValue = featureInfluenceThreshold; - return Self; - } - - /// - /// - /// The method that outlier detection uses. Available methods are lof, ldof, distance_kth_nn, distance_knn, and ensemble. The default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score. - /// - /// - public DataframeAnalysisOutlierDetectionDescriptor Method(string? method) - { - MethodValue = method; - return Self; - } - - /// - /// - /// Defines the value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score. When the value is not set, different values are used for different ensemble members. This default behavior helps improve the diversity in the ensemble; only override it if you are confident that the value you choose is appropriate for the data set. - /// - /// - public DataframeAnalysisOutlierDetectionDescriptor NNeighbors(int? nNeighbors) - { - NNeighborsValue = nNeighbors; - return Self; - } - - /// - /// - /// The proportion of the data set that is assumed to be outlying prior to outlier detection. For example, 0.05 means it is assumed that 5% of values are real outliers and 95% are inliers. - /// - /// - public DataframeAnalysisOutlierDetectionDescriptor OutlierFraction(double? outlierFraction) - { - OutlierFractionValue = outlierFraction; - return Self; - } - - /// - /// - /// If true, the following operation is performed on the columns before computing outlier scores: (x_i - mean(x_i)) / sd(x_i). - /// - /// - public DataframeAnalysisOutlierDetectionDescriptor StandardizationEnabled(bool? standardizationEnabled = true) - { - StandardizationEnabledValue = standardizationEnabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ComputeFeatureInfluenceValue.HasValue) - { - writer.WritePropertyName("compute_feature_influence"); - writer.WriteBooleanValue(ComputeFeatureInfluenceValue.Value); - } - - if (FeatureInfluenceThresholdValue.HasValue) - { - writer.WritePropertyName("feature_influence_threshold"); - writer.WriteNumberValue(FeatureInfluenceThresholdValue.Value); - } - - if (!string.IsNullOrEmpty(MethodValue)) - { - writer.WritePropertyName("method"); - writer.WriteStringValue(MethodValue); - } - - if (NNeighborsValue.HasValue) - { - writer.WritePropertyName("n_neighbors"); - writer.WriteNumberValue(NNeighborsValue.Value); - } - - if (OutlierFractionValue.HasValue) - { - writer.WritePropertyName("outlier_fraction"); - writer.WriteNumberValue(OutlierFractionValue.Value); - } - - if (StandardizationEnabledValue.HasValue) - { - writer.WritePropertyName("standardization_enabled"); - writer.WriteBooleanValue(StandardizationEnabledValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs deleted file mode 100644 index d8aa08cedd4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs +++ /dev/null @@ -1,1344 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -internal sealed partial class DataframeAnalysisRegressionConverter : JsonConverter -{ - public override DataframeAnalysisRegression Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new DataframeAnalysisRegression(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "alpha") - { - variant.Alpha = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "dependent_variable") - { - variant.DependentVariable = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "downsample_factor") - { - variant.DownsampleFactor = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "early_stopping_enabled") - { - variant.EarlyStoppingEnabled = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "eta") - { - variant.Eta = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "eta_growth_rate_per_tree") - { - variant.EtaGrowthRatePerTree = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "feature_bag_fraction") - { - variant.FeatureBagFraction = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "feature_processors") - { - variant.FeatureProcessors = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "gamma") - { - variant.Gamma = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lambda") - { - variant.Lambda = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "loss_function") - { - variant.LossFunction = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "loss_function_parameter") - { - variant.LossFunctionParameter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_optimization_rounds_per_hyperparameter") - { - variant.MaxOptimizationRoundsPerHyperparameter = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_trees" || property == "maximum_number_trees") - { - variant.MaxTrees = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "num_top_feature_importance_values") - { - variant.NumTopFeatureImportanceValues = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "prediction_field_name") - { - variant.PredictionFieldName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "randomize_seed") - { - variant.RandomizeSeed = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "soft_tree_depth_limit") - { - variant.SoftTreeDepthLimit = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "soft_tree_depth_tolerance") - { - variant.SoftTreeDepthTolerance = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "training_percent") - { - variant.TrainingPercent = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, DataframeAnalysisRegression value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Alpha.HasValue) - { - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(value.Alpha.Value); - } - - writer.WritePropertyName("dependent_variable"); - writer.WriteStringValue(value.DependentVariable); - if (value.DownsampleFactor.HasValue) - { - writer.WritePropertyName("downsample_factor"); - writer.WriteNumberValue(value.DownsampleFactor.Value); - } - - if (value.EarlyStoppingEnabled.HasValue) - { - writer.WritePropertyName("early_stopping_enabled"); - writer.WriteBooleanValue(value.EarlyStoppingEnabled.Value); - } - - if (value.Eta.HasValue) - { - writer.WritePropertyName("eta"); - writer.WriteNumberValue(value.Eta.Value); - } - - if (value.EtaGrowthRatePerTree.HasValue) - { - writer.WritePropertyName("eta_growth_rate_per_tree"); - writer.WriteNumberValue(value.EtaGrowthRatePerTree.Value); - } - - if (value.FeatureBagFraction.HasValue) - { - writer.WritePropertyName("feature_bag_fraction"); - writer.WriteNumberValue(value.FeatureBagFraction.Value); - } - - if (value.FeatureProcessors is not null) - { - writer.WritePropertyName("feature_processors"); - JsonSerializer.Serialize(writer, value.FeatureProcessors, options); - } - - if (value.Gamma.HasValue) - { - writer.WritePropertyName("gamma"); - writer.WriteNumberValue(value.Gamma.Value); - } - - if (value.Lambda.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(value.Lambda.Value); - } - - if (!string.IsNullOrEmpty(value.LossFunction)) - { - writer.WritePropertyName("loss_function"); - writer.WriteStringValue(value.LossFunction); - } - - if (value.LossFunctionParameter.HasValue) - { - writer.WritePropertyName("loss_function_parameter"); - writer.WriteNumberValue(value.LossFunctionParameter.Value); - } - - if (value.MaxOptimizationRoundsPerHyperparameter.HasValue) - { - writer.WritePropertyName("max_optimization_rounds_per_hyperparameter"); - writer.WriteNumberValue(value.MaxOptimizationRoundsPerHyperparameter.Value); - } - - if (value.MaxTrees.HasValue) - { - writer.WritePropertyName("max_trees"); - writer.WriteNumberValue(value.MaxTrees.Value); - } - - if (value.NumTopFeatureImportanceValues.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(value.NumTopFeatureImportanceValues.Value); - } - - if (value.PredictionFieldName is not null) - { - writer.WritePropertyName("prediction_field_name"); - JsonSerializer.Serialize(writer, value.PredictionFieldName, options); - } - - if (value.RandomizeSeed.HasValue) - { - writer.WritePropertyName("randomize_seed"); - writer.WriteNumberValue(value.RandomizeSeed.Value); - } - - if (value.SoftTreeDepthLimit.HasValue) - { - writer.WritePropertyName("soft_tree_depth_limit"); - writer.WriteNumberValue(value.SoftTreeDepthLimit.Value); - } - - if (value.SoftTreeDepthTolerance.HasValue) - { - writer.WritePropertyName("soft_tree_depth_tolerance"); - writer.WriteNumberValue(value.SoftTreeDepthTolerance.Value); - } - - if (value.TrainingPercent.HasValue) - { - writer.WritePropertyName("training_percent"); - writer.WriteNumberValue(value.TrainingPercent.Value); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(DataframeAnalysisRegressionConverter))] -public sealed partial class DataframeAnalysisRegression -{ - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero. - /// - /// - public double? Alpha { get; set; } - - /// - /// - /// Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable. - /// For classification analysis, the data type of the field must be numeric (integer, short, long, byte), categorical (ip or keyword), or boolean. There must be no more than 30 different values in this field. - /// For regression analysis, the data type of the field must be numeric. - /// - /// - public string DependentVariable { get; set; } - - /// - /// - /// Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1. - /// - /// - public double? DownsampleFactor { get; set; } - - /// - /// - /// Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable. - /// - /// - public bool? EarlyStoppingEnabled { get; set; } - - /// - /// - /// Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1. - /// - /// - public double? Eta { get; set; } - - /// - /// - /// Advanced configuration option. Specifies the rate at which eta increases for each new tree that is added to the forest. For example, a rate of 1.05 increases eta by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2. - /// - /// - public double? EtaGrowthRatePerTree { get; set; } - - /// - /// - /// Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization. - /// - /// - public double? FeatureBagFraction { get; set; } - - /// - /// - /// Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple feature_processors entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields. - /// - /// - public ICollection? FeatureProcessors { get; set; } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public double? Gamma { get; set; } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public double? Lambda { get; set; } - - /// - /// - /// The loss function used during regression. Available options are mse (mean squared error), msle (mean squared logarithmic error), huber (Pseudo-Huber loss). - /// - /// - public string? LossFunction { get; set; } - - /// - /// - /// A positive number that is used as a parameter to the loss_function. - /// - /// - public double? LossFunctionParameter { get; set; } - - /// - /// - /// Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization. - /// - /// - public int? MaxOptimizationRoundsPerHyperparameter { get; set; } - - /// - /// - /// Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization. - /// - /// - public int? MaxTrees { get; set; } - - /// - /// - /// Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs. - /// - /// - public int? NumTopFeatureImportanceValues { get; set; } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Field? PredictionFieldName { get; set; } - - /// - /// - /// Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as source and analyzed_fields are the same). - /// - /// - public double? RandomizeSeed { get; set; } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the soft_tree_depth_tolerance to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0. - /// - /// - public int? SoftTreeDepthLimit { get; set; } - - /// - /// - /// Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds soft_tree_depth_limit. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01. - /// - /// - public double? SoftTreeDepthTolerance { get; set; } - - /// - /// - /// Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage. - /// - /// - public double? TrainingPercent { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis(DataframeAnalysisRegression dataframeAnalysisRegression) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis.Regression(dataframeAnalysisRegression); -} - -public sealed partial class DataframeAnalysisRegressionDescriptor : SerializableDescriptor> -{ - internal DataframeAnalysisRegressionDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalysisRegressionDescriptor() : base() - { - } - - private double? AlphaValue { get; set; } - private string DependentVariableValue { get; set; } - private double? DownsampleFactorValue { get; set; } - private bool? EarlyStoppingEnabledValue { get; set; } - private double? EtaValue { get; set; } - private double? EtaGrowthRatePerTreeValue { get; set; } - private double? FeatureBagFractionValue { get; set; } - private ICollection? FeatureProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor FeatureProcessorsDescriptor { get; set; } - private Action> FeatureProcessorsDescriptorAction { get; set; } - private Action>[] FeatureProcessorsDescriptorActions { get; set; } - private double? GammaValue { get; set; } - private double? LambdaValue { get; set; } - private string? LossFunctionValue { get; set; } - private double? LossFunctionParameterValue { get; set; } - private int? MaxOptimizationRoundsPerHyperparameterValue { get; set; } - private int? MaxTreesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PredictionFieldNameValue { get; set; } - private double? RandomizeSeedValue { get; set; } - private int? SoftTreeDepthLimitValue { get; set; } - private double? SoftTreeDepthToleranceValue { get; set; } - private double? TrainingPercentValue { get; set; } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero. - /// - /// - public DataframeAnalysisRegressionDescriptor Alpha(double? alpha) - { - AlphaValue = alpha; - return Self; - } - - /// - /// - /// Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable. - /// For classification analysis, the data type of the field must be numeric (integer, short, long, byte), categorical (ip or keyword), or boolean. There must be no more than 30 different values in this field. - /// For regression analysis, the data type of the field must be numeric. - /// - /// - public DataframeAnalysisRegressionDescriptor DependentVariable(string dependentVariable) - { - DependentVariableValue = dependentVariable; - return Self; - } - - /// - /// - /// Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1. - /// - /// - public DataframeAnalysisRegressionDescriptor DownsampleFactor(double? downsampleFactor) - { - DownsampleFactorValue = downsampleFactor; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable. - /// - /// - public DataframeAnalysisRegressionDescriptor EarlyStoppingEnabled(bool? earlyStoppingEnabled = true) - { - EarlyStoppingEnabledValue = earlyStoppingEnabled; - return Self; - } - - /// - /// - /// Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1. - /// - /// - public DataframeAnalysisRegressionDescriptor Eta(double? eta) - { - EtaValue = eta; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the rate at which eta increases for each new tree that is added to the forest. For example, a rate of 1.05 increases eta by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2. - /// - /// - public DataframeAnalysisRegressionDescriptor EtaGrowthRatePerTree(double? etaGrowthRatePerTree) - { - EtaGrowthRatePerTreeValue = etaGrowthRatePerTree; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisRegressionDescriptor FeatureBagFraction(double? featureBagFraction) - { - FeatureBagFractionValue = featureBagFraction; - return Self; - } - - /// - /// - /// Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple feature_processors entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields. - /// - /// - public DataframeAnalysisRegressionDescriptor FeatureProcessors(ICollection? featureProcessors) - { - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsValue = featureProcessors; - return Self; - } - - public DataframeAnalysisRegressionDescriptor FeatureProcessors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor descriptor) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptor = descriptor; - return Self; - } - - public DataframeAnalysisRegressionDescriptor FeatureProcessors(Action> configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptorAction = configure; - return Self; - } - - public DataframeAnalysisRegressionDescriptor FeatureProcessors(params Action>[] configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisRegressionDescriptor Gamma(double? gamma) - { - GammaValue = gamma; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisRegressionDescriptor Lambda(double? lambda) - { - LambdaValue = lambda; - return Self; - } - - /// - /// - /// The loss function used during regression. Available options are mse (mean squared error), msle (mean squared logarithmic error), huber (Pseudo-Huber loss). - /// - /// - public DataframeAnalysisRegressionDescriptor LossFunction(string? lossFunction) - { - LossFunctionValue = lossFunction; - return Self; - } - - /// - /// - /// A positive number that is used as a parameter to the loss_function. - /// - /// - public DataframeAnalysisRegressionDescriptor LossFunctionParameter(double? lossFunctionParameter) - { - LossFunctionParameterValue = lossFunctionParameter; - return Self; - } - - /// - /// - /// Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisRegressionDescriptor MaxOptimizationRoundsPerHyperparameter(int? maxOptimizationRoundsPerHyperparameter) - { - MaxOptimizationRoundsPerHyperparameterValue = maxOptimizationRoundsPerHyperparameter; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisRegressionDescriptor MaxTrees(int? maxTrees) - { - MaxTreesValue = maxTrees; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs. - /// - /// - public DataframeAnalysisRegressionDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisRegressionDescriptor PredictionFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisRegressionDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisRegressionDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as source and analyzed_fields are the same). - /// - /// - public DataframeAnalysisRegressionDescriptor RandomizeSeed(double? randomizeSeed) - { - RandomizeSeedValue = randomizeSeed; - return Self; - } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the soft_tree_depth_tolerance to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0. - /// - /// - public DataframeAnalysisRegressionDescriptor SoftTreeDepthLimit(int? softTreeDepthLimit) - { - SoftTreeDepthLimitValue = softTreeDepthLimit; - return Self; - } - - /// - /// - /// Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds soft_tree_depth_limit. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01. - /// - /// - public DataframeAnalysisRegressionDescriptor SoftTreeDepthTolerance(double? softTreeDepthTolerance) - { - SoftTreeDepthToleranceValue = softTreeDepthTolerance; - return Self; - } - - /// - /// - /// Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage. - /// - /// - public DataframeAnalysisRegressionDescriptor TrainingPercent(double? trainingPercent) - { - TrainingPercentValue = trainingPercent; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlphaValue.HasValue) - { - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(AlphaValue.Value); - } - - writer.WritePropertyName("dependent_variable"); - writer.WriteStringValue(DependentVariableValue); - if (DownsampleFactorValue.HasValue) - { - writer.WritePropertyName("downsample_factor"); - writer.WriteNumberValue(DownsampleFactorValue.Value); - } - - if (EarlyStoppingEnabledValue.HasValue) - { - writer.WritePropertyName("early_stopping_enabled"); - writer.WriteBooleanValue(EarlyStoppingEnabledValue.Value); - } - - if (EtaValue.HasValue) - { - writer.WritePropertyName("eta"); - writer.WriteNumberValue(EtaValue.Value); - } - - if (EtaGrowthRatePerTreeValue.HasValue) - { - writer.WritePropertyName("eta_growth_rate_per_tree"); - writer.WriteNumberValue(EtaGrowthRatePerTreeValue.Value); - } - - if (FeatureBagFractionValue.HasValue) - { - writer.WritePropertyName("feature_bag_fraction"); - writer.WriteNumberValue(FeatureBagFractionValue.Value); - } - - if (FeatureProcessorsDescriptor is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FeatureProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(FeatureProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - foreach (var action in FeatureProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FeatureProcessorsValue is not null) - { - writer.WritePropertyName("feature_processors"); - JsonSerializer.Serialize(writer, FeatureProcessorsValue, options); - } - - if (GammaValue.HasValue) - { - writer.WritePropertyName("gamma"); - writer.WriteNumberValue(GammaValue.Value); - } - - if (LambdaValue.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(LambdaValue.Value); - } - - if (!string.IsNullOrEmpty(LossFunctionValue)) - { - writer.WritePropertyName("loss_function"); - writer.WriteStringValue(LossFunctionValue); - } - - if (LossFunctionParameterValue.HasValue) - { - writer.WritePropertyName("loss_function_parameter"); - writer.WriteNumberValue(LossFunctionParameterValue.Value); - } - - if (MaxOptimizationRoundsPerHyperparameterValue.HasValue) - { - writer.WritePropertyName("max_optimization_rounds_per_hyperparameter"); - writer.WriteNumberValue(MaxOptimizationRoundsPerHyperparameterValue.Value); - } - - if (MaxTreesValue.HasValue) - { - writer.WritePropertyName("max_trees"); - writer.WriteNumberValue(MaxTreesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (PredictionFieldNameValue is not null) - { - writer.WritePropertyName("prediction_field_name"); - JsonSerializer.Serialize(writer, PredictionFieldNameValue, options); - } - - if (RandomizeSeedValue.HasValue) - { - writer.WritePropertyName("randomize_seed"); - writer.WriteNumberValue(RandomizeSeedValue.Value); - } - - if (SoftTreeDepthLimitValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_limit"); - writer.WriteNumberValue(SoftTreeDepthLimitValue.Value); - } - - if (SoftTreeDepthToleranceValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_tolerance"); - writer.WriteNumberValue(SoftTreeDepthToleranceValue.Value); - } - - if (TrainingPercentValue.HasValue) - { - writer.WritePropertyName("training_percent"); - writer.WriteNumberValue(TrainingPercentValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalysisRegressionDescriptor : SerializableDescriptor -{ - internal DataframeAnalysisRegressionDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalysisRegressionDescriptor() : base() - { - } - - private double? AlphaValue { get; set; } - private string DependentVariableValue { get; set; } - private double? DownsampleFactorValue { get; set; } - private bool? EarlyStoppingEnabledValue { get; set; } - private double? EtaValue { get; set; } - private double? EtaGrowthRatePerTreeValue { get; set; } - private double? FeatureBagFractionValue { get; set; } - private ICollection? FeatureProcessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor FeatureProcessorsDescriptor { get; set; } - private Action FeatureProcessorsDescriptorAction { get; set; } - private Action[] FeatureProcessorsDescriptorActions { get; set; } - private double? GammaValue { get; set; } - private double? LambdaValue { get; set; } - private string? LossFunctionValue { get; set; } - private double? LossFunctionParameterValue { get; set; } - private int? MaxOptimizationRoundsPerHyperparameterValue { get; set; } - private int? MaxTreesValue { get; set; } - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PredictionFieldNameValue { get; set; } - private double? RandomizeSeedValue { get; set; } - private int? SoftTreeDepthLimitValue { get; set; } - private double? SoftTreeDepthToleranceValue { get; set; } - private double? TrainingPercentValue { get; set; } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero. - /// - /// - public DataframeAnalysisRegressionDescriptor Alpha(double? alpha) - { - AlphaValue = alpha; - return Self; - } - - /// - /// - /// Defines which field of the document is to be predicted. It must match one of the fields in the index being used to train. If this field is missing from a document, then that document will not be used for training, but a prediction with the trained model will be generated for it. It is also known as continuous target variable. - /// For classification analysis, the data type of the field must be numeric (integer, short, long, byte), categorical (ip or keyword), or boolean. There must be no more than 30 different values in this field. - /// For regression analysis, the data type of the field must be numeric. - /// - /// - public DataframeAnalysisRegressionDescriptor DependentVariable(string dependentVariable) - { - DependentVariableValue = dependentVariable; - return Self; - } - - /// - /// - /// Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1. - /// - /// - public DataframeAnalysisRegressionDescriptor DownsampleFactor(double? downsampleFactor) - { - DownsampleFactorValue = downsampleFactor; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable. - /// - /// - public DataframeAnalysisRegressionDescriptor EarlyStoppingEnabled(bool? earlyStoppingEnabled = true) - { - EarlyStoppingEnabledValue = earlyStoppingEnabled; - return Self; - } - - /// - /// - /// Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between 0.001 and 1. - /// - /// - public DataframeAnalysisRegressionDescriptor Eta(double? eta) - { - EtaValue = eta; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the rate at which eta increases for each new tree that is added to the forest. For example, a rate of 1.05 increases eta by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between 0.5 and 2. - /// - /// - public DataframeAnalysisRegressionDescriptor EtaGrowthRatePerTree(double? etaGrowthRatePerTree) - { - EtaGrowthRatePerTreeValue = etaGrowthRatePerTree; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisRegressionDescriptor FeatureBagFraction(double? featureBagFraction) - { - FeatureBagFractionValue = featureBagFraction; - return Self; - } - - /// - /// - /// Advanced configuration option. A collection of feature preprocessors that modify one or more included fields. The analysis uses the resulting one or more features instead of the original document field. However, these features are ephemeral; they are not stored in the destination index. Multiple feature_processors entries can refer to the same document fields. Automatic categorical feature encoding still occurs for the fields that are unprocessed by a custom processor or that have categorical values. Use this property only if you want to override the automatic feature encoding of the specified fields. - /// - /// - public DataframeAnalysisRegressionDescriptor FeatureProcessors(ICollection? featureProcessors) - { - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsValue = featureProcessors; - return Self; - } - - public DataframeAnalysisRegressionDescriptor FeatureProcessors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor descriptor) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptor = descriptor; - return Self; - } - - public DataframeAnalysisRegressionDescriptor FeatureProcessors(Action configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorActions = null; - FeatureProcessorsDescriptorAction = configure; - return Self; - } - - public DataframeAnalysisRegressionDescriptor FeatureProcessors(params Action[] configure) - { - FeatureProcessorsValue = null; - FeatureProcessorsDescriptor = null; - FeatureProcessorsDescriptorAction = null; - FeatureProcessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisRegressionDescriptor Gamma(double? gamma) - { - GammaValue = gamma; - return Self; - } - - /// - /// - /// Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value. - /// - /// - public DataframeAnalysisRegressionDescriptor Lambda(double? lambda) - { - LambdaValue = lambda; - return Self; - } - - /// - /// - /// The loss function used during regression. Available options are mse (mean squared error), msle (mean squared logarithmic error), huber (Pseudo-Huber loss). - /// - /// - public DataframeAnalysisRegressionDescriptor LossFunction(string? lossFunction) - { - LossFunctionValue = lossFunction; - return Self; - } - - /// - /// - /// A positive number that is used as a parameter to the loss_function. - /// - /// - public DataframeAnalysisRegressionDescriptor LossFunctionParameter(double? lossFunctionParameter) - { - LossFunctionParameterValue = lossFunctionParameter; - return Self; - } - - /// - /// - /// Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisRegressionDescriptor MaxOptimizationRoundsPerHyperparameter(int? maxOptimizationRoundsPerHyperparameter) - { - MaxOptimizationRoundsPerHyperparameterValue = maxOptimizationRoundsPerHyperparameter; - return Self; - } - - /// - /// - /// Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization. - /// - /// - public DataframeAnalysisRegressionDescriptor MaxTrees(int? maxTrees) - { - MaxTreesValue = maxTrees; - return Self; - } - - /// - /// - /// Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs. - /// - /// - public DataframeAnalysisRegressionDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisRegressionDescriptor PredictionFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisRegressionDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the name of the prediction field in the results. Defaults to <dependent_variable>_prediction. - /// - /// - public DataframeAnalysisRegressionDescriptor PredictionFieldName(Expression> predictionFieldName) - { - PredictionFieldNameValue = predictionFieldName; - return Self; - } - - /// - /// - /// Defines the seed for the random generator that is used to pick training data. By default, it is randomly generated. Set it to a specific value to use the same training data each time you start a job (assuming other related parameters such as source and analyzed_fields are the same). - /// - /// - public DataframeAnalysisRegressionDescriptor RandomizeSeed(double? randomizeSeed) - { - RandomizeSeedValue = randomizeSeed; - return Self; - } - - /// - /// - /// Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with the soft_tree_depth_tolerance to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0. - /// - /// - public DataframeAnalysisRegressionDescriptor SoftTreeDepthLimit(int? softTreeDepthLimit) - { - SoftTreeDepthLimitValue = softTreeDepthLimit; - return Self; - } - - /// - /// - /// Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceeds soft_tree_depth_limit. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01. - /// - /// - public DataframeAnalysisRegressionDescriptor SoftTreeDepthTolerance(double? softTreeDepthTolerance) - { - SoftTreeDepthToleranceValue = softTreeDepthTolerance; - return Self; - } - - /// - /// - /// Defines what percentage of the eligible documents that will be used for training. Documents that are ignored by the analysis (for example those that contain arrays with more than one value) won’t be included in the calculation for used percentage. - /// - /// - public DataframeAnalysisRegressionDescriptor TrainingPercent(double? trainingPercent) - { - TrainingPercentValue = trainingPercent; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlphaValue.HasValue) - { - writer.WritePropertyName("alpha"); - writer.WriteNumberValue(AlphaValue.Value); - } - - writer.WritePropertyName("dependent_variable"); - writer.WriteStringValue(DependentVariableValue); - if (DownsampleFactorValue.HasValue) - { - writer.WritePropertyName("downsample_factor"); - writer.WriteNumberValue(DownsampleFactorValue.Value); - } - - if (EarlyStoppingEnabledValue.HasValue) - { - writer.WritePropertyName("early_stopping_enabled"); - writer.WriteBooleanValue(EarlyStoppingEnabledValue.Value); - } - - if (EtaValue.HasValue) - { - writer.WritePropertyName("eta"); - writer.WriteNumberValue(EtaValue.Value); - } - - if (EtaGrowthRatePerTreeValue.HasValue) - { - writer.WritePropertyName("eta_growth_rate_per_tree"); - writer.WriteNumberValue(EtaGrowthRatePerTreeValue.Value); - } - - if (FeatureBagFractionValue.HasValue) - { - writer.WritePropertyName("feature_bag_fraction"); - writer.WriteNumberValue(FeatureBagFractionValue.Value); - } - - if (FeatureProcessorsDescriptor is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FeatureProcessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorAction is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(FeatureProcessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FeatureProcessorsDescriptorActions is not null) - { - writer.WritePropertyName("feature_processors"); - writer.WriteStartArray(); - foreach (var action in FeatureProcessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisFeatureProcessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FeatureProcessorsValue is not null) - { - writer.WritePropertyName("feature_processors"); - JsonSerializer.Serialize(writer, FeatureProcessorsValue, options); - } - - if (GammaValue.HasValue) - { - writer.WritePropertyName("gamma"); - writer.WriteNumberValue(GammaValue.Value); - } - - if (LambdaValue.HasValue) - { - writer.WritePropertyName("lambda"); - writer.WriteNumberValue(LambdaValue.Value); - } - - if (!string.IsNullOrEmpty(LossFunctionValue)) - { - writer.WritePropertyName("loss_function"); - writer.WriteStringValue(LossFunctionValue); - } - - if (LossFunctionParameterValue.HasValue) - { - writer.WritePropertyName("loss_function_parameter"); - writer.WriteNumberValue(LossFunctionParameterValue.Value); - } - - if (MaxOptimizationRoundsPerHyperparameterValue.HasValue) - { - writer.WritePropertyName("max_optimization_rounds_per_hyperparameter"); - writer.WriteNumberValue(MaxOptimizationRoundsPerHyperparameterValue.Value); - } - - if (MaxTreesValue.HasValue) - { - writer.WritePropertyName("max_trees"); - writer.WriteNumberValue(MaxTreesValue.Value); - } - - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (PredictionFieldNameValue is not null) - { - writer.WritePropertyName("prediction_field_name"); - JsonSerializer.Serialize(writer, PredictionFieldNameValue, options); - } - - if (RandomizeSeedValue.HasValue) - { - writer.WritePropertyName("randomize_seed"); - writer.WriteNumberValue(RandomizeSeedValue.Value); - } - - if (SoftTreeDepthLimitValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_limit"); - writer.WriteNumberValue(SoftTreeDepthLimitValue.Value); - } - - if (SoftTreeDepthToleranceValue.HasValue) - { - writer.WritePropertyName("soft_tree_depth_tolerance"); - writer.WriteNumberValue(SoftTreeDepthToleranceValue.Value); - } - - if (TrainingPercentValue.HasValue) - { - writer.WritePropertyName("training_percent"); - writer.WriteNumberValue(TrainingPercentValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalytics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalytics.g.cs deleted file mode 100644 index f8050261083..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalytics.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalytics -{ - /// - /// - /// For running jobs only, contains messages relating to the selection of a node to run the job. - /// - /// - [JsonInclude, JsonPropertyName("assignment_explanation")] - public string? AssignmentExplanation { get; init; } - - /// - /// - /// An object that provides counts for the quantity of documents skipped, used in training, or available for testing. - /// - /// - [JsonInclude, JsonPropertyName("data_counts")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsStatsDataCounts DataCounts { get; init; } - - /// - /// - /// The unique identifier of the data frame analytics job. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// An object describing memory usage of the analytics. It is present only after the job is started and memory usage is reported. - /// - /// - [JsonInclude, JsonPropertyName("memory_usage")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsStatsMemoryUsage MemoryUsage { get; init; } - - /// - /// - /// The progress report of the data frame analytics job by phase. - /// - /// - [JsonInclude, JsonPropertyName("progress")] - public IReadOnlyCollection Progress { get; init; } - - /// - /// - /// The status of the data frame analytics job, which can be one of the following values: failed, started, starting, stopping, stopped. - /// - /// - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeState State { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsAuthorization.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsAuthorization.g.cs deleted file mode 100644 index ec4d17328df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsAuthorization.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsAuthorization -{ - /// - /// - /// If an API key was used for the most recent update to the job, its name and identifier are listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("api_key")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ApiKeyAuthorization? ApiKey { get; init; } - - /// - /// - /// If a user ID was used for the most recent update to the job, its roles at the time of the update are listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - - /// - /// - /// If a service account was used for the most recent update to the job, the account name is listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("service_account")] - public string? ServiceAccount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsDestination.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsDestination.g.cs deleted file mode 100644 index 81422f87404..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsDestination.g.cs +++ /dev/null @@ -1,187 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsDestination -{ - /// - /// - /// Defines the destination index to store the results of the data frame analytics job. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ResultsField { get; set; } -} - -public sealed partial class DataframeAnalyticsDestinationDescriptor : SerializableDescriptor> -{ - internal DataframeAnalyticsDestinationDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalyticsDestinationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - - /// - /// - /// Defines the destination index to store the results of the data frame analytics job. - /// - /// - public DataframeAnalyticsDestinationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - public DataframeAnalyticsDestinationDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - public DataframeAnalyticsDestinationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - public DataframeAnalyticsDestinationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalyticsDestinationDescriptor : SerializableDescriptor -{ - internal DataframeAnalyticsDestinationDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalyticsDestinationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - - /// - /// - /// Defines the destination index to store the results of the data frame analytics job. - /// - /// - public DataframeAnalyticsDestinationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - public DataframeAnalyticsDestinationDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - public DataframeAnalyticsDestinationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// Defines the name of the field in which to store the results of the analysis. Defaults to ml. - /// - /// - public DataframeAnalyticsDestinationDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsFieldSelection.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsFieldSelection.g.cs deleted file mode 100644 index d99a523835a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsFieldSelection.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsFieldSelection -{ - /// - /// - /// The feature type of this field for the analysis. May be categorical or numerical. - /// - /// - [JsonInclude, JsonPropertyName("feature_type")] - public string? FeatureType { get; init; } - - /// - /// - /// Whether the field is selected to be included in the analysis. - /// - /// - [JsonInclude, JsonPropertyName("is_included")] - public bool IsIncluded { get; init; } - - /// - /// - /// Whether the field is required. - /// - /// - [JsonInclude, JsonPropertyName("is_required")] - public bool IsRequired { get; init; } - - /// - /// - /// The mapping types of the field. - /// - /// - [JsonInclude, JsonPropertyName("mapping_types")] - public IReadOnlyCollection MappingTypes { get; init; } - - /// - /// - /// The field name. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// The reason a field is not selected to be included in the analysis. - /// - /// - [JsonInclude, JsonPropertyName("reason")] - public string? Reason { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsMemoryEstimation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsMemoryEstimation.g.cs deleted file mode 100644 index dd0c12b7901..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsMemoryEstimation.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsMemoryEstimation -{ - /// - /// - /// Estimated memory usage under the assumption that overflowing to disk is allowed during data frame analytics. expected_memory_with_disk is usually smaller than expected_memory_without_disk as using disk allows to limit the main memory needed to perform data frame analytics. - /// - /// - [JsonInclude, JsonPropertyName("expected_memory_with_disk")] - public string ExpectedMemoryWithDisk { get; init; } - - /// - /// - /// Estimated memory usage under the assumption that the whole data frame analytics should happen in memory (i.e. without overflowing to disk). - /// - /// - [JsonInclude, JsonPropertyName("expected_memory_without_disk")] - public string ExpectedMemoryWithoutDisk { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs deleted file mode 100644 index a4f72488bff..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs +++ /dev/null @@ -1,351 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsSource -{ - /// - /// - /// Index or indices on which to perform the analysis. It can be a single index or index pattern as well as an array of indices or patterns. NOTE: If your source indices contain documents with the same IDs, only the document that is indexed last appears in the destination index. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.Indices Indices { get; set; } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. By default, this property has the following value: {"match_all": {}}. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Definitions of runtime fields that will become part of the mapping of the destination index. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } - - /// - /// - /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. - /// - /// - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? Source { get; set; } -} - -public sealed partial class DataframeAnalyticsSourceDescriptor : SerializableDescriptor> -{ - internal DataframeAnalyticsSourceDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeAnalyticsSourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - /// - /// - /// Index or indices on which to perform the analysis. It can be a single index or index pattern as well as an array of indices or patterns. NOTE: If your source indices contain documents with the same IDs, only the document that is indexed last appears in the destination index. - /// - /// - public DataframeAnalyticsSourceDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. By default, this property has the following value: {"match_all": {}}. - /// - /// - public DataframeAnalyticsSourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Definitions of runtime fields that will become part of the mapping of the destination index. - /// - /// - public DataframeAnalyticsSourceDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. - /// - /// - public DataframeAnalyticsSourceDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeAnalyticsSourceDescriptor : SerializableDescriptor -{ - internal DataframeAnalyticsSourceDescriptor(Action configure) => configure.Invoke(this); - - public DataframeAnalyticsSourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - /// - /// - /// Index or indices on which to perform the analysis. It can be a single index or index pattern as well as an array of indices or patterns. NOTE: If your source indices contain documents with the same IDs, only the document that is indexed last appears in the destination index. - /// - /// - public DataframeAnalyticsSourceDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. By default, this property has the following value: {"match_all": {}}. - /// - /// - public DataframeAnalyticsSourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Definitions of runtime fields that will become part of the mapping of the destination index. - /// - /// - public DataframeAnalyticsSourceDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. - /// - /// - public DataframeAnalyticsSourceDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public DataframeAnalyticsSourceDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsDataCounts.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsDataCounts.g.cs deleted file mode 100644 index 7a5eedc30d6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsDataCounts.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsStatsDataCounts -{ - /// - /// - /// The number of documents that are skipped during the analysis because they contained values that are not supported by the analysis. For example, outlier detection does not support missing fields so it skips documents with missing fields. Likewise, all types of analysis skip documents that contain arrays with more than one element. - /// - /// - [JsonInclude, JsonPropertyName("skipped_docs_count")] - public int SkippedDocsCount { get; init; } - - /// - /// - /// The number of documents that are not used for training the model and can be used for testing. - /// - /// - [JsonInclude, JsonPropertyName("test_docs_count")] - public int TestDocsCount { get; init; } - - /// - /// - /// The number of documents that are used for training the model. - /// - /// - [JsonInclude, JsonPropertyName("training_docs_count")] - public int TrainingDocsCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs deleted file mode 100644 index d9b2ed04691..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsStatsMemoryUsage -{ - /// - /// - /// This value is present when the status is hard_limit and it is a new estimate of how much memory the job needs. - /// - /// - [JsonInclude, JsonPropertyName("memory_reestimate_bytes")] - public long? MemoryReestimateBytes { get; init; } - - /// - /// - /// The number of bytes used at the highest peak of memory usage. - /// - /// - [JsonInclude, JsonPropertyName("peak_usage_bytes")] - public long PeakUsageBytes { get; init; } - - /// - /// - /// The memory usage status. - /// - /// - [JsonInclude, JsonPropertyName("status")] - public string Status { get; init; } - - /// - /// - /// The timestamp when memory usage was calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsProgress.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsProgress.g.cs deleted file mode 100644 index c61a9dae93a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsStatsProgress.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsStatsProgress -{ - /// - /// - /// Defines the phase of the data frame analytics job. - /// - /// - [JsonInclude, JsonPropertyName("phase")] - public string Phase { get; init; } - - /// - /// - /// The progress that the data frame analytics job has made expressed in percentage. - /// - /// - [JsonInclude, JsonPropertyName("progress_percent")] - public int ProgressPercent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs deleted file mode 100644 index f5ff47be1e7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs +++ /dev/null @@ -1,64 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeAnalyticsSummary -{ - [JsonInclude, JsonPropertyName("allow_lazy_start")] - public bool? AllowLazyStart { get; init; } - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis Analysis { get; init; } - [JsonInclude, JsonPropertyName("analyzed_fields")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFields { get; init; } - - /// - /// - /// The security privileges that the job uses to run its queries. If Elastic Stack security features were disabled at the time of the most recent update to the job, this property is omitted. - /// - /// - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsAuthorization? Authorization { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public long? CreateTime { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsDestination Dest { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("max_num_threads")] - public int? MaxNumThreads { get; init; } - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string? ModelMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource Source { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummary.g.cs deleted file mode 100644 index ef0f0d47608..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummary.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeClassificationSummary -{ - /// - /// - /// Accuracy of predictions (per-class and overall). - /// - /// - [JsonInclude, JsonPropertyName("accuracy")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeClassificationSummaryAccuracy? Accuracy { get; init; } - - /// - /// - /// The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. - /// It is calculated for a specific class (provided as "class_name") treated as positive. - /// - /// - [JsonInclude, JsonPropertyName("auc_roc")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationSummaryAucRoc? AucRoc { get; init; } - - /// - /// - /// Multiclass confusion matrix. - /// - /// - [JsonInclude, JsonPropertyName("multiclass_confusion_matrix")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeClassificationSummaryMulticlassConfusionMatrix? MulticlassConfusionMatrix { get; init; } - - /// - /// - /// Precision of predictions (per-class and average). - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeClassificationSummaryPrecision? Precision { get; init; } - - /// - /// - /// Recall of predictions (per-class and average). - /// - /// - [JsonInclude, JsonPropertyName("recall")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeClassificationSummaryRecall? Recall { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryAccuracy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryAccuracy.g.cs deleted file mode 100644 index 1054f98958c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryAccuracy.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeClassificationSummaryAccuracy -{ - [JsonInclude, JsonPropertyName("classes")] - public IReadOnlyCollection Classes { get; init; } - [JsonInclude, JsonPropertyName("overall_accuracy")] - public double OverallAccuracy { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryMulticlassConfusionMatrix.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryMulticlassConfusionMatrix.g.cs deleted file mode 100644 index 0ec22d13667..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryMulticlassConfusionMatrix.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeClassificationSummaryMulticlassConfusionMatrix -{ - [JsonInclude, JsonPropertyName("confusion_matrix")] - public IReadOnlyCollection ConfusionMatrix { get; init; } - [JsonInclude, JsonPropertyName("other_actual_class_count")] - public int OtherActualClassCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryPrecision.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryPrecision.g.cs deleted file mode 100644 index 8505fdf2805..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryPrecision.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeClassificationSummaryPrecision -{ - [JsonInclude, JsonPropertyName("avg_precision")] - public double AvgPrecision { get; init; } - [JsonInclude, JsonPropertyName("classes")] - public IReadOnlyCollection Classes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryRecall.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryRecall.g.cs deleted file mode 100644 index 724a607404f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeClassificationSummaryRecall.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeClassificationSummaryRecall -{ - [JsonInclude, JsonPropertyName("avg_recall")] - public double AvgRecall { get; init; } - [JsonInclude, JsonPropertyName("classes")] - public IReadOnlyCollection Classes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluation.g.cs deleted file mode 100644 index 1d558249276..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluation.g.cs +++ /dev/null @@ -1,257 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -[JsonConverter(typeof(DataframeEvaluationConverter))] -public sealed partial class DataframeEvaluation -{ - internal DataframeEvaluation(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 DataframeEvaluation Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassification dataframeEvaluationClassification) => new DataframeEvaluation("classification", dataframeEvaluationClassification); - public static DataframeEvaluation OutlierDetection(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetection dataframeEvaluationOutlierDetection) => new DataframeEvaluation("outlier_detection", dataframeEvaluationOutlierDetection); - public static DataframeEvaluation Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegression dataframeEvaluationRegression) => new DataframeEvaluation("regression", dataframeEvaluationRegression); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class DataframeEvaluationConverter : JsonConverter -{ - public override DataframeEvaluation 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; - 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 == "classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "outlier_detection") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regression") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'DataframeEvaluation' from the response."); - } - - var result = new DataframeEvaluation(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, DataframeEvaluation value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassification)value.Variant, options); - break; - case "outlier_detection": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetection)value.Variant, options); - break; - case "regression": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegression)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeEvaluationDescriptor : SerializableDescriptor> -{ - internal DataframeEvaluationDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeEvaluationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DataframeEvaluationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DataframeEvaluationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public DataframeEvaluationDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassification dataframeEvaluationClassification) => Set(dataframeEvaluationClassification, "classification"); - public DataframeEvaluationDescriptor Classification(Action> configure) => Set(configure, "classification"); - public DataframeEvaluationDescriptor OutlierDetection(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetection dataframeEvaluationOutlierDetection) => Set(dataframeEvaluationOutlierDetection, "outlier_detection"); - public DataframeEvaluationDescriptor OutlierDetection(Action> configure) => Set(configure, "outlier_detection"); - public DataframeEvaluationDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegression dataframeEvaluationRegression) => Set(dataframeEvaluationRegression, "regression"); - public DataframeEvaluationDescriptor Regression(Action> configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeEvaluationDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DataframeEvaluationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DataframeEvaluationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public DataframeEvaluationDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassification dataframeEvaluationClassification) => Set(dataframeEvaluationClassification, "classification"); - public DataframeEvaluationDescriptor Classification(Action configure) => Set(configure, "classification"); - public DataframeEvaluationDescriptor OutlierDetection(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetection dataframeEvaluationOutlierDetection) => Set(dataframeEvaluationOutlierDetection, "outlier_detection"); - public DataframeEvaluationDescriptor OutlierDetection(Action configure) => Set(configure, "outlier_detection"); - public DataframeEvaluationDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegression dataframeEvaluationRegression) => Set(dataframeEvaluationRegression, "regression"); - public DataframeEvaluationDescriptor Regression(Action configure) => Set(configure, "regression"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClass.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClass.g.cs deleted file mode 100644 index d57392546ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClass.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationClass -{ - [JsonInclude, JsonPropertyName("class_name")] - public string ClassName { get; init; } - [JsonInclude, JsonPropertyName("value")] - public double Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassification.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassification.g.cs deleted file mode 100644 index b41069346fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassification.g.cs +++ /dev/null @@ -1,425 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationClassification -{ - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - [JsonInclude, JsonPropertyName("actual_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field ActualField { get; set; } - - /// - /// - /// Specifies the metrics that are used for the evaluation. - /// - /// - [JsonInclude, JsonPropertyName("metrics")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetrics? Metrics { get; set; } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - [JsonInclude, JsonPropertyName("predicted_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? PredictedField { get; set; } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - [JsonInclude, JsonPropertyName("top_classes_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TopClassesField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation(DataframeEvaluationClassification dataframeEvaluationClassification) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation.Classification(dataframeEvaluationClassification); -} - -public sealed partial class DataframeEvaluationClassificationDescriptor : SerializableDescriptor> -{ - internal DataframeEvaluationClassificationDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeEvaluationClassificationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field ActualFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetrics? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PredictedFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TopClassesFieldValue { get; set; } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationClassificationDescriptor ActualField(Elastic.Clients.Elasticsearch.Serverless.Field actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationClassificationDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationClassificationDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// Specifies the metrics that are used for the evaluation. - /// - /// - public DataframeEvaluationClassificationDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetrics? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsValue = metrics; - return Self; - } - - public DataframeEvaluationClassificationDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationClassificationDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - public DataframeEvaluationClassificationDescriptor PredictedField(Elastic.Clients.Elasticsearch.Serverless.Field? predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - public DataframeEvaluationClassificationDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - public DataframeEvaluationClassificationDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - public DataframeEvaluationClassificationDescriptor TopClassesField(Elastic.Clients.Elasticsearch.Serverless.Field? topClassesField) - { - TopClassesFieldValue = topClassesField; - return Self; - } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - public DataframeEvaluationClassificationDescriptor TopClassesField(Expression> topClassesField) - { - TopClassesFieldValue = topClassesField; - return Self; - } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - public DataframeEvaluationClassificationDescriptor TopClassesField(Expression> topClassesField) - { - TopClassesFieldValue = topClassesField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actual_field"); - JsonSerializer.Serialize(writer, ActualFieldValue, options); - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - } - - if (PredictedFieldValue is not null) - { - writer.WritePropertyName("predicted_field"); - JsonSerializer.Serialize(writer, PredictedFieldValue, options); - } - - if (TopClassesFieldValue is not null) - { - writer.WritePropertyName("top_classes_field"); - JsonSerializer.Serialize(writer, TopClassesFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeEvaluationClassificationDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationClassificationDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationClassificationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field ActualFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetrics? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PredictedFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TopClassesFieldValue { get; set; } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationClassificationDescriptor ActualField(Elastic.Clients.Elasticsearch.Serverless.Field actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationClassificationDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationClassificationDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// Specifies the metrics that are used for the evaluation. - /// - /// - public DataframeEvaluationClassificationDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetrics? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsValue = metrics; - return Self; - } - - public DataframeEvaluationClassificationDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationClassificationDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - public DataframeEvaluationClassificationDescriptor PredictedField(Elastic.Clients.Elasticsearch.Serverless.Field? predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - public DataframeEvaluationClassificationDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index which contains the predicted value, in other words the results of the classification analysis. - /// - /// - public DataframeEvaluationClassificationDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - public DataframeEvaluationClassificationDescriptor TopClassesField(Elastic.Clients.Elasticsearch.Serverless.Field? topClassesField) - { - TopClassesFieldValue = topClassesField; - return Self; - } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - public DataframeEvaluationClassificationDescriptor TopClassesField(Expression> topClassesField) - { - TopClassesFieldValue = topClassesField; - return Self; - } - - /// - /// - /// The field of the index which is an array of documents of the form { "class_name": XXX, "class_probability": YYY }. This field must be defined as nested in the mappings. - /// - /// - public DataframeEvaluationClassificationDescriptor TopClassesField(Expression> topClassesField) - { - TopClassesFieldValue = topClassesField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actual_field"); - JsonSerializer.Serialize(writer, ActualFieldValue, options); - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - } - - if (PredictedFieldValue is not null) - { - writer.WritePropertyName("predicted_field"); - JsonSerializer.Serialize(writer, PredictedFieldValue, options); - } - - if (TopClassesFieldValue is not null) - { - writer.WritePropertyName("top_classes_field"); - JsonSerializer.Serialize(writer, TopClassesFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetrics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetrics.g.cs deleted file mode 100644 index f776f2df50a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetrics.g.cs +++ /dev/null @@ -1,207 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationClassificationMetrics -{ - /// - /// - /// Accuracy of predictions (per-class and overall). - /// - /// - [JsonInclude, JsonPropertyName("accuracy")] - public IDictionary? Accuracy { get; set; } - - /// - /// - /// The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. It is calculated for a specific class (provided as "class_name") treated as positive. - /// - /// - [JsonInclude, JsonPropertyName("auc_roc")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRoc? AucRoc { get; set; } - - /// - /// - /// Multiclass confusion matrix. - /// - /// - [JsonInclude, JsonPropertyName("multiclass_confusion_matrix")] - public IDictionary? MulticlassConfusionMatrix { get; set; } - - /// - /// - /// Precision of predictions (per-class and average). - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public IDictionary? Precision { get; set; } - - /// - /// - /// Recall of predictions (per-class and average). - /// - /// - [JsonInclude, JsonPropertyName("recall")] - public IDictionary? Recall { get; set; } -} - -public sealed partial class DataframeEvaluationClassificationMetricsDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationClassificationMetricsDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationClassificationMetricsDescriptor() : base() - { - } - - private IDictionary? AccuracyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRoc? AucRocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRocDescriptor AucRocDescriptor { get; set; } - private Action AucRocDescriptorAction { get; set; } - private IDictionary? MulticlassConfusionMatrixValue { get; set; } - private IDictionary? PrecisionValue { get; set; } - private IDictionary? RecallValue { get; set; } - - /// - /// - /// Accuracy of predictions (per-class and overall). - /// - /// - public DataframeEvaluationClassificationMetricsDescriptor Accuracy(Func, FluentDictionary> selector) - { - AccuracyValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. It is calculated for a specific class (provided as "class_name") treated as positive. - /// - /// - public DataframeEvaluationClassificationMetricsDescriptor AucRoc(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRoc? aucRoc) - { - AucRocDescriptor = null; - AucRocDescriptorAction = null; - AucRocValue = aucRoc; - return Self; - } - - public DataframeEvaluationClassificationMetricsDescriptor AucRoc(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRocDescriptor descriptor) - { - AucRocValue = null; - AucRocDescriptorAction = null; - AucRocDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationClassificationMetricsDescriptor AucRoc(Action configure) - { - AucRocValue = null; - AucRocDescriptor = null; - AucRocDescriptorAction = configure; - return Self; - } - - /// - /// - /// Multiclass confusion matrix. - /// - /// - public DataframeEvaluationClassificationMetricsDescriptor MulticlassConfusionMatrix(Func, FluentDictionary> selector) - { - MulticlassConfusionMatrixValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Precision of predictions (per-class and average). - /// - /// - public DataframeEvaluationClassificationMetricsDescriptor Precision(Func, FluentDictionary> selector) - { - PrecisionValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Recall of predictions (per-class and average). - /// - /// - public DataframeEvaluationClassificationMetricsDescriptor Recall(Func, FluentDictionary> selector) - { - RecallValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AccuracyValue is not null) - { - writer.WritePropertyName("accuracy"); - JsonSerializer.Serialize(writer, AccuracyValue, options); - } - - if (AucRocDescriptor is not null) - { - writer.WritePropertyName("auc_roc"); - JsonSerializer.Serialize(writer, AucRocDescriptor, options); - } - else if (AucRocDescriptorAction is not null) - { - writer.WritePropertyName("auc_roc"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRocDescriptor(AucRocDescriptorAction), options); - } - else if (AucRocValue is not null) - { - writer.WritePropertyName("auc_roc"); - JsonSerializer.Serialize(writer, AucRocValue, options); - } - - if (MulticlassConfusionMatrixValue is not null) - { - writer.WritePropertyName("multiclass_confusion_matrix"); - JsonSerializer.Serialize(writer, MulticlassConfusionMatrixValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - if (RecallValue is not null) - { - writer.WritePropertyName("recall"); - JsonSerializer.Serialize(writer, RecallValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs deleted file mode 100644 index 4c8632f587f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationClassificationMetricsAucRoc -{ - /// - /// - /// Name of the only class that is treated as positive during AUC ROC calculation. Other classes are treated as negative ("one-vs-all" strategy). All the evaluated documents must have class_name in the list of their top classes. - /// - /// - [JsonInclude, JsonPropertyName("class_name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? ClassName { get; set; } - - /// - /// - /// Whether or not the curve should be returned in addition to the score. Default value is false. - /// - /// - [JsonInclude, JsonPropertyName("include_curve")] - public bool? IncludeCurve { get; set; } -} - -public sealed partial class DataframeEvaluationClassificationMetricsAucRocDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationClassificationMetricsAucRocDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationClassificationMetricsAucRocDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Name? ClassNameValue { get; set; } - private bool? IncludeCurveValue { get; set; } - - /// - /// - /// Name of the only class that is treated as positive during AUC ROC calculation. Other classes are treated as negative ("one-vs-all" strategy). All the evaluated documents must have class_name in the list of their top classes. - /// - /// - public DataframeEvaluationClassificationMetricsAucRocDescriptor ClassName(Elastic.Clients.Elasticsearch.Serverless.Name? className) - { - ClassNameValue = className; - return Self; - } - - /// - /// - /// Whether or not the curve should be returned in addition to the score. Default value is false. - /// - /// - public DataframeEvaluationClassificationMetricsAucRocDescriptor IncludeCurve(bool? includeCurve = true) - { - IncludeCurveValue = includeCurve; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ClassNameValue is not null) - { - writer.WritePropertyName("class_name"); - JsonSerializer.Serialize(writer, ClassNameValue, options); - } - - if (IncludeCurveValue.HasValue) - { - writer.WritePropertyName("include_curve"); - writer.WriteBooleanValue(IncludeCurveValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetection.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetection.g.cs deleted file mode 100644 index d0e2c195922..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetection.g.cs +++ /dev/null @@ -1,329 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationOutlierDetection -{ - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - [JsonInclude, JsonPropertyName("actual_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field ActualField { get; set; } - - /// - /// - /// Specifies the metrics that are used for the evaluation. - /// - /// - [JsonInclude, JsonPropertyName("metrics")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetrics? Metrics { get; set; } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - [JsonInclude, JsonPropertyName("predicted_probability_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field PredictedProbabilityField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation(DataframeEvaluationOutlierDetection dataframeEvaluationOutlierDetection) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation.OutlierDetection(dataframeEvaluationOutlierDetection); -} - -public sealed partial class DataframeEvaluationOutlierDetectionDescriptor : SerializableDescriptor> -{ - internal DataframeEvaluationOutlierDetectionDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeEvaluationOutlierDetectionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field ActualFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetrics? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetricsDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PredictedProbabilityFieldValue { get; set; } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor ActualField(Elastic.Clients.Elasticsearch.Serverless.Field actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// Specifies the metrics that are used for the evaluation. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetrics? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsValue = metrics; - return Self; - } - - public DataframeEvaluationOutlierDetectionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetricsDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationOutlierDetectionDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor PredictedProbabilityField(Elastic.Clients.Elasticsearch.Serverless.Field predictedProbabilityField) - { - PredictedProbabilityFieldValue = predictedProbabilityField; - return Self; - } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor PredictedProbabilityField(Expression> predictedProbabilityField) - { - PredictedProbabilityFieldValue = predictedProbabilityField; - return Self; - } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor PredictedProbabilityField(Expression> predictedProbabilityField) - { - PredictedProbabilityFieldValue = predictedProbabilityField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actual_field"); - JsonSerializer.Serialize(writer, ActualFieldValue, options); - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetricsDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - } - - writer.WritePropertyName("predicted_probability_field"); - JsonSerializer.Serialize(writer, PredictedProbabilityFieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeEvaluationOutlierDetectionDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationOutlierDetectionDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationOutlierDetectionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field ActualFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetrics? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetricsDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PredictedProbabilityFieldValue { get; set; } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor ActualField(Elastic.Clients.Elasticsearch.Serverless.Field actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field can be boolean or integer. If the data type is integer, the value has to be either 0 (false) or 1 (true). - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// Specifies the metrics that are used for the evaluation. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetrics? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsValue = metrics; - return Self; - } - - public DataframeEvaluationOutlierDetectionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetricsDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationOutlierDetectionDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor PredictedProbabilityField(Elastic.Clients.Elasticsearch.Serverless.Field predictedProbabilityField) - { - PredictedProbabilityFieldValue = predictedProbabilityField; - return Self; - } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor PredictedProbabilityField(Expression> predictedProbabilityField) - { - PredictedProbabilityFieldValue = predictedProbabilityField; - return Self; - } - - /// - /// - /// The field of the index that defines the probability of whether the item belongs to the class in question or not. It’s the field that contains the results of the analysis. - /// - /// - public DataframeEvaluationOutlierDetectionDescriptor PredictedProbabilityField(Expression> predictedProbabilityField) - { - PredictedProbabilityFieldValue = predictedProbabilityField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actual_field"); - JsonSerializer.Serialize(writer, ActualFieldValue, options); - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationOutlierDetectionMetricsDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - } - - writer.WritePropertyName("predicted_probability_field"); - JsonSerializer.Serialize(writer, PredictedProbabilityFieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetectionMetrics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetectionMetrics.g.cs deleted file mode 100644 index 708bc5f7268..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationOutlierDetectionMetrics.g.cs +++ /dev/null @@ -1,181 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationOutlierDetectionMetrics -{ - /// - /// - /// The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. It is calculated for a specific class (provided as "class_name") treated as positive. - /// - /// - [JsonInclude, JsonPropertyName("auc_roc")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRoc? AucRoc { get; set; } - - /// - /// - /// Accuracy of predictions (per-class and overall). - /// - /// - [JsonInclude, JsonPropertyName("confusion_matrix")] - public IDictionary? ConfusionMatrix { get; set; } - - /// - /// - /// Precision of predictions (per-class and average). - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public IDictionary? Precision { get; set; } - - /// - /// - /// Recall of predictions (per-class and average). - /// - /// - [JsonInclude, JsonPropertyName("recall")] - public IDictionary? Recall { get; set; } -} - -public sealed partial class DataframeEvaluationOutlierDetectionMetricsDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationOutlierDetectionMetricsDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationOutlierDetectionMetricsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRoc? AucRocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRocDescriptor AucRocDescriptor { get; set; } - private Action AucRocDescriptorAction { get; set; } - private IDictionary? ConfusionMatrixValue { get; set; } - private IDictionary? PrecisionValue { get; set; } - private IDictionary? RecallValue { get; set; } - - /// - /// - /// The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. It is calculated for a specific class (provided as "class_name") treated as positive. - /// - /// - public DataframeEvaluationOutlierDetectionMetricsDescriptor AucRoc(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRoc? aucRoc) - { - AucRocDescriptor = null; - AucRocDescriptorAction = null; - AucRocValue = aucRoc; - return Self; - } - - public DataframeEvaluationOutlierDetectionMetricsDescriptor AucRoc(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRocDescriptor descriptor) - { - AucRocValue = null; - AucRocDescriptorAction = null; - AucRocDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationOutlierDetectionMetricsDescriptor AucRoc(Action configure) - { - AucRocValue = null; - AucRocDescriptor = null; - AucRocDescriptorAction = configure; - return Self; - } - - /// - /// - /// Accuracy of predictions (per-class and overall). - /// - /// - public DataframeEvaluationOutlierDetectionMetricsDescriptor ConfusionMatrix(Func, FluentDictionary> selector) - { - ConfusionMatrixValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Precision of predictions (per-class and average). - /// - /// - public DataframeEvaluationOutlierDetectionMetricsDescriptor Precision(Func, FluentDictionary> selector) - { - PrecisionValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Recall of predictions (per-class and average). - /// - /// - public DataframeEvaluationOutlierDetectionMetricsDescriptor Recall(Func, FluentDictionary> selector) - { - RecallValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AucRocDescriptor is not null) - { - writer.WritePropertyName("auc_roc"); - JsonSerializer.Serialize(writer, AucRocDescriptor, options); - } - else if (AucRocDescriptorAction is not null) - { - writer.WritePropertyName("auc_roc"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationClassificationMetricsAucRocDescriptor(AucRocDescriptorAction), options); - } - else if (AucRocValue is not null) - { - writer.WritePropertyName("auc_roc"); - JsonSerializer.Serialize(writer, AucRocValue, options); - } - - if (ConfusionMatrixValue is not null) - { - writer.WritePropertyName("confusion_matrix"); - JsonSerializer.Serialize(writer, ConfusionMatrixValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - if (RecallValue is not null) - { - writer.WritePropertyName("recall"); - JsonSerializer.Serialize(writer, RecallValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegression.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegression.g.cs deleted file mode 100644 index d232ce84dd3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegression.g.cs +++ /dev/null @@ -1,329 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationRegression -{ - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - [JsonInclude, JsonPropertyName("actual_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field ActualField { get; set; } - - /// - /// - /// Specifies the metrics that are used for the evaluation. For more information on mse, msle, and huber, consult the Jupyter notebook on regression loss functions. - /// - /// - [JsonInclude, JsonPropertyName("metrics")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetrics? Metrics { get; set; } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - [JsonInclude, JsonPropertyName("predicted_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field PredictedField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation(DataframeEvaluationRegression dataframeEvaluationRegression) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluation.Regression(dataframeEvaluationRegression); -} - -public sealed partial class DataframeEvaluationRegressionDescriptor : SerializableDescriptor> -{ - internal DataframeEvaluationRegressionDescriptor(Action> configure) => configure.Invoke(this); - - public DataframeEvaluationRegressionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field ActualFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetrics? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PredictedFieldValue { get; set; } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - public DataframeEvaluationRegressionDescriptor ActualField(Elastic.Clients.Elasticsearch.Serverless.Field actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - public DataframeEvaluationRegressionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - public DataframeEvaluationRegressionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// Specifies the metrics that are used for the evaluation. For more information on mse, msle, and huber, consult the Jupyter notebook on regression loss functions. - /// - /// - public DataframeEvaluationRegressionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetrics? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsValue = metrics; - return Self; - } - - public DataframeEvaluationRegressionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationRegressionDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - public DataframeEvaluationRegressionDescriptor PredictedField(Elastic.Clients.Elasticsearch.Serverless.Field predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - public DataframeEvaluationRegressionDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - public DataframeEvaluationRegressionDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actual_field"); - JsonSerializer.Serialize(writer, ActualFieldValue, options); - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - } - - writer.WritePropertyName("predicted_field"); - JsonSerializer.Serialize(writer, PredictedFieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class DataframeEvaluationRegressionDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationRegressionDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationRegressionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field ActualFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetrics? MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsDescriptor MetricsDescriptor { get; set; } - private Action MetricsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PredictedFieldValue { get; set; } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - public DataframeEvaluationRegressionDescriptor ActualField(Elastic.Clients.Elasticsearch.Serverless.Field actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - public DataframeEvaluationRegressionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// The field of the index which contains the ground truth. The data type of this field must be numerical. - /// - /// - public DataframeEvaluationRegressionDescriptor ActualField(Expression> actualField) - { - ActualFieldValue = actualField; - return Self; - } - - /// - /// - /// Specifies the metrics that are used for the evaluation. For more information on mse, msle, and huber, consult the Jupyter notebook on regression loss functions. - /// - /// - public DataframeEvaluationRegressionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetrics? metrics) - { - MetricsDescriptor = null; - MetricsDescriptorAction = null; - MetricsValue = metrics; - return Self; - } - - public DataframeEvaluationRegressionDescriptor Metrics(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsDescriptor descriptor) - { - MetricsValue = null; - MetricsDescriptorAction = null; - MetricsDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationRegressionDescriptor Metrics(Action configure) - { - MetricsValue = null; - MetricsDescriptor = null; - MetricsDescriptorAction = configure; - return Self; - } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - public DataframeEvaluationRegressionDescriptor PredictedField(Elastic.Clients.Elasticsearch.Serverless.Field predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - public DataframeEvaluationRegressionDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - /// - /// - /// The field in the index that contains the predicted value, in other words the results of the regression analysis. - /// - /// - public DataframeEvaluationRegressionDescriptor PredictedField(Expression> predictedField) - { - PredictedFieldValue = predictedField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actual_field"); - JsonSerializer.Serialize(writer, ActualFieldValue, options); - if (MetricsDescriptor is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsDescriptor, options); - } - else if (MetricsDescriptorAction is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsDescriptor(MetricsDescriptorAction), options); - } - else if (MetricsValue is not null) - { - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - } - - writer.WritePropertyName("predicted_field"); - JsonSerializer.Serialize(writer, PredictedFieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetrics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetrics.g.cs deleted file mode 100644 index f360d6b2ad1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetrics.g.cs +++ /dev/null @@ -1,211 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationRegressionMetrics -{ - /// - /// - /// Pseudo Huber loss function. - /// - /// - [JsonInclude, JsonPropertyName("huber")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsHuber? Huber { get; set; } - - /// - /// - /// Average squared difference between the predicted values and the actual (ground truth) value. For more information, read this wiki article. - /// - /// - [JsonInclude, JsonPropertyName("mse")] - public IDictionary? Mse { get; set; } - - /// - /// - /// Average squared difference between the logarithm of the predicted values and the logarithm of the actual (ground truth) value. - /// - /// - [JsonInclude, JsonPropertyName("msle")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsMsle? Msle { get; set; } - - /// - /// - /// Proportion of the variance in the dependent variable that is predictable from the independent variables. - /// - /// - [JsonInclude, JsonPropertyName("r_squared")] - public IDictionary? RSquared { get; set; } -} - -public sealed partial class DataframeEvaluationRegressionMetricsDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationRegressionMetricsDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationRegressionMetricsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsHuber? HuberValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsHuberDescriptor HuberDescriptor { get; set; } - private Action HuberDescriptorAction { get; set; } - private IDictionary? MseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsMsle? MsleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsMsleDescriptor MsleDescriptor { get; set; } - private Action MsleDescriptorAction { get; set; } - private IDictionary? RSquaredValue { get; set; } - - /// - /// - /// Pseudo Huber loss function. - /// - /// - public DataframeEvaluationRegressionMetricsDescriptor Huber(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsHuber? huber) - { - HuberDescriptor = null; - HuberDescriptorAction = null; - HuberValue = huber; - return Self; - } - - public DataframeEvaluationRegressionMetricsDescriptor Huber(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsHuberDescriptor descriptor) - { - HuberValue = null; - HuberDescriptorAction = null; - HuberDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationRegressionMetricsDescriptor Huber(Action configure) - { - HuberValue = null; - HuberDescriptor = null; - HuberDescriptorAction = configure; - return Self; - } - - /// - /// - /// Average squared difference between the predicted values and the actual (ground truth) value. For more information, read this wiki article. - /// - /// - public DataframeEvaluationRegressionMetricsDescriptor Mse(Func, FluentDictionary> selector) - { - MseValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Average squared difference between the logarithm of the predicted values and the logarithm of the actual (ground truth) value. - /// - /// - public DataframeEvaluationRegressionMetricsDescriptor Msle(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsMsle? msle) - { - MsleDescriptor = null; - MsleDescriptorAction = null; - MsleValue = msle; - return Self; - } - - public DataframeEvaluationRegressionMetricsDescriptor Msle(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsMsleDescriptor descriptor) - { - MsleValue = null; - MsleDescriptorAction = null; - MsleDescriptor = descriptor; - return Self; - } - - public DataframeEvaluationRegressionMetricsDescriptor Msle(Action configure) - { - MsleValue = null; - MsleDescriptor = null; - MsleDescriptorAction = configure; - return Self; - } - - /// - /// - /// Proportion of the variance in the dependent variable that is predictable from the independent variables. - /// - /// - public DataframeEvaluationRegressionMetricsDescriptor RSquared(Func, FluentDictionary> selector) - { - RSquaredValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (HuberDescriptor is not null) - { - writer.WritePropertyName("huber"); - JsonSerializer.Serialize(writer, HuberDescriptor, options); - } - else if (HuberDescriptorAction is not null) - { - writer.WritePropertyName("huber"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsHuberDescriptor(HuberDescriptorAction), options); - } - else if (HuberValue is not null) - { - writer.WritePropertyName("huber"); - JsonSerializer.Serialize(writer, HuberValue, options); - } - - if (MseValue is not null) - { - writer.WritePropertyName("mse"); - JsonSerializer.Serialize(writer, MseValue, options); - } - - if (MsleDescriptor is not null) - { - writer.WritePropertyName("msle"); - JsonSerializer.Serialize(writer, MsleDescriptor, options); - } - else if (MsleDescriptorAction is not null) - { - writer.WritePropertyName("msle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationRegressionMetricsMsleDescriptor(MsleDescriptorAction), options); - } - else if (MsleValue is not null) - { - writer.WritePropertyName("msle"); - JsonSerializer.Serialize(writer, MsleValue, options); - } - - if (RSquaredValue is not null) - { - writer.WritePropertyName("r_squared"); - JsonSerializer.Serialize(writer, RSquaredValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs deleted file mode 100644 index e1388d95a21..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationRegressionMetricsHuber -{ - /// - /// - /// Approximates 1/2 (prediction - actual)2 for values much less than delta and approximates a straight line with slope delta for values much larger than delta. Defaults to 1. Delta needs to be greater than 0. - /// - /// - [JsonInclude, JsonPropertyName("delta")] - public double? Delta { get; set; } -} - -public sealed partial class DataframeEvaluationRegressionMetricsHuberDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationRegressionMetricsHuberDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationRegressionMetricsHuberDescriptor() : base() - { - } - - private double? DeltaValue { get; set; } - - /// - /// - /// Approximates 1/2 (prediction - actual)2 for values much less than delta and approximates a straight line with slope delta for values much larger than delta. Defaults to 1. Delta needs to be greater than 0. - /// - /// - public DataframeEvaluationRegressionMetricsHuberDescriptor Delta(double? delta) - { - DeltaValue = delta; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DeltaValue.HasValue) - { - writer.WritePropertyName("delta"); - writer.WriteNumberValue(DeltaValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs deleted file mode 100644 index 0d7b10c329d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationRegressionMetricsMsle -{ - /// - /// - /// Defines the transition point at which you switch from minimizing quadratic error to minimizing quadratic log error. Defaults to 1. - /// - /// - [JsonInclude, JsonPropertyName("offset")] - public double? Offset { get; set; } -} - -public sealed partial class DataframeEvaluationRegressionMetricsMsleDescriptor : SerializableDescriptor -{ - internal DataframeEvaluationRegressionMetricsMsleDescriptor(Action configure) => configure.Invoke(this); - - public DataframeEvaluationRegressionMetricsMsleDescriptor() : base() - { - } - - private double? OffsetValue { get; set; } - - /// - /// - /// Defines the transition point at which you switch from minimizing quadratic error to minimizing quadratic log error. Defaults to 1. - /// - /// - public DataframeEvaluationRegressionMetricsMsleDescriptor Offset(double? offset) - { - OffsetValue = offset; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (OffsetValue.HasValue) - { - writer.WritePropertyName("offset"); - writer.WriteNumberValue(OffsetValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRoc.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRoc.g.cs deleted file mode 100644 index b1868bf3ba3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRoc.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationSummaryAucRoc -{ - [JsonInclude, JsonPropertyName("curve")] - public IReadOnlyCollection? Curve { get; init; } - [JsonInclude, JsonPropertyName("value")] - public double Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRocCurveItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRocCurveItem.g.cs deleted file mode 100644 index 6475a4ac6c5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationSummaryAucRocCurveItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationSummaryAucRocCurveItem -{ - [JsonInclude, JsonPropertyName("fpr")] - public double Fpr { get; init; } - [JsonInclude, JsonPropertyName("threshold")] - public double Threshold { get; init; } - [JsonInclude, JsonPropertyName("tpr")] - public double Tpr { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationValue.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationValue.g.cs deleted file mode 100644 index 1fecfee17d8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeEvaluationValue.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeEvaluationValue -{ - [JsonInclude, JsonPropertyName("value")] - public double Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeOutlierDetectionSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeOutlierDetectionSummary.g.cs deleted file mode 100644 index 43170ed7f19..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeOutlierDetectionSummary.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeOutlierDetectionSummary -{ - /// - /// - /// The AUC ROC (area under the curve of the receiver operating characteristic) score and optionally the curve. - /// - /// - [JsonInclude, JsonPropertyName("auc_roc")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationSummaryAucRoc? AucRoc { get; init; } - - /// - /// - /// Set the different thresholds of the outlier score at where the metrics (tp - true positive, fp - false positive, tn - true negative, fn - false negative) are calculated. - /// - /// - [JsonInclude, JsonPropertyName("confusion_matrix")] - public IReadOnlyDictionary? ConfusionMatrix { get; init; } - - /// - /// - /// Set the different thresholds of the outlier score at where the metric is calculated. - /// - /// - [JsonInclude, JsonPropertyName("precision")] - public IReadOnlyDictionary? Precision { get; init; } - - /// - /// - /// Set the different thresholds of the outlier score at where the metric is calculated. - /// - /// - [JsonInclude, JsonPropertyName("recall")] - public IReadOnlyDictionary? Recall { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs deleted file mode 100644 index e75fa0df884..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs +++ /dev/null @@ -1,384 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframePreviewConfig -{ - [JsonInclude, JsonPropertyName("analysis")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis Analysis { get; set; } - [JsonInclude, JsonPropertyName("analyzed_fields")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFields { get; set; } - [JsonInclude, JsonPropertyName("max_num_threads")] - public int? MaxNumThreads { get; set; } - [JsonInclude, JsonPropertyName("model_memory_limit")] - public string? ModelMemoryLimit { get; set; } - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource Source { get; set; } -} - -public sealed partial class DataframePreviewConfigDescriptor : SerializableDescriptor> -{ - internal DataframePreviewConfigDescriptor(Action> configure) => configure.Invoke(this); - - public DataframePreviewConfigDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action> AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor AnalyzedFieldsDescriptor { get; set; } - private Action AnalyzedFieldsDescriptorAction { get; set; } - private int? MaxNumThreadsValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } - - public DataframePreviewConfigDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public DataframePreviewConfigDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public DataframePreviewConfigDescriptor Analysis(Action> configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - public DataframePreviewConfigDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? analyzedFields) - { - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsValue = analyzedFields; - return Self; - } - - public DataframePreviewConfigDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsDescriptor = descriptor; - return Self; - } - - public DataframePreviewConfigDescriptor AnalyzedFields(Action configure) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = configure; - return Self; - } - - public DataframePreviewConfigDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - public DataframePreviewConfigDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - public DataframePreviewConfigDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public DataframePreviewConfigDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public DataframePreviewConfigDescriptor Source(Action> configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzedFieldsDescriptor is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsDescriptor, options); - } - else if (AnalyzedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(AnalyzedFieldsDescriptorAction), options); - } - else if (AnalyzedFieldsValue is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsValue, options); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DataframePreviewConfigDescriptor : SerializableDescriptor -{ - internal DataframePreviewConfigDescriptor(Action configure) => configure.Invoke(this); - - public DataframePreviewConfigDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis AnalysisValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor AnalysisDescriptor { get; set; } - private Action AnalysisDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? AnalyzedFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor AnalyzedFieldsDescriptor { get; set; } - private Action AnalyzedFieldsDescriptorAction { get; set; } - private int? MaxNumThreadsValue { get; set; } - private string? ModelMemoryLimitValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - - public DataframePreviewConfigDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysis analysis) - { - AnalysisDescriptor = null; - AnalysisDescriptorAction = null; - AnalysisValue = analysis; - return Self; - } - - public DataframePreviewConfigDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor descriptor) - { - AnalysisValue = null; - AnalysisDescriptorAction = null; - AnalysisDescriptor = descriptor; - return Self; - } - - public DataframePreviewConfigDescriptor Analysis(Action configure) - { - AnalysisValue = null; - AnalysisDescriptor = null; - AnalysisDescriptorAction = configure; - return Self; - } - - public DataframePreviewConfigDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFields? analyzedFields) - { - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsValue = analyzedFields; - return Self; - } - - public DataframePreviewConfigDescriptor AnalyzedFields(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor descriptor) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptorAction = null; - AnalyzedFieldsDescriptor = descriptor; - return Self; - } - - public DataframePreviewConfigDescriptor AnalyzedFields(Action configure) - { - AnalyzedFieldsValue = null; - AnalyzedFieldsDescriptor = null; - AnalyzedFieldsDescriptorAction = configure; - return Self; - } - - public DataframePreviewConfigDescriptor MaxNumThreads(int? maxNumThreads) - { - MaxNumThreadsValue = maxNumThreads; - return Self; - } - - public DataframePreviewConfigDescriptor ModelMemoryLimit(string? modelMemoryLimit) - { - ModelMemoryLimitValue = modelMemoryLimit; - return Self; - } - - public DataframePreviewConfigDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSource source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public DataframePreviewConfigDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public DataframePreviewConfigDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalysisDescriptor is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisDescriptor, options); - } - else if (AnalysisDescriptorAction is not null) - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisDescriptor(AnalysisDescriptorAction), options); - } - else - { - writer.WritePropertyName("analysis"); - JsonSerializer.Serialize(writer, AnalysisValue, options); - } - - if (AnalyzedFieldsDescriptor is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsDescriptor, options); - } - else if (AnalyzedFieldsDescriptorAction is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(AnalyzedFieldsDescriptorAction), options); - } - else if (AnalyzedFieldsValue is not null) - { - writer.WritePropertyName("analyzed_fields"); - JsonSerializer.Serialize(writer, AnalyzedFieldsValue, options); - } - - if (MaxNumThreadsValue.HasValue) - { - writer.WritePropertyName("max_num_threads"); - writer.WriteNumberValue(MaxNumThreadsValue.Value); - } - - if (!string.IsNullOrEmpty(ModelMemoryLimitValue)) - { - writer.WritePropertyName("model_memory_limit"); - writer.WriteStringValue(ModelMemoryLimitValue); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeAnalyticsSourceDescriptor(SourceDescriptorAction), options); - } - else - { - writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeRegressionSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeRegressionSummary.g.cs deleted file mode 100644 index 9d5ce63f9e8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DataframeRegressionSummary.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DataframeRegressionSummary -{ - /// - /// - /// Pseudo Huber loss function. - /// - /// - [JsonInclude, JsonPropertyName("huber")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationValue? Huber { get; init; } - - /// - /// - /// Average squared difference between the predicted values and the actual (ground truth) value. - /// - /// - [JsonInclude, JsonPropertyName("mse")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationValue? Mse { get; init; } - - /// - /// - /// Average squared difference between the logarithm of the predicted values and the logarithm of the actual (ground truth) value. - /// - /// - [JsonInclude, JsonPropertyName("msle")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationValue? Msle { get; init; } - - /// - /// - /// Proportion of the variance in the dependent variable that is predictable from the independent variables. - /// - /// - [JsonInclude, JsonPropertyName("r_squared")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataframeEvaluationValue? RSquared { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Defaults.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Defaults.g.cs deleted file mode 100644 index 425657063bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Defaults.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Defaults -{ - [JsonInclude, JsonPropertyName("anomaly_detectors")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnomalyDetectors AnomalyDetectors { get; init; } - [JsonInclude, JsonPropertyName("datafeeds")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Datafeeds Datafeeds { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Definition.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Definition.g.cs deleted file mode 100644 index 1e69894799d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Definition.g.cs +++ /dev/null @@ -1,187 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Definition -{ - /// - /// - /// Collection of preprocessors - /// - /// - [JsonInclude, JsonPropertyName("preprocessors")] - public ICollection? Preprocessors { get; set; } - - /// - /// - /// The definition of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("trained_model")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModel TrainedModel { get; set; } -} - -public sealed partial class DefinitionDescriptor : SerializableDescriptor -{ - internal DefinitionDescriptor(Action configure) => configure.Invoke(this); - - public DefinitionDescriptor() : base() - { - } - - private ICollection? PreprocessorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PreprocessorDescriptor PreprocessorsDescriptor { get; set; } - private Action PreprocessorsDescriptorAction { get; set; } - private Action[] PreprocessorsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModel TrainedModelValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor TrainedModelDescriptor { get; set; } - private Action TrainedModelDescriptorAction { get; set; } - - /// - /// - /// Collection of preprocessors - /// - /// - public DefinitionDescriptor Preprocessors(ICollection? preprocessors) - { - PreprocessorsDescriptor = null; - PreprocessorsDescriptorAction = null; - PreprocessorsDescriptorActions = null; - PreprocessorsValue = preprocessors; - return Self; - } - - public DefinitionDescriptor Preprocessors(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PreprocessorDescriptor descriptor) - { - PreprocessorsValue = null; - PreprocessorsDescriptorAction = null; - PreprocessorsDescriptorActions = null; - PreprocessorsDescriptor = descriptor; - return Self; - } - - public DefinitionDescriptor Preprocessors(Action configure) - { - PreprocessorsValue = null; - PreprocessorsDescriptor = null; - PreprocessorsDescriptorActions = null; - PreprocessorsDescriptorAction = configure; - return Self; - } - - public DefinitionDescriptor Preprocessors(params Action[] configure) - { - PreprocessorsValue = null; - PreprocessorsDescriptor = null; - PreprocessorsDescriptorAction = null; - PreprocessorsDescriptorActions = configure; - return Self; - } - - /// - /// - /// The definition of the trained model. - /// - /// - public DefinitionDescriptor TrainedModel(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModel trainedModel) - { - TrainedModelDescriptor = null; - TrainedModelDescriptorAction = null; - TrainedModelValue = trainedModel; - return Self; - } - - public DefinitionDescriptor TrainedModel(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor descriptor) - { - TrainedModelValue = null; - TrainedModelDescriptorAction = null; - TrainedModelDescriptor = descriptor; - return Self; - } - - public DefinitionDescriptor TrainedModel(Action configure) - { - TrainedModelValue = null; - TrainedModelDescriptor = null; - TrainedModelDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PreprocessorsDescriptor is not null) - { - writer.WritePropertyName("preprocessors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, PreprocessorsDescriptor, options); - writer.WriteEndArray(); - } - else if (PreprocessorsDescriptorAction is not null) - { - writer.WritePropertyName("preprocessors"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PreprocessorDescriptor(PreprocessorsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (PreprocessorsDescriptorActions is not null) - { - writer.WritePropertyName("preprocessors"); - writer.WriteStartArray(); - foreach (var action in PreprocessorsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PreprocessorDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (PreprocessorsValue is not null) - { - writer.WritePropertyName("preprocessors"); - JsonSerializer.Serialize(writer, PreprocessorsValue, options); - } - - if (TrainedModelDescriptor is not null) - { - writer.WritePropertyName("trained_model"); - JsonSerializer.Serialize(writer, TrainedModelDescriptor, options); - } - else if (TrainedModelDescriptorAction is not null) - { - writer.WritePropertyName("trained_model"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor(TrainedModelDescriptorAction), options); - } - else - { - writer.WritePropertyName("trained_model"); - JsonSerializer.Serialize(writer, TrainedModelValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DelayedDataCheckConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DelayedDataCheckConfig.g.cs deleted file mode 100644 index ec437ef5102..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DelayedDataCheckConfig.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DelayedDataCheckConfig -{ - /// - /// - /// The window of time that is searched for late data. This window of time ends with the latest finalized bucket. - /// It defaults to null, which causes an appropriate check_window to be calculated when the real-time datafeed runs. - /// In particular, the default check_window span calculation is based on the maximum of 2h or 8 * bucket_span. - /// - /// - [JsonInclude, JsonPropertyName("check_window")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? CheckWindow { get; set; } - - /// - /// - /// Specifies whether the datafeed periodically checks for delayed data. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } -} - -public sealed partial class DelayedDataCheckConfigDescriptor : SerializableDescriptor -{ - internal DelayedDataCheckConfigDescriptor(Action configure) => configure.Invoke(this); - - public DelayedDataCheckConfigDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? CheckWindowValue { get; set; } - private bool EnabledValue { get; set; } - - /// - /// - /// The window of time that is searched for late data. This window of time ends with the latest finalized bucket. - /// It defaults to null, which causes an appropriate check_window to be calculated when the real-time datafeed runs. - /// In particular, the default check_window span calculation is based on the maximum of 2h or 8 * bucket_span. - /// - /// - public DelayedDataCheckConfigDescriptor CheckWindow(Elastic.Clients.Elasticsearch.Serverless.Duration? checkWindow) - { - CheckWindowValue = checkWindow; - return Self; - } - - /// - /// - /// Specifies whether the datafeed periodically checks for delayed data. - /// - /// - public DelayedDataCheckConfigDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CheckWindowValue is not null) - { - writer.WritePropertyName("check_window"); - JsonSerializer.Serialize(writer, CheckWindowValue, options); - } - - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectionRule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectionRule.g.cs deleted file mode 100644 index 23688092d20..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectionRule.g.cs +++ /dev/null @@ -1,311 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DetectionRule -{ - /// - /// - /// The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined. - /// - /// - [JsonInclude, JsonPropertyName("actions")] - public ICollection? Actions { get; set; } - - /// - /// - /// An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND. - /// - /// - [JsonInclude, JsonPropertyName("conditions")] - public ICollection? Conditions { get; set; } - - /// - /// - /// A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified in by_field_name, over_field_name, or partition_field_name. - /// - /// - [JsonInclude, JsonPropertyName("scope")] - public IDictionary? Scope { get; set; } -} - -public sealed partial class DetectionRuleDescriptor : SerializableDescriptor> -{ - internal DetectionRuleDescriptor(Action> configure) => configure.Invoke(this); - - public DetectionRuleDescriptor() : base() - { - } - - private ICollection? ActionsValue { get; set; } - private ICollection? ConditionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor ConditionsDescriptor { get; set; } - private Action ConditionsDescriptorAction { get; set; } - private Action[] ConditionsDescriptorActions { get; set; } - private IDictionary ScopeValue { get; set; } - - /// - /// - /// The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined. - /// - /// - public DetectionRuleDescriptor Actions(ICollection? actions) - { - ActionsValue = actions; - return Self; - } - - /// - /// - /// An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND. - /// - /// - public DetectionRuleDescriptor Conditions(ICollection? conditions) - { - ConditionsDescriptor = null; - ConditionsDescriptorAction = null; - ConditionsDescriptorActions = null; - ConditionsValue = conditions; - return Self; - } - - public DetectionRuleDescriptor Conditions(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor descriptor) - { - ConditionsValue = null; - ConditionsDescriptorAction = null; - ConditionsDescriptorActions = null; - ConditionsDescriptor = descriptor; - return Self; - } - - public DetectionRuleDescriptor Conditions(Action configure) - { - ConditionsValue = null; - ConditionsDescriptor = null; - ConditionsDescriptorActions = null; - ConditionsDescriptorAction = configure; - return Self; - } - - public DetectionRuleDescriptor Conditions(params Action[] configure) - { - ConditionsValue = null; - ConditionsDescriptor = null; - ConditionsDescriptorAction = null; - ConditionsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified in by_field_name, over_field_name, or partition_field_name. - /// - /// - public DetectionRuleDescriptor Scope(Func, FluentDescriptorDictionary> selector) - { - ScopeValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsValue is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - if (ConditionsDescriptor is not null) - { - writer.WritePropertyName("conditions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ConditionsDescriptor, options); - writer.WriteEndArray(); - } - else if (ConditionsDescriptorAction is not null) - { - writer.WritePropertyName("conditions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor(ConditionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ConditionsDescriptorActions is not null) - { - writer.WritePropertyName("conditions"); - writer.WriteStartArray(); - foreach (var action in ConditionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ConditionsValue is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, ConditionsValue, options); - } - - if (ScopeValue is not null) - { - writer.WritePropertyName("scope"); - JsonSerializer.Serialize(writer, ScopeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DetectionRuleDescriptor : SerializableDescriptor -{ - internal DetectionRuleDescriptor(Action configure) => configure.Invoke(this); - - public DetectionRuleDescriptor() : base() - { - } - - private ICollection? ActionsValue { get; set; } - private ICollection? ConditionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor ConditionsDescriptor { get; set; } - private Action ConditionsDescriptorAction { get; set; } - private Action[] ConditionsDescriptorActions { get; set; } - private IDictionary ScopeValue { get; set; } - - /// - /// - /// The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined. - /// - /// - public DetectionRuleDescriptor Actions(ICollection? actions) - { - ActionsValue = actions; - return Self; - } - - /// - /// - /// An array of numeric conditions when the rule applies. A rule must either have a non-empty scope or at least one condition. Multiple conditions are combined together with a logical AND. - /// - /// - public DetectionRuleDescriptor Conditions(ICollection? conditions) - { - ConditionsDescriptor = null; - ConditionsDescriptorAction = null; - ConditionsDescriptorActions = null; - ConditionsValue = conditions; - return Self; - } - - public DetectionRuleDescriptor Conditions(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor descriptor) - { - ConditionsValue = null; - ConditionsDescriptorAction = null; - ConditionsDescriptorActions = null; - ConditionsDescriptor = descriptor; - return Self; - } - - public DetectionRuleDescriptor Conditions(Action configure) - { - ConditionsValue = null; - ConditionsDescriptor = null; - ConditionsDescriptorActions = null; - ConditionsDescriptorAction = configure; - return Self; - } - - public DetectionRuleDescriptor Conditions(params Action[] configure) - { - ConditionsValue = null; - ConditionsDescriptor = null; - ConditionsDescriptorAction = null; - ConditionsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A scope of series where the rule applies. A rule must either have a non-empty scope or at least one condition. By default, the scope includes all series. Scoping is allowed for any of the fields that are also specified in by_field_name, over_field_name, or partition_field_name. - /// - /// - public DetectionRuleDescriptor Scope(Func, FluentDescriptorDictionary> selector) - { - ScopeValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsValue is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - if (ConditionsDescriptor is not null) - { - writer.WritePropertyName("conditions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ConditionsDescriptor, options); - writer.WriteEndArray(); - } - else if (ConditionsDescriptorAction is not null) - { - writer.WritePropertyName("conditions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor(ConditionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ConditionsDescriptorActions is not null) - { - writer.WritePropertyName("conditions"); - writer.WriteStartArray(); - foreach (var action in ConditionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RuleConditionDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ConditionsValue is not null) - { - writer.WritePropertyName("conditions"); - JsonSerializer.Serialize(writer, ConditionsValue, options); - } - - if (ScopeValue is not null) - { - writer.WritePropertyName("scope"); - JsonSerializer.Serialize(writer, ScopeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Detector.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Detector.g.cs deleted file mode 100644 index d609fe6d7cf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Detector.g.cs +++ /dev/null @@ -1,795 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Detector -{ - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - [JsonInclude, JsonPropertyName("by_field_name")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ByFieldName { get; set; } - - /// - /// - /// Custom rules enable you to customize the way detectors operate. For example, a rule may dictate conditions under which results should be skipped. Kibana refers to custom rules as job rules. - /// - /// - [JsonInclude, JsonPropertyName("custom_rules")] - public ICollection? CustomRules { get; set; } - - /// - /// - /// A description of the detector. - /// - /// - [JsonInclude, JsonPropertyName("detector_description")] - public string? DetectorDescription { get; set; } - - /// - /// - /// A unique identifier for the detector. This identifier is based on the order of the detectors in the analysis_config, starting at zero. If you specify a value for this property, it is ignored. - /// - /// - [JsonInclude, JsonPropertyName("detector_index")] - public int? DetectorIndex { get; set; } - - /// - /// - /// If set, frequent entities are excluded from influencing the anomaly results. Entities can be considered frequent over time or frequent in a population. If you are working with both over and by fields, you can set exclude_frequent to all for both fields, or to by or over for those specific fields. - /// - /// - [JsonInclude, JsonPropertyName("exclude_frequent")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExcludeFrequent? ExcludeFrequent { get; set; } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - [JsonInclude, JsonPropertyName("field_name")] - public Elastic.Clients.Elasticsearch.Serverless.Field? FieldName { get; set; } - - /// - /// - /// The analysis function that is used. For example, count, rare, mean, min, max, or sum. - /// - /// - [JsonInclude, JsonPropertyName("function")] - public string? Function { get; set; } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - [JsonInclude, JsonPropertyName("over_field_name")] - public Elastic.Clients.Elasticsearch.Serverless.Field? OverFieldName { get; set; } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - [JsonInclude, JsonPropertyName("partition_field_name")] - public Elastic.Clients.Elasticsearch.Serverless.Field? PartitionFieldName { get; set; } - - /// - /// - /// Defines whether a new series is used as the null series when there is no value for the by or partition fields. - /// - /// - [JsonInclude, JsonPropertyName("use_null")] - public bool? UseNull { get; set; } -} - -public sealed partial class DetectorDescriptor : SerializableDescriptor> -{ - internal DetectorDescriptor(Action> configure) => configure.Invoke(this); - - public DetectorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? ByFieldNameValue { get; set; } - private ICollection? CustomRulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor CustomRulesDescriptor { get; set; } - private Action> CustomRulesDescriptorAction { get; set; } - private Action>[] CustomRulesDescriptorActions { get; set; } - private string? DetectorDescriptionValue { get; set; } - private int? DetectorIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExcludeFrequent? ExcludeFrequentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldNameValue { get; set; } - private string? FunctionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? OverFieldNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PartitionFieldNameValue { get; set; } - private bool? UseNullValue { get; set; } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - public DetectorDescriptor ByFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? byFieldName) - { - ByFieldNameValue = byFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - public DetectorDescriptor ByFieldName(Expression> byFieldName) - { - ByFieldNameValue = byFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - public DetectorDescriptor ByFieldName(Expression> byFieldName) - { - ByFieldNameValue = byFieldName; - return Self; - } - - /// - /// - /// Custom rules enable you to customize the way detectors operate. For example, a rule may dictate conditions under which results should be skipped. Kibana refers to custom rules as job rules. - /// - /// - public DetectorDescriptor CustomRules(ICollection? customRules) - { - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesValue = customRules; - return Self; - } - - public DetectorDescriptor CustomRules(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor descriptor) - { - CustomRulesValue = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptor = descriptor; - return Self; - } - - public DetectorDescriptor CustomRules(Action> configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptorAction = configure; - return Self; - } - - public DetectorDescriptor CustomRules(params Action>[] configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = configure; - return Self; - } - - /// - /// - /// A description of the detector. - /// - /// - public DetectorDescriptor DetectorDescription(string? detectorDescription) - { - DetectorDescriptionValue = detectorDescription; - return Self; - } - - /// - /// - /// A unique identifier for the detector. This identifier is based on the order of the detectors in the analysis_config, starting at zero. If you specify a value for this property, it is ignored. - /// - /// - public DetectorDescriptor DetectorIndex(int? detectorIndex) - { - DetectorIndexValue = detectorIndex; - return Self; - } - - /// - /// - /// If set, frequent entities are excluded from influencing the anomaly results. Entities can be considered frequent over time or frequent in a population. If you are working with both over and by fields, you can set exclude_frequent to all for both fields, or to by or over for those specific fields. - /// - /// - public DetectorDescriptor ExcludeFrequent(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExcludeFrequent? excludeFrequent) - { - ExcludeFrequentValue = excludeFrequent; - return Self; - } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - public DetectorDescriptor FieldName(Elastic.Clients.Elasticsearch.Serverless.Field? fieldName) - { - FieldNameValue = fieldName; - return Self; - } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - public DetectorDescriptor FieldName(Expression> fieldName) - { - FieldNameValue = fieldName; - return Self; - } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - public DetectorDescriptor FieldName(Expression> fieldName) - { - FieldNameValue = fieldName; - return Self; - } - - /// - /// - /// The analysis function that is used. For example, count, rare, mean, min, max, or sum. - /// - /// - public DetectorDescriptor Function(string? function) - { - FunctionValue = function; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - public DetectorDescriptor OverFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? overFieldName) - { - OverFieldNameValue = overFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - public DetectorDescriptor OverFieldName(Expression> overFieldName) - { - OverFieldNameValue = overFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - public DetectorDescriptor OverFieldName(Expression> overFieldName) - { - OverFieldNameValue = overFieldName; - return Self; - } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - public DetectorDescriptor PartitionFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? partitionFieldName) - { - PartitionFieldNameValue = partitionFieldName; - return Self; - } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - public DetectorDescriptor PartitionFieldName(Expression> partitionFieldName) - { - PartitionFieldNameValue = partitionFieldName; - return Self; - } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - public DetectorDescriptor PartitionFieldName(Expression> partitionFieldName) - { - PartitionFieldNameValue = partitionFieldName; - return Self; - } - - /// - /// - /// Defines whether a new series is used as the null series when there is no value for the by or partition fields. - /// - /// - public DetectorDescriptor UseNull(bool? useNull = true) - { - UseNullValue = useNull; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ByFieldNameValue is not null) - { - writer.WritePropertyName("by_field_name"); - JsonSerializer.Serialize(writer, ByFieldNameValue, options); - } - - if (CustomRulesDescriptor is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, CustomRulesDescriptor, options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorAction is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(CustomRulesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorActions is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - foreach (var action in CustomRulesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (CustomRulesValue is not null) - { - writer.WritePropertyName("custom_rules"); - JsonSerializer.Serialize(writer, CustomRulesValue, options); - } - - if (!string.IsNullOrEmpty(DetectorDescriptionValue)) - { - writer.WritePropertyName("detector_description"); - writer.WriteStringValue(DetectorDescriptionValue); - } - - if (DetectorIndexValue.HasValue) - { - writer.WritePropertyName("detector_index"); - writer.WriteNumberValue(DetectorIndexValue.Value); - } - - if (ExcludeFrequentValue is not null) - { - writer.WritePropertyName("exclude_frequent"); - JsonSerializer.Serialize(writer, ExcludeFrequentValue, options); - } - - if (FieldNameValue is not null) - { - writer.WritePropertyName("field_name"); - JsonSerializer.Serialize(writer, FieldNameValue, options); - } - - if (!string.IsNullOrEmpty(FunctionValue)) - { - writer.WritePropertyName("function"); - writer.WriteStringValue(FunctionValue); - } - - if (OverFieldNameValue is not null) - { - writer.WritePropertyName("over_field_name"); - JsonSerializer.Serialize(writer, OverFieldNameValue, options); - } - - if (PartitionFieldNameValue is not null) - { - writer.WritePropertyName("partition_field_name"); - JsonSerializer.Serialize(writer, PartitionFieldNameValue, options); - } - - if (UseNullValue.HasValue) - { - writer.WritePropertyName("use_null"); - writer.WriteBooleanValue(UseNullValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DetectorDescriptor : SerializableDescriptor -{ - internal DetectorDescriptor(Action configure) => configure.Invoke(this); - - public DetectorDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? ByFieldNameValue { get; set; } - private ICollection? CustomRulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor CustomRulesDescriptor { get; set; } - private Action CustomRulesDescriptorAction { get; set; } - private Action[] CustomRulesDescriptorActions { get; set; } - private string? DetectorDescriptionValue { get; set; } - private int? DetectorIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExcludeFrequent? ExcludeFrequentValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldNameValue { get; set; } - private string? FunctionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? OverFieldNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PartitionFieldNameValue { get; set; } - private bool? UseNullValue { get; set; } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - public DetectorDescriptor ByFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? byFieldName) - { - ByFieldNameValue = byFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - public DetectorDescriptor ByFieldName(Expression> byFieldName) - { - ByFieldNameValue = byFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split. - /// - /// - public DetectorDescriptor ByFieldName(Expression> byFieldName) - { - ByFieldNameValue = byFieldName; - return Self; - } - - /// - /// - /// Custom rules enable you to customize the way detectors operate. For example, a rule may dictate conditions under which results should be skipped. Kibana refers to custom rules as job rules. - /// - /// - public DetectorDescriptor CustomRules(ICollection? customRules) - { - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesValue = customRules; - return Self; - } - - public DetectorDescriptor CustomRules(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor descriptor) - { - CustomRulesValue = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptor = descriptor; - return Self; - } - - public DetectorDescriptor CustomRules(Action configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptorAction = configure; - return Self; - } - - public DetectorDescriptor CustomRules(params Action[] configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = configure; - return Self; - } - - /// - /// - /// A description of the detector. - /// - /// - public DetectorDescriptor DetectorDescription(string? detectorDescription) - { - DetectorDescriptionValue = detectorDescription; - return Self; - } - - /// - /// - /// A unique identifier for the detector. This identifier is based on the order of the detectors in the analysis_config, starting at zero. If you specify a value for this property, it is ignored. - /// - /// - public DetectorDescriptor DetectorIndex(int? detectorIndex) - { - DetectorIndexValue = detectorIndex; - return Self; - } - - /// - /// - /// If set, frequent entities are excluded from influencing the anomaly results. Entities can be considered frequent over time or frequent in a population. If you are working with both over and by fields, you can set exclude_frequent to all for both fields, or to by or over for those specific fields. - /// - /// - public DetectorDescriptor ExcludeFrequent(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExcludeFrequent? excludeFrequent) - { - ExcludeFrequentValue = excludeFrequent; - return Self; - } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - public DetectorDescriptor FieldName(Elastic.Clients.Elasticsearch.Serverless.Field? fieldName) - { - FieldNameValue = fieldName; - return Self; - } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - public DetectorDescriptor FieldName(Expression> fieldName) - { - FieldNameValue = fieldName; - return Self; - } - - /// - /// - /// The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field. The field_name cannot contain double quotes or backslashes. - /// - /// - public DetectorDescriptor FieldName(Expression> fieldName) - { - FieldNameValue = fieldName; - return Self; - } - - /// - /// - /// The analysis function that is used. For example, count, rare, mean, min, max, or sum. - /// - /// - public DetectorDescriptor Function(string? function) - { - FunctionValue = function; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - public DetectorDescriptor OverFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? overFieldName) - { - OverFieldNameValue = overFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - public DetectorDescriptor OverFieldName(Expression> overFieldName) - { - OverFieldNameValue = overFieldName; - return Self; - } - - /// - /// - /// The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits. - /// - /// - public DetectorDescriptor OverFieldName(Expression> overFieldName) - { - OverFieldNameValue = overFieldName; - return Self; - } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - public DetectorDescriptor PartitionFieldName(Elastic.Clients.Elasticsearch.Serverless.Field? partitionFieldName) - { - PartitionFieldNameValue = partitionFieldName; - return Self; - } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - public DetectorDescriptor PartitionFieldName(Expression> partitionFieldName) - { - PartitionFieldNameValue = partitionFieldName; - return Self; - } - - /// - /// - /// The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. - /// - /// - public DetectorDescriptor PartitionFieldName(Expression> partitionFieldName) - { - PartitionFieldNameValue = partitionFieldName; - return Self; - } - - /// - /// - /// Defines whether a new series is used as the null series when there is no value for the by or partition fields. - /// - /// - public DetectorDescriptor UseNull(bool? useNull = true) - { - UseNullValue = useNull; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ByFieldNameValue is not null) - { - writer.WritePropertyName("by_field_name"); - JsonSerializer.Serialize(writer, ByFieldNameValue, options); - } - - if (CustomRulesDescriptor is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, CustomRulesDescriptor, options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorAction is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(CustomRulesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorActions is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - foreach (var action in CustomRulesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (CustomRulesValue is not null) - { - writer.WritePropertyName("custom_rules"); - JsonSerializer.Serialize(writer, CustomRulesValue, options); - } - - if (!string.IsNullOrEmpty(DetectorDescriptionValue)) - { - writer.WritePropertyName("detector_description"); - writer.WriteStringValue(DetectorDescriptionValue); - } - - if (DetectorIndexValue.HasValue) - { - writer.WritePropertyName("detector_index"); - writer.WriteNumberValue(DetectorIndexValue.Value); - } - - if (ExcludeFrequentValue is not null) - { - writer.WritePropertyName("exclude_frequent"); - JsonSerializer.Serialize(writer, ExcludeFrequentValue, options); - } - - if (FieldNameValue is not null) - { - writer.WritePropertyName("field_name"); - JsonSerializer.Serialize(writer, FieldNameValue, options); - } - - if (!string.IsNullOrEmpty(FunctionValue)) - { - writer.WritePropertyName("function"); - writer.WriteStringValue(FunctionValue); - } - - if (OverFieldNameValue is not null) - { - writer.WritePropertyName("over_field_name"); - JsonSerializer.Serialize(writer, OverFieldNameValue, options); - } - - if (PartitionFieldNameValue is not null) - { - writer.WritePropertyName("partition_field_name"); - JsonSerializer.Serialize(writer, PartitionFieldNameValue, options); - } - - if (UseNullValue.HasValue) - { - writer.WritePropertyName("use_null"); - writer.WriteBooleanValue(UseNullValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorRead.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorRead.g.cs deleted file mode 100644 index b466f39c893..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorRead.g.cs +++ /dev/null @@ -1,124 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DetectorRead -{ - /// - /// - /// The field used to split the data. - /// In particular, this property is used for analyzing the splits with respect to their own history. - /// It is used for finding unusual values in the context of the split. - /// - /// - [JsonInclude, JsonPropertyName("by_field_name")] - public string? ByFieldName { get; init; } - - /// - /// - /// An array of custom rule objects, which enable you to customize the way detectors operate. - /// For example, a rule may dictate to the detector conditions under which results should be skipped. - /// Kibana refers to custom rules as job rules. - /// - /// - [JsonInclude, JsonPropertyName("custom_rules")] - public IReadOnlyCollection? CustomRules { get; init; } - - /// - /// - /// A description of the detector. - /// - /// - [JsonInclude, JsonPropertyName("detector_description")] - public string? DetectorDescription { get; init; } - - /// - /// - /// A unique identifier for the detector. - /// This identifier is based on the order of the detectors in the analysis_config, starting at zero. - /// - /// - [JsonInclude, JsonPropertyName("detector_index")] - public int? DetectorIndex { get; init; } - - /// - /// - /// Contains one of the following values: all, none, by, or over. - /// If set, frequent entities are excluded from influencing the anomaly results. - /// Entities can be considered frequent over time or frequent in a population. - /// If you are working with both over and by fields, then you can set exclude_frequent to all for both fields, or to by or over for those specific fields. - /// - /// - [JsonInclude, JsonPropertyName("exclude_frequent")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ExcludeFrequent? ExcludeFrequent { get; init; } - - /// - /// - /// The field that the detector uses in the function. - /// If you use an event rate function such as count or rare, do not specify this field. - /// - /// - [JsonInclude, JsonPropertyName("field_name")] - public string? FieldName { get; init; } - - /// - /// - /// The analysis function that is used. - /// For example, count, rare, mean, min, max, and sum. - /// - /// - [JsonInclude, JsonPropertyName("function")] - public string Function { get; init; } - - /// - /// - /// The field used to split the data. - /// In particular, this property is used for analyzing the splits with respect to the history of all splits. - /// It is used for finding unusual values in the population of all splits. - /// - /// - [JsonInclude, JsonPropertyName("over_field_name")] - public string? OverFieldName { get; init; } - - /// - /// - /// The field used to segment the analysis. - /// When you use this property, you have completely independent baselines for each value of this field. - /// - /// - [JsonInclude, JsonPropertyName("partition_field_name")] - public string? PartitionFieldName { get; init; } - - /// - /// - /// Defines whether a new series is used as the null series when there is no value for the by or partition fields. - /// - /// - [JsonInclude, JsonPropertyName("use_null")] - public bool? UseNull { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorUpdate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorUpdate.g.cs deleted file mode 100644 index 8cc5b1413aa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/DetectorUpdate.g.cs +++ /dev/null @@ -1,312 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class DetectorUpdate -{ - /// - /// - /// An array of custom rule objects, which enable you to customize the way detectors operate. - /// For example, a rule may dictate to the detector conditions under which results should be skipped. - /// Kibana refers to custom rules as job rules. - /// - /// - [JsonInclude, JsonPropertyName("custom_rules")] - public ICollection? CustomRules { get; set; } - - /// - /// - /// A description of the detector. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// A unique identifier for the detector. - /// This identifier is based on the order of the detectors in the analysis_config, starting at zero. - /// - /// - [JsonInclude, JsonPropertyName("detector_index")] - public int DetectorIndex { get; set; } -} - -public sealed partial class DetectorUpdateDescriptor : SerializableDescriptor> -{ - internal DetectorUpdateDescriptor(Action> configure) => configure.Invoke(this); - - public DetectorUpdateDescriptor() : base() - { - } - - private ICollection? CustomRulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor CustomRulesDescriptor { get; set; } - private Action> CustomRulesDescriptorAction { get; set; } - private Action>[] CustomRulesDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private int DetectorIndexValue { get; set; } - - /// - /// - /// An array of custom rule objects, which enable you to customize the way detectors operate. - /// For example, a rule may dictate to the detector conditions under which results should be skipped. - /// Kibana refers to custom rules as job rules. - /// - /// - public DetectorUpdateDescriptor CustomRules(ICollection? customRules) - { - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesValue = customRules; - return Self; - } - - public DetectorUpdateDescriptor CustomRules(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor descriptor) - { - CustomRulesValue = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptor = descriptor; - return Self; - } - - public DetectorUpdateDescriptor CustomRules(Action> configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptorAction = configure; - return Self; - } - - public DetectorUpdateDescriptor CustomRules(params Action>[] configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = configure; - return Self; - } - - /// - /// - /// A description of the detector. - /// - /// - public DetectorUpdateDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A unique identifier for the detector. - /// This identifier is based on the order of the detectors in the analysis_config, starting at zero. - /// - /// - public DetectorUpdateDescriptor DetectorIndex(int detectorIndex) - { - DetectorIndexValue = detectorIndex; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CustomRulesDescriptor is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, CustomRulesDescriptor, options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorAction is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(CustomRulesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorActions is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - foreach (var action in CustomRulesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (CustomRulesValue is not null) - { - writer.WritePropertyName("custom_rules"); - JsonSerializer.Serialize(writer, CustomRulesValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("detector_index"); - writer.WriteNumberValue(DetectorIndexValue); - writer.WriteEndObject(); - } -} - -public sealed partial class DetectorUpdateDescriptor : SerializableDescriptor -{ - internal DetectorUpdateDescriptor(Action configure) => configure.Invoke(this); - - public DetectorUpdateDescriptor() : base() - { - } - - private ICollection? CustomRulesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor CustomRulesDescriptor { get; set; } - private Action CustomRulesDescriptorAction { get; set; } - private Action[] CustomRulesDescriptorActions { get; set; } - private string? DescriptionValue { get; set; } - private int DetectorIndexValue { get; set; } - - /// - /// - /// An array of custom rule objects, which enable you to customize the way detectors operate. - /// For example, a rule may dictate to the detector conditions under which results should be skipped. - /// Kibana refers to custom rules as job rules. - /// - /// - public DetectorUpdateDescriptor CustomRules(ICollection? customRules) - { - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesValue = customRules; - return Self; - } - - public DetectorUpdateDescriptor CustomRules(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor descriptor) - { - CustomRulesValue = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptor = descriptor; - return Self; - } - - public DetectorUpdateDescriptor CustomRules(Action configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorActions = null; - CustomRulesDescriptorAction = configure; - return Self; - } - - public DetectorUpdateDescriptor CustomRules(params Action[] configure) - { - CustomRulesValue = null; - CustomRulesDescriptor = null; - CustomRulesDescriptorAction = null; - CustomRulesDescriptorActions = configure; - return Self; - } - - /// - /// - /// A description of the detector. - /// - /// - public DetectorUpdateDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A unique identifier for the detector. - /// This identifier is based on the order of the detectors in the analysis_config, starting at zero. - /// - /// - public DetectorUpdateDescriptor DetectorIndex(int detectorIndex) - { - DetectorIndexValue = detectorIndex; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CustomRulesDescriptor is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, CustomRulesDescriptor, options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorAction is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(CustomRulesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (CustomRulesDescriptorActions is not null) - { - writer.WritePropertyName("custom_rules"); - writer.WriteStartArray(); - foreach (var action in CustomRulesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DetectionRuleDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (CustomRulesValue is not null) - { - writer.WritePropertyName("custom_rules"); - JsonSerializer.Serialize(writer, CustomRulesValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - writer.WritePropertyName("detector_index"); - writer.WriteNumberValue(DetectorIndexValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Ensemble.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Ensemble.g.cs deleted file mode 100644 index 833a0ffc5bc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Ensemble.g.cs +++ /dev/null @@ -1,211 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Ensemble -{ - [JsonInclude, JsonPropertyName("aggregate_output")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AggregateOutput? AggregateOutput { get; set; } - [JsonInclude, JsonPropertyName("classification_labels")] - public ICollection? ClassificationLabels { get; set; } - [JsonInclude, JsonPropertyName("feature_names")] - public ICollection? FeatureNames { get; set; } - [JsonInclude, JsonPropertyName("target_type")] - public string? TargetType { get; set; } - [JsonInclude, JsonPropertyName("trained_models")] - public ICollection TrainedModels { get; set; } -} - -public sealed partial class EnsembleDescriptor : SerializableDescriptor -{ - internal EnsembleDescriptor(Action configure) => configure.Invoke(this); - - public EnsembleDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AggregateOutput? AggregateOutputValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AggregateOutputDescriptor AggregateOutputDescriptor { get; set; } - private Action AggregateOutputDescriptorAction { get; set; } - private ICollection? ClassificationLabelsValue { get; set; } - private ICollection? FeatureNamesValue { get; set; } - private string? TargetTypeValue { get; set; } - private ICollection TrainedModelsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor TrainedModelsDescriptor { get; set; } - private Action TrainedModelsDescriptorAction { get; set; } - private Action[] TrainedModelsDescriptorActions { get; set; } - - public EnsembleDescriptor AggregateOutput(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AggregateOutput? aggregateOutput) - { - AggregateOutputDescriptor = null; - AggregateOutputDescriptorAction = null; - AggregateOutputValue = aggregateOutput; - return Self; - } - - public EnsembleDescriptor AggregateOutput(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AggregateOutputDescriptor descriptor) - { - AggregateOutputValue = null; - AggregateOutputDescriptorAction = null; - AggregateOutputDescriptor = descriptor; - return Self; - } - - public EnsembleDescriptor AggregateOutput(Action configure) - { - AggregateOutputValue = null; - AggregateOutputDescriptor = null; - AggregateOutputDescriptorAction = configure; - return Self; - } - - public EnsembleDescriptor ClassificationLabels(ICollection? classificationLabels) - { - ClassificationLabelsValue = classificationLabels; - return Self; - } - - public EnsembleDescriptor FeatureNames(ICollection? featureNames) - { - FeatureNamesValue = featureNames; - return Self; - } - - public EnsembleDescriptor TargetType(string? targetType) - { - TargetTypeValue = targetType; - return Self; - } - - public EnsembleDescriptor TrainedModels(ICollection trainedModels) - { - TrainedModelsDescriptor = null; - TrainedModelsDescriptorAction = null; - TrainedModelsDescriptorActions = null; - TrainedModelsValue = trainedModels; - return Self; - } - - public EnsembleDescriptor TrainedModels(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor descriptor) - { - TrainedModelsValue = null; - TrainedModelsDescriptorAction = null; - TrainedModelsDescriptorActions = null; - TrainedModelsDescriptor = descriptor; - return Self; - } - - public EnsembleDescriptor TrainedModels(Action configure) - { - TrainedModelsValue = null; - TrainedModelsDescriptor = null; - TrainedModelsDescriptorActions = null; - TrainedModelsDescriptorAction = configure; - return Self; - } - - public EnsembleDescriptor TrainedModels(params Action[] configure) - { - TrainedModelsValue = null; - TrainedModelsDescriptor = null; - TrainedModelsDescriptorAction = null; - TrainedModelsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregateOutputDescriptor is not null) - { - writer.WritePropertyName("aggregate_output"); - JsonSerializer.Serialize(writer, AggregateOutputDescriptor, options); - } - else if (AggregateOutputDescriptorAction is not null) - { - writer.WritePropertyName("aggregate_output"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AggregateOutputDescriptor(AggregateOutputDescriptorAction), options); - } - else if (AggregateOutputValue is not null) - { - writer.WritePropertyName("aggregate_output"); - JsonSerializer.Serialize(writer, AggregateOutputValue, options); - } - - if (ClassificationLabelsValue is not null) - { - writer.WritePropertyName("classification_labels"); - JsonSerializer.Serialize(writer, ClassificationLabelsValue, options); - } - - if (FeatureNamesValue is not null) - { - writer.WritePropertyName("feature_names"); - JsonSerializer.Serialize(writer, FeatureNamesValue, options); - } - - if (!string.IsNullOrEmpty(TargetTypeValue)) - { - writer.WritePropertyName("target_type"); - writer.WriteStringValue(TargetTypeValue); - } - - if (TrainedModelsDescriptor is not null) - { - writer.WritePropertyName("trained_models"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TrainedModelsDescriptor, options); - writer.WriteEndArray(); - } - else if (TrainedModelsDescriptorAction is not null) - { - writer.WritePropertyName("trained_models"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor(TrainedModelsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TrainedModelsDescriptorActions is not null) - { - writer.WritePropertyName("trained_models"); - writer.WriteStartArray(); - foreach (var action in TrainedModelsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("trained_models"); - JsonSerializer.Serialize(writer, TrainedModelsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs deleted file mode 100644 index 52d547b338e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ExponentialAverageCalculationContext -{ - [JsonInclude, JsonPropertyName("incremental_metric_value_ms")] - public double IncrementalMetricValueMs { get; init; } - [JsonInclude, JsonPropertyName("latest_timestamp")] - public long? LatestTimestamp { get; init; } - [JsonInclude, JsonPropertyName("previous_exponential_average_ms")] - public double? PreviousExponentialAverageMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs deleted file mode 100644 index 4ab30dc87a1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs +++ /dev/null @@ -1,246 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Fill mask inference options -/// -/// -public sealed partial class FillMaskInferenceOptions -{ - /// - /// - /// The string/token which will be removed from incoming documents and replaced with the inference prediction(s). - /// In a response, this field contains the mask token for the specified model/tokenizer. Each model and tokenizer - /// has a predefined mask token which cannot be changed. Thus, it is recommended not to set this value in requests. - /// However, if this field is present in a request, its value must match the predefined value for that model/tokenizer, - /// otherwise the request will fail. - /// - /// - [JsonInclude, JsonPropertyName("mask_token")] - public string? MaskToken { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - [JsonInclude, JsonPropertyName("vocabulary")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary Vocabulary { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(FillMaskInferenceOptions fillMaskInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.FillMask(fillMaskInferenceOptions); -} - -/// -/// -/// Fill mask inference options -/// -/// -public sealed partial class FillMaskInferenceOptionsDescriptor : SerializableDescriptor -{ - internal FillMaskInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public FillMaskInferenceOptionsDescriptor() : base() - { - } - - private string? MaskTokenValue { get; set; } - private int? NumTopClassesValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary VocabularyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor VocabularyDescriptor { get; set; } - private Action VocabularyDescriptorAction { get; set; } - - /// - /// - /// The string/token which will be removed from incoming documents and replaced with the inference prediction(s). - /// In a response, this field contains the mask token for the specified model/tokenizer. Each model and tokenizer - /// has a predefined mask token which cannot be changed. Thus, it is recommended not to set this value in requests. - /// However, if this field is present in a request, its value must match the predefined value for that model/tokenizer, - /// otherwise the request will fail. - /// - /// - public FillMaskInferenceOptionsDescriptor MaskToken(string? maskToken) - { - MaskTokenValue = maskToken; - return Self; - } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public FillMaskInferenceOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public FillMaskInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public FillMaskInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public FillMaskInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public FillMaskInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - public FillMaskInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary vocabulary) - { - VocabularyDescriptor = null; - VocabularyDescriptorAction = null; - VocabularyValue = vocabulary; - return Self; - } - - public FillMaskInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor descriptor) - { - VocabularyValue = null; - VocabularyDescriptorAction = null; - VocabularyDescriptor = descriptor; - return Self; - } - - public FillMaskInferenceOptionsDescriptor Vocabulary(Action configure) - { - VocabularyValue = null; - VocabularyDescriptor = null; - VocabularyDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(MaskTokenValue)) - { - writer.WritePropertyName("mask_token"); - writer.WriteStringValue(MaskTokenValue); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - if (VocabularyDescriptor is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyDescriptor, options); - } - else if (VocabularyDescriptorAction is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor(VocabularyDescriptorAction), options); - } - else - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs deleted file mode 100644 index 373b0c4269e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,157 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class FillMaskInferenceUpdateOptions -{ - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(FillMaskInferenceUpdateOptions fillMaskInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.FillMask(fillMaskInferenceUpdateOptions); -} - -public sealed partial class FillMaskInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal FillMaskInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public FillMaskInferenceUpdateOptionsDescriptor() : base() - { - } - - private int? NumTopClassesValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public FillMaskInferenceUpdateOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public FillMaskInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public FillMaskInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public FillMaskInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public FillMaskInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Filter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Filter.g.cs deleted file mode 100644 index 278c084fb64..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Filter.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Filter -{ - /// - /// - /// A description of the filter. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// A string that uniquely identifies a filter. - /// - /// - [JsonInclude, JsonPropertyName("filter_id")] - public string FilterId { get; init; } - - /// - /// - /// An array of strings which is the filter item list. - /// - /// - [JsonInclude, JsonPropertyName("items")] - public IReadOnlyCollection Items { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FilterRef.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FilterRef.g.cs deleted file mode 100644 index 1fa35c12454..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FilterRef.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class FilterRef -{ - /// - /// - /// The identifier for the filter. - /// - /// - [JsonInclude, JsonPropertyName("filter_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id FilterId { get; set; } - - /// - /// - /// If set to include, the rule applies for values in the filter. If set to exclude, the rule applies for values not in the filter. - /// - /// - [JsonInclude, JsonPropertyName("filter_type")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FilterType? FilterType { get; set; } -} - -public sealed partial class FilterRefDescriptor : SerializableDescriptor -{ - internal FilterRefDescriptor(Action configure) => configure.Invoke(this); - - public FilterRefDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id FilterIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FilterType? FilterTypeValue { get; set; } - - /// - /// - /// The identifier for the filter. - /// - /// - public FilterRefDescriptor FilterId(Elastic.Clients.Elasticsearch.Serverless.Id filterId) - { - FilterIdValue = filterId; - return Self; - } - - /// - /// - /// If set to include, the rule applies for values in the filter. If set to exclude, the rule applies for values not in the filter. - /// - /// - public FilterRefDescriptor FilterType(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FilterType? filterType) - { - FilterTypeValue = filterType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("filter_id"); - JsonSerializer.Serialize(writer, FilterIdValue, options); - if (FilterTypeValue is not null) - { - writer.WritePropertyName("filter_type"); - JsonSerializer.Serialize(writer, FilterTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FrequencyEncodingPreprocessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FrequencyEncodingPreprocessor.g.cs deleted file mode 100644 index 6e4d09f449b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/FrequencyEncodingPreprocessor.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class FrequencyEncodingPreprocessor -{ - [JsonInclude, JsonPropertyName("feature_name")] - public string FeatureName { get; set; } - [JsonInclude, JsonPropertyName("field")] - public string Field { get; set; } - [JsonInclude, JsonPropertyName("frequency_map")] - public IDictionary FrequencyMap { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Preprocessor(FrequencyEncodingPreprocessor frequencyEncodingPreprocessor) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Preprocessor.FrequencyEncoding(frequencyEncodingPreprocessor); -} - -public sealed partial class FrequencyEncodingPreprocessorDescriptor : SerializableDescriptor -{ - internal FrequencyEncodingPreprocessorDescriptor(Action configure) => configure.Invoke(this); - - public FrequencyEncodingPreprocessorDescriptor() : base() - { - } - - private string FeatureNameValue { get; set; } - private string FieldValue { get; set; } - private IDictionary FrequencyMapValue { get; set; } - - public FrequencyEncodingPreprocessorDescriptor FeatureName(string featureName) - { - FeatureNameValue = featureName; - return Self; - } - - public FrequencyEncodingPreprocessorDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - public FrequencyEncodingPreprocessorDescriptor FrequencyMap(Func, FluentDictionary> selector) - { - FrequencyMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("feature_name"); - writer.WriteStringValue(FeatureNameValue); - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - writer.WritePropertyName("frequency_map"); - JsonSerializer.Serialize(writer, FrequencyMapValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/GeoResults.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/GeoResults.g.cs deleted file mode 100644 index d0d27829304..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/GeoResults.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class GeoResults -{ - /// - /// - /// The actual value for the bucket formatted as a geo_point. - /// - /// - [JsonInclude, JsonPropertyName("actual_point")] - public string ActualPoint { get; init; } - - /// - /// - /// The typical value for the bucket formatted as a geo_point. - /// - /// - [JsonInclude, JsonPropertyName("typical_point")] - public string TypicalPoint { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Hyperparameter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Hyperparameter.g.cs deleted file mode 100644 index e4ed7657f46..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Hyperparameter.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Hyperparameter -{ - /// - /// - /// A positive number showing how much the parameter influences the variation of the loss function. For hyperparameters with values that are not specified by the user but tuned during hyperparameter optimization. - /// - /// - [JsonInclude, JsonPropertyName("absolute_importance")] - public double? AbsoluteImportance { get; init; } - - /// - /// - /// Name of the hyperparameter. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// A number between 0 and 1 showing the proportion of influence on the variation of the loss function among all tuned hyperparameters. For hyperparameters with values that are not specified by the user but tuned during hyperparameter optimization. - /// - /// - [JsonInclude, JsonPropertyName("relative_importance")] - public double? RelativeImportance { get; init; } - - /// - /// - /// Indicates if the hyperparameter is specified by the user (true) or optimized (false). - /// - /// - [JsonInclude, JsonPropertyName("supplied")] - public bool Supplied { get; init; } - - /// - /// - /// The value of the hyperparameter, either optimized or specified by the user. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigCreate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigCreate.g.cs deleted file mode 100644 index a86e4468446..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigCreate.g.cs +++ /dev/null @@ -1,367 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Inference configuration provided when storing the model config -/// -/// -[JsonConverter(typeof(InferenceConfigCreateConverter))] -public sealed partial class InferenceConfigCreate -{ - internal InferenceConfigCreate(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 InferenceConfigCreate Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => new InferenceConfigCreate("classification", classificationInferenceOptions); - public static InferenceConfigCreate FillMask(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceOptions fillMaskInferenceOptions) => new InferenceConfigCreate("fill_mask", fillMaskInferenceOptions); - public static InferenceConfigCreate Ner(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceOptions nerInferenceOptions) => new InferenceConfigCreate("ner", nerInferenceOptions); - public static InferenceConfigCreate PassThrough(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceOptions passThroughInferenceOptions) => new InferenceConfigCreate("pass_through", passThroughInferenceOptions); - public static InferenceConfigCreate QuestionAnswering(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceOptions questionAnsweringInferenceOptions) => new InferenceConfigCreate("question_answering", questionAnsweringInferenceOptions); - public static InferenceConfigCreate Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => new InferenceConfigCreate("regression", regressionInferenceOptions); - public static InferenceConfigCreate TextClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceOptions textClassificationInferenceOptions) => new InferenceConfigCreate("text_classification", textClassificationInferenceOptions); - public static InferenceConfigCreate TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceOptions textEmbeddingInferenceOptions) => new InferenceConfigCreate("text_embedding", textEmbeddingInferenceOptions); - public static InferenceConfigCreate TextExpansion(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceOptions textExpansionInferenceOptions) => new InferenceConfigCreate("text_expansion", textExpansionInferenceOptions); - public static InferenceConfigCreate ZeroShotClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceOptions zeroShotClassificationInferenceOptions) => new InferenceConfigCreate("zero_shot_classification", zeroShotClassificationInferenceOptions); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class InferenceConfigCreateConverter : JsonConverter -{ - public override InferenceConfigCreate 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; - 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 == "classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fill_mask") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ner") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "pass_through") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "question_answering") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regression") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_embedding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_expansion") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "zero_shot_classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'InferenceConfigCreate' from the response."); - } - - var result = new InferenceConfigCreate(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, InferenceConfigCreate value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions)value.Variant, options); - break; - case "fill_mask": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceOptions)value.Variant, options); - break; - case "ner": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceOptions)value.Variant, options); - break; - case "pass_through": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceOptions)value.Variant, options); - break; - case "question_answering": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceOptions)value.Variant, options); - break; - case "regression": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions)value.Variant, options); - break; - case "text_classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceOptions)value.Variant, options); - break; - case "text_embedding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceOptions)value.Variant, options); - break; - case "text_expansion": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceOptions)value.Variant, options); - break; - case "zero_shot_classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceOptions)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigCreateDescriptor : SerializableDescriptor> -{ - internal InferenceConfigCreateDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceConfigCreateDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigCreateDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigCreateDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigCreateDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => Set(classificationInferenceOptions, "classification"); - public InferenceConfigCreateDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigCreateDescriptor FillMask(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceOptions fillMaskInferenceOptions) => Set(fillMaskInferenceOptions, "fill_mask"); - public InferenceConfigCreateDescriptor FillMask(Action configure) => Set(configure, "fill_mask"); - public InferenceConfigCreateDescriptor Ner(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceOptions nerInferenceOptions) => Set(nerInferenceOptions, "ner"); - public InferenceConfigCreateDescriptor Ner(Action configure) => Set(configure, "ner"); - public InferenceConfigCreateDescriptor PassThrough(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceOptions passThroughInferenceOptions) => Set(passThroughInferenceOptions, "pass_through"); - public InferenceConfigCreateDescriptor PassThrough(Action configure) => Set(configure, "pass_through"); - public InferenceConfigCreateDescriptor QuestionAnswering(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceOptions questionAnsweringInferenceOptions) => Set(questionAnsweringInferenceOptions, "question_answering"); - public InferenceConfigCreateDescriptor QuestionAnswering(Action configure) => Set(configure, "question_answering"); - public InferenceConfigCreateDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => Set(regressionInferenceOptions, "regression"); - public InferenceConfigCreateDescriptor Regression(Action> configure) => Set(configure, "regression"); - public InferenceConfigCreateDescriptor TextClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceOptions textClassificationInferenceOptions) => Set(textClassificationInferenceOptions, "text_classification"); - public InferenceConfigCreateDescriptor TextClassification(Action configure) => Set(configure, "text_classification"); - public InferenceConfigCreateDescriptor TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceOptions textEmbeddingInferenceOptions) => Set(textEmbeddingInferenceOptions, "text_embedding"); - public InferenceConfigCreateDescriptor TextEmbedding(Action configure) => Set(configure, "text_embedding"); - public InferenceConfigCreateDescriptor TextExpansion(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceOptions textExpansionInferenceOptions) => Set(textExpansionInferenceOptions, "text_expansion"); - public InferenceConfigCreateDescriptor TextExpansion(Action configure) => Set(configure, "text_expansion"); - public InferenceConfigCreateDescriptor ZeroShotClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceOptions zeroShotClassificationInferenceOptions) => Set(zeroShotClassificationInferenceOptions, "zero_shot_classification"); - public InferenceConfigCreateDescriptor ZeroShotClassification(Action configure) => Set(configure, "zero_shot_classification"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigCreateDescriptor : SerializableDescriptor -{ - internal InferenceConfigCreateDescriptor(Action configure) => configure.Invoke(this); - - public InferenceConfigCreateDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigCreateDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigCreateDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigCreateDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => Set(classificationInferenceOptions, "classification"); - public InferenceConfigCreateDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigCreateDescriptor FillMask(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceOptions fillMaskInferenceOptions) => Set(fillMaskInferenceOptions, "fill_mask"); - public InferenceConfigCreateDescriptor FillMask(Action configure) => Set(configure, "fill_mask"); - public InferenceConfigCreateDescriptor Ner(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceOptions nerInferenceOptions) => Set(nerInferenceOptions, "ner"); - public InferenceConfigCreateDescriptor Ner(Action configure) => Set(configure, "ner"); - public InferenceConfigCreateDescriptor PassThrough(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceOptions passThroughInferenceOptions) => Set(passThroughInferenceOptions, "pass_through"); - public InferenceConfigCreateDescriptor PassThrough(Action configure) => Set(configure, "pass_through"); - public InferenceConfigCreateDescriptor QuestionAnswering(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceOptions questionAnsweringInferenceOptions) => Set(questionAnsweringInferenceOptions, "question_answering"); - public InferenceConfigCreateDescriptor QuestionAnswering(Action configure) => Set(configure, "question_answering"); - public InferenceConfigCreateDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => Set(regressionInferenceOptions, "regression"); - public InferenceConfigCreateDescriptor Regression(Action configure) => Set(configure, "regression"); - public InferenceConfigCreateDescriptor TextClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceOptions textClassificationInferenceOptions) => Set(textClassificationInferenceOptions, "text_classification"); - public InferenceConfigCreateDescriptor TextClassification(Action configure) => Set(configure, "text_classification"); - public InferenceConfigCreateDescriptor TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceOptions textEmbeddingInferenceOptions) => Set(textEmbeddingInferenceOptions, "text_embedding"); - public InferenceConfigCreateDescriptor TextEmbedding(Action configure) => Set(configure, "text_embedding"); - public InferenceConfigCreateDescriptor TextExpansion(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceOptions textExpansionInferenceOptions) => Set(textExpansionInferenceOptions, "text_expansion"); - public InferenceConfigCreateDescriptor TextExpansion(Action configure) => Set(configure, "text_expansion"); - public InferenceConfigCreateDescriptor ZeroShotClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceOptions zeroShotClassificationInferenceOptions) => Set(zeroShotClassificationInferenceOptions, "zero_shot_classification"); - public InferenceConfigCreateDescriptor ZeroShotClassification(Action configure) => Set(configure, "zero_shot_classification"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigUpdate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigUpdate.g.cs deleted file mode 100644 index 84a33ce0b83..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceConfigUpdate.g.cs +++ /dev/null @@ -1,362 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -[JsonConverter(typeof(InferenceConfigUpdateConverter))] -public sealed partial class InferenceConfigUpdate -{ - internal InferenceConfigUpdate(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 InferenceConfigUpdate Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => new InferenceConfigUpdate("classification", classificationInferenceOptions); - public static InferenceConfigUpdate FillMask(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceUpdateOptions fillMaskInferenceUpdateOptions) => new InferenceConfigUpdate("fill_mask", fillMaskInferenceUpdateOptions); - public static InferenceConfigUpdate Ner(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceUpdateOptions nerInferenceUpdateOptions) => new InferenceConfigUpdate("ner", nerInferenceUpdateOptions); - public static InferenceConfigUpdate PassThrough(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceUpdateOptions passThroughInferenceUpdateOptions) => new InferenceConfigUpdate("pass_through", passThroughInferenceUpdateOptions); - public static InferenceConfigUpdate QuestionAnswering(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceUpdateOptions questionAnsweringInferenceUpdateOptions) => new InferenceConfigUpdate("question_answering", questionAnsweringInferenceUpdateOptions); - public static InferenceConfigUpdate Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => new InferenceConfigUpdate("regression", regressionInferenceOptions); - public static InferenceConfigUpdate TextClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceUpdateOptions textClassificationInferenceUpdateOptions) => new InferenceConfigUpdate("text_classification", textClassificationInferenceUpdateOptions); - public static InferenceConfigUpdate TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceUpdateOptions textEmbeddingInferenceUpdateOptions) => new InferenceConfigUpdate("text_embedding", textEmbeddingInferenceUpdateOptions); - public static InferenceConfigUpdate TextExpansion(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceUpdateOptions textExpansionInferenceUpdateOptions) => new InferenceConfigUpdate("text_expansion", textExpansionInferenceUpdateOptions); - public static InferenceConfigUpdate ZeroShotClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceUpdateOptions zeroShotClassificationInferenceUpdateOptions) => new InferenceConfigUpdate("zero_shot_classification", zeroShotClassificationInferenceUpdateOptions); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class InferenceConfigUpdateConverter : JsonConverter -{ - public override InferenceConfigUpdate 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; - 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 == "classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fill_mask") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ner") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "pass_through") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "question_answering") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regression") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_embedding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_expansion") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "zero_shot_classification") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'InferenceConfigUpdate' from the response."); - } - - var result = new InferenceConfigUpdate(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, InferenceConfigUpdate value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions)value.Variant, options); - break; - case "fill_mask": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceUpdateOptions)value.Variant, options); - break; - case "ner": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceUpdateOptions)value.Variant, options); - break; - case "pass_through": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceUpdateOptions)value.Variant, options); - break; - case "question_answering": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceUpdateOptions)value.Variant, options); - break; - case "regression": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions)value.Variant, options); - break; - case "text_classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceUpdateOptions)value.Variant, options); - break; - case "text_embedding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceUpdateOptions)value.Variant, options); - break; - case "text_expansion": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceUpdateOptions)value.Variant, options); - break; - case "zero_shot_classification": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceUpdateOptions)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigUpdateDescriptor : SerializableDescriptor> -{ - internal InferenceConfigUpdateDescriptor(Action> configure) => configure.Invoke(this); - - public InferenceConfigUpdateDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigUpdateDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigUpdateDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigUpdateDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => Set(classificationInferenceOptions, "classification"); - public InferenceConfigUpdateDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigUpdateDescriptor FillMask(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceUpdateOptions fillMaskInferenceUpdateOptions) => Set(fillMaskInferenceUpdateOptions, "fill_mask"); - public InferenceConfigUpdateDescriptor FillMask(Action configure) => Set(configure, "fill_mask"); - public InferenceConfigUpdateDescriptor Ner(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceUpdateOptions nerInferenceUpdateOptions) => Set(nerInferenceUpdateOptions, "ner"); - public InferenceConfigUpdateDescriptor Ner(Action configure) => Set(configure, "ner"); - public InferenceConfigUpdateDescriptor PassThrough(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceUpdateOptions passThroughInferenceUpdateOptions) => Set(passThroughInferenceUpdateOptions, "pass_through"); - public InferenceConfigUpdateDescriptor PassThrough(Action configure) => Set(configure, "pass_through"); - public InferenceConfigUpdateDescriptor QuestionAnswering(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceUpdateOptions questionAnsweringInferenceUpdateOptions) => Set(questionAnsweringInferenceUpdateOptions, "question_answering"); - public InferenceConfigUpdateDescriptor QuestionAnswering(Action configure) => Set(configure, "question_answering"); - public InferenceConfigUpdateDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => Set(regressionInferenceOptions, "regression"); - public InferenceConfigUpdateDescriptor Regression(Action> configure) => Set(configure, "regression"); - public InferenceConfigUpdateDescriptor TextClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceUpdateOptions textClassificationInferenceUpdateOptions) => Set(textClassificationInferenceUpdateOptions, "text_classification"); - public InferenceConfigUpdateDescriptor TextClassification(Action configure) => Set(configure, "text_classification"); - public InferenceConfigUpdateDescriptor TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceUpdateOptions textEmbeddingInferenceUpdateOptions) => Set(textEmbeddingInferenceUpdateOptions, "text_embedding"); - public InferenceConfigUpdateDescriptor TextEmbedding(Action configure) => Set(configure, "text_embedding"); - public InferenceConfigUpdateDescriptor TextExpansion(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceUpdateOptions textExpansionInferenceUpdateOptions) => Set(textExpansionInferenceUpdateOptions, "text_expansion"); - public InferenceConfigUpdateDescriptor TextExpansion(Action configure) => Set(configure, "text_expansion"); - public InferenceConfigUpdateDescriptor ZeroShotClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceUpdateOptions zeroShotClassificationInferenceUpdateOptions) => Set(zeroShotClassificationInferenceUpdateOptions, "zero_shot_classification"); - public InferenceConfigUpdateDescriptor ZeroShotClassification(Action configure) => Set(configure, "zero_shot_classification"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class InferenceConfigUpdateDescriptor : SerializableDescriptor -{ - internal InferenceConfigUpdateDescriptor(Action configure) => configure.Invoke(this); - - public InferenceConfigUpdateDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private InferenceConfigUpdateDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private InferenceConfigUpdateDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public InferenceConfigUpdateDescriptor Classification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ClassificationInferenceOptions classificationInferenceOptions) => Set(classificationInferenceOptions, "classification"); - public InferenceConfigUpdateDescriptor Classification(Action configure) => Set(configure, "classification"); - public InferenceConfigUpdateDescriptor FillMask(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FillMaskInferenceUpdateOptions fillMaskInferenceUpdateOptions) => Set(fillMaskInferenceUpdateOptions, "fill_mask"); - public InferenceConfigUpdateDescriptor FillMask(Action configure) => Set(configure, "fill_mask"); - public InferenceConfigUpdateDescriptor Ner(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NerInferenceUpdateOptions nerInferenceUpdateOptions) => Set(nerInferenceUpdateOptions, "ner"); - public InferenceConfigUpdateDescriptor Ner(Action configure) => Set(configure, "ner"); - public InferenceConfigUpdateDescriptor PassThrough(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.PassThroughInferenceUpdateOptions passThroughInferenceUpdateOptions) => Set(passThroughInferenceUpdateOptions, "pass_through"); - public InferenceConfigUpdateDescriptor PassThrough(Action configure) => Set(configure, "pass_through"); - public InferenceConfigUpdateDescriptor QuestionAnswering(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.QuestionAnsweringInferenceUpdateOptions questionAnsweringInferenceUpdateOptions) => Set(questionAnsweringInferenceUpdateOptions, "question_answering"); - public InferenceConfigUpdateDescriptor QuestionAnswering(Action configure) => Set(configure, "question_answering"); - public InferenceConfigUpdateDescriptor Regression(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RegressionInferenceOptions regressionInferenceOptions) => Set(regressionInferenceOptions, "regression"); - public InferenceConfigUpdateDescriptor Regression(Action configure) => Set(configure, "regression"); - public InferenceConfigUpdateDescriptor TextClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextClassificationInferenceUpdateOptions textClassificationInferenceUpdateOptions) => Set(textClassificationInferenceUpdateOptions, "text_classification"); - public InferenceConfigUpdateDescriptor TextClassification(Action configure) => Set(configure, "text_classification"); - public InferenceConfigUpdateDescriptor TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextEmbeddingInferenceUpdateOptions textEmbeddingInferenceUpdateOptions) => Set(textEmbeddingInferenceUpdateOptions, "text_embedding"); - public InferenceConfigUpdateDescriptor TextEmbedding(Action configure) => Set(configure, "text_embedding"); - public InferenceConfigUpdateDescriptor TextExpansion(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TextExpansionInferenceUpdateOptions textExpansionInferenceUpdateOptions) => Set(textExpansionInferenceUpdateOptions, "text_expansion"); - public InferenceConfigUpdateDescriptor TextExpansion(Action configure) => Set(configure, "text_expansion"); - public InferenceConfigUpdateDescriptor ZeroShotClassification(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ZeroShotClassificationInferenceUpdateOptions zeroShotClassificationInferenceUpdateOptions) => Set(zeroShotClassificationInferenceUpdateOptions, "zero_shot_classification"); - public InferenceConfigUpdateDescriptor ZeroShotClassification(Action configure) => Set(configure, "zero_shot_classification"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs deleted file mode 100644 index 17adcb46d84..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/InferenceResponseResult.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class InferenceResponseResult -{ - /// - /// - /// If the model is trained for named entity recognition (NER) tasks, the response contains the recognized entities. - /// - /// - [JsonInclude, JsonPropertyName("entities")] - public IReadOnlyCollection? Entities { get; init; } - - /// - /// - /// The feature importance for the inference results. Relevant only for classification or regression models - /// - /// - [JsonInclude, JsonPropertyName("feature_importance")] - public IReadOnlyCollection? FeatureImportance { get; init; } - - /// - /// - /// Indicates whether the input text was truncated to meet the model's maximum sequence length limit. This property - /// is present only when it is true. - /// - /// - [JsonInclude, JsonPropertyName("is_truncated")] - public bool? IsTruncated { get; init; } - - /// - /// - /// If the model is trained for a text classification or zero shot classification task, the response is the - /// predicted class. - /// For named entity recognition (NER) tasks, it contains the annotated text output. - /// For fill mask tasks, it contains the top prediction for replacing the mask token. - /// For text embedding tasks, it contains the raw numerical text embedding values. - /// For regression models, its a numerical value - /// For classification models, it may be an integer, double, boolean or string depending on prediction type - /// - /// - [JsonInclude, JsonPropertyName("predicted_value")] - [SingleOrManyCollectionConverter(typeof(object))] - public IReadOnlyCollection? PredictedValue { get; init; } - - /// - /// - /// For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted - /// value. - /// Additionally - /// - /// - [JsonInclude, JsonPropertyName("predicted_value_sequence")] - public string? PredictedValueSequence { get; init; } - - /// - /// - /// Specifies a probability for the predicted value. - /// - /// - [JsonInclude, JsonPropertyName("prediction_probability")] - public double? PredictionProbability { get; init; } - - /// - /// - /// Specifies a confidence score for the predicted value. - /// - /// - [JsonInclude, JsonPropertyName("prediction_score")] - public double? PredictionScore { get; init; } - - /// - /// - /// For fill mask, text classification, and zero shot classification tasks, the response contains a list of top - /// class entries. - /// - /// - [JsonInclude, JsonPropertyName("top_classes")] - public IReadOnlyCollection? TopClasses { get; init; } - - /// - /// - /// If the request failed, the response contains the reason for the failure. - /// - /// - [JsonInclude, JsonPropertyName("warning")] - public string? Warning { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influence.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influence.g.cs deleted file mode 100644 index c161ca1ae95..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influence.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Influence -{ - [JsonInclude, JsonPropertyName("influencer_field_name")] - public string InfluencerFieldName { get; init; } - [JsonInclude, JsonPropertyName("influencer_field_values")] - public IReadOnlyCollection InfluencerFieldValues { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influencer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influencer.g.cs deleted file mode 100644 index 6780f01d772..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Influencer.g.cs +++ /dev/null @@ -1,126 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Influencer -{ - /// - /// - /// The length of the bucket in seconds. This value matches the bucket span that is specified in the job. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public long BucketSpan { get; init; } - - /// - /// - /// Additional influencer properties are added, depending on the fields being analyzed. For example, if it’s - /// analyzing user_name as an influencer, a field user_name is added to the result document. This - /// information enables you to filter the anomaly results more easily. - /// - /// - [JsonInclude, JsonPropertyName("foo")] - public string? Foo { get; init; } - - /// - /// - /// The field name of the influencer. - /// - /// - [JsonInclude, JsonPropertyName("influencer_field_name")] - public string InfluencerFieldName { get; init; } - - /// - /// - /// The entity that influenced, contributed to, or was to blame for the anomaly. - /// - /// - [JsonInclude, JsonPropertyName("influencer_field_value")] - public string InfluencerFieldValue { get; init; } - - /// - /// - /// A normalized score between 0-100, which is based on the probability of the influencer in this bucket aggregated - /// across detectors. Unlike initial_influencer_score, this value is updated by a re-normalization process as new - /// data is analyzed. - /// - /// - [JsonInclude, JsonPropertyName("influencer_score")] - public double InfluencerScore { get; init; } - - /// - /// - /// A normalized score between 0-100, which is based on the probability of the influencer aggregated across detectors. - /// This is the initial value that was calculated at the time the bucket was processed. - /// - /// - [JsonInclude, JsonPropertyName("initial_influencer_score")] - public double InitialInfluencerScore { get; init; } - - /// - /// - /// If true, this is an interim result. In other words, the results are calculated based on partial input data. - /// - /// - [JsonInclude, JsonPropertyName("is_interim")] - public bool IsInterim { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The probability that the influencer has this behavior, in the range 0 to 1. This value can be held to a high - /// precision of over 300 decimal places, so the influencer_score is provided as a human-readable and friendly - /// interpretation of this value. - /// - /// - [JsonInclude, JsonPropertyName("probability")] - public double Probability { get; init; } - - /// - /// - /// Internal. This value is always set to influencer. - /// - /// - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - - /// - /// - /// The start time of the bucket for which these results were calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Input.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Input.g.cs deleted file mode 100644 index 281634121dc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Input.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Input -{ - [JsonInclude, JsonPropertyName("field_names")] - public Elastic.Clients.Elasticsearch.Serverless.Names FieldNames { get; set; } -} - -public sealed partial class InputDescriptor : SerializableDescriptor -{ - internal InputDescriptor(Action configure) => configure.Invoke(this); - - public InputDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Names FieldNamesValue { get; set; } - - public InputDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Names fieldNames) - { - FieldNamesValue = fieldNames; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field_names"); - JsonSerializer.Serialize(writer, FieldNamesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Job.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Job.g.cs deleted file mode 100644 index aa895e01ed1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Job.g.cs +++ /dev/null @@ -1,231 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Job -{ - /// - /// - /// Advanced configuration option. - /// Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. - /// - /// - [JsonInclude, JsonPropertyName("allow_lazy_open")] - public bool AllowLazyOpen { get; init; } - - /// - /// - /// The analysis configuration, which specifies how to analyze the data. - /// After you create a job, you cannot change the analysis configuration; all the properties are informational. - /// - /// - [JsonInclude, JsonPropertyName("analysis_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisConfig AnalysisConfig { get; init; } - - /// - /// - /// Limits can be applied for the resources required to hold the mathematical models in memory. - /// These limits are approximate and can be set per job. - /// They do not control the memory used by other processes, for example the Elasticsearch Java processes. - /// - /// - [JsonInclude, JsonPropertyName("analysis_limits")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AnalysisLimits? AnalysisLimits { get; init; } - - /// - /// - /// Advanced configuration option. - /// The time between each periodic persistence of the model. - /// The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. - /// The smallest allowed value is 1 hour. - /// - /// - [JsonInclude, JsonPropertyName("background_persist_interval")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? BackgroundPersistInterval { get; init; } - [JsonInclude, JsonPropertyName("blocked")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobBlocked? Blocked { get; init; } - [JsonInclude, JsonPropertyName("create_time")] - public DateTimeOffset? CreateTime { get; init; } - - /// - /// - /// Advanced configuration option. - /// Contains custom metadata about the job. - /// - /// - [JsonInclude, JsonPropertyName("custom_settings")] - public object? CustomSettings { get; init; } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. - /// It specifies a period of time (in days) after which only the first snapshot per day is retained. - /// This period is relative to the timestamp of the most recent snapshot for this job. - /// Valid values range from 0 to model_snapshot_retention_days. - /// - /// - [JsonInclude, JsonPropertyName("daily_model_snapshot_retention_after_days")] - public long? DailyModelSnapshotRetentionAfterDays { get; init; } - - /// - /// - /// The data description defines the format of the input data when you send data to the job by using the post data API. - /// Note that when configuring a datafeed, these properties are automatically set. - /// When data is received via the post data API, it is not stored in Elasticsearch. - /// Only the results for anomaly detection are retained. - /// - /// - [JsonInclude, JsonPropertyName("data_description")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataDescription DataDescription { get; init; } - - /// - /// - /// The datafeed, which retrieves data from Elasticsearch for analysis by the job. - /// You can associate only one datafeed with each anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("datafeed_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Datafeed? DatafeedConfig { get; init; } - - /// - /// - /// Indicates that the process of deleting the job is in progress but not yet completed. - /// It is only reported when true. - /// - /// - [JsonInclude, JsonPropertyName("deleting")] - public bool? Deleting { get; init; } - - /// - /// - /// A description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// If the job closed or failed, this is the time the job finished, otherwise it is null. - /// This property is informational; you cannot change its value. - /// - /// - [JsonInclude, JsonPropertyName("finished_time")] - public DateTimeOffset? FinishedTime { get; init; } - - /// - /// - /// A list of job groups. - /// A job can belong to no groups or many. - /// - /// - [JsonInclude, JsonPropertyName("groups")] - public IReadOnlyCollection? Groups { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. - /// It must start and end with alphanumeric characters. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// Reserved for future use, currently set to anomaly_detector. - /// - /// - [JsonInclude, JsonPropertyName("job_type")] - public string? JobType { get; init; } - - /// - /// - /// The machine learning configuration version number at which the the job was created. - /// - /// - [JsonInclude, JsonPropertyName("job_version")] - public string? JobVersion { get; init; } - - /// - /// - /// This advanced configuration option stores model information along with the results. - /// It provides a more detailed view into anomaly detection. - /// Model plot provides a simplified and indicative view of the model and its bounds. - /// - /// - [JsonInclude, JsonPropertyName("model_plot_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPlotConfig? ModelPlotConfig { get; init; } - [JsonInclude, JsonPropertyName("model_snapshot_id")] - public string? ModelSnapshotId { get; init; } - - /// - /// - /// Advanced configuration option, which affects the automatic removal of old model snapshots for this job. - /// It specifies the maximum period of time (in days) that snapshots are retained. - /// This period is relative to the timestamp of the most recent snapshot for this job. - /// By default, snapshots ten days older than the newest snapshot are deleted. - /// - /// - [JsonInclude, JsonPropertyName("model_snapshot_retention_days")] - public long ModelSnapshotRetentionDays { get; init; } - - /// - /// - /// Advanced configuration option. - /// The period over which adjustments to the score are applied, as new data is seen. - /// The default value is the longer of 30 days or 100 bucket_spans. - /// - /// - [JsonInclude, JsonPropertyName("renormalization_window_days")] - public long? RenormalizationWindowDays { get; init; } - - /// - /// - /// A text string that affects the name of the machine learning results index. - /// The default value is shared, which generates an index named .ml-anomalies-shared. - /// - /// - [JsonInclude, JsonPropertyName("results_index_name")] - public string ResultsIndexName { get; init; } - - /// - /// - /// Advanced configuration option. - /// The period of time (in days) that results are retained. - /// Age is calculated relative to the timestamp of the latest bucket result. - /// If this property has a non-null value, once per day at 00:30 (server time), results that are the specified number of days older than the latest bucket result are deleted from Elasticsearch. - /// The default value is null, which means all results are retained. - /// Annotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results. - /// Annotations added by users are retained forever. - /// - /// - [JsonInclude, JsonPropertyName("results_retention_days")] - public long? ResultsRetentionDays { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobBlocked.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobBlocked.g.cs deleted file mode 100644 index a6f0ecc0bb5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobBlocked.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class JobBlocked -{ - [JsonInclude, JsonPropertyName("reason")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobBlockedReason Reason { get; init; } - [JsonInclude, JsonPropertyName("task_id")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? TaskId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobForecastStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobForecastStatistics.g.cs deleted file mode 100644 index 944103753d2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobForecastStatistics.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class JobForecastStatistics -{ - [JsonInclude, JsonPropertyName("forecasted_jobs")] - public int ForecastedJobs { get; init; } - [JsonInclude, JsonPropertyName("memory_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics? MemoryBytes { get; init; } - [JsonInclude, JsonPropertyName("processing_time_ms")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics? ProcessingTimeMs { get; init; } - [JsonInclude, JsonPropertyName("records")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics? Records { get; init; } - [JsonInclude, JsonPropertyName("status")] - public IReadOnlyDictionary? Status { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStatistics.g.cs deleted file mode 100644 index 95308fbafb1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStatistics.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class JobStatistics -{ - [JsonInclude, JsonPropertyName("avg")] - public double Avg { get; init; } - [JsonInclude, JsonPropertyName("max")] - public double Max { get; init; } - [JsonInclude, JsonPropertyName("min")] - public double Min { get; init; } - [JsonInclude, JsonPropertyName("total")] - public double Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStats.g.cs deleted file mode 100644 index 417d21bf799..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobStats.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class JobStats -{ - /// - /// - /// For open anomaly detection jobs only, contains messages relating to the selection of a node to run the job. - /// - /// - [JsonInclude, JsonPropertyName("assignment_explanation")] - public string? AssignmentExplanation { get; init; } - - /// - /// - /// An object that describes the quantity of input to the job and any related error counts. - /// The data_count values are cumulative for the lifetime of a job. - /// If a model snapshot is reverted or old results are deleted, the job counts are not reset. - /// - /// - [JsonInclude, JsonPropertyName("data_counts")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DataCounts DataCounts { get; init; } - - /// - /// - /// Indicates that the process of deleting the job is in progress but not yet completed. It is only reported when true. - /// - /// - [JsonInclude, JsonPropertyName("deleting")] - public bool? Deleting { get; init; } - - /// - /// - /// An object that provides statistical information about forecasts belonging to this job. - /// Some statistics are omitted if no forecasts have been made. - /// - /// - [JsonInclude, JsonPropertyName("forecasts_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobForecastStatistics ForecastsStats { get; init; } - - /// - /// - /// Identifier for the anomaly detection job. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// An object that provides information about the size and contents of the model. - /// - /// - [JsonInclude, JsonPropertyName("model_size_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelSizeStats ModelSizeStats { get; init; } - - /// - /// - /// For open jobs only, the elapsed time for which the job has been open. - /// - /// - [JsonInclude, JsonPropertyName("open_time")] - public DateTimeOffset? OpenTime { get; init; } - - /// - /// - /// The status of the anomaly detection job, which can be one of the following values: closed, closing, failed, opened, opening. - /// - /// - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobState State { get; init; } - - /// - /// - /// An object that provides statistical information about timing aspect of this job. - /// - /// - [JsonInclude, JsonPropertyName("timing_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobTimingStats TimingStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobTimingStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobTimingStats.g.cs deleted file mode 100644 index dd6e02ace02..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JobTimingStats.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class JobTimingStats -{ - [JsonInclude, JsonPropertyName("average_bucket_processing_time_ms")] - public double? AverageBucketProcessingTimeMs { get; init; } - [JsonInclude, JsonPropertyName("bucket_count")] - public long BucketCount { get; init; } - [JsonInclude, JsonPropertyName("exponential_average_bucket_processing_time_ms")] - public double? ExponentialAverageBucketProcessingTimeMs { get; init; } - [JsonInclude, JsonPropertyName("exponential_average_bucket_processing_time_per_hour_ms")] - public double ExponentialAverageBucketProcessingTimePerHourMs { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("maximum_bucket_processing_time_ms")] - public double? MaximumBucketProcessingTimeMs { get; init; } - [JsonInclude, JsonPropertyName("minimum_bucket_processing_time_ms")] - public double? MinimumBucketProcessingTimeMs { get; init; } - [JsonInclude, JsonPropertyName("total_bucket_processing_time_ms")] - public double TotalBucketProcessingTimeMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JvmStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JvmStats.g.cs deleted file mode 100644 index 2d222e2e8ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/JvmStats.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class JvmStats -{ - /// - /// - /// Maximum amount of memory available for use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("heap_max")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? HeapMax { get; init; } - - /// - /// - /// Maximum amount of memory, in bytes, available for use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("heap_max_in_bytes")] - public int HeapMaxInBytes { get; init; } - - /// - /// - /// Amount of Java heap currently being used for caching inference models. - /// - /// - [JsonInclude, JsonPropertyName("java_inference")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? JavaInference { get; init; } - - /// - /// - /// Amount of Java heap, in bytes, currently being used for caching inference models. - /// - /// - [JsonInclude, JsonPropertyName("java_inference_in_bytes")] - public int JavaInferenceInBytes { get; init; } - - /// - /// - /// Maximum amount of Java heap to be used for caching inference models. - /// - /// - [JsonInclude, JsonPropertyName("java_inference_max")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? JavaInferenceMax { get; init; } - - /// - /// - /// Maximum amount of Java heap, in bytes, to be used for caching inference models. - /// - /// - [JsonInclude, JsonPropertyName("java_inference_max_in_bytes")] - public int JavaInferenceMaxInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Limits.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Limits.g.cs deleted file mode 100644 index 43e5e559dc6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Limits.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Limits -{ - [JsonInclude, JsonPropertyName("effective_max_model_memory_limit")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? EffectiveMaxModelMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("max_model_memory_limit")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxModelMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("max_single_ml_node_processors")] - public int? MaxSingleMlNodeProcessors { get; init; } - [JsonInclude, JsonPropertyName("total_ml_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize TotalMlMemory { get; init; } - [JsonInclude, JsonPropertyName("total_ml_processors")] - public int? TotalMlProcessors { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemMlStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemMlStats.g.cs deleted file mode 100644 index fb4ad9f2700..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemMlStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class MemMlStats -{ - /// - /// - /// Amount of native memory set aside for anomaly detection jobs. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_detectors")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? AnomalyDetectors { get; init; } - - /// - /// - /// Amount of native memory, in bytes, set aside for anomaly detection jobs. - /// - /// - [JsonInclude, JsonPropertyName("anomaly_detectors_in_bytes")] - public int AnomalyDetectorsInBytes { get; init; } - - /// - /// - /// Amount of native memory set aside for data frame analytics jobs. - /// - /// - [JsonInclude, JsonPropertyName("data_frame_analytics")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? DataFrameAnalytics { get; init; } - - /// - /// - /// Amount of native memory, in bytes, set aside for data frame analytics jobs. - /// - /// - [JsonInclude, JsonPropertyName("data_frame_analytics_in_bytes")] - public int DataFrameAnalyticsInBytes { get; init; } - - /// - /// - /// Maximum amount of native memory (separate to the JVM heap) that may be used by machine learning native processes. - /// - /// - [JsonInclude, JsonPropertyName("max")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Max { get; init; } - - /// - /// - /// Maximum amount of native memory (separate to the JVM heap), in bytes, that may be used by machine learning native processes. - /// - /// - [JsonInclude, JsonPropertyName("max_in_bytes")] - public int MaxInBytes { get; init; } - - /// - /// - /// Amount of native memory set aside for loading machine learning native code shared libraries. - /// - /// - [JsonInclude, JsonPropertyName("native_code_overhead")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? NativeCodeOverhead { get; init; } - - /// - /// - /// Amount of native memory, in bytes, set aside for loading machine learning native code shared libraries. - /// - /// - [JsonInclude, JsonPropertyName("native_code_overhead_in_bytes")] - public int NativeCodeOverheadInBytes { get; init; } - - /// - /// - /// Amount of native memory set aside for trained models that have a PyTorch model_type. - /// - /// - [JsonInclude, JsonPropertyName("native_inference")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? NativeInference { get; init; } - - /// - /// - /// Amount of native memory, in bytes, set aside for trained models that have a PyTorch model_type. - /// - /// - [JsonInclude, JsonPropertyName("native_inference_in_bytes")] - public int NativeInferenceInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemStats.g.cs deleted file mode 100644 index 57c7d2f5945..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/MemStats.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class MemStats -{ - /// - /// - /// If the amount of physical memory has been overridden using the es.total_memory_bytes system property - /// then this reports the overridden value. Otherwise it reports the same value as total. - /// - /// - [JsonInclude, JsonPropertyName("adjusted_total")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? AdjustedTotal { get; init; } - - /// - /// - /// If the amount of physical memory has been overridden using the es.total_memory_bytes system property - /// then this reports the overridden value in bytes. Otherwise it reports the same value as total_in_bytes. - /// - /// - [JsonInclude, JsonPropertyName("adjusted_total_in_bytes")] - public int AdjustedTotalInBytes { get; init; } - - /// - /// - /// Contains statistics about machine learning use of native memory on the node. - /// - /// - [JsonInclude, JsonPropertyName("ml")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.MemMlStats Ml { get; init; } - - /// - /// - /// Total amount of physical memory. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Total { get; init; } - - /// - /// - /// Total amount of physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public int TotalInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Memory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Memory.g.cs deleted file mode 100644 index 4a85e12020b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Memory.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Memory -{ - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary Attributes { get; init; } - [JsonInclude, JsonPropertyName("ephemeral_id")] - public string EphemeralId { get; init; } - - /// - /// - /// Contains Java Virtual Machine (JVM) statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("jvm")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JvmStats Jvm { get; init; } - - /// - /// - /// Contains statistics about memory usage for the node. - /// - /// - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.MemStats Mem { get; init; } - - /// - /// - /// Human-readable identifier for the node. Based on the Node name setting setting. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// Roles assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - - /// - /// - /// The host and port where transport HTTP connections are accepted. - /// - /// - [JsonInclude, JsonPropertyName("transport_address")] - public string TransportAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs deleted file mode 100644 index 3152267a8f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs +++ /dev/null @@ -1,60 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ModelPackageConfig -{ - [JsonInclude, JsonPropertyName("create_time")] - public long? CreateTime { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("inference_config")] - public IReadOnlyDictionary? InferenceConfig { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary? Metadata { get; init; } - [JsonInclude, JsonPropertyName("minimum_version")] - public string? MinimumVersion { get; init; } - [JsonInclude, JsonPropertyName("model_repository")] - public string? ModelRepository { get; init; } - [JsonInclude, JsonPropertyName("model_type")] - public string? ModelType { get; init; } - [JsonInclude, JsonPropertyName("packaged_model_id")] - public string PackagedModelId { get; init; } - [JsonInclude, JsonPropertyName("platform_architecture")] - public string? PlatformArchitecture { get; init; } - [JsonInclude, JsonPropertyName("prefix_strings")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? PrefixStrings { get; init; } - [JsonInclude, JsonPropertyName("sha256")] - public string? Sha256 { get; init; } - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Size { get; init; } - [JsonInclude, JsonPropertyName("tags")] - public IReadOnlyCollection? Tags { get; init; } - [JsonInclude, JsonPropertyName("vocabulary_file")] - public string? VocabularyFile { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs deleted file mode 100644 index d5394af556e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs +++ /dev/null @@ -1,239 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ModelPlotConfig -{ - /// - /// - /// If true, enables calculation and storage of the model change annotations for each entity that is being analyzed. - /// - /// - [JsonInclude, JsonPropertyName("annotations_enabled")] - public bool? AnnotationsEnabled { get; set; } - - /// - /// - /// If true, enables calculation and storage of the model bounds for each entity that is being analyzed. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - [JsonInclude, JsonPropertyName("terms")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Terms { get; set; } -} - -public sealed partial class ModelPlotConfigDescriptor : SerializableDescriptor> -{ - internal ModelPlotConfigDescriptor(Action> configure) => configure.Invoke(this); - - public ModelPlotConfigDescriptor() : base() - { - } - - private bool? AnnotationsEnabledValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TermsValue { get; set; } - - /// - /// - /// If true, enables calculation and storage of the model change annotations for each entity that is being analyzed. - /// - /// - public ModelPlotConfigDescriptor AnnotationsEnabled(bool? annotationsEnabled = true) - { - AnnotationsEnabledValue = annotationsEnabled; - return Self; - } - - /// - /// - /// If true, enables calculation and storage of the model bounds for each entity that is being analyzed. - /// - /// - public ModelPlotConfigDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - public ModelPlotConfigDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Field? terms) - { - TermsValue = terms; - return Self; - } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - public ModelPlotConfigDescriptor Terms(Expression> terms) - { - TermsValue = terms; - return Self; - } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - public ModelPlotConfigDescriptor Terms(Expression> terms) - { - TermsValue = terms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnnotationsEnabledValue.HasValue) - { - writer.WritePropertyName("annotations_enabled"); - writer.WriteBooleanValue(AnnotationsEnabledValue.Value); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (TermsValue is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ModelPlotConfigDescriptor : SerializableDescriptor -{ - internal ModelPlotConfigDescriptor(Action configure) => configure.Invoke(this); - - public ModelPlotConfigDescriptor() : base() - { - } - - private bool? AnnotationsEnabledValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TermsValue { get; set; } - - /// - /// - /// If true, enables calculation and storage of the model change annotations for each entity that is being analyzed. - /// - /// - public ModelPlotConfigDescriptor AnnotationsEnabled(bool? annotationsEnabled = true) - { - AnnotationsEnabledValue = annotationsEnabled; - return Self; - } - - /// - /// - /// If true, enables calculation and storage of the model bounds for each entity that is being analyzed. - /// - /// - public ModelPlotConfigDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - public ModelPlotConfigDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Field? terms) - { - TermsValue = terms; - return Self; - } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - public ModelPlotConfigDescriptor Terms(Expression> terms) - { - TermsValue = terms; - return Self; - } - - /// - /// - /// Limits data collection to this comma separated list of partition or by field values. If terms are not specified or it is an empty string, no filtering is applied. Wildcards are not supported. Only the specified terms can be viewed when using the Single Metric Viewer. - /// - /// - public ModelPlotConfigDescriptor Terms(Expression> terms) - { - TermsValue = terms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnnotationsEnabledValue.HasValue) - { - writer.WritePropertyName("annotations_enabled"); - writer.WriteBooleanValue(AnnotationsEnabledValue.Value); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (TermsValue is not null) - { - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSizeStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSizeStats.g.cs deleted file mode 100644 index 6a4edf5c573..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSizeStats.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ModelSizeStats -{ - [JsonInclude, JsonPropertyName("assignment_memory_basis")] - public string? AssignmentMemoryBasis { get; init; } - [JsonInclude, JsonPropertyName("bucket_allocation_failures_count")] - public long BucketAllocationFailuresCount { get; init; } - [JsonInclude, JsonPropertyName("categorization_status")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.CategorizationStatus CategorizationStatus { get; init; } - [JsonInclude, JsonPropertyName("categorized_doc_count")] - public int CategorizedDocCount { get; init; } - [JsonInclude, JsonPropertyName("dead_category_count")] - public int DeadCategoryCount { get; init; } - [JsonInclude, JsonPropertyName("failed_category_count")] - public int FailedCategoryCount { get; init; } - [JsonInclude, JsonPropertyName("frequent_category_count")] - public int FrequentCategoryCount { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("log_time")] - public DateTimeOffset LogTime { get; init; } - [JsonInclude, JsonPropertyName("memory_status")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.MemoryStatus MemoryStatus { get; init; } - [JsonInclude, JsonPropertyName("model_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize ModelBytes { get; init; } - [JsonInclude, JsonPropertyName("model_bytes_exceeded")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ModelBytesExceeded { get; init; } - [JsonInclude, JsonPropertyName("model_bytes_memory_limit")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ModelBytesMemoryLimit { get; init; } - [JsonInclude, JsonPropertyName("output_memory_allocator_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? OutputMemoryAllocatorBytes { get; init; } - [JsonInclude, JsonPropertyName("peak_model_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? PeakModelBytes { get; init; } - [JsonInclude, JsonPropertyName("rare_category_count")] - public int RareCategoryCount { get; init; } - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } - [JsonInclude, JsonPropertyName("total_by_field_count")] - public long TotalByFieldCount { get; init; } - [JsonInclude, JsonPropertyName("total_category_count")] - public int TotalCategoryCount { get; init; } - [JsonInclude, JsonPropertyName("total_over_field_count")] - public long TotalOverFieldCount { get; init; } - [JsonInclude, JsonPropertyName("total_partition_field_count")] - public long TotalPartitionFieldCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshot.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshot.g.cs deleted file mode 100644 index 9db647910df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshot.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ModelSnapshot -{ - /// - /// - /// An optional description of the job. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// A numerical character string that uniquely identifies the job that the snapshot was created for. - /// - /// - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - - /// - /// - /// The timestamp of the latest processed record. - /// - /// - [JsonInclude, JsonPropertyName("latest_record_time_stamp")] - public int? LatestRecordTimeStamp { get; init; } - - /// - /// - /// The timestamp of the latest bucket result. - /// - /// - [JsonInclude, JsonPropertyName("latest_result_time_stamp")] - public int? LatestResultTimeStamp { get; init; } - - /// - /// - /// The minimum version required to be able to restore the model snapshot. - /// - /// - [JsonInclude, JsonPropertyName("min_version")] - public string MinVersion { get; init; } - - /// - /// - /// Summary information describing the model. - /// - /// - [JsonInclude, JsonPropertyName("model_size_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelSizeStats? ModelSizeStats { get; init; } - - /// - /// - /// If true, this snapshot will not be deleted during automatic cleanup of snapshots older than model_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted. The default value is false. - /// - /// - [JsonInclude, JsonPropertyName("retain")] - public bool Retain { get; init; } - - /// - /// - /// For internal use only. - /// - /// - [JsonInclude, JsonPropertyName("snapshot_doc_count")] - public long SnapshotDocCount { get; init; } - - /// - /// - /// A numerical character string that uniquely identifies the model snapshot. - /// - /// - [JsonInclude, JsonPropertyName("snapshot_id")] - public string SnapshotId { get; init; } - - /// - /// - /// The creation timestamp for the snapshot. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshotUpgrade.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshotUpgrade.g.cs deleted file mode 100644 index b3f5d5fd72d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ModelSnapshotUpgrade.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ModelSnapshotUpgrade -{ - [JsonInclude, JsonPropertyName("assignment_explanation")] - public string AssignmentExplanation { get; init; } - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("snapshot_id")] - public string SnapshotId { get; init; } - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.SnapshotUpgradeState State { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NativeCode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NativeCode.g.cs deleted file mode 100644 index 15fd1504a3b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NativeCode.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class NativeCode -{ - [JsonInclude, JsonPropertyName("build_hash")] - public string BuildHash { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceOptions.g.cs deleted file mode 100644 index 1be4abae252..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceOptions.g.cs +++ /dev/null @@ -1,212 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Named entity recognition options -/// -/// -public sealed partial class NerInferenceOptions -{ - /// - /// - /// The token classification labels. Must be IOB formatted tags - /// - /// - [JsonInclude, JsonPropertyName("classification_labels")] - public ICollection? ClassificationLabels { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - [JsonInclude, JsonPropertyName("vocabulary")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary? Vocabulary { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(NerInferenceOptions nerInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.Ner(nerInferenceOptions); -} - -/// -/// -/// Named entity recognition options -/// -/// -public sealed partial class NerInferenceOptionsDescriptor : SerializableDescriptor -{ - internal NerInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public NerInferenceOptionsDescriptor() : base() - { - } - - private ICollection? ClassificationLabelsValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary? VocabularyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor VocabularyDescriptor { get; set; } - private Action VocabularyDescriptorAction { get; set; } - - /// - /// - /// The token classification labels. Must be IOB formatted tags - /// - /// - public NerInferenceOptionsDescriptor ClassificationLabels(ICollection? classificationLabels) - { - ClassificationLabelsValue = classificationLabels; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public NerInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options - /// - /// - public NerInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public NerInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public NerInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - public NerInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary? vocabulary) - { - VocabularyDescriptor = null; - VocabularyDescriptorAction = null; - VocabularyValue = vocabulary; - return Self; - } - - public NerInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor descriptor) - { - VocabularyValue = null; - VocabularyDescriptorAction = null; - VocabularyDescriptor = descriptor; - return Self; - } - - public NerInferenceOptionsDescriptor Vocabulary(Action configure) - { - VocabularyValue = null; - VocabularyDescriptor = null; - VocabularyDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ClassificationLabelsValue is not null) - { - writer.WritePropertyName("classification_labels"); - JsonSerializer.Serialize(writer, ClassificationLabelsValue, options); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - if (VocabularyDescriptor is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyDescriptor, options); - } - else if (VocabularyDescriptorAction is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor(VocabularyDescriptorAction), options); - } - else if (VocabularyValue is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceUpdateOptions.g.cs deleted file mode 100644 index 0e001aa293b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NerInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,131 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class NerInferenceUpdateOptions -{ - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(NerInferenceUpdateOptions nerInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.Ner(nerInferenceUpdateOptions); -} - -public sealed partial class NerInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal NerInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public NerInferenceUpdateOptionsDescriptor() : base() - { - } - - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public NerInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public NerInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public NerInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public NerInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs deleted file mode 100644 index 6e27c5db1a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs +++ /dev/null @@ -1,187 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// BERT and MPNet tokenization configuration options -/// -/// -public sealed partial class NlpBertTokenizationConfig -{ - /// - /// - /// Should the tokenizer lower case the text - /// - /// - [JsonInclude, JsonPropertyName("do_lower_case")] - public bool? DoLowerCase { get; set; } - - /// - /// - /// Maximum input sequence length for the model - /// - /// - [JsonInclude, JsonPropertyName("max_sequence_length")] - public int? MaxSequenceLength { get; set; } - - /// - /// - /// Tokenization spanning options. Special value of -1 indicates no spanning takes place - /// - /// - [JsonInclude, JsonPropertyName("span")] - public int? Span { get; set; } - - /// - /// - /// Should tokenization input be automatically truncated before sending to the model for inference - /// - /// - [JsonInclude, JsonPropertyName("truncate")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? Truncate { get; set; } - - /// - /// - /// Is tokenization completed with special tokens - /// - /// - [JsonInclude, JsonPropertyName("with_special_tokens")] - public bool? WithSpecialTokens { get; set; } -} - -/// -/// -/// BERT and MPNet tokenization configuration options -/// -/// -public sealed partial class NlpBertTokenizationConfigDescriptor : SerializableDescriptor -{ - internal NlpBertTokenizationConfigDescriptor(Action configure) => configure.Invoke(this); - - public NlpBertTokenizationConfigDescriptor() : base() - { - } - - private bool? DoLowerCaseValue { get; set; } - private int? MaxSequenceLengthValue { get; set; } - private int? SpanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? TruncateValue { get; set; } - private bool? WithSpecialTokensValue { get; set; } - - /// - /// - /// Should the tokenizer lower case the text - /// - /// - public NlpBertTokenizationConfigDescriptor DoLowerCase(bool? doLowerCase = true) - { - DoLowerCaseValue = doLowerCase; - return Self; - } - - /// - /// - /// Maximum input sequence length for the model - /// - /// - public NlpBertTokenizationConfigDescriptor MaxSequenceLength(int? maxSequenceLength) - { - MaxSequenceLengthValue = maxSequenceLength; - return Self; - } - - /// - /// - /// Tokenization spanning options. Special value of -1 indicates no spanning takes place - /// - /// - public NlpBertTokenizationConfigDescriptor Span(int? span) - { - SpanValue = span; - return Self; - } - - /// - /// - /// Should tokenization input be automatically truncated before sending to the model for inference - /// - /// - public NlpBertTokenizationConfigDescriptor Truncate(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? truncate) - { - TruncateValue = truncate; - return Self; - } - - /// - /// - /// Is tokenization completed with special tokens - /// - /// - public NlpBertTokenizationConfigDescriptor WithSpecialTokens(bool? withSpecialTokens = true) - { - WithSpecialTokensValue = withSpecialTokens; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DoLowerCaseValue.HasValue) - { - writer.WritePropertyName("do_lower_case"); - writer.WriteBooleanValue(DoLowerCaseValue.Value); - } - - if (MaxSequenceLengthValue.HasValue) - { - writer.WritePropertyName("max_sequence_length"); - writer.WriteNumberValue(MaxSequenceLengthValue.Value); - } - - if (SpanValue.HasValue) - { - writer.WritePropertyName("span"); - writer.WriteNumberValue(SpanValue.Value); - } - - if (TruncateValue is not null) - { - writer.WritePropertyName("truncate"); - JsonSerializer.Serialize(writer, TruncateValue, options); - } - - if (WithSpecialTokensValue.HasValue) - { - writer.WritePropertyName("with_special_tokens"); - writer.WriteBooleanValue(WithSpecialTokensValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs deleted file mode 100644 index 260c112a22b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs +++ /dev/null @@ -1,215 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// RoBERTa tokenization configuration options -/// -/// -public sealed partial class NlpRobertaTokenizationConfig -{ - /// - /// - /// Should the tokenizer prefix input with a space character - /// - /// - [JsonInclude, JsonPropertyName("add_prefix_space")] - public bool? AddPrefixSpace { get; set; } - - /// - /// - /// Should the tokenizer lower case the text - /// - /// - [JsonInclude, JsonPropertyName("do_lower_case")] - public bool? DoLowerCase { get; set; } - - /// - /// - /// Maximum input sequence length for the model - /// - /// - [JsonInclude, JsonPropertyName("max_sequence_length")] - public int? MaxSequenceLength { get; set; } - - /// - /// - /// Tokenization spanning options. Special value of -1 indicates no spanning takes place - /// - /// - [JsonInclude, JsonPropertyName("span")] - public int? Span { get; set; } - - /// - /// - /// Should tokenization input be automatically truncated before sending to the model for inference - /// - /// - [JsonInclude, JsonPropertyName("truncate")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? Truncate { get; set; } - - /// - /// - /// Is tokenization completed with special tokens - /// - /// - [JsonInclude, JsonPropertyName("with_special_tokens")] - public bool? WithSpecialTokens { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig(NlpRobertaTokenizationConfig nlpRobertaTokenizationConfig) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig.Roberta(nlpRobertaTokenizationConfig); -} - -/// -/// -/// RoBERTa tokenization configuration options -/// -/// -public sealed partial class NlpRobertaTokenizationConfigDescriptor : SerializableDescriptor -{ - internal NlpRobertaTokenizationConfigDescriptor(Action configure) => configure.Invoke(this); - - public NlpRobertaTokenizationConfigDescriptor() : base() - { - } - - private bool? AddPrefixSpaceValue { get; set; } - private bool? DoLowerCaseValue { get; set; } - private int? MaxSequenceLengthValue { get; set; } - private int? SpanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? TruncateValue { get; set; } - private bool? WithSpecialTokensValue { get; set; } - - /// - /// - /// Should the tokenizer prefix input with a space character - /// - /// - public NlpRobertaTokenizationConfigDescriptor AddPrefixSpace(bool? addPrefixSpace = true) - { - AddPrefixSpaceValue = addPrefixSpace; - return Self; - } - - /// - /// - /// Should the tokenizer lower case the text - /// - /// - public NlpRobertaTokenizationConfigDescriptor DoLowerCase(bool? doLowerCase = true) - { - DoLowerCaseValue = doLowerCase; - return Self; - } - - /// - /// - /// Maximum input sequence length for the model - /// - /// - public NlpRobertaTokenizationConfigDescriptor MaxSequenceLength(int? maxSequenceLength) - { - MaxSequenceLengthValue = maxSequenceLength; - return Self; - } - - /// - /// - /// Tokenization spanning options. Special value of -1 indicates no spanning takes place - /// - /// - public NlpRobertaTokenizationConfigDescriptor Span(int? span) - { - SpanValue = span; - return Self; - } - - /// - /// - /// Should tokenization input be automatically truncated before sending to the model for inference - /// - /// - public NlpRobertaTokenizationConfigDescriptor Truncate(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? truncate) - { - TruncateValue = truncate; - return Self; - } - - /// - /// - /// Is tokenization completed with special tokens - /// - /// - public NlpRobertaTokenizationConfigDescriptor WithSpecialTokens(bool? withSpecialTokens = true) - { - WithSpecialTokensValue = withSpecialTokens; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AddPrefixSpaceValue.HasValue) - { - writer.WritePropertyName("add_prefix_space"); - writer.WriteBooleanValue(AddPrefixSpaceValue.Value); - } - - if (DoLowerCaseValue.HasValue) - { - writer.WritePropertyName("do_lower_case"); - writer.WriteBooleanValue(DoLowerCaseValue.Value); - } - - if (MaxSequenceLengthValue.HasValue) - { - writer.WritePropertyName("max_sequence_length"); - writer.WriteNumberValue(MaxSequenceLengthValue.Value); - } - - if (SpanValue.HasValue) - { - writer.WritePropertyName("span"); - writer.WriteNumberValue(SpanValue.Value); - } - - if (TruncateValue is not null) - { - writer.WritePropertyName("truncate"); - JsonSerializer.Serialize(writer, TruncateValue, options); - } - - if (WithSpecialTokensValue.HasValue) - { - writer.WritePropertyName("with_special_tokens"); - writer.WriteBooleanValue(WithSpecialTokensValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs deleted file mode 100644 index fa8f9c663a6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class NlpTokenizationUpdateOptions -{ - /// - /// - /// Span options to apply - /// - /// - [JsonInclude, JsonPropertyName("span")] - public int? Span { get; set; } - - /// - /// - /// Truncate options to apply - /// - /// - [JsonInclude, JsonPropertyName("truncate")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? Truncate { get; set; } -} - -public sealed partial class NlpTokenizationUpdateOptionsDescriptor : SerializableDescriptor -{ - internal NlpTokenizationUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public NlpTokenizationUpdateOptionsDescriptor() : base() - { - } - - private int? SpanValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? TruncateValue { get; set; } - - /// - /// - /// Span options to apply - /// - /// - public NlpTokenizationUpdateOptionsDescriptor Span(int? span) - { - SpanValue = span; - return Self; - } - - /// - /// - /// Truncate options to apply - /// - /// - public NlpTokenizationUpdateOptionsDescriptor Truncate(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationTruncate? truncate) - { - TruncateValue = truncate; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SpanValue.HasValue) - { - writer.WritePropertyName("span"); - writer.WriteNumberValue(SpanValue.Value); - } - - if (TruncateValue is not null) - { - writer.WritePropertyName("truncate"); - JsonSerializer.Serialize(writer, TruncateValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OneHotEncodingPreprocessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OneHotEncodingPreprocessor.g.cs deleted file mode 100644 index 5ade6587249..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OneHotEncodingPreprocessor.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class OneHotEncodingPreprocessor -{ - [JsonInclude, JsonPropertyName("field")] - public string Field { get; set; } - [JsonInclude, JsonPropertyName("hot_map")] - public IDictionary HotMap { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Preprocessor(OneHotEncodingPreprocessor oneHotEncodingPreprocessor) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Preprocessor.OneHotEncoding(oneHotEncodingPreprocessor); -} - -public sealed partial class OneHotEncodingPreprocessorDescriptor : SerializableDescriptor -{ - internal OneHotEncodingPreprocessorDescriptor(Action configure) => configure.Invoke(this); - - public OneHotEncodingPreprocessorDescriptor() : base() - { - } - - private string FieldValue { get; set; } - private IDictionary HotMapValue { get; set; } - - public OneHotEncodingPreprocessorDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - public OneHotEncodingPreprocessorDescriptor HotMap(Func, FluentDictionary> selector) - { - HotMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - writer.WritePropertyName("hot_map"); - JsonSerializer.Serialize(writer, HotMapValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucket.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucket.g.cs deleted file mode 100644 index 76bd6e84c89..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucket.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class OverallBucket -{ - /// - /// - /// The length of the bucket in seconds. Matches the job with the longest bucket_span value. - /// - /// - [JsonInclude, JsonPropertyName("bucket_span")] - public long BucketSpan { get; init; } - - /// - /// - /// If true, this is an interim result. In other words, the results are calculated based on partial input data. - /// - /// - [JsonInclude, JsonPropertyName("is_interim")] - public bool IsInterim { get; init; } - - /// - /// - /// An array of objects that contain the max_anomaly_score per job_id. - /// - /// - [JsonInclude, JsonPropertyName("jobs")] - public IReadOnlyCollection Jobs { get; init; } - - /// - /// - /// The top_n average of the maximum bucket anomaly_score per job. - /// - /// - [JsonInclude, JsonPropertyName("overall_score")] - public double OverallScore { get; init; } - - /// - /// - /// Internal. This is always set to overall_bucket. - /// - /// - [JsonInclude, JsonPropertyName("result_type")] - public string ResultType { get; init; } - - /// - /// - /// The start time of the bucket for which these results were calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } - - /// - /// - /// The start time of the bucket for which these results were calculated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp_string")] - public DateTimeOffset? TimestampString { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucketJob.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucketJob.g.cs deleted file mode 100644 index 205fb773271..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/OverallBucketJob.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class OverallBucketJob -{ - [JsonInclude, JsonPropertyName("job_id")] - public string JobId { get; init; } - [JsonInclude, JsonPropertyName("max_anomaly_score")] - public double MaxAnomalyScore { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Page.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Page.g.cs deleted file mode 100644 index d01fb20346b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Page.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Page -{ - /// - /// - /// Skips the specified number of items. - /// - /// - [JsonInclude, JsonPropertyName("from")] - public int? From { get; set; } - - /// - /// - /// Specifies the maximum number of items to obtain. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; set; } -} - -public sealed partial class PageDescriptor : SerializableDescriptor -{ - internal PageDescriptor(Action configure) => configure.Invoke(this); - - public PageDescriptor() : base() - { - } - - private int? FromValue { get; set; } - private int? SizeValue { get; set; } - - /// - /// - /// Skips the specified number of items. - /// - /// - public PageDescriptor From(int? from) - { - FromValue = from; - return Self; - } - - /// - /// - /// Specifies the maximum number of items to obtain. - /// - /// - public PageDescriptor Size(int? size) - { - SizeValue = size; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FromValue.HasValue) - { - writer.WritePropertyName("from"); - writer.WriteNumberValue(FromValue.Value); - } - - if (SizeValue.HasValue) - { - writer.WritePropertyName("size"); - writer.WriteNumberValue(SizeValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceOptions.g.cs deleted file mode 100644 index ef00813e79e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceOptions.g.cs +++ /dev/null @@ -1,186 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Pass through configuration options -/// -/// -public sealed partial class PassThroughInferenceOptions -{ - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - [JsonInclude, JsonPropertyName("vocabulary")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary? Vocabulary { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(PassThroughInferenceOptions passThroughInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.PassThrough(passThroughInferenceOptions); -} - -/// -/// -/// Pass through configuration options -/// -/// -public sealed partial class PassThroughInferenceOptionsDescriptor : SerializableDescriptor -{ - internal PassThroughInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public PassThroughInferenceOptionsDescriptor() : base() - { - } - - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary? VocabularyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor VocabularyDescriptor { get; set; } - private Action VocabularyDescriptorAction { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public PassThroughInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options - /// - /// - public PassThroughInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public PassThroughInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public PassThroughInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - public PassThroughInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary? vocabulary) - { - VocabularyDescriptor = null; - VocabularyDescriptorAction = null; - VocabularyValue = vocabulary; - return Self; - } - - public PassThroughInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor descriptor) - { - VocabularyValue = null; - VocabularyDescriptorAction = null; - VocabularyDescriptor = descriptor; - return Self; - } - - public PassThroughInferenceOptionsDescriptor Vocabulary(Action configure) - { - VocabularyValue = null; - VocabularyDescriptor = null; - VocabularyDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - if (VocabularyDescriptor is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyDescriptor, options); - } - else if (VocabularyDescriptorAction is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor(VocabularyDescriptorAction), options); - } - else if (VocabularyValue is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceUpdateOptions.g.cs deleted file mode 100644 index 0618f73f9d6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PassThroughInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,131 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PassThroughInferenceUpdateOptions -{ - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(PassThroughInferenceUpdateOptions passThroughInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.PassThrough(passThroughInferenceUpdateOptions); -} - -public sealed partial class PassThroughInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal PassThroughInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public PassThroughInferenceUpdateOptionsDescriptor() : base() - { - } - - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public PassThroughInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public PassThroughInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public PassThroughInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public PassThroughInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs deleted file mode 100644 index eb7bae950d3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/PerPartitionCategorization.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class PerPartitionCategorization -{ - /// - /// - /// To enable this setting, you must also set the partition_field_name property to the same value in every detector that uses the keyword mlcategory. Otherwise, job creation fails. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - - /// - /// - /// This setting can be set to true only if per-partition categorization is enabled. If true, both categorization and subsequent anomaly detection stops for partitions where the categorization status changes to warn. This setting makes it viable to have a job where it is expected that categorization works well for some partitions but not others; you do not pay the cost of bad categorization forever in the partitions where it works badly. - /// - /// - [JsonInclude, JsonPropertyName("stop_on_warn")] - public bool? StopOnWarn { get; set; } -} - -public sealed partial class PerPartitionCategorizationDescriptor : SerializableDescriptor -{ - internal PerPartitionCategorizationDescriptor(Action configure) => configure.Invoke(this); - - public PerPartitionCategorizationDescriptor() : base() - { - } - - private bool? EnabledValue { get; set; } - private bool? StopOnWarnValue { get; set; } - - /// - /// - /// To enable this setting, you must also set the partition_field_name property to the same value in every detector that uses the keyword mlcategory. Otherwise, job creation fails. - /// - /// - public PerPartitionCategorizationDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - /// - /// - /// This setting can be set to true only if per-partition categorization is enabled. If true, both categorization and subsequent anomaly detection stops for partitions where the categorization status changes to warn. This setting makes it viable to have a job where it is expected that categorization works well for some partitions but not others; you do not pay the cost of bad categorization forever in the partitions where it works badly. - /// - /// - public PerPartitionCategorizationDescriptor StopOnWarn(bool? stopOnWarn = true) - { - StopOnWarnValue = stopOnWarn; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (StopOnWarnValue.HasValue) - { - writer.WritePropertyName("stop_on_warn"); - writer.WriteBooleanValue(StopOnWarnValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Preprocessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Preprocessor.g.cs deleted file mode 100644 index ffce803e061..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Preprocessor.g.cs +++ /dev/null @@ -1,257 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -[JsonConverter(typeof(PreprocessorConverter))] -public sealed partial class Preprocessor -{ - internal Preprocessor(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 Preprocessor FrequencyEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FrequencyEncodingPreprocessor frequencyEncodingPreprocessor) => new Preprocessor("frequency_encoding", frequencyEncodingPreprocessor); - public static Preprocessor OneHotEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.OneHotEncodingPreprocessor oneHotEncodingPreprocessor) => new Preprocessor("one_hot_encoding", oneHotEncodingPreprocessor); - public static Preprocessor TargetMeanEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TargetMeanEncodingPreprocessor targetMeanEncodingPreprocessor) => new Preprocessor("target_mean_encoding", targetMeanEncodingPreprocessor); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class PreprocessorConverter : JsonConverter -{ - public override Preprocessor 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; - 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 == "frequency_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "one_hot_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "target_mean_encoding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Preprocessor' from the response."); - } - - var result = new Preprocessor(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Preprocessor value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "frequency_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FrequencyEncodingPreprocessor)value.Variant, options); - break; - case "one_hot_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.OneHotEncodingPreprocessor)value.Variant, options); - break; - case "target_mean_encoding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TargetMeanEncodingPreprocessor)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PreprocessorDescriptor : SerializableDescriptor> -{ - internal PreprocessorDescriptor(Action> configure) => configure.Invoke(this); - - public PreprocessorDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private PreprocessorDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private PreprocessorDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public PreprocessorDescriptor FrequencyEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FrequencyEncodingPreprocessor frequencyEncodingPreprocessor) => Set(frequencyEncodingPreprocessor, "frequency_encoding"); - public PreprocessorDescriptor FrequencyEncoding(Action configure) => Set(configure, "frequency_encoding"); - public PreprocessorDescriptor OneHotEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.OneHotEncodingPreprocessor oneHotEncodingPreprocessor) => Set(oneHotEncodingPreprocessor, "one_hot_encoding"); - public PreprocessorDescriptor OneHotEncoding(Action configure) => Set(configure, "one_hot_encoding"); - public PreprocessorDescriptor TargetMeanEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TargetMeanEncodingPreprocessor targetMeanEncodingPreprocessor) => Set(targetMeanEncodingPreprocessor, "target_mean_encoding"); - public PreprocessorDescriptor TargetMeanEncoding(Action configure) => Set(configure, "target_mean_encoding"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PreprocessorDescriptor : SerializableDescriptor -{ - internal PreprocessorDescriptor(Action configure) => configure.Invoke(this); - - public PreprocessorDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private PreprocessorDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private PreprocessorDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public PreprocessorDescriptor FrequencyEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.FrequencyEncodingPreprocessor frequencyEncodingPreprocessor) => Set(frequencyEncodingPreprocessor, "frequency_encoding"); - public PreprocessorDescriptor FrequencyEncoding(Action configure) => Set(configure, "frequency_encoding"); - public PreprocessorDescriptor OneHotEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.OneHotEncodingPreprocessor oneHotEncodingPreprocessor) => Set(oneHotEncodingPreprocessor, "one_hot_encoding"); - public PreprocessorDescriptor OneHotEncoding(Action configure) => Set(configure, "one_hot_encoding"); - public PreprocessorDescriptor TargetMeanEncoding(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TargetMeanEncodingPreprocessor targetMeanEncodingPreprocessor) => Set(targetMeanEncodingPreprocessor, "target_mean_encoding"); - public PreprocessorDescriptor TargetMeanEncoding(Action configure) => Set(configure, "target_mean_encoding"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs deleted file mode 100644 index eea25d5cc23..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs +++ /dev/null @@ -1,193 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Question answering inference options -/// -/// -public sealed partial class QuestionAnsweringInferenceOptions -{ - /// - /// - /// The maximum answer length to consider - /// - /// - [JsonInclude, JsonPropertyName("max_answer_length")] - public int? MaxAnswerLength { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(QuestionAnsweringInferenceOptions questionAnsweringInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.QuestionAnswering(questionAnsweringInferenceOptions); -} - -/// -/// -/// Question answering inference options -/// -/// -public sealed partial class QuestionAnsweringInferenceOptionsDescriptor : SerializableDescriptor -{ - internal QuestionAnsweringInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public QuestionAnsweringInferenceOptionsDescriptor() : base() - { - } - - private int? MaxAnswerLengthValue { get; set; } - private int? NumTopClassesValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The maximum answer length to consider - /// - /// - public QuestionAnsweringInferenceOptionsDescriptor MaxAnswerLength(int? maxAnswerLength) - { - MaxAnswerLengthValue = maxAnswerLength; - return Self; - } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public QuestionAnsweringInferenceOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public QuestionAnsweringInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public QuestionAnsweringInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public QuestionAnsweringInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public QuestionAnsweringInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxAnswerLengthValue.HasValue) - { - writer.WritePropertyName("max_answer_length"); - writer.WriteNumberValue(MaxAnswerLengthValue.Value); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs deleted file mode 100644 index 724868b82a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,205 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class QuestionAnsweringInferenceUpdateOptions -{ - /// - /// - /// The maximum answer length to consider for extraction - /// - /// - [JsonInclude, JsonPropertyName("max_answer_length")] - public int? MaxAnswerLength { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// The question to answer given the inference context - /// - /// - [JsonInclude, JsonPropertyName("question")] - public string Question { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(QuestionAnsweringInferenceUpdateOptions questionAnsweringInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.QuestionAnswering(questionAnsweringInferenceUpdateOptions); -} - -public sealed partial class QuestionAnsweringInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal QuestionAnsweringInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public QuestionAnsweringInferenceUpdateOptionsDescriptor() : base() - { - } - - private int? MaxAnswerLengthValue { get; set; } - private int? NumTopClassesValue { get; set; } - private string QuestionValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The maximum answer length to consider for extraction - /// - /// - public QuestionAnsweringInferenceUpdateOptionsDescriptor MaxAnswerLength(int? maxAnswerLength) - { - MaxAnswerLengthValue = maxAnswerLength; - return Self; - } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public QuestionAnsweringInferenceUpdateOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// The question to answer given the inference context - /// - /// - public QuestionAnsweringInferenceUpdateOptionsDescriptor Question(string question) - { - QuestionValue = question; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public QuestionAnsweringInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public QuestionAnsweringInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public QuestionAnsweringInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public QuestionAnsweringInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MaxAnswerLengthValue.HasValue) - { - writer.WritePropertyName("max_answer_length"); - writer.WriteNumberValue(MaxAnswerLengthValue.Value); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - writer.WritePropertyName("question"); - writer.WriteStringValue(QuestionValue); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs deleted file mode 100644 index b6c6eb113bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs +++ /dev/null @@ -1,199 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class RegressionInferenceOptions -{ - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - [JsonInclude, JsonPropertyName("num_top_feature_importance_values")] - public int? NumTopFeatureImportanceValues { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? ResultsField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig(RegressionInferenceOptions regressionInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig.Regression(regressionInferenceOptions); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(RegressionInferenceOptions regressionInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.Regression(regressionInferenceOptions); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(RegressionInferenceOptions regressionInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.Regression(regressionInferenceOptions); -} - -public sealed partial class RegressionInferenceOptionsDescriptor : SerializableDescriptor> -{ - internal RegressionInferenceOptionsDescriptor(Action> configure) => configure.Invoke(this); - - public RegressionInferenceOptionsDescriptor() : base() - { - } - - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public RegressionInferenceOptionsDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public RegressionInferenceOptionsDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public RegressionInferenceOptionsDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public RegressionInferenceOptionsDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RegressionInferenceOptionsDescriptor : SerializableDescriptor -{ - internal RegressionInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public RegressionInferenceOptionsDescriptor() : base() - { - } - - private int? NumTopFeatureImportanceValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? ResultsFieldValue { get; set; } - - /// - /// - /// Specifies the maximum number of feature importance values per document. - /// - /// - public RegressionInferenceOptionsDescriptor NumTopFeatureImportanceValues(int? numTopFeatureImportanceValues) - { - NumTopFeatureImportanceValuesValue = numTopFeatureImportanceValues; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public RegressionInferenceOptionsDescriptor ResultsField(Elastic.Clients.Elasticsearch.Serverless.Field? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public RegressionInferenceOptionsDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public RegressionInferenceOptionsDescriptor ResultsField(Expression> resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (NumTopFeatureImportanceValuesValue.HasValue) - { - writer.WritePropertyName("num_top_feature_importance_values"); - writer.WriteNumberValue(NumTopFeatureImportanceValuesValue.Value); - } - - if (ResultsFieldValue is not null) - { - writer.WritePropertyName("results_field"); - JsonSerializer.Serialize(writer, ResultsFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RuleCondition.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RuleCondition.g.cs deleted file mode 100644 index 615ee4c9c1a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RuleCondition.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class RuleCondition -{ - /// - /// - /// Specifies the result property to which the condition applies. If your detector uses lat_long, metric, rare, or freq_rare functions, you can only specify conditions that apply to time. - /// - /// - [JsonInclude, JsonPropertyName("applies_to")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AppliesTo AppliesTo { get; set; } - - /// - /// - /// Specifies the condition operator. The available options are greater than, greater than or equals, less than, and less than or equals. - /// - /// - [JsonInclude, JsonPropertyName("operator")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ConditionOperator Operator { get; set; } - - /// - /// - /// The value that is compared against the applies_to field using the operator. - /// - /// - [JsonInclude, JsonPropertyName("value")] - public double Value { get; set; } -} - -public sealed partial class RuleConditionDescriptor : SerializableDescriptor -{ - internal RuleConditionDescriptor(Action configure) => configure.Invoke(this); - - public RuleConditionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AppliesTo AppliesToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ConditionOperator OperatorValue { get; set; } - private double ValueValue { get; set; } - - /// - /// - /// Specifies the result property to which the condition applies. If your detector uses lat_long, metric, rare, or freq_rare functions, you can only specify conditions that apply to time. - /// - /// - public RuleConditionDescriptor AppliesTo(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AppliesTo appliesTo) - { - AppliesToValue = appliesTo; - return Self; - } - - /// - /// - /// Specifies the condition operator. The available options are greater than, greater than or equals, less than, and less than or equals. - /// - /// - public RuleConditionDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ConditionOperator value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// The value that is compared against the applies_to field using the operator. - /// - /// - public RuleConditionDescriptor Value(double value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("applies_to"); - JsonSerializer.Serialize(writer, AppliesToValue, options); - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - writer.WritePropertyName("value"); - writer.WriteNumberValue(ValueValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RunningStateSearchInterval.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RunningStateSearchInterval.g.cs deleted file mode 100644 index ceffe5648d6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/RunningStateSearchInterval.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class RunningStateSearchInterval -{ - /// - /// - /// The end time. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? End { get; init; } - - /// - /// - /// The end time as an epoch in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("end_ms")] - public long EndMs { get; init; } - - /// - /// - /// The start time. - /// - /// - [JsonInclude, JsonPropertyName("start")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Start { get; init; } - - /// - /// - /// The start time as an epoch in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("start_ms")] - public long StartMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TargetMeanEncodingPreprocessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TargetMeanEncodingPreprocessor.g.cs deleted file mode 100644 index c8c9f987ff3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TargetMeanEncodingPreprocessor.g.cs +++ /dev/null @@ -1,94 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TargetMeanEncodingPreprocessor -{ - [JsonInclude, JsonPropertyName("default_value")] - public double DefaultValue { get; set; } - [JsonInclude, JsonPropertyName("feature_name")] - public string FeatureName { get; set; } - [JsonInclude, JsonPropertyName("field")] - public string Field { get; set; } - [JsonInclude, JsonPropertyName("target_map")] - public IDictionary TargetMap { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Preprocessor(TargetMeanEncodingPreprocessor targetMeanEncodingPreprocessor) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Preprocessor.TargetMeanEncoding(targetMeanEncodingPreprocessor); -} - -public sealed partial class TargetMeanEncodingPreprocessorDescriptor : SerializableDescriptor -{ - internal TargetMeanEncodingPreprocessorDescriptor(Action configure) => configure.Invoke(this); - - public TargetMeanEncodingPreprocessorDescriptor() : base() - { - } - - private double DefaultValueValue { get; set; } - private string FeatureNameValue { get; set; } - private string FieldValue { get; set; } - private IDictionary TargetMapValue { get; set; } - - public TargetMeanEncodingPreprocessorDescriptor DefaultValue(double defaultValue) - { - DefaultValueValue = defaultValue; - return Self; - } - - public TargetMeanEncodingPreprocessorDescriptor FeatureName(string featureName) - { - FeatureNameValue = featureName; - return Self; - } - - public TargetMeanEncodingPreprocessorDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - public TargetMeanEncodingPreprocessorDescriptor TargetMap(Func, FluentDictionary> selector) - { - TargetMapValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("default_value"); - writer.WriteNumberValue(DefaultValueValue); - writer.WritePropertyName("feature_name"); - writer.WriteStringValue(FeatureNameValue); - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - writer.WritePropertyName("target_map"); - JsonSerializer.Serialize(writer, TargetMapValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs deleted file mode 100644 index fed77e31d98..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs +++ /dev/null @@ -1,193 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Text classification configuration options -/// -/// -public sealed partial class TextClassificationInferenceOptions -{ - /// - /// - /// Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels - /// - /// - [JsonInclude, JsonPropertyName("classification_labels")] - public ICollection? ClassificationLabels { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(TextClassificationInferenceOptions textClassificationInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.TextClassification(textClassificationInferenceOptions); -} - -/// -/// -/// Text classification configuration options -/// -/// -public sealed partial class TextClassificationInferenceOptionsDescriptor : SerializableDescriptor -{ - internal TextClassificationInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public TextClassificationInferenceOptionsDescriptor() : base() - { - } - - private ICollection? ClassificationLabelsValue { get; set; } - private int? NumTopClassesValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels - /// - /// - public TextClassificationInferenceOptionsDescriptor ClassificationLabels(ICollection? classificationLabels) - { - ClassificationLabelsValue = classificationLabels; - return Self; - } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public TextClassificationInferenceOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public TextClassificationInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options - /// - /// - public TextClassificationInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public TextClassificationInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public TextClassificationInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ClassificationLabelsValue is not null) - { - writer.WritePropertyName("classification_labels"); - JsonSerializer.Serialize(writer, ClassificationLabelsValue, options); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs deleted file mode 100644 index 6613c59a10e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,183 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TextClassificationInferenceUpdateOptions -{ - /// - /// - /// Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels - /// - /// - [JsonInclude, JsonPropertyName("classification_labels")] - public ICollection? ClassificationLabels { get; set; } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - [JsonInclude, JsonPropertyName("num_top_classes")] - public int? NumTopClasses { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(TextClassificationInferenceUpdateOptions textClassificationInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.TextClassification(textClassificationInferenceUpdateOptions); -} - -public sealed partial class TextClassificationInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal TextClassificationInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public TextClassificationInferenceUpdateOptionsDescriptor() : base() - { - } - - private ICollection? ClassificationLabelsValue { get; set; } - private int? NumTopClassesValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labels - /// - /// - public TextClassificationInferenceUpdateOptionsDescriptor ClassificationLabels(ICollection? classificationLabels) - { - ClassificationLabelsValue = classificationLabels; - return Self; - } - - /// - /// - /// Specifies the number of top class predictions to return. Defaults to 0. - /// - /// - public TextClassificationInferenceUpdateOptionsDescriptor NumTopClasses(int? numTopClasses) - { - NumTopClassesValue = numTopClasses; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public TextClassificationInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public TextClassificationInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public TextClassificationInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public TextClassificationInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ClassificationLabelsValue is not null) - { - writer.WritePropertyName("classification_labels"); - JsonSerializer.Serialize(writer, ClassificationLabelsValue, options); - } - - if (NumTopClassesValue.HasValue) - { - writer.WritePropertyName("num_top_classes"); - writer.WriteNumberValue(NumTopClassesValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs deleted file mode 100644 index 06a6b317396..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs +++ /dev/null @@ -1,212 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Text embedding inference options -/// -/// -public sealed partial class TextEmbeddingInferenceOptions -{ - /// - /// - /// The number of dimensions in the embedding output - /// - /// - [JsonInclude, JsonPropertyName("embedding_size")] - public int? EmbeddingSize { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - [JsonInclude, JsonPropertyName("vocabulary")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary Vocabulary { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(TextEmbeddingInferenceOptions textEmbeddingInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.TextEmbedding(textEmbeddingInferenceOptions); -} - -/// -/// -/// Text embedding inference options -/// -/// -public sealed partial class TextEmbeddingInferenceOptionsDescriptor : SerializableDescriptor -{ - internal TextEmbeddingInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public TextEmbeddingInferenceOptionsDescriptor() : base() - { - } - - private int? EmbeddingSizeValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary VocabularyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor VocabularyDescriptor { get; set; } - private Action VocabularyDescriptorAction { get; set; } - - /// - /// - /// The number of dimensions in the embedding output - /// - /// - public TextEmbeddingInferenceOptionsDescriptor EmbeddingSize(int? embeddingSize) - { - EmbeddingSizeValue = embeddingSize; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public TextEmbeddingInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options - /// - /// - public TextEmbeddingInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public TextEmbeddingInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public TextEmbeddingInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - public TextEmbeddingInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary vocabulary) - { - VocabularyDescriptor = null; - VocabularyDescriptorAction = null; - VocabularyValue = vocabulary; - return Self; - } - - public TextEmbeddingInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor descriptor) - { - VocabularyValue = null; - VocabularyDescriptorAction = null; - VocabularyDescriptor = descriptor; - return Self; - } - - public TextEmbeddingInferenceOptionsDescriptor Vocabulary(Action configure) - { - VocabularyValue = null; - VocabularyDescriptor = null; - VocabularyDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EmbeddingSizeValue.HasValue) - { - writer.WritePropertyName("embedding_size"); - writer.WriteNumberValue(EmbeddingSizeValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - if (VocabularyDescriptor is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyDescriptor, options); - } - else if (VocabularyDescriptorAction is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor(VocabularyDescriptorAction), options); - } - else - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceUpdateOptions.g.cs deleted file mode 100644 index aab77603e6d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextEmbeddingInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,120 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TextEmbeddingInferenceUpdateOptions -{ - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(TextEmbeddingInferenceUpdateOptions textEmbeddingInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.TextEmbedding(textEmbeddingInferenceUpdateOptions); -} - -public sealed partial class TextEmbeddingInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal TextEmbeddingInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public TextEmbeddingInferenceUpdateOptionsDescriptor() : base() - { - } - - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public TextEmbeddingInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - public TextEmbeddingInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public TextEmbeddingInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public TextEmbeddingInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceOptions.g.cs deleted file mode 100644 index 64ae8998c08..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceOptions.g.cs +++ /dev/null @@ -1,186 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Text expansion inference options -/// -/// -public sealed partial class TextExpansionInferenceOptions -{ - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - [JsonInclude, JsonPropertyName("vocabulary")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary Vocabulary { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(TextExpansionInferenceOptions textExpansionInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.TextExpansion(textExpansionInferenceOptions); -} - -/// -/// -/// Text expansion inference options -/// -/// -public sealed partial class TextExpansionInferenceOptionsDescriptor : SerializableDescriptor -{ - internal TextExpansionInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public TextExpansionInferenceOptionsDescriptor() : base() - { - } - - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary VocabularyValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor VocabularyDescriptor { get; set; } - private Action VocabularyDescriptorAction { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public TextExpansionInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options - /// - /// - public TextExpansionInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public TextExpansionInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public TextExpansionInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - public TextExpansionInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Vocabulary vocabulary) - { - VocabularyDescriptor = null; - VocabularyDescriptorAction = null; - VocabularyValue = vocabulary; - return Self; - } - - public TextExpansionInferenceOptionsDescriptor Vocabulary(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor descriptor) - { - VocabularyValue = null; - VocabularyDescriptorAction = null; - VocabularyDescriptor = descriptor; - return Self; - } - - public TextExpansionInferenceOptionsDescriptor Vocabulary(Action configure) - { - VocabularyValue = null; - VocabularyDescriptor = null; - VocabularyDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - if (VocabularyDescriptor is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyDescriptor, options); - } - else if (VocabularyDescriptorAction is not null) - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.VocabularyDescriptor(VocabularyDescriptorAction), options); - } - else - { - writer.WritePropertyName("vocabulary"); - JsonSerializer.Serialize(writer, VocabularyValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceUpdateOptions.g.cs deleted file mode 100644 index e7ade69c7e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TextExpansionInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,120 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TextExpansionInferenceUpdateOptions -{ - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(TextExpansionInferenceUpdateOptions textExpansionInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.TextExpansion(textExpansionInferenceUpdateOptions); -} - -public sealed partial class TextExpansionInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal TextExpansionInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public TextExpansionInferenceUpdateOptionsDescriptor() : base() - { - } - - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public TextExpansionInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - public TextExpansionInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public TextExpansionInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public TextExpansionInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TokenizationConfig.g.cs deleted file mode 100644 index fb54aca32fc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TokenizationConfig.g.cs +++ /dev/null @@ -1,277 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Tokenization options stored in inference configuration -/// -/// -[JsonConverter(typeof(TokenizationConfigConverter))] -public sealed partial class TokenizationConfig -{ - internal TokenizationConfig(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 TokenizationConfig Bert(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => new TokenizationConfig("bert", nlpBertTokenizationConfig); - public static TokenizationConfig BertJa(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => new TokenizationConfig("bert_ja", nlpBertTokenizationConfig); - public static TokenizationConfig Mpnet(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => new TokenizationConfig("mpnet", nlpBertTokenizationConfig); - public static TokenizationConfig Roberta(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpRobertaTokenizationConfig nlpRobertaTokenizationConfig) => new TokenizationConfig("roberta", nlpRobertaTokenizationConfig); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class TokenizationConfigConverter : JsonConverter -{ - public override TokenizationConfig 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; - 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 == "bert") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "bert_ja") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "mpnet") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "roberta") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'TokenizationConfig' from the response."); - } - - var result = new TokenizationConfig(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, TokenizationConfig value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "bert": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig)value.Variant, options); - break; - case "bert_ja": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig)value.Variant, options); - break; - case "mpnet": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig)value.Variant, options); - break; - case "roberta": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpRobertaTokenizationConfig)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TokenizationConfigDescriptor : SerializableDescriptor> -{ - internal TokenizationConfigDescriptor(Action> configure) => configure.Invoke(this); - - public TokenizationConfigDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private TokenizationConfigDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private TokenizationConfigDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public TokenizationConfigDescriptor Bert(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => Set(nlpBertTokenizationConfig, "bert"); - public TokenizationConfigDescriptor Bert(Action configure) => Set(configure, "bert"); - public TokenizationConfigDescriptor BertJa(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => Set(nlpBertTokenizationConfig, "bert_ja"); - public TokenizationConfigDescriptor BertJa(Action configure) => Set(configure, "bert_ja"); - public TokenizationConfigDescriptor Mpnet(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => Set(nlpBertTokenizationConfig, "mpnet"); - public TokenizationConfigDescriptor Mpnet(Action configure) => Set(configure, "mpnet"); - public TokenizationConfigDescriptor Roberta(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpRobertaTokenizationConfig nlpRobertaTokenizationConfig) => Set(nlpRobertaTokenizationConfig, "roberta"); - public TokenizationConfigDescriptor Roberta(Action configure) => Set(configure, "roberta"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TokenizationConfigDescriptor : SerializableDescriptor -{ - internal TokenizationConfigDescriptor(Action configure) => configure.Invoke(this); - - public TokenizationConfigDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private TokenizationConfigDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private TokenizationConfigDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public TokenizationConfigDescriptor Bert(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => Set(nlpBertTokenizationConfig, "bert"); - public TokenizationConfigDescriptor Bert(Action configure) => Set(configure, "bert"); - public TokenizationConfigDescriptor BertJa(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => Set(nlpBertTokenizationConfig, "bert_ja"); - public TokenizationConfigDescriptor BertJa(Action configure) => Set(configure, "bert_ja"); - public TokenizationConfigDescriptor Mpnet(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpBertTokenizationConfig nlpBertTokenizationConfig) => Set(nlpBertTokenizationConfig, "mpnet"); - public TokenizationConfigDescriptor Mpnet(Action configure) => Set(configure, "mpnet"); - public TokenizationConfigDescriptor Roberta(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpRobertaTokenizationConfig nlpRobertaTokenizationConfig) => Set(nlpRobertaTokenizationConfig, "roberta"); - public TokenizationConfigDescriptor Roberta(Action configure) => Set(configure, "roberta"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TopClassEntry.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TopClassEntry.g.cs deleted file mode 100644 index c9833c2c899..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TopClassEntry.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TopClassEntry -{ - [JsonInclude, JsonPropertyName("class_name")] - public string ClassName { get; init; } - [JsonInclude, JsonPropertyName("class_probability")] - public double ClassProbability { get; init; } - [JsonInclude, JsonPropertyName("class_score")] - public double ClassScore { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportance.g.cs deleted file mode 100644 index 691eaff684d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportance.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TotalFeatureImportance -{ - /// - /// - /// If the trained model is a classification model, feature importance statistics are gathered per target class value. - /// - /// - [JsonInclude, JsonPropertyName("classes")] - public IReadOnlyCollection Classes { get; init; } - - /// - /// - /// The feature for which this importance was calculated. - /// - /// - [JsonInclude, JsonPropertyName("feature_name")] - public string FeatureName { get; init; } - - /// - /// - /// A collection of feature importance statistics related to the training data set for this particular feature. - /// - /// - [JsonInclude, JsonPropertyName("importance")] - public IReadOnlyCollection Importance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceClass.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceClass.g.cs deleted file mode 100644 index 7a660361c36..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceClass.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TotalFeatureImportanceClass -{ - /// - /// - /// The target class value. Could be a string, boolean, or number. - /// - /// - [JsonInclude, JsonPropertyName("class_name")] - public string ClassName { get; init; } - - /// - /// - /// A collection of feature importance statistics related to the training data set for this particular feature. - /// - /// - [JsonInclude, JsonPropertyName("importance")] - public IReadOnlyCollection Importance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceStatistics.g.cs deleted file mode 100644 index fb2a4665bec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TotalFeatureImportanceStatistics.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TotalFeatureImportanceStatistics -{ - /// - /// - /// The maximum importance value across all the training data for this feature. - /// - /// - [JsonInclude, JsonPropertyName("max")] - public int Max { get; init; } - - /// - /// - /// The average magnitude of this feature across all the training data. This value is the average of the absolute values of the importance for this feature. - /// - /// - [JsonInclude, JsonPropertyName("mean_magnitude")] - public double MeanMagnitude { get; init; } - - /// - /// - /// The minimum importance value across all the training data for this feature. - /// - /// - [JsonInclude, JsonPropertyName("min")] - public int Min { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModel.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModel.g.cs deleted file mode 100644 index bd3b3d35b2b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModel.g.cs +++ /dev/null @@ -1,241 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModel -{ - /// - /// - /// The definition for an ensemble model - /// - /// - [JsonInclude, JsonPropertyName("ensemble")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Ensemble? Ensemble { get; set; } - - /// - /// - /// The definition for a binary decision tree. - /// - /// - [JsonInclude, JsonPropertyName("tree")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTree? Tree { get; set; } - - /// - /// - /// The definition of a node in a tree. - /// There are two major types of nodes: leaf nodes and not-leaf nodes. - /// - /// - /// - /// - /// Leaf nodes only need node_index and leaf_value defined. - /// - /// - /// - /// - /// All other nodes need split_feature, left_child, right_child, threshold, decision_type, and default_left defined. - /// - /// - /// - /// - [JsonInclude, JsonPropertyName("tree_node")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNode? TreeNode { get; set; } -} - -public sealed partial class TrainedModelDescriptor : SerializableDescriptor -{ - internal TrainedModelDescriptor(Action configure) => configure.Invoke(this); - - public TrainedModelDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Ensemble? EnsembleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.EnsembleDescriptor EnsembleDescriptor { get; set; } - private Action EnsembleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTree? TreeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeDescriptor TreeDescriptor { get; set; } - private Action TreeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNode? TreeNodeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor TreeNodeDescriptor { get; set; } - private Action TreeNodeDescriptorAction { get; set; } - - /// - /// - /// The definition for an ensemble model - /// - /// - public TrainedModelDescriptor Ensemble(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Ensemble? ensemble) - { - EnsembleDescriptor = null; - EnsembleDescriptorAction = null; - EnsembleValue = ensemble; - return Self; - } - - public TrainedModelDescriptor Ensemble(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.EnsembleDescriptor descriptor) - { - EnsembleValue = null; - EnsembleDescriptorAction = null; - EnsembleDescriptor = descriptor; - return Self; - } - - public TrainedModelDescriptor Ensemble(Action configure) - { - EnsembleValue = null; - EnsembleDescriptor = null; - EnsembleDescriptorAction = configure; - return Self; - } - - /// - /// - /// The definition for a binary decision tree. - /// - /// - public TrainedModelDescriptor Tree(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTree? tree) - { - TreeDescriptor = null; - TreeDescriptorAction = null; - TreeValue = tree; - return Self; - } - - public TrainedModelDescriptor Tree(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeDescriptor descriptor) - { - TreeValue = null; - TreeDescriptorAction = null; - TreeDescriptor = descriptor; - return Self; - } - - public TrainedModelDescriptor Tree(Action configure) - { - TreeValue = null; - TreeDescriptor = null; - TreeDescriptorAction = configure; - return Self; - } - - /// - /// - /// The definition of a node in a tree. - /// There are two major types of nodes: leaf nodes and not-leaf nodes. - /// - /// - /// - /// - /// Leaf nodes only need node_index and leaf_value defined. - /// - /// - /// - /// - /// All other nodes need split_feature, left_child, right_child, threshold, decision_type, and default_left defined. - /// - /// - /// - /// - public TrainedModelDescriptor TreeNode(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNode? treeNode) - { - TreeNodeDescriptor = null; - TreeNodeDescriptorAction = null; - TreeNodeValue = treeNode; - return Self; - } - - public TrainedModelDescriptor TreeNode(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor descriptor) - { - TreeNodeValue = null; - TreeNodeDescriptorAction = null; - TreeNodeDescriptor = descriptor; - return Self; - } - - public TrainedModelDescriptor TreeNode(Action configure) - { - TreeNodeValue = null; - TreeNodeDescriptor = null; - TreeNodeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (EnsembleDescriptor is not null) - { - writer.WritePropertyName("ensemble"); - JsonSerializer.Serialize(writer, EnsembleDescriptor, options); - } - else if (EnsembleDescriptorAction is not null) - { - writer.WritePropertyName("ensemble"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.EnsembleDescriptor(EnsembleDescriptorAction), options); - } - else if (EnsembleValue is not null) - { - writer.WritePropertyName("ensemble"); - JsonSerializer.Serialize(writer, EnsembleValue, options); - } - - if (TreeDescriptor is not null) - { - writer.WritePropertyName("tree"); - JsonSerializer.Serialize(writer, TreeDescriptor, options); - } - else if (TreeDescriptorAction is not null) - { - writer.WritePropertyName("tree"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeDescriptor(TreeDescriptorAction), options); - } - else if (TreeValue is not null) - { - writer.WritePropertyName("tree"); - JsonSerializer.Serialize(writer, TreeValue, options); - } - - if (TreeNodeDescriptor is not null) - { - writer.WritePropertyName("tree_node"); - JsonSerializer.Serialize(writer, TreeNodeDescriptor, options); - } - else if (TreeNodeDescriptorAction is not null) - { - writer.WritePropertyName("tree_node"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor(TreeNodeDescriptorAction), options); - } - else if (TreeNodeValue is not null) - { - writer.WritePropertyName("tree_node"); - JsonSerializer.Serialize(writer, TreeNodeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs deleted file mode 100644 index c091d8ae2a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs +++ /dev/null @@ -1,64 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelAssignment -{ - [JsonInclude, JsonPropertyName("adaptive_allocations")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AdaptiveAllocationsSettings? AdaptiveAllocations { get; init; } - - /// - /// - /// The overall assignment state. - /// - /// - [JsonInclude, JsonPropertyName("assignment_state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAssignmentState AssignmentState { get; init; } - [JsonInclude, JsonPropertyName("max_assigned_allocations")] - public int? MaxAssignedAllocations { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public string? Reason { get; init; } - - /// - /// - /// The allocation state for each node. - /// - /// - [JsonInclude, JsonPropertyName("routing_table")] - public IReadOnlyDictionary RoutingTable { get; init; } - - /// - /// - /// The timestamp when the deployment started. - /// - /// - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset StartTime { get; init; } - [JsonInclude, JsonPropertyName("task_parameters")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelAssignmentTaskParameters TaskParameters { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentRoutingTable.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentRoutingTable.g.cs deleted file mode 100644 index 7a5582dc037..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentRoutingTable.g.cs +++ /dev/null @@ -1,64 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelAssignmentRoutingTable -{ - /// - /// - /// Current number of allocations. - /// - /// - [JsonInclude, JsonPropertyName("current_allocations")] - public int CurrentAllocations { get; init; } - - /// - /// - /// The reason for the current state. It is usually populated only when the - /// routing_state is failed. - /// - /// - [JsonInclude, JsonPropertyName("reason")] - public string? Reason { get; init; } - - /// - /// - /// The current routing state. - /// - /// - [JsonInclude, JsonPropertyName("routing_state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.RoutingState RoutingState { get; init; } - - /// - /// - /// Target number of allocations. - /// - /// - [JsonInclude, JsonPropertyName("target_allocations")] - public int TargetAllocations { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentTaskParameters.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentTaskParameters.g.cs deleted file mode 100644 index 180d3e5b690..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelAssignmentTaskParameters.g.cs +++ /dev/null @@ -1,93 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelAssignmentTaskParameters -{ - /// - /// - /// The size of the trained model cache. - /// - /// - [JsonInclude, JsonPropertyName("cache_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? CacheSize { get; init; } - - /// - /// - /// The unique identifier for the trained model deployment. - /// - /// - [JsonInclude, JsonPropertyName("deployment_id")] - public string DeploymentId { get; init; } - - /// - /// - /// The size of the trained model in bytes. - /// - /// - [JsonInclude, JsonPropertyName("model_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize ModelBytes { get; init; } - - /// - /// - /// The unique identifier for the trained model. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; init; } - - /// - /// - /// The total number of allocations this model is assigned across ML nodes. - /// - /// - [JsonInclude, JsonPropertyName("number_of_allocations")] - public int NumberOfAllocations { get; init; } - [JsonInclude, JsonPropertyName("per_allocation_memory_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize PerAllocationMemoryBytes { get; init; } - [JsonInclude, JsonPropertyName("per_deployment_memory_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize PerDeploymentMemoryBytes { get; init; } - [JsonInclude, JsonPropertyName("priority")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainingPriority Priority { get; init; } - - /// - /// - /// Number of inference requests are allowed in the queue at a time. - /// - /// - [JsonInclude, JsonPropertyName("queue_capacity")] - public int QueueCapacity { get; init; } - - /// - /// - /// Number of threads per allocation. - /// - /// - [JsonInclude, JsonPropertyName("threads_per_allocation")] - public int ThreadsPerAllocation { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs deleted file mode 100644 index 8f5496654f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs +++ /dev/null @@ -1,162 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelConfig -{ - [JsonInclude, JsonPropertyName("compressed_definition")] - public string? CompressedDefinition { get; init; } - - /// - /// - /// Information on the creator of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("created_by")] - public string? CreatedBy { get; init; } - - /// - /// - /// The time when the trained model was created. - /// - /// - [JsonInclude, JsonPropertyName("create_time")] - public DateTimeOffset? CreateTime { get; init; } - - /// - /// - /// Any field map described in the inference configuration takes precedence. - /// - /// - [JsonInclude, JsonPropertyName("default_field_map")] - public IReadOnlyDictionary? DefaultFieldMap { get; init; } - - /// - /// - /// The free-text description of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// The estimated heap usage in bytes to keep the trained model in memory. - /// - /// - [JsonInclude, JsonPropertyName("estimated_heap_memory_usage_bytes")] - public int? EstimatedHeapMemoryUsageBytes { get; init; } - - /// - /// - /// The estimated number of operations to use the trained model. - /// - /// - [JsonInclude, JsonPropertyName("estimated_operations")] - public int? EstimatedOperations { get; init; } - - /// - /// - /// True if the full model definition is present. - /// - /// - [JsonInclude, JsonPropertyName("fully_defined")] - public bool? FullyDefined { get; init; } - - /// - /// - /// The default configuration for inference. This can be either a regression, classification, or one of the many NLP focused configurations. It must match the underlying definition.trained_model's target_type. For pre-packaged models such as ELSER the config is not required. - /// - /// - [JsonInclude, JsonPropertyName("inference_config")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate? InferenceConfig { get; init; } - - /// - /// - /// The input field names for the model definition. - /// - /// - [JsonInclude, JsonPropertyName("input")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelConfigInput Input { get; init; } - - /// - /// - /// The license level of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("license_level")] - public string? LicenseLevel { get; init; } - [JsonInclude, JsonPropertyName("location")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelLocation? Location { get; init; } - - /// - /// - /// An object containing metadata about the trained model. For example, models created by data frame analytics contain analysis_config and input objects. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelConfigMetadata? Metadata { get; init; } - - /// - /// - /// Identifier for the trained model. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; init; } - [JsonInclude, JsonPropertyName("model_package")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ModelPackageConfig? ModelPackage { get; init; } - [JsonInclude, JsonPropertyName("model_size_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ModelSizeBytes { get; init; } - - /// - /// - /// The model type - /// - /// - [JsonInclude, JsonPropertyName("model_type")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelType? ModelType { get; init; } - [JsonInclude, JsonPropertyName("prefix_strings")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelPrefixStrings? PrefixStrings { get; init; } - - /// - /// - /// A comma delimited string of tags. A trained model can have many tags, or none. - /// - /// - [JsonInclude, JsonPropertyName("tags")] - public IReadOnlyCollection Tags { get; init; } - - /// - /// - /// The Elasticsearch version number in which the trained model was created. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigInput.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigInput.g.cs deleted file mode 100644 index 470067ae3b2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigInput.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelConfigInput -{ - /// - /// - /// An array of input field names for the model. - /// - /// - [JsonInclude, JsonPropertyName("field_names")] - public IReadOnlyCollection FieldNames { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigMetadata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigMetadata.g.cs deleted file mode 100644 index cae44fa3cb3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelConfigMetadata.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelConfigMetadata -{ - /// - /// - /// An object that contains the baseline for feature importance values. For regression analysis, it is a single value. For classification analysis, there is a value for each class. - /// - /// - [JsonInclude, JsonPropertyName("feature_importance_baseline")] - public IReadOnlyDictionary? FeatureImportanceBaseline { get; init; } - - /// - /// - /// List of the available hyperparameters optimized during the fine_parameter_tuning phase as well as specified by the user. - /// - /// - [JsonInclude, JsonPropertyName("hyperparameters")] - public IReadOnlyCollection? Hyperparameters { get; init; } - [JsonInclude, JsonPropertyName("model_aliases")] - public IReadOnlyCollection? ModelAliases { get; init; } - - /// - /// - /// An array of the total feature importance for each feature used from the training data set. This array of objects is returned if data frame analytics trained the model and the request includes total_feature_importance in the include request parameter. - /// - /// - [JsonInclude, JsonPropertyName("total_feature_importance")] - public IReadOnlyCollection? TotalFeatureImportance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentAllocationStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentAllocationStatus.g.cs deleted file mode 100644 index 6fdd0cf1dbf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentAllocationStatus.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelDeploymentAllocationStatus -{ - /// - /// - /// The current number of nodes where the model is allocated. - /// - /// - [JsonInclude, JsonPropertyName("allocation_count")] - public int AllocationCount { get; init; } - - /// - /// - /// The detailed allocation state related to the nodes. - /// - /// - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAllocationState State { get; init; } - - /// - /// - /// The desired number of nodes for model allocation. - /// - /// - [JsonInclude, JsonPropertyName("target_allocation_count")] - public int TargetAllocationCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs deleted file mode 100644 index b82df2b6ec2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs +++ /dev/null @@ -1,137 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelDeploymentNodesStats -{ - /// - /// - /// The average time for each inference call to complete on this node. - /// - /// - [JsonInclude, JsonPropertyName("average_inference_time_ms")] - public double? AverageInferenceTimeMs { get; init; } - - /// - /// - /// The average time for each inference call to complete on this node, excluding cache - /// - /// - [JsonInclude, JsonPropertyName("average_inference_time_ms_excluding_cache_hits")] - public double? AverageInferenceTimeMsExcludingCacheHits { get; init; } - [JsonInclude, JsonPropertyName("average_inference_time_ms_last_minute")] - public double? AverageInferenceTimeMsLastMinute { get; init; } - - /// - /// - /// The number of errors when evaluating the trained model. - /// - /// - [JsonInclude, JsonPropertyName("error_count")] - public int? ErrorCount { get; init; } - [JsonInclude, JsonPropertyName("inference_cache_hit_count")] - public long? InferenceCacheHitCount { get; init; } - [JsonInclude, JsonPropertyName("inference_cache_hit_count_last_minute")] - public long? InferenceCacheHitCountLastMinute { get; init; } - - /// - /// - /// The total number of inference calls made against this node for this model. - /// - /// - [JsonInclude, JsonPropertyName("inference_count")] - public long? InferenceCount { get; init; } - - /// - /// - /// The epoch time stamp of the last inference call for the model on this node. - /// - /// - [JsonInclude, JsonPropertyName("last_access")] - public long? LastAccess { get; init; } - - /// - /// - /// The number of allocations assigned to this node. - /// - /// - [JsonInclude, JsonPropertyName("number_of_allocations")] - public int? NumberOfAllocations { get; init; } - - /// - /// - /// The number of inference requests queued to be processed. - /// - /// - [JsonInclude, JsonPropertyName("number_of_pending_requests")] - public int? NumberOfPendingRequests { get; init; } - [JsonInclude, JsonPropertyName("peak_throughput_per_minute")] - public long PeakThroughputPerMinute { get; init; } - - /// - /// - /// The number of inference requests that were not processed because the queue was full. - /// - /// - [JsonInclude, JsonPropertyName("rejection_execution_count")] - public int? RejectionExecutionCount { get; init; } - - /// - /// - /// The current routing state and reason for the current routing state for this allocation. - /// - /// - [JsonInclude, JsonPropertyName("routing_state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelAssignmentRoutingTable RoutingState { get; init; } - - /// - /// - /// The epoch timestamp when the allocation started. - /// - /// - [JsonInclude, JsonPropertyName("start_time")] - public long? StartTime { get; init; } - - /// - /// - /// The number of threads used by each allocation during inference. - /// - /// - [JsonInclude, JsonPropertyName("threads_per_allocation")] - public int? ThreadsPerAllocation { get; init; } - [JsonInclude, JsonPropertyName("throughput_last_minute")] - public int ThroughputLastMinute { get; init; } - - /// - /// - /// The number of inference requests that timed out before being processed. - /// - /// - [JsonInclude, JsonPropertyName("timeout_count")] - public int? TimeoutCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs deleted file mode 100644 index 7924cefaf6c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs +++ /dev/null @@ -1,157 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelDeploymentStats -{ - [JsonInclude, JsonPropertyName("adaptive_allocations")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.AdaptiveAllocationsSettings? AdaptiveAllocations { get; init; } - - /// - /// - /// The detailed allocation status for the deployment. - /// - /// - [JsonInclude, JsonPropertyName("allocation_status")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDeploymentAllocationStatus? AllocationStatus { get; init; } - [JsonInclude, JsonPropertyName("cache_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? CacheSize { get; init; } - - /// - /// - /// The unique identifier for the trained model deployment. - /// - /// - [JsonInclude, JsonPropertyName("deployment_id")] - public string DeploymentId { get; init; } - - /// - /// - /// The sum of error_count for all nodes in the deployment. - /// - /// - [JsonInclude, JsonPropertyName("error_count")] - public int? ErrorCount { get; init; } - - /// - /// - /// The sum of inference_count for all nodes in the deployment. - /// - /// - [JsonInclude, JsonPropertyName("inference_count")] - public int? InferenceCount { get; init; } - - /// - /// - /// The unique identifier for the trained model. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; init; } - - /// - /// - /// The deployment stats for each node that currently has the model allocated. - /// In serverless, stats are reported for a single unnamed virtual node. - /// - /// - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyCollection Nodes { get; init; } - - /// - /// - /// The number of allocations requested. - /// - /// - [JsonInclude, JsonPropertyName("number_of_allocations")] - public int? NumberOfAllocations { get; init; } - [JsonInclude, JsonPropertyName("peak_throughput_per_minute")] - public long PeakThroughputPerMinute { get; init; } - [JsonInclude, JsonPropertyName("priority")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainingPriority Priority { get; init; } - - /// - /// - /// The number of inference requests that can be queued before new requests are rejected. - /// - /// - [JsonInclude, JsonPropertyName("queue_capacity")] - public int? QueueCapacity { get; init; } - - /// - /// - /// The reason for the current deployment state. Usually only populated when - /// the model is not deployed to a node. - /// - /// - [JsonInclude, JsonPropertyName("reason")] - public string? Reason { get; init; } - - /// - /// - /// The sum of rejected_execution_count for all nodes in the deployment. - /// Individual nodes reject an inference request if the inference queue is full. - /// The queue size is controlled by the queue_capacity setting in the start - /// trained model deployment API. - /// - /// - [JsonInclude, JsonPropertyName("rejected_execution_count")] - public int? RejectedExecutionCount { get; init; } - - /// - /// - /// The epoch timestamp when the deployment started. - /// - /// - [JsonInclude, JsonPropertyName("start_time")] - public long StartTime { get; init; } - - /// - /// - /// The overall state of the deployment. - /// - /// - [JsonInclude, JsonPropertyName("state")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.DeploymentAssignmentState? State { get; init; } - - /// - /// - /// The number of threads used be each allocation during inference. - /// - /// - [JsonInclude, JsonPropertyName("threads_per_allocation")] - public int? ThreadsPerAllocation { get; init; } - - /// - /// - /// The sum of timeout_count for all nodes in the deployment. - /// - /// - [JsonInclude, JsonPropertyName("timeout_count")] - public int? TimeoutCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelEntities.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelEntities.g.cs deleted file mode 100644 index e9e694fab64..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelEntities.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelEntities -{ - [JsonInclude, JsonPropertyName("class_name")] - public string ClassName { get; init; } - [JsonInclude, JsonPropertyName("class_probability")] - public double ClassProbability { get; init; } - [JsonInclude, JsonPropertyName("end_pos")] - public int EndPos { get; init; } - [JsonInclude, JsonPropertyName("entity")] - public string Entity { get; init; } - [JsonInclude, JsonPropertyName("start_pos")] - public int StartPos { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceClassImportance.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceClassImportance.g.cs deleted file mode 100644 index 9f7f76c9471..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceClassImportance.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelInferenceClassImportance -{ - [JsonInclude, JsonPropertyName("class_name")] - public string ClassName { get; init; } - [JsonInclude, JsonPropertyName("importance")] - public double Importance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs deleted file mode 100644 index 1552eff6e06..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelInferenceFeatureImportance -{ - [JsonInclude, JsonPropertyName("classes")] - public IReadOnlyCollection? Classes { get; init; } - [JsonInclude, JsonPropertyName("feature_name")] - public string FeatureName { get; init; } - [JsonInclude, JsonPropertyName("importance")] - public double? Importance { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceStats.g.cs deleted file mode 100644 index 44c6dc55125..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelInferenceStats.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelInferenceStats -{ - /// - /// - /// The number of times the model was loaded for inference and was not retrieved from the cache. - /// If this number is close to the inference_count, the cache is not being appropriately used. - /// This can be solved by increasing the cache size or its time-to-live (TTL). - /// Refer to general machine learning settings for the appropriate settings. - /// - /// - [JsonInclude, JsonPropertyName("cache_miss_count")] - public int CacheMissCount { get; init; } - - /// - /// - /// The number of failures when using the model for inference. - /// - /// - [JsonInclude, JsonPropertyName("failure_count")] - public int FailureCount { get; init; } - - /// - /// - /// The total number of times the model has been called for inference. - /// This is across all inference contexts, including all pipelines. - /// - /// - [JsonInclude, JsonPropertyName("inference_count")] - public int InferenceCount { get; init; } - - /// - /// - /// The number of inference calls where all the training features for the model were missing. - /// - /// - [JsonInclude, JsonPropertyName("missing_all_fields_count")] - public int MissingAllFieldsCount { get; init; } - - /// - /// - /// The time when the statistics were last updated. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocation.g.cs deleted file mode 100644 index f1e48eed8bb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocation.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelLocation -{ - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelLocationIndex Index { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocationIndex.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocationIndex.g.cs deleted file mode 100644 index 0f4347111c8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelLocationIndex.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelLocationIndex -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelPrefixStrings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelPrefixStrings.g.cs deleted file mode 100644 index e22990b6db9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelPrefixStrings.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelPrefixStrings -{ - /// - /// - /// String prepended to input at ingest - /// - /// - [JsonInclude, JsonPropertyName("ingest")] - public string? Ingest { get; set; } - - /// - /// - /// String prepended to input at search - /// - /// - [JsonInclude, JsonPropertyName("search")] - public string? Search { get; set; } -} - -public sealed partial class TrainedModelPrefixStringsDescriptor : SerializableDescriptor -{ - internal TrainedModelPrefixStringsDescriptor(Action configure) => configure.Invoke(this); - - public TrainedModelPrefixStringsDescriptor() : base() - { - } - - private string? IngestValue { get; set; } - private string? SearchValue { get; set; } - - /// - /// - /// String prepended to input at ingest - /// - /// - public TrainedModelPrefixStringsDescriptor Ingest(string? ingest) - { - IngestValue = ingest; - return Self; - } - - /// - /// - /// String prepended to input at search - /// - /// - public TrainedModelPrefixStringsDescriptor Search(string? search) - { - SearchValue = search; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(IngestValue)) - { - writer.WritePropertyName("ingest"); - writer.WriteStringValue(IngestValue); - } - - if (!string.IsNullOrEmpty(SearchValue)) - { - writer.WritePropertyName("search"); - writer.WriteStringValue(SearchValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelSizeStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelSizeStats.g.cs deleted file mode 100644 index 92944af967e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelSizeStats.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelSizeStats -{ - /// - /// - /// The size of the model in bytes. - /// - /// - [JsonInclude, JsonPropertyName("model_size_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize ModelSizeBytes { get; init; } - - /// - /// - /// The amount of memory required to load the model in bytes. - /// - /// - [JsonInclude, JsonPropertyName("required_native_memory_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize RequiredNativeMemoryBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelStats.g.cs deleted file mode 100644 index 67f582ae281..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelStats -{ - /// - /// - /// A collection of deployment stats, which is present when the models are deployed. - /// - /// - [JsonInclude, JsonPropertyName("deployment_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelDeploymentStats? DeploymentStats { get; init; } - - /// - /// - /// A collection of inference stats fields. - /// - /// - [JsonInclude, JsonPropertyName("inference_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelInferenceStats? InferenceStats { get; init; } - - /// - /// - /// A collection of ingest stats for the model across all nodes. - /// The values are summations of the individual node statistics. - /// The format matches the ingest section in the nodes stats API. - /// - /// - [JsonInclude, JsonPropertyName("ingest")] - public IReadOnlyDictionary? Ingest { get; init; } - - /// - /// - /// The unique identifier of the trained model. - /// - /// - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; init; } - - /// - /// - /// A collection of model size stats. - /// - /// - [JsonInclude, JsonPropertyName("model_size_stats")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelSizeStats ModelSizeStats { get; init; } - - /// - /// - /// The number of ingest pipelines that currently refer to the model. - /// - /// - [JsonInclude, JsonPropertyName("pipeline_count")] - public int PipelineCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTree.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTree.g.cs deleted file mode 100644 index f128c5a5254..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTree.g.cs +++ /dev/null @@ -1,162 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelTree -{ - [JsonInclude, JsonPropertyName("classification_labels")] - public ICollection? ClassificationLabels { get; set; } - [JsonInclude, JsonPropertyName("feature_names")] - public ICollection FeatureNames { get; set; } - [JsonInclude, JsonPropertyName("target_type")] - public string? TargetType { get; set; } - [JsonInclude, JsonPropertyName("tree_structure")] - public ICollection TreeStructure { get; set; } -} - -public sealed partial class TrainedModelTreeDescriptor : SerializableDescriptor -{ - internal TrainedModelTreeDescriptor(Action configure) => configure.Invoke(this); - - public TrainedModelTreeDescriptor() : base() - { - } - - private ICollection? ClassificationLabelsValue { get; set; } - private ICollection FeatureNamesValue { get; set; } - private string? TargetTypeValue { get; set; } - private ICollection TreeStructureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor TreeStructureDescriptor { get; set; } - private Action TreeStructureDescriptorAction { get; set; } - private Action[] TreeStructureDescriptorActions { get; set; } - - public TrainedModelTreeDescriptor ClassificationLabels(ICollection? classificationLabels) - { - ClassificationLabelsValue = classificationLabels; - return Self; - } - - public TrainedModelTreeDescriptor FeatureNames(ICollection featureNames) - { - FeatureNamesValue = featureNames; - return Self; - } - - public TrainedModelTreeDescriptor TargetType(string? targetType) - { - TargetTypeValue = targetType; - return Self; - } - - public TrainedModelTreeDescriptor TreeStructure(ICollection treeStructure) - { - TreeStructureDescriptor = null; - TreeStructureDescriptorAction = null; - TreeStructureDescriptorActions = null; - TreeStructureValue = treeStructure; - return Self; - } - - public TrainedModelTreeDescriptor TreeStructure(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor descriptor) - { - TreeStructureValue = null; - TreeStructureDescriptorAction = null; - TreeStructureDescriptorActions = null; - TreeStructureDescriptor = descriptor; - return Self; - } - - public TrainedModelTreeDescriptor TreeStructure(Action configure) - { - TreeStructureValue = null; - TreeStructureDescriptor = null; - TreeStructureDescriptorActions = null; - TreeStructureDescriptorAction = configure; - return Self; - } - - public TrainedModelTreeDescriptor TreeStructure(params Action[] configure) - { - TreeStructureValue = null; - TreeStructureDescriptor = null; - TreeStructureDescriptorAction = null; - TreeStructureDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ClassificationLabelsValue is not null) - { - writer.WritePropertyName("classification_labels"); - JsonSerializer.Serialize(writer, ClassificationLabelsValue, options); - } - - writer.WritePropertyName("feature_names"); - JsonSerializer.Serialize(writer, FeatureNamesValue, options); - if (!string.IsNullOrEmpty(TargetTypeValue)) - { - writer.WritePropertyName("target_type"); - writer.WriteStringValue(TargetTypeValue); - } - - if (TreeStructureDescriptor is not null) - { - writer.WritePropertyName("tree_structure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, TreeStructureDescriptor, options); - writer.WriteEndArray(); - } - else if (TreeStructureDescriptorAction is not null) - { - writer.WritePropertyName("tree_structure"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor(TreeStructureDescriptorAction), options); - writer.WriteEndArray(); - } - else if (TreeStructureDescriptorActions is not null) - { - writer.WritePropertyName("tree_structure"); - writer.WriteStartArray(); - foreach (var action in TreeStructureDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TrainedModelTreeNodeDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("tree_structure"); - JsonSerializer.Serialize(writer, TreeStructureValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs deleted file mode 100644 index 8e79372da26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs +++ /dev/null @@ -1,179 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TrainedModelTreeNode -{ - [JsonInclude, JsonPropertyName("decision_type")] - public string? DecisionType { get; set; } - [JsonInclude, JsonPropertyName("default_left")] - public bool? DefaultLeft { get; set; } - [JsonInclude, JsonPropertyName("leaf_value")] - public double? LeafValue { get; set; } - [JsonInclude, JsonPropertyName("left_child")] - public int? LeftChild { get; set; } - [JsonInclude, JsonPropertyName("node_index")] - public int NodeIndex { get; set; } - [JsonInclude, JsonPropertyName("right_child")] - public int? RightChild { get; set; } - [JsonInclude, JsonPropertyName("split_feature")] - public int? SplitFeature { get; set; } - [JsonInclude, JsonPropertyName("split_gain")] - public int? SplitGain { get; set; } - [JsonInclude, JsonPropertyName("threshold")] - public double? Threshold { get; set; } -} - -public sealed partial class TrainedModelTreeNodeDescriptor : SerializableDescriptor -{ - internal TrainedModelTreeNodeDescriptor(Action configure) => configure.Invoke(this); - - public TrainedModelTreeNodeDescriptor() : base() - { - } - - private string? DecisionTypeValue { get; set; } - private bool? DefaultLeftValue { get; set; } - private double? LeafValueValue { get; set; } - private int? LeftChildValue { get; set; } - private int NodeIndexValue { get; set; } - private int? RightChildValue { get; set; } - private int? SplitFeatureValue { get; set; } - private int? SplitGainValue { get; set; } - private double? ThresholdValue { get; set; } - - public TrainedModelTreeNodeDescriptor DecisionType(string? decisionType) - { - DecisionTypeValue = decisionType; - return Self; - } - - public TrainedModelTreeNodeDescriptor DefaultLeft(bool? defaultLeft = true) - { - DefaultLeftValue = defaultLeft; - return Self; - } - - public TrainedModelTreeNodeDescriptor LeafValue(double? leafValue) - { - LeafValueValue = leafValue; - return Self; - } - - public TrainedModelTreeNodeDescriptor LeftChild(int? leftChild) - { - LeftChildValue = leftChild; - return Self; - } - - public TrainedModelTreeNodeDescriptor NodeIndex(int nodeIndex) - { - NodeIndexValue = nodeIndex; - return Self; - } - - public TrainedModelTreeNodeDescriptor RightChild(int? rightChild) - { - RightChildValue = rightChild; - return Self; - } - - public TrainedModelTreeNodeDescriptor SplitFeature(int? splitFeature) - { - SplitFeatureValue = splitFeature; - return Self; - } - - public TrainedModelTreeNodeDescriptor SplitGain(int? splitGain) - { - SplitGainValue = splitGain; - return Self; - } - - public TrainedModelTreeNodeDescriptor Threshold(double? threshold) - { - ThresholdValue = threshold; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(DecisionTypeValue)) - { - writer.WritePropertyName("decision_type"); - writer.WriteStringValue(DecisionTypeValue); - } - - if (DefaultLeftValue.HasValue) - { - writer.WritePropertyName("default_left"); - writer.WriteBooleanValue(DefaultLeftValue.Value); - } - - if (LeafValueValue.HasValue) - { - writer.WritePropertyName("leaf_value"); - writer.WriteNumberValue(LeafValueValue.Value); - } - - if (LeftChildValue.HasValue) - { - writer.WritePropertyName("left_child"); - writer.WriteNumberValue(LeftChildValue.Value); - } - - writer.WritePropertyName("node_index"); - writer.WriteNumberValue(NodeIndexValue); - if (RightChildValue.HasValue) - { - writer.WritePropertyName("right_child"); - writer.WriteNumberValue(RightChildValue.Value); - } - - if (SplitFeatureValue.HasValue) - { - writer.WritePropertyName("split_feature"); - writer.WriteNumberValue(SplitFeatureValue.Value); - } - - if (SplitGainValue.HasValue) - { - writer.WritePropertyName("split_gain"); - writer.WriteNumberValue(SplitGainValue.Value); - } - - if (ThresholdValue.HasValue) - { - writer.WritePropertyName("threshold"); - writer.WriteNumberValue(ThresholdValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TransformAuthorization.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TransformAuthorization.g.cs deleted file mode 100644 index 260632bff6a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/TransformAuthorization.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class TransformAuthorization -{ - /// - /// - /// If an API key was used for the most recent update to the transform, its name and identifier are listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("api_key")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.ApiKeyAuthorization? ApiKey { get; init; } - - /// - /// - /// If a user ID was used for the most recent update to the transform, its roles at the time of the update are listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - - /// - /// - /// If a service account was used for the most recent update to the transform, the account name is listed in the response. - /// - /// - [JsonInclude, JsonPropertyName("service_account")] - public string? ServiceAccount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Vocabulary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Vocabulary.g.cs deleted file mode 100644 index d3f12e40fb0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Vocabulary.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Vocabulary -{ - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } -} - -public sealed partial class VocabularyDescriptor : SerializableDescriptor -{ - internal VocabularyDescriptor(Action configure) => configure.Invoke(this); - - public VocabularyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - - public VocabularyDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Weights.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Weights.g.cs deleted file mode 100644 index 9ce888f15bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/Weights.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class Weights -{ - [JsonInclude, JsonPropertyName("weights")] - public double WeightsValue { get; set; } -} - -public sealed partial class WeightsDescriptor : SerializableDescriptor -{ - internal WeightsDescriptor(Action configure) => configure.Invoke(this); - - public WeightsDescriptor() : base() - { - } - - private double WeightsValueValue { get; set; } - - public WeightsDescriptor WeightsValue(double weightsValue) - { - WeightsValueValue = weightsValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("weights"); - writer.WriteNumberValue(WeightsValueValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs deleted file mode 100644 index a53eb4c43a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs +++ /dev/null @@ -1,243 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -/// -/// -/// Zero shot classification configuration options -/// -/// -public sealed partial class ZeroShotClassificationInferenceOptions -{ - /// - /// - /// The zero shot classification labels indicating entailment, neutral, and contradiction - /// Must contain exactly and only entailment, neutral, and contradiction - /// - /// - [JsonInclude, JsonPropertyName("classification_labels")] - public ICollection ClassificationLabels { get; set; } - - /// - /// - /// Hypothesis template used when tokenizing labels for prediction - /// - /// - [JsonInclude, JsonPropertyName("hypothesis_template")] - public string? HypothesisTemplate { get; set; } - - /// - /// - /// The labels to predict. - /// - /// - [JsonInclude, JsonPropertyName("labels")] - public ICollection? Labels { get; set; } - - /// - /// - /// Indicates if more than one true label exists. - /// - /// - [JsonInclude, JsonPropertyName("multi_label")] - public bool? MultiLabel { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate(ZeroShotClassificationInferenceOptions zeroShotClassificationInferenceOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigCreate.ZeroShotClassification(zeroShotClassificationInferenceOptions); -} - -/// -/// -/// Zero shot classification configuration options -/// -/// -public sealed partial class ZeroShotClassificationInferenceOptionsDescriptor : SerializableDescriptor -{ - internal ZeroShotClassificationInferenceOptionsDescriptor(Action configure) => configure.Invoke(this); - - public ZeroShotClassificationInferenceOptionsDescriptor() : base() - { - } - - private ICollection ClassificationLabelsValue { get; set; } - private string? HypothesisTemplateValue { get; set; } - private ICollection? LabelsValue { get; set; } - private bool? MultiLabelValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The zero shot classification labels indicating entailment, neutral, and contradiction - /// Must contain exactly and only entailment, neutral, and contradiction - /// - /// - public ZeroShotClassificationInferenceOptionsDescriptor ClassificationLabels(ICollection classificationLabels) - { - ClassificationLabelsValue = classificationLabels; - return Self; - } - - /// - /// - /// Hypothesis template used when tokenizing labels for prediction - /// - /// - public ZeroShotClassificationInferenceOptionsDescriptor HypothesisTemplate(string? hypothesisTemplate) - { - HypothesisTemplateValue = hypothesisTemplate; - return Self; - } - - /// - /// - /// The labels to predict. - /// - /// - public ZeroShotClassificationInferenceOptionsDescriptor Labels(ICollection? labels) - { - LabelsValue = labels; - return Self; - } - - /// - /// - /// Indicates if more than one true label exists. - /// - /// - public ZeroShotClassificationInferenceOptionsDescriptor MultiLabel(bool? multiLabel = true) - { - MultiLabelValue = multiLabel; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public ZeroShotClassificationInferenceOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public ZeroShotClassificationInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfig? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public ZeroShotClassificationInferenceOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public ZeroShotClassificationInferenceOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("classification_labels"); - JsonSerializer.Serialize(writer, ClassificationLabelsValue, options); - if (!string.IsNullOrEmpty(HypothesisTemplateValue)) - { - writer.WritePropertyName("hypothesis_template"); - writer.WriteStringValue(HypothesisTemplateValue); - } - - if (LabelsValue is not null) - { - writer.WritePropertyName("labels"); - JsonSerializer.Serialize(writer, LabelsValue, options); - } - - if (MultiLabelValue.HasValue) - { - writer.WritePropertyName("multi_label"); - writer.WriteBooleanValue(MultiLabelValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TokenizationConfigDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs deleted file mode 100644 index 986afc982df..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs +++ /dev/null @@ -1,179 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning; - -public sealed partial class ZeroShotClassificationInferenceUpdateOptions -{ - /// - /// - /// The labels to predict. - /// - /// - [JsonInclude, JsonPropertyName("labels")] - public ICollection Labels { get; set; } - - /// - /// - /// Update the configured multi label option. Indicates if more than one true label exists. Defaults to the configured value. - /// - /// - [JsonInclude, JsonPropertyName("multi_label")] - public bool? MultiLabel { get; set; } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - [JsonInclude, JsonPropertyName("results_field")] - public string? ResultsField { get; set; } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - [JsonInclude, JsonPropertyName("tokenization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? Tokenization { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate(ZeroShotClassificationInferenceUpdateOptions zeroShotClassificationInferenceUpdateOptions) => Elastic.Clients.Elasticsearch.Serverless.MachineLearning.InferenceConfigUpdate.ZeroShotClassification(zeroShotClassificationInferenceUpdateOptions); -} - -public sealed partial class ZeroShotClassificationInferenceUpdateOptionsDescriptor : SerializableDescriptor -{ - internal ZeroShotClassificationInferenceUpdateOptionsDescriptor(Action configure) => configure.Invoke(this); - - public ZeroShotClassificationInferenceUpdateOptionsDescriptor() : base() - { - } - - private ICollection LabelsValue { get; set; } - private bool? MultiLabelValue { get; set; } - private string? ResultsFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? TokenizationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor TokenizationDescriptor { get; set; } - private Action TokenizationDescriptorAction { get; set; } - - /// - /// - /// The labels to predict. - /// - /// - public ZeroShotClassificationInferenceUpdateOptionsDescriptor Labels(ICollection labels) - { - LabelsValue = labels; - return Self; - } - - /// - /// - /// Update the configured multi label option. Indicates if more than one true label exists. Defaults to the configured value. - /// - /// - public ZeroShotClassificationInferenceUpdateOptionsDescriptor MultiLabel(bool? multiLabel = true) - { - MultiLabelValue = multiLabel; - return Self; - } - - /// - /// - /// The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value. - /// - /// - public ZeroShotClassificationInferenceUpdateOptionsDescriptor ResultsField(string? resultsField) - { - ResultsFieldValue = resultsField; - return Self; - } - - /// - /// - /// The tokenization options to update when inferring - /// - /// - public ZeroShotClassificationInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptions? tokenization) - { - TokenizationDescriptor = null; - TokenizationDescriptorAction = null; - TokenizationValue = tokenization; - return Self; - } - - public ZeroShotClassificationInferenceUpdateOptionsDescriptor Tokenization(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor descriptor) - { - TokenizationValue = null; - TokenizationDescriptorAction = null; - TokenizationDescriptor = descriptor; - return Self; - } - - public ZeroShotClassificationInferenceUpdateOptionsDescriptor Tokenization(Action configure) - { - TokenizationValue = null; - TokenizationDescriptor = null; - TokenizationDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("labels"); - JsonSerializer.Serialize(writer, LabelsValue, options); - if (MultiLabelValue.HasValue) - { - writer.WritePropertyName("multi_label"); - writer.WriteBooleanValue(MultiLabelValue.Value); - } - - if (!string.IsNullOrEmpty(ResultsFieldValue)) - { - writer.WritePropertyName("results_field"); - writer.WriteStringValue(ResultsFieldValue); - } - - if (TokenizationDescriptor is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationDescriptor, options); - } - else if (TokenizationDescriptorAction is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.MachineLearning.NlpTokenizationUpdateOptionsDescriptor(TokenizationDescriptorAction), options); - } - else if (TokenizationValue is not null) - { - writer.WritePropertyName("tokenization"); - JsonSerializer.Serialize(writer, TokenizationValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs deleted file mode 100644 index f098aeb90b0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs +++ /dev/null @@ -1,375 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class AggregateMetricDoubleProperty : IProperty -{ - [JsonInclude, JsonPropertyName("default_metric")] - public string DefaultMetric { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("metrics")] - public ICollection Metrics { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("time_series_metric")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "aggregate_metric_double"; -} - -public sealed partial class AggregateMetricDoublePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal AggregateMetricDoublePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public AggregateMetricDoublePropertyDescriptor() : base() - { - } - - private string DefaultMetricValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private ICollection MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } - - public AggregateMetricDoublePropertyDescriptor DefaultMetric(string defaultMetric) - { - DefaultMetricValue = defaultMetric; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public AggregateMetricDoublePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Metrics(ICollection metrics) - { - MetricsValue = metrics; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor TimeSeriesMetric(Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? timeSeriesMetric) - { - TimeSeriesMetricValue = timeSeriesMetric; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("default_metric"); - writer.WriteStringValue(DefaultMetricValue); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (TimeSeriesMetricValue is not null) - { - writer.WritePropertyName("time_series_metric"); - JsonSerializer.Serialize(writer, TimeSeriesMetricValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("aggregate_metric_double"); - writer.WriteEndObject(); - } - - AggregateMetricDoubleProperty IBuildableDescriptor.Build() => new() - { - DefaultMetric = DefaultMetricValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Metrics = MetricsValue, - Properties = PropertiesValue, - TimeSeriesMetric = TimeSeriesMetricValue - }; -} - -public sealed partial class AggregateMetricDoublePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal AggregateMetricDoublePropertyDescriptor(Action configure) => configure.Invoke(this); - - public AggregateMetricDoublePropertyDescriptor() : base() - { - } - - private string DefaultMetricValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private ICollection MetricsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } - - public AggregateMetricDoublePropertyDescriptor DefaultMetric(string defaultMetric) - { - DefaultMetricValue = defaultMetric; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public AggregateMetricDoublePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Metrics(ICollection metrics) - { - MetricsValue = metrics; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public AggregateMetricDoublePropertyDescriptor TimeSeriesMetric(Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? timeSeriesMetric) - { - TimeSeriesMetricValue = timeSeriesMetric; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("default_metric"); - writer.WriteStringValue(DefaultMetricValue); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WritePropertyName("metrics"); - JsonSerializer.Serialize(writer, MetricsValue, options); - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (TimeSeriesMetricValue is not null) - { - writer.WritePropertyName("time_series_metric"); - JsonSerializer.Serialize(writer, TimeSeriesMetricValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("aggregate_metric_double"); - writer.WriteEndObject(); - } - - AggregateMetricDoubleProperty IBuildableDescriptor.Build() => new() - { - DefaultMetric = DefaultMetricValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Metrics = MetricsValue, - Properties = PropertiesValue, - TimeSeriesMetric = TimeSeriesMetricValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AllField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AllField.g.cs deleted file mode 100644 index bff87e21bdd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/AllField.g.cs +++ /dev/null @@ -1,158 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class AllField -{ - [JsonInclude, JsonPropertyName("analyzer")] - public string Analyzer { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } - [JsonInclude, JsonPropertyName("omit_norms")] - public bool OmitNorms { get; set; } - [JsonInclude, JsonPropertyName("search_analyzer")] - public string SearchAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string Similarity { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool Store { get; set; } - [JsonInclude, JsonPropertyName("store_term_vector_offsets")] - public bool StoreTermVectorOffsets { get; set; } - [JsonInclude, JsonPropertyName("store_term_vector_payloads")] - public bool StoreTermVectorPayloads { get; set; } - [JsonInclude, JsonPropertyName("store_term_vector_positions")] - public bool StoreTermVectorPositions { get; set; } - [JsonInclude, JsonPropertyName("store_term_vectors")] - public bool StoreTermVectors { get; set; } -} - -public sealed partial class AllFieldDescriptor : SerializableDescriptor -{ - internal AllFieldDescriptor(Action configure) => configure.Invoke(this); - - public AllFieldDescriptor() : base() - { - } - - private string AnalyzerValue { get; set; } - private bool EnabledValue { get; set; } - private bool OmitNormsValue { get; set; } - private string SearchAnalyzerValue { get; set; } - private string SimilarityValue { get; set; } - private bool StoreValue { get; set; } - private bool StoreTermVectorOffsetsValue { get; set; } - private bool StoreTermVectorPayloadsValue { get; set; } - private bool StoreTermVectorPositionsValue { get; set; } - private bool StoreTermVectorsValue { get; set; } - - public AllFieldDescriptor Analyzer(string analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public AllFieldDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public AllFieldDescriptor OmitNorms(bool omitNorms = true) - { - OmitNormsValue = omitNorms; - return Self; - } - - public AllFieldDescriptor SearchAnalyzer(string searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public AllFieldDescriptor Similarity(string similarity) - { - SimilarityValue = similarity; - return Self; - } - - public AllFieldDescriptor Store(bool store = true) - { - StoreValue = store; - return Self; - } - - public AllFieldDescriptor StoreTermVectorOffsets(bool storeTermVectorOffsets = true) - { - StoreTermVectorOffsetsValue = storeTermVectorOffsets; - return Self; - } - - public AllFieldDescriptor StoreTermVectorPayloads(bool storeTermVectorPayloads = true) - { - StoreTermVectorPayloadsValue = storeTermVectorPayloads; - return Self; - } - - public AllFieldDescriptor StoreTermVectorPositions(bool storeTermVectorPositions = true) - { - StoreTermVectorPositionsValue = storeTermVectorPositions; - return Self; - } - - public AllFieldDescriptor StoreTermVectors(bool storeTermVectors = true) - { - StoreTermVectorsValue = storeTermVectors; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WritePropertyName("omit_norms"); - writer.WriteBooleanValue(OmitNormsValue); - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue); - writer.WritePropertyName("store_term_vector_offsets"); - writer.WriteBooleanValue(StoreTermVectorOffsetsValue); - writer.WritePropertyName("store_term_vector_payloads"); - writer.WriteBooleanValue(StoreTermVectorPayloadsValue); - writer.WritePropertyName("store_term_vector_positions"); - writer.WriteBooleanValue(StoreTermVectorPositionsValue); - writer.WritePropertyName("store_term_vectors"); - writer.WriteBooleanValue(StoreTermVectorsValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs deleted file mode 100644 index b28e2cb4305..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BinaryProperty.g.cs +++ /dev/null @@ -1,392 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class BinaryProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "binary"; -} - -public sealed partial class BinaryPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal BinaryPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public BinaryPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public BinaryPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public BinaryPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public BinaryPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public BinaryPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public BinaryPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BinaryPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public BinaryPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("binary"); - writer.WriteEndObject(); - } - - BinaryProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class BinaryPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal BinaryPropertyDescriptor(Action configure) => configure.Invoke(this); - - public BinaryPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public BinaryPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public BinaryPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public BinaryPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public BinaryPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public BinaryPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BinaryPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public BinaryPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BinaryPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("binary"); - writer.WriteEndObject(); - } - - BinaryProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BooleanProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BooleanProperty.g.cs deleted file mode 100644 index 590190c8b1e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/BooleanProperty.g.cs +++ /dev/null @@ -1,620 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class BooleanProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fielddata")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? Fielddata { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public bool? NullValue { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "boolean"; -} - -public sealed partial class BooleanPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal BooleanPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public BooleanPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? FielddataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor FielddataDescriptor { get; set; } - private Action FielddataDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public BooleanPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public BooleanPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public BooleanPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public BooleanPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public BooleanPropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? fielddata) - { - FielddataDescriptor = null; - FielddataDescriptorAction = null; - FielddataValue = fielddata; - return Self; - } - - public BooleanPropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor descriptor) - { - FielddataValue = null; - FielddataDescriptorAction = null; - FielddataDescriptor = descriptor; - return Self; - } - - public BooleanPropertyDescriptor Fielddata(Action configure) - { - FielddataValue = null; - FielddataDescriptor = null; - FielddataDescriptorAction = configure; - return Self; - } - - public BooleanPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public BooleanPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public BooleanPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public BooleanPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BooleanPropertyDescriptor NullValue(bool? nullValue = true) - { - NullValueValue = nullValue; - return Self; - } - - public BooleanPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public BooleanPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FielddataDescriptor is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataDescriptor, options); - } - else if (FielddataDescriptorAction is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction), options); - } - else if (FielddataValue is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteBooleanValue(NullValueValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("boolean"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? BuildFielddata() - { - if (FielddataValue is not null) - { - return FielddataValue; - } - - if ((object)FielddataDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (FielddataDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - BooleanProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fielddata = BuildFielddata(), - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class BooleanPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal BooleanPropertyDescriptor(Action configure) => configure.Invoke(this); - - public BooleanPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? FielddataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor FielddataDescriptor { get; set; } - private Action FielddataDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public BooleanPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public BooleanPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public BooleanPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public BooleanPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public BooleanPropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? fielddata) - { - FielddataDescriptor = null; - FielddataDescriptorAction = null; - FielddataValue = fielddata; - return Self; - } - - public BooleanPropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor descriptor) - { - FielddataValue = null; - FielddataDescriptorAction = null; - FielddataDescriptor = descriptor; - return Self; - } - - public BooleanPropertyDescriptor Fielddata(Action configure) - { - FielddataValue = null; - FielddataDescriptor = null; - FielddataDescriptorAction = configure; - return Self; - } - - public BooleanPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public BooleanPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public BooleanPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public BooleanPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BooleanPropertyDescriptor NullValue(bool? nullValue = true) - { - NullValueValue = nullValue; - return Self; - } - - public BooleanPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public BooleanPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public BooleanPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FielddataDescriptor is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataDescriptor, options); - } - else if (FielddataDescriptorAction is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction), options); - } - else if (FielddataValue is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteBooleanValue(NullValueValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("boolean"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? BuildFielddata() - { - if (FielddataValue is not null) - { - return FielddataValue; - } - - if ((object)FielddataDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (FielddataDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - BooleanProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fielddata = BuildFielddata(), - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ByteNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ByteNumberProperty.g.cs deleted file mode 100644 index bc24858541b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ByteNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class ByteNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public byte? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "byte"; -} - -public sealed partial class ByteNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal ByteNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public ByteNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private byte? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public ByteNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public ByteNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ByteNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ByteNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ByteNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ByteNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ByteNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ByteNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ByteNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ByteNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ByteNumberPropertyDescriptor NullValue(byte? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public ByteNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public ByteNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ByteNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ByteNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ByteNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ByteNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("byte"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ByteNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class ByteNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ByteNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public ByteNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private byte? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public ByteNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public ByteNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ByteNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ByteNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ByteNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ByteNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ByteNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ByteNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ByteNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ByteNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ByteNumberPropertyDescriptor NullValue(byte? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public ByteNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public ByteNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ByteNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ByteNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ByteNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ByteNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ByteNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("byte"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ByteNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs deleted file mode 100644 index 68c7d5053b5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompletionProperty.g.cs +++ /dev/null @@ -1,736 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class CompletionProperty : IProperty -{ - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - [JsonInclude, JsonPropertyName("contexts")] - public ICollection? Contexts { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("max_input_length")] - public int? MaxInputLength { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("preserve_position_increments")] - public bool? PreservePositionIncrements { get; set; } - [JsonInclude, JsonPropertyName("preserve_separators")] - public bool? PreserveSeparators { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("search_analyzer")] - public string? SearchAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "completion"; -} - -public sealed partial class CompletionPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal CompletionPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public CompletionPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private ICollection? ContextsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor ContextsDescriptor { get; set; } - private Action> ContextsDescriptorAction { get; set; } - private Action>[] ContextsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private int? MaxInputLengthValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? PreservePositionIncrementsValue { get; set; } - private bool? PreserveSeparatorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SearchAnalyzerValue { get; set; } - private bool? StoreValue { get; set; } - - public CompletionPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public CompletionPropertyDescriptor Contexts(ICollection? contexts) - { - ContextsDescriptor = null; - ContextsDescriptorAction = null; - ContextsDescriptorActions = null; - ContextsValue = contexts; - return Self; - } - - public CompletionPropertyDescriptor Contexts(Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor descriptor) - { - ContextsValue = null; - ContextsDescriptorAction = null; - ContextsDescriptorActions = null; - ContextsDescriptor = descriptor; - return Self; - } - - public CompletionPropertyDescriptor Contexts(Action> configure) - { - ContextsValue = null; - ContextsDescriptor = null; - ContextsDescriptorActions = null; - ContextsDescriptorAction = configure; - return Self; - } - - public CompletionPropertyDescriptor Contexts(params Action>[] configure) - { - ContextsValue = null; - ContextsDescriptor = null; - ContextsDescriptorAction = null; - ContextsDescriptorActions = configure; - return Self; - } - - public CompletionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public CompletionPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public CompletionPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public CompletionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public CompletionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public CompletionPropertyDescriptor MaxInputLength(int? maxInputLength) - { - MaxInputLengthValue = maxInputLength; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public CompletionPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CompletionPropertyDescriptor PreservePositionIncrements(bool? preservePositionIncrements = true) - { - PreservePositionIncrementsValue = preservePositionIncrements; - return Self; - } - - public CompletionPropertyDescriptor PreserveSeparators(bool? preserveSeparators = true) - { - PreserveSeparatorsValue = preserveSeparators; - return Self; - } - - public CompletionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public CompletionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public CompletionPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (ContextsDescriptor is not null) - { - writer.WritePropertyName("contexts"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ContextsDescriptor, options); - writer.WriteEndArray(); - } - else if (ContextsDescriptorAction is not null) - { - writer.WritePropertyName("contexts"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor(ContextsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ContextsDescriptorActions is not null) - { - writer.WritePropertyName("contexts"); - writer.WriteStartArray(); - foreach (var action in ContextsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ContextsValue is not null) - { - writer.WritePropertyName("contexts"); - JsonSerializer.Serialize(writer, ContextsValue, options); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MaxInputLengthValue.HasValue) - { - writer.WritePropertyName("max_input_length"); - writer.WriteNumberValue(MaxInputLengthValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PreservePositionIncrementsValue.HasValue) - { - writer.WritePropertyName("preserve_position_increments"); - writer.WriteBooleanValue(PreservePositionIncrementsValue.Value); - } - - if (PreserveSeparatorsValue.HasValue) - { - writer.WritePropertyName("preserve_separators"); - writer.WriteBooleanValue(PreserveSeparatorsValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("completion"); - writer.WriteEndObject(); - } - - private ICollection? BuildContexts() - { - if (ContextsValue is not null) - { - return ContextsValue; - } - - if ((object)ContextsDescriptor is IBuildableDescriptor?> buildable) - { - return buildable.Build(); - } - - if (ContextsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor(ContextsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor?> buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - CompletionProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Contexts = BuildContexts(), - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - MaxInputLength = MaxInputLengthValue, - Meta = MetaValue, - PreservePositionIncrements = PreservePositionIncrementsValue, - PreserveSeparators = PreserveSeparatorsValue, - Properties = PropertiesValue, - SearchAnalyzer = SearchAnalyzerValue, - Store = StoreValue - }; -} - -public sealed partial class CompletionPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal CompletionPropertyDescriptor(Action configure) => configure.Invoke(this); - - public CompletionPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private ICollection? ContextsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor ContextsDescriptor { get; set; } - private Action ContextsDescriptorAction { get; set; } - private Action[] ContextsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private int? MaxInputLengthValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? PreservePositionIncrementsValue { get; set; } - private bool? PreserveSeparatorsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SearchAnalyzerValue { get; set; } - private bool? StoreValue { get; set; } - - public CompletionPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public CompletionPropertyDescriptor Contexts(ICollection? contexts) - { - ContextsDescriptor = null; - ContextsDescriptorAction = null; - ContextsDescriptorActions = null; - ContextsValue = contexts; - return Self; - } - - public CompletionPropertyDescriptor Contexts(Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor descriptor) - { - ContextsValue = null; - ContextsDescriptorAction = null; - ContextsDescriptorActions = null; - ContextsDescriptor = descriptor; - return Self; - } - - public CompletionPropertyDescriptor Contexts(Action configure) - { - ContextsValue = null; - ContextsDescriptor = null; - ContextsDescriptorActions = null; - ContextsDescriptorAction = configure; - return Self; - } - - public CompletionPropertyDescriptor Contexts(params Action[] configure) - { - ContextsValue = null; - ContextsDescriptor = null; - ContextsDescriptorAction = null; - ContextsDescriptorActions = configure; - return Self; - } - - public CompletionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public CompletionPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public CompletionPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public CompletionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public CompletionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public CompletionPropertyDescriptor MaxInputLength(int? maxInputLength) - { - MaxInputLengthValue = maxInputLength; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public CompletionPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CompletionPropertyDescriptor PreservePositionIncrements(bool? preservePositionIncrements = true) - { - PreservePositionIncrementsValue = preservePositionIncrements; - return Self; - } - - public CompletionPropertyDescriptor PreserveSeparators(bool? preserveSeparators = true) - { - PreserveSeparatorsValue = preserveSeparators; - return Self; - } - - public CompletionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public CompletionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public CompletionPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public CompletionPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (ContextsDescriptor is not null) - { - writer.WritePropertyName("contexts"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ContextsDescriptor, options); - writer.WriteEndArray(); - } - else if (ContextsDescriptorAction is not null) - { - writer.WritePropertyName("contexts"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor(ContextsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ContextsDescriptorActions is not null) - { - writer.WritePropertyName("contexts"); - writer.WriteStartArray(); - foreach (var action in ContextsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ContextsValue is not null) - { - writer.WritePropertyName("contexts"); - JsonSerializer.Serialize(writer, ContextsValue, options); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MaxInputLengthValue.HasValue) - { - writer.WritePropertyName("max_input_length"); - writer.WriteNumberValue(MaxInputLengthValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PreservePositionIncrementsValue.HasValue) - { - writer.WritePropertyName("preserve_position_increments"); - writer.WriteBooleanValue(PreservePositionIncrementsValue.Value); - } - - if (PreserveSeparatorsValue.HasValue) - { - writer.WritePropertyName("preserve_separators"); - writer.WriteBooleanValue(PreserveSeparatorsValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("completion"); - writer.WriteEndObject(); - } - - private ICollection? BuildContexts() - { - if (ContextsValue is not null) - { - return ContextsValue; - } - - if ((object)ContextsDescriptor is IBuildableDescriptor?> buildable) - { - return buildable.Build(); - } - - if (ContextsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.SuggestContextDescriptor(ContextsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor?> buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - CompletionProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Contexts = BuildContexts(), - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - MaxInputLength = MaxInputLengthValue, - Meta = MetaValue, - PreservePositionIncrements = PreservePositionIncrementsValue, - PreserveSeparators = PreserveSeparatorsValue, - Properties = PropertiesValue, - SearchAnalyzer = SearchAnalyzerValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs deleted file mode 100644 index a0d3725ffa7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/CompositeSubField.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class CompositeSubField -{ - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType Type { get; set; } -} - -public sealed partial class CompositeSubFieldDescriptor : SerializableDescriptor -{ - internal CompositeSubFieldDescriptor(Action configure) => configure.Invoke(this); - - public CompositeSubFieldDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType TypeValue { get; set; } - - public CompositeSubFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs deleted file mode 100644 index aef2cc64a1a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs +++ /dev/null @@ -1,332 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class ConstantKeywordProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "constant_keyword"; - - [JsonInclude, JsonPropertyName("value")] - public object? Value { get; set; } -} - -public sealed partial class ConstantKeywordPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal ConstantKeywordPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public ConstantKeywordPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private object? ValueValue { get; set; } - - public ConstantKeywordPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ConstantKeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ConstantKeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ConstantKeywordPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ConstantKeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ConstantKeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor Value(object? value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("constant_keyword"); - if (ValueValue is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - } - - writer.WriteEndObject(); - } - - ConstantKeywordProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Value = ValueValue - }; -} - -public sealed partial class ConstantKeywordPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ConstantKeywordPropertyDescriptor(Action configure) => configure.Invoke(this); - - public ConstantKeywordPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private object? ValueValue { get; set; } - - public ConstantKeywordPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ConstantKeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ConstantKeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ConstantKeywordPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ConstantKeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ConstantKeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ConstantKeywordPropertyDescriptor Value(object? value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("constant_keyword"); - if (ValueValue is not null) - { - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - } - - writer.WriteEndObject(); - } - - ConstantKeywordProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Value = ValueValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DataStreamTimestamp.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DataStreamTimestamp.g.cs deleted file mode 100644 index 084ba29b64a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DataStreamTimestamp.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DataStreamTimestamp -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } -} - -public sealed partial class DataStreamTimestampDescriptor : SerializableDescriptor -{ - internal DataStreamTimestampDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamTimestampDescriptor() : base() - { - } - - private bool EnabledValue { get; set; } - - public DataStreamTimestampDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs deleted file mode 100644 index 9cc89e12a5b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateNanosProperty.g.cs +++ /dev/null @@ -1,572 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DateNanosProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public DateTimeOffset? NullValue { get; set; } - [JsonInclude, JsonPropertyName("precision_step")] - public int? PrecisionStep { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "date_nanos"; -} - -public sealed partial class DateNanosPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DateNanosPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DateNanosPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private DateTimeOffset? NullValueValue { get; set; } - private int? PrecisionStepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DateNanosPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DateNanosPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DateNanosPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DateNanosPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DateNanosPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DateNanosPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DateNanosPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DateNanosPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DateNanosPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DateNanosPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DateNanosPropertyDescriptor NullValue(DateTimeOffset? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DateNanosPropertyDescriptor PrecisionStep(int? precisionStep) - { - PrecisionStepValue = precisionStep; - return Self; - } - - public DateNanosPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DateNanosPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (PrecisionStepValue.HasValue) - { - writer.WritePropertyName("precision_step"); - writer.WriteNumberValue(PrecisionStepValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("date_nanos"); - writer.WriteEndObject(); - } - - DateNanosProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - PrecisionStep = PrecisionStepValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class DateNanosPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DateNanosPropertyDescriptor(Action configure) => configure.Invoke(this); - - public DateNanosPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private DateTimeOffset? NullValueValue { get; set; } - private int? PrecisionStepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DateNanosPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DateNanosPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DateNanosPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DateNanosPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DateNanosPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DateNanosPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DateNanosPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DateNanosPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DateNanosPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DateNanosPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DateNanosPropertyDescriptor NullValue(DateTimeOffset? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DateNanosPropertyDescriptor PrecisionStep(int? precisionStep) - { - PrecisionStepValue = precisionStep; - return Self; - } - - public DateNanosPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DateNanosPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateNanosPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (PrecisionStepValue.HasValue) - { - writer.WritePropertyName("precision_step"); - writer.WriteNumberValue(PrecisionStepValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("date_nanos"); - writer.WriteEndObject(); - } - - DateNanosProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - PrecisionStep = PrecisionStepValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateProperty.g.cs deleted file mode 100644 index 01298193afb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateProperty.g.cs +++ /dev/null @@ -1,740 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DateProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fielddata")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? Fielddata { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("locale")] - public string? Locale { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public DateTimeOffset? NullValue { get; set; } - [JsonInclude, JsonPropertyName("precision_step")] - public int? PrecisionStep { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "date"; -} - -public sealed partial class DatePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DatePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DatePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? FielddataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor FielddataDescriptor { get; set; } - private Action FielddataDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private string? LocaleValue { get; set; } - private IDictionary? MetaValue { get; set; } - private DateTimeOffset? NullValueValue { get; set; } - private int? PrecisionStepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DatePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DatePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DatePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DatePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DatePropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? fielddata) - { - FielddataDescriptor = null; - FielddataDescriptorAction = null; - FielddataValue = fielddata; - return Self; - } - - public DatePropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor descriptor) - { - FielddataValue = null; - FielddataDescriptorAction = null; - FielddataDescriptor = descriptor; - return Self; - } - - public DatePropertyDescriptor Fielddata(Action configure) - { - FielddataValue = null; - FielddataDescriptor = null; - FielddataDescriptorAction = configure; - return Self; - } - - public DatePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DatePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DatePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DatePropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DatePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public DatePropertyDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DatePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DatePropertyDescriptor NullValue(DateTimeOffset? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DatePropertyDescriptor PrecisionStep(int? precisionStep) - { - PrecisionStepValue = precisionStep; - return Self; - } - - public DatePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DatePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FielddataDescriptor is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataDescriptor, options); - } - else if (FielddataDescriptorAction is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction), options); - } - else if (FielddataValue is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (PrecisionStepValue.HasValue) - { - writer.WritePropertyName("precision_step"); - writer.WriteNumberValue(PrecisionStepValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("date"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? BuildFielddata() - { - if (FielddataValue is not null) - { - return FielddataValue; - } - - if ((object)FielddataDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (FielddataDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DateProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fielddata = BuildFielddata(), - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Locale = LocaleValue, - Meta = MetaValue, - NullValue = NullValueValue, - PrecisionStep = PrecisionStepValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class DatePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DatePropertyDescriptor(Action configure) => configure.Invoke(this); - - public DatePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? FielddataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor FielddataDescriptor { get; set; } - private Action FielddataDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private string? LocaleValue { get; set; } - private IDictionary? MetaValue { get; set; } - private DateTimeOffset? NullValueValue { get; set; } - private int? PrecisionStepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DatePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DatePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DatePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DatePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DatePropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? fielddata) - { - FielddataDescriptor = null; - FielddataDescriptorAction = null; - FielddataValue = fielddata; - return Self; - } - - public DatePropertyDescriptor Fielddata(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor descriptor) - { - FielddataValue = null; - FielddataDescriptorAction = null; - FielddataDescriptor = descriptor; - return Self; - } - - public DatePropertyDescriptor Fielddata(Action configure) - { - FielddataValue = null; - FielddataDescriptor = null; - FielddataDescriptorAction = configure; - return Self; - } - - public DatePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DatePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DatePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DatePropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DatePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public DatePropertyDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DatePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DatePropertyDescriptor NullValue(DateTimeOffset? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DatePropertyDescriptor PrecisionStep(int? precisionStep) - { - PrecisionStepValue = precisionStep; - return Self; - } - - public DatePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DatePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DatePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FielddataDescriptor is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataDescriptor, options); - } - else if (FielddataDescriptorAction is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction), options); - } - else if (FielddataValue is not null) - { - writer.WritePropertyName("fielddata"); - JsonSerializer.Serialize(writer, FielddataValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (PrecisionStepValue.HasValue) - { - writer.WritePropertyName("precision_step"); - writer.WriteNumberValue(PrecisionStepValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("date"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddata? BuildFielddata() - { - if (FielddataValue is not null) - { - return FielddataValue; - } - - if ((object)FielddataDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (FielddataDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.NumericFielddataDescriptor(FielddataDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DateProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fielddata = BuildFielddata(), - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Locale = LocaleValue, - Meta = MetaValue, - NullValue = NullValueValue, - PrecisionStep = PrecisionStepValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateRangeProperty.g.cs deleted file mode 100644 index 98a8be7ae0d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DateRangeProperty.g.cs +++ /dev/null @@ -1,512 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DateRangeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "date_range"; -} - -public sealed partial class DateRangePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DateRangePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DateRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DateRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DateRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DateRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DateRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DateRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DateRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DateRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DateRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DateRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DateRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DateRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DateRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("date_range"); - writer.WriteEndObject(); - } - - DateRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class DateRangePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DateRangePropertyDescriptor(Action configure) => configure.Invoke(this); - - public DateRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DateRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DateRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DateRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DateRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DateRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DateRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DateRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DateRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DateRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DateRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DateRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DateRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DateRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("date_range"); - writer.WriteEndObject(); - } - - DateRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs deleted file mode 100644 index 46d3cd22aa6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs +++ /dev/null @@ -1,185 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DenseVectorIndexOptions -{ - /// - /// - /// The confidence interval to use when quantizing the vectors. Can be any value between and including 0.90 and - /// 1.0 or exactly 0. When the value is 0, this indicates that dynamic quantiles should be calculated for - /// optimized quantization. When between 0.90 and 1.0, this value restricts the values used when calculating - /// the quantization thresholds. - /// - /// - /// For example, a value of 0.95 will only use the middle 95% of the values when calculating the quantization - /// thresholds (e.g. the highest and lowest 2.5% of values will be ignored). - /// - /// - /// Defaults to 1/(dims + 1) for int8 quantized vectors and 0 for int4 for dynamic quantile calculation. - /// - /// - /// Only applicable to int8_hnsw, int4_hnsw, int8_flat, and int4_flat index types. - /// - /// - [JsonInclude, JsonPropertyName("confidence_interval")] - public float? ConfidenceInterval { get; set; } - - /// - /// - /// The number of candidates to track while assembling the list of nearest neighbors for each new node. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// - [JsonInclude, JsonPropertyName("ef_construction")] - public int? EfConstruction { get; set; } - - /// - /// - /// The number of neighbors each node will be connected to in the HNSW graph. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// - [JsonInclude, JsonPropertyName("m")] - public int? m { get; set; } - - /// - /// - /// The type of kNN algorithm to use. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsType Type { get; set; } -} - -public sealed partial class DenseVectorIndexOptionsDescriptor : SerializableDescriptor -{ - internal DenseVectorIndexOptionsDescriptor(Action configure) => configure.Invoke(this); - - public DenseVectorIndexOptionsDescriptor() : base() - { - } - - private float? ConfidenceIntervalValue { get; set; } - private int? EfConstructionValue { get; set; } - private int? mValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsType TypeValue { get; set; } - - /// - /// - /// The confidence interval to use when quantizing the vectors. Can be any value between and including 0.90 and - /// 1.0 or exactly 0. When the value is 0, this indicates that dynamic quantiles should be calculated for - /// optimized quantization. When between 0.90 and 1.0, this value restricts the values used when calculating - /// the quantization thresholds. - /// - /// - /// For example, a value of 0.95 will only use the middle 95% of the values when calculating the quantization - /// thresholds (e.g. the highest and lowest 2.5% of values will be ignored). - /// - /// - /// Defaults to 1/(dims + 1) for int8 quantized vectors and 0 for int4 for dynamic quantile calculation. - /// - /// - /// Only applicable to int8_hnsw, int4_hnsw, int8_flat, and int4_flat index types. - /// - /// - public DenseVectorIndexOptionsDescriptor ConfidenceInterval(float? confidenceInterval) - { - ConfidenceIntervalValue = confidenceInterval; - return Self; - } - - /// - /// - /// The number of candidates to track while assembling the list of nearest neighbors for each new node. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// - public DenseVectorIndexOptionsDescriptor EfConstruction(int? efConstruction) - { - EfConstructionValue = efConstruction; - return Self; - } - - /// - /// - /// The number of neighbors each node will be connected to in the HNSW graph. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// - public DenseVectorIndexOptionsDescriptor m(int? m) - { - mValue = m; - return Self; - } - - /// - /// - /// The type of kNN algorithm to use. - /// - /// - public DenseVectorIndexOptionsDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ConfidenceIntervalValue.HasValue) - { - writer.WritePropertyName("confidence_interval"); - writer.WriteNumberValue(ConfidenceIntervalValue.Value); - } - - if (EfConstructionValue.HasValue) - { - writer.WritePropertyName("ef_construction"); - writer.WriteNumberValue(EfConstructionValue.Value); - } - - if (mValue.HasValue) - { - writer.WritePropertyName("m"); - writer.WriteNumberValue(mValue.Value); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorProperty.g.cs deleted file mode 100644 index dbf11217d64..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DenseVectorProperty.g.cs +++ /dev/null @@ -1,698 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DenseVectorProperty : IProperty -{ - /// - /// - /// Number of vector dimensions. Can't exceed 4096. If dims is not specified, it will be set to the length of - /// the first vector added to the field. - /// - /// - [JsonInclude, JsonPropertyName("dims")] - public int? Dims { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - - /// - /// - /// The data type used to encode vectors. The supported data types are float (default), byte, and bit. - /// - /// - [JsonInclude, JsonPropertyName("element_type")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorElementType? ElementType { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// If true, you can search this field using the kNN search API. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters - /// that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the - /// expense of slower indexing speed. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? IndexOptions { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - /// - /// - /// The vector similarity metric to use in kNN search. - /// - /// - /// Documents are ranked by their vector field's similarity to the query vector. The _score of each document will - /// be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds - /// to a higher ranking. - /// - /// - /// Defaults to l2_norm when element_type is bit otherwise defaults to cosine. - /// - /// - /// bit vectors only support l2_norm as their similarity metric. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - [JsonInclude, JsonPropertyName("similarity")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorSimilarity? Similarity { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "dense_vector"; -} - -public sealed partial class DenseVectorPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DenseVectorPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DenseVectorPropertyDescriptor() : base() - { - } - - private int? DimsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorElementType? ElementTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? IndexOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor IndexOptionsDescriptor { get; set; } - private Action IndexOptionsDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorSimilarity? SimilarityValue { get; set; } - - /// - /// - /// Number of vector dimensions. Can't exceed 4096. If dims is not specified, it will be set to the length of - /// the first vector added to the field. - /// - /// - public DenseVectorPropertyDescriptor Dims(int? dims) - { - DimsValue = dims; - return Self; - } - - public DenseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - /// - /// - /// The data type used to encode vectors. The supported data types are float (default), byte, and bit. - /// - /// - public DenseVectorPropertyDescriptor ElementType(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorElementType? elementType) - { - ElementTypeValue = elementType; - return Self; - } - - public DenseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DenseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DenseVectorPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DenseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// If true, you can search this field using the kNN search API. - /// - /// - public DenseVectorPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters - /// that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the - /// expense of slower indexing speed. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - public DenseVectorPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? indexOptions) - { - IndexOptionsDescriptor = null; - IndexOptionsDescriptorAction = null; - IndexOptionsValue = indexOptions; - return Self; - } - - public DenseVectorPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor descriptor) - { - IndexOptionsValue = null; - IndexOptionsDescriptorAction = null; - IndexOptionsDescriptor = descriptor; - return Self; - } - - public DenseVectorPropertyDescriptor IndexOptions(Action configure) - { - IndexOptionsValue = null; - IndexOptionsDescriptor = null; - IndexOptionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DenseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DenseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DenseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DenseVectorPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - /// - /// - /// The vector similarity metric to use in kNN search. - /// - /// - /// Documents are ranked by their vector field's similarity to the query vector. The _score of each document will - /// be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds - /// to a higher ranking. - /// - /// - /// Defaults to l2_norm when element_type is bit otherwise defaults to cosine. - /// - /// - /// bit vectors only support l2_norm as their similarity metric. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - public DenseVectorPropertyDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorSimilarity? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DimsValue.HasValue) - { - writer.WritePropertyName("dims"); - writer.WriteNumberValue(DimsValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (ElementTypeValue is not null) - { - writer.WritePropertyName("element_type"); - JsonSerializer.Serialize(writer, ElementTypeValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsDescriptor is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsDescriptor, options); - } - else if (IndexOptionsDescriptorAction is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor(IndexOptionsDescriptorAction), options); - } - else if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (SimilarityValue is not null) - { - writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, SimilarityValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("dense_vector"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? BuildIndexOptions() - { - if (IndexOptionsValue is not null) - { - return IndexOptionsValue; - } - - if ((object)IndexOptionsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (IndexOptionsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor(IndexOptionsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DenseVectorProperty IBuildableDescriptor.Build() => new() - { - Dims = DimsValue, - Dynamic = DynamicValue, - ElementType = ElementTypeValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = BuildIndexOptions(), - Meta = MetaValue, - Properties = PropertiesValue, - Similarity = SimilarityValue - }; -} - -public sealed partial class DenseVectorPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DenseVectorPropertyDescriptor(Action configure) => configure.Invoke(this); - - public DenseVectorPropertyDescriptor() : base() - { - } - - private int? DimsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorElementType? ElementTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? IndexOptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor IndexOptionsDescriptor { get; set; } - private Action IndexOptionsDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorSimilarity? SimilarityValue { get; set; } - - /// - /// - /// Number of vector dimensions. Can't exceed 4096. If dims is not specified, it will be set to the length of - /// the first vector added to the field. - /// - /// - public DenseVectorPropertyDescriptor Dims(int? dims) - { - DimsValue = dims; - return Self; - } - - public DenseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - /// - /// - /// The data type used to encode vectors. The supported data types are float (default), byte, and bit. - /// - /// - public DenseVectorPropertyDescriptor ElementType(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorElementType? elementType) - { - ElementTypeValue = elementType; - return Self; - } - - public DenseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DenseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DenseVectorPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DenseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// If true, you can search this field using the kNN search API. - /// - /// - public DenseVectorPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters - /// that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the - /// expense of slower indexing speed. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - public DenseVectorPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? indexOptions) - { - IndexOptionsDescriptor = null; - IndexOptionsDescriptorAction = null; - IndexOptionsValue = indexOptions; - return Self; - } - - public DenseVectorPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor descriptor) - { - IndexOptionsValue = null; - IndexOptionsDescriptorAction = null; - IndexOptionsDescriptor = descriptor; - return Self; - } - - public DenseVectorPropertyDescriptor IndexOptions(Action configure) - { - IndexOptionsValue = null; - IndexOptionsDescriptor = null; - IndexOptionsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DenseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DenseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DenseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DenseVectorPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - /// - /// - /// The vector similarity metric to use in kNN search. - /// - /// - /// Documents are ranked by their vector field's similarity to the query vector. The _score of each document will - /// be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds - /// to a higher ranking. - /// - /// - /// Defaults to l2_norm when element_type is bit otherwise defaults to cosine. - /// - /// - /// bit vectors only support l2_norm as their similarity metric. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - public DenseVectorPropertyDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorSimilarity? similarity) - { - SimilarityValue = similarity; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DimsValue.HasValue) - { - writer.WritePropertyName("dims"); - writer.WriteNumberValue(DimsValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (ElementTypeValue is not null) - { - writer.WritePropertyName("element_type"); - JsonSerializer.Serialize(writer, ElementTypeValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsDescriptor is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsDescriptor, options); - } - else if (IndexOptionsDescriptorAction is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor(IndexOptionsDescriptorAction), options); - } - else if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (SimilarityValue is not null) - { - writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, SimilarityValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("dense_vector"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptions? BuildIndexOptions() - { - if (IndexOptionsValue is not null) - { - return IndexOptionsValue; - } - - if ((object)IndexOptionsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (IndexOptionsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorIndexOptionsDescriptor(IndexOptionsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DenseVectorProperty IBuildableDescriptor.Build() => new() - { - Dims = DimsValue, - Dynamic = DynamicValue, - ElementType = ElementTypeValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = BuildIndexOptions(), - Meta = MetaValue, - Properties = PropertiesValue, - Similarity = SimilarityValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleNumberProperty.g.cs deleted file mode 100644 index 1c50170dbfe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DoubleNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public double? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "double"; -} - -public sealed partial class DoubleNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DoubleNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DoubleNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private double? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public DoubleNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DoubleNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DoubleNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DoubleNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DoubleNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DoubleNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DoubleNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DoubleNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DoubleNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DoubleNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DoubleNumberPropertyDescriptor NullValue(double? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DoubleNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public DoubleNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DoubleNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DoubleNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DoubleNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public DoubleNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("double"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DoubleNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class DoubleNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DoubleNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public DoubleNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private double? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public DoubleNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DoubleNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DoubleNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DoubleNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DoubleNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DoubleNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DoubleNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DoubleNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DoubleNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DoubleNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DoubleNumberPropertyDescriptor NullValue(double? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DoubleNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public DoubleNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DoubleNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DoubleNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DoubleNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public DoubleNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("double"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DoubleNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleRangeProperty.g.cs deleted file mode 100644 index cd3a1dfc6c5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DoubleRangeProperty.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DoubleRangeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "double_range"; -} - -public sealed partial class DoubleRangePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DoubleRangePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DoubleRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DoubleRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DoubleRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DoubleRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DoubleRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DoubleRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DoubleRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DoubleRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DoubleRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DoubleRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DoubleRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DoubleRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("double_range"); - writer.WriteEndObject(); - } - - DoubleRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class DoubleRangePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DoubleRangePropertyDescriptor(Action configure) => configure.Invoke(this); - - public DoubleRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public DoubleRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DoubleRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DoubleRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DoubleRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DoubleRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DoubleRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DoubleRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DoubleRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DoubleRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DoubleRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DoubleRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DoubleRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("double_range"); - writer.WriteEndObject(); - } - - DoubleRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs deleted file mode 100644 index c82eb82083c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs +++ /dev/null @@ -1,1268 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class DynamicProperty : IProperty -{ - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("eager_global_ordinals")] - public bool? EagerGlobalOrdinals { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } - [JsonInclude, JsonPropertyName("index_phrases")] - public bool? IndexPhrases { get; set; } - [JsonInclude, JsonPropertyName("index_prefixes")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? IndexPrefixes { get; set; } - [JsonInclude, JsonPropertyName("locale")] - public string? Locale { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("norms")] - public bool? Norms { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public Elastic.Clients.Elasticsearch.Serverless.FieldValue? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("position_increment_gap")] - public int? PositionIncrementGap { get; set; } - [JsonInclude, JsonPropertyName("precision_step")] - public int? PrecisionStep { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("search_analyzer")] - public string? SearchAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("search_quote_analyzer")] - public string? SearchQuoteAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("term_vector")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVector { get; set; } - [JsonInclude, JsonPropertyName("time_series_metric")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "{dynamic_type}"; -} - -public sealed partial class DynamicPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal DynamicPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public DynamicPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private bool? IndexPhrasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? IndexPrefixesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor IndexPrefixesDescriptor { get; set; } - private Action IndexPrefixesDescriptorAction { get; set; } - private string? LocaleValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private int? PositionIncrementGapValue { get; set; } - private int? PrecisionStepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? SearchAnalyzerValue { get; set; } - private string? SearchQuoteAnalyzerValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } - - public DynamicPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public DynamicPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DynamicPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DynamicPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DynamicPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DynamicPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DynamicPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public DynamicPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public DynamicPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DynamicPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DynamicPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DynamicPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DynamicPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public DynamicPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public DynamicPropertyDescriptor IndexPhrases(bool? indexPhrases = true) - { - IndexPhrasesValue = indexPhrases; - return Self; - } - - public DynamicPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? indexPrefixes) - { - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesValue = indexPrefixes; - return Self; - } - - public DynamicPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor descriptor) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesDescriptor = descriptor; - return Self; - } - - public DynamicPropertyDescriptor IndexPrefixes(Action configure) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = configure; - return Self; - } - - public DynamicPropertyDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DynamicPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DynamicPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public DynamicPropertyDescriptor NullValue(Elastic.Clients.Elasticsearch.Serverless.FieldValue? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DynamicPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public DynamicPropertyDescriptor PositionIncrementGap(int? positionIncrementGap) - { - PositionIncrementGapValue = positionIncrementGap; - return Self; - } - - public DynamicPropertyDescriptor PrecisionStep(int? precisionStep) - { - PrecisionStepValue = precisionStep; - return Self; - } - - public DynamicPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DynamicPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DynamicPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DynamicPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public DynamicPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public DynamicPropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer) - { - SearchQuoteAnalyzerValue = searchQuoteAnalyzer; - return Self; - } - - public DynamicPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public DynamicPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? termVector) - { - TermVectorValue = termVector; - return Self; - } - - public DynamicPropertyDescriptor TimeSeriesMetric(Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? timeSeriesMetric) - { - TimeSeriesMetricValue = timeSeriesMetric; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (IndexPhrasesValue.HasValue) - { - writer.WritePropertyName("index_phrases"); - writer.WriteBooleanValue(IndexPhrasesValue.Value); - } - - if (IndexPrefixesDescriptor is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesDescriptor, options); - } - else if (IndexPrefixesDescriptorAction is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction), options); - } - else if (IndexPrefixesValue is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesValue, options); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PositionIncrementGapValue.HasValue) - { - writer.WritePropertyName("position_increment_gap"); - writer.WriteNumberValue(PositionIncrementGapValue.Value); - } - - if (PrecisionStepValue.HasValue) - { - writer.WritePropertyName("precision_step"); - writer.WriteNumberValue(PrecisionStepValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SearchQuoteAnalyzerValue)) - { - writer.WritePropertyName("search_quote_analyzer"); - writer.WriteStringValue(SearchQuoteAnalyzerValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TermVectorValue is not null) - { - writer.WritePropertyName("term_vector"); - JsonSerializer.Serialize(writer, TermVectorValue, options); - } - - if (TimeSeriesMetricValue is not null) - { - writer.WritePropertyName("time_series_metric"); - JsonSerializer.Serialize(writer, TimeSeriesMetricValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("{dynamic_type}"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? BuildIndexPrefixes() - { - if (IndexPrefixesValue is not null) - { - return IndexPrefixesValue; - } - - if ((object)IndexPrefixesDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (IndexPrefixesDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DynamicProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Enabled = EnabledValue, - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - IndexPhrases = IndexPhrasesValue, - IndexPrefixes = BuildIndexPrefixes(), - Locale = LocaleValue, - Meta = MetaValue, - Norms = NormsValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - PositionIncrementGap = PositionIncrementGapValue, - PrecisionStep = PrecisionStepValue, - Properties = PropertiesValue, - Script = BuildScript(), - SearchAnalyzer = SearchAnalyzerValue, - SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Store = StoreValue, - TermVector = TermVectorValue, - TimeSeriesMetric = TimeSeriesMetricValue - }; -} - -public sealed partial class DynamicPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal DynamicPropertyDescriptor(Action configure) => configure.Invoke(this); - - public DynamicPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private string? FormatValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private bool? IndexPhrasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? IndexPrefixesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor IndexPrefixesDescriptor { get; set; } - private Action IndexPrefixesDescriptorAction { get; set; } - private string? LocaleValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private int? PositionIncrementGapValue { get; set; } - private int? PrecisionStepValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? SearchAnalyzerValue { get; set; } - private string? SearchQuoteAnalyzerValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } - - public DynamicPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public DynamicPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public DynamicPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public DynamicPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public DynamicPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public DynamicPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public DynamicPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public DynamicPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public DynamicPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public DynamicPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public DynamicPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public DynamicPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public DynamicPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public DynamicPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public DynamicPropertyDescriptor IndexPhrases(bool? indexPhrases = true) - { - IndexPhrasesValue = indexPhrases; - return Self; - } - - public DynamicPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? indexPrefixes) - { - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesValue = indexPrefixes; - return Self; - } - - public DynamicPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor descriptor) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesDescriptor = descriptor; - return Self; - } - - public DynamicPropertyDescriptor IndexPrefixes(Action configure) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = configure; - return Self; - } - - public DynamicPropertyDescriptor Locale(string? locale) - { - LocaleValue = locale; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public DynamicPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DynamicPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public DynamicPropertyDescriptor NullValue(Elastic.Clients.Elasticsearch.Serverless.FieldValue? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public DynamicPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public DynamicPropertyDescriptor PositionIncrementGap(int? positionIncrementGap) - { - PositionIncrementGapValue = positionIncrementGap; - return Self; - } - - public DynamicPropertyDescriptor PrecisionStep(int? precisionStep) - { - PrecisionStepValue = precisionStep; - return Self; - } - - public DynamicPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public DynamicPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public DynamicPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public DynamicPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public DynamicPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public DynamicPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public DynamicPropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer) - { - SearchQuoteAnalyzerValue = searchQuoteAnalyzer; - return Self; - } - - public DynamicPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public DynamicPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? termVector) - { - TermVectorValue = termVector; - return Self; - } - - public DynamicPropertyDescriptor TimeSeriesMetric(Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? timeSeriesMetric) - { - TimeSeriesMetricValue = timeSeriesMetric; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (IndexPhrasesValue.HasValue) - { - writer.WritePropertyName("index_phrases"); - writer.WriteBooleanValue(IndexPhrasesValue.Value); - } - - if (IndexPrefixesDescriptor is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesDescriptor, options); - } - else if (IndexPrefixesDescriptorAction is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction), options); - } - else if (IndexPrefixesValue is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesValue, options); - } - - if (!string.IsNullOrEmpty(LocaleValue)) - { - writer.WritePropertyName("locale"); - writer.WriteStringValue(LocaleValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PositionIncrementGapValue.HasValue) - { - writer.WritePropertyName("position_increment_gap"); - writer.WriteNumberValue(PositionIncrementGapValue.Value); - } - - if (PrecisionStepValue.HasValue) - { - writer.WritePropertyName("precision_step"); - writer.WriteNumberValue(PrecisionStepValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SearchQuoteAnalyzerValue)) - { - writer.WritePropertyName("search_quote_analyzer"); - writer.WriteStringValue(SearchQuoteAnalyzerValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TermVectorValue is not null) - { - writer.WritePropertyName("term_vector"); - JsonSerializer.Serialize(writer, TermVectorValue, options); - } - - if (TimeSeriesMetricValue is not null) - { - writer.WritePropertyName("time_series_metric"); - JsonSerializer.Serialize(writer, TimeSeriesMetricValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("{dynamic_type}"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? BuildIndexPrefixes() - { - if (IndexPrefixesValue is not null) - { - return IndexPrefixesValue; - } - - if ((object)IndexPrefixesDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (IndexPrefixesDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - DynamicProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Enabled = EnabledValue, - Fields = FieldsValue, - Format = FormatValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - IndexPhrases = IndexPhrasesValue, - IndexPrefixes = BuildIndexPrefixes(), - Locale = LocaleValue, - Meta = MetaValue, - Norms = NormsValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - PositionIncrementGap = PositionIncrementGapValue, - PrecisionStep = PrecisionStepValue, - Properties = PropertiesValue, - Script = BuildScript(), - SearchAnalyzer = SearchAnalyzerValue, - SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Store = StoreValue, - TermVector = TermVectorValue, - TimeSeriesMetric = TimeSeriesMetricValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicTemplate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicTemplate.g.cs deleted file mode 100644 index 84661cf4461..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicTemplate.g.cs +++ /dev/null @@ -1,535 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -[JsonConverter(typeof(DynamicTemplateConverter))] -public sealed partial class DynamicTemplate -{ - internal DynamicTemplate(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 DynamicTemplate Mapping(Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty property) => new DynamicTemplate("mapping", property); - public static DynamicTemplate Runtime(Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty property) => new DynamicTemplate("runtime", property); - - [JsonInclude, JsonPropertyName("match")] - public ICollection? Match { get; set; } - [JsonInclude, JsonPropertyName("match_mapping_type")] - public ICollection? MatchMappingType { get; set; } - [JsonInclude, JsonPropertyName("match_pattern")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchType? MatchPattern { get; set; } - [JsonInclude, JsonPropertyName("path_match")] - public ICollection? PathMatch { get; set; } - [JsonInclude, JsonPropertyName("path_unmatch")] - public ICollection? PathUnmatch { get; set; } - [JsonInclude, JsonPropertyName("unmatch")] - public ICollection? Unmatch { get; set; } - [JsonInclude, JsonPropertyName("unmatch_mapping_type")] - public ICollection? UnmatchMappingType { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class DynamicTemplateConverter : JsonConverter -{ - public override DynamicTemplate 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; - ICollection? matchValue = default; - ICollection? matchMappingTypeValue = default; - Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchType? matchPatternValue = default; - ICollection? pathMatchValue = default; - ICollection? pathUnmatchValue = default; - ICollection? unmatchValue = default; - ICollection? unmatchMappingTypeValue = 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 == "match") - { - matchValue = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "match_mapping_type") - { - matchMappingTypeValue = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "match_pattern") - { - matchPatternValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "path_match") - { - pathMatchValue = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "path_unmatch") - { - pathUnmatchValue = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "unmatch") - { - unmatchValue = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "unmatch_mapping_type") - { - unmatchMappingTypeValue = SingleOrManySerializationHelper.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "mapping") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "runtime") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'DynamicTemplate' from the response."); - } - - var result = new DynamicTemplate(variantNameValue, variantValue); - result.Match = matchValue; - result.MatchMappingType = matchMappingTypeValue; - result.MatchPattern = matchPatternValue; - result.PathMatch = pathMatchValue; - result.PathUnmatch = pathUnmatchValue; - result.Unmatch = unmatchValue; - result.UnmatchMappingType = unmatchMappingTypeValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, DynamicTemplate value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Match is not null) - { - writer.WritePropertyName("match"); - SingleOrManySerializationHelper.Serialize(value.Match, writer, options); - } - - if (value.MatchMappingType is not null) - { - writer.WritePropertyName("match_mapping_type"); - SingleOrManySerializationHelper.Serialize(value.MatchMappingType, writer, options); - } - - if (value.MatchPattern is not null) - { - writer.WritePropertyName("match_pattern"); - JsonSerializer.Serialize(writer, value.MatchPattern, options); - } - - if (value.PathMatch is not null) - { - writer.WritePropertyName("path_match"); - SingleOrManySerializationHelper.Serialize(value.PathMatch, writer, options); - } - - if (value.PathUnmatch is not null) - { - writer.WritePropertyName("path_unmatch"); - SingleOrManySerializationHelper.Serialize(value.PathUnmatch, writer, options); - } - - if (value.Unmatch is not null) - { - writer.WritePropertyName("unmatch"); - SingleOrManySerializationHelper.Serialize(value.Unmatch, writer, options); - } - - if (value.UnmatchMappingType is not null) - { - writer.WritePropertyName("unmatch_mapping_type"); - SingleOrManySerializationHelper.Serialize(value.UnmatchMappingType, writer, options); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "mapping": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty)value.Variant, options); - break; - case "runtime": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DynamicTemplateDescriptor : SerializableDescriptor> -{ - internal DynamicTemplateDescriptor(Action> configure) => configure.Invoke(this); - - public DynamicTemplateDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DynamicTemplateDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DynamicTemplateDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private ICollection? MatchValue { get; set; } - private ICollection? MatchMappingTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchType? MatchPatternValue { get; set; } - private ICollection? PathMatchValue { get; set; } - private ICollection? PathUnmatchValue { get; set; } - private ICollection? UnmatchValue { get; set; } - private ICollection? UnmatchMappingTypeValue { get; set; } - - public DynamicTemplateDescriptor Match(ICollection? match) - { - MatchValue = match; - return Self; - } - - public DynamicTemplateDescriptor MatchMappingType(ICollection? matchMappingType) - { - MatchMappingTypeValue = matchMappingType; - return Self; - } - - public DynamicTemplateDescriptor MatchPattern(Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchType? matchPattern) - { - MatchPatternValue = matchPattern; - return Self; - } - - public DynamicTemplateDescriptor PathMatch(ICollection? pathMatch) - { - PathMatchValue = pathMatch; - return Self; - } - - public DynamicTemplateDescriptor PathUnmatch(ICollection? pathUnmatch) - { - PathUnmatchValue = pathUnmatch; - return Self; - } - - public DynamicTemplateDescriptor Unmatch(ICollection? unmatch) - { - UnmatchValue = unmatch; - return Self; - } - - public DynamicTemplateDescriptor UnmatchMappingType(ICollection? unmatchMappingType) - { - UnmatchMappingTypeValue = unmatchMappingType; - return Self; - } - - public DynamicTemplateDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty property) => Set(property, "mapping"); - public DynamicTemplateDescriptor Runtime(Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty property) => Set(property, "runtime"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MatchValue is not null) - { - writer.WritePropertyName("match"); - SingleOrManySerializationHelper.Serialize(MatchValue, writer, options); - } - - if (MatchMappingTypeValue is not null) - { - writer.WritePropertyName("match_mapping_type"); - SingleOrManySerializationHelper.Serialize(MatchMappingTypeValue, writer, options); - } - - if (MatchPatternValue is not null) - { - writer.WritePropertyName("match_pattern"); - JsonSerializer.Serialize(writer, MatchPatternValue, options); - } - - if (PathMatchValue is not null) - { - writer.WritePropertyName("path_match"); - SingleOrManySerializationHelper.Serialize(PathMatchValue, writer, options); - } - - if (PathUnmatchValue is not null) - { - writer.WritePropertyName("path_unmatch"); - SingleOrManySerializationHelper.Serialize(PathUnmatchValue, writer, options); - } - - if (UnmatchValue is not null) - { - writer.WritePropertyName("unmatch"); - SingleOrManySerializationHelper.Serialize(UnmatchValue, writer, options); - } - - if (UnmatchMappingTypeValue is not null) - { - writer.WritePropertyName("unmatch_mapping_type"); - SingleOrManySerializationHelper.Serialize(UnmatchMappingTypeValue, writer, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DynamicTemplateDescriptor : SerializableDescriptor -{ - internal DynamicTemplateDescriptor(Action configure) => configure.Invoke(this); - - public DynamicTemplateDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private DynamicTemplateDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private DynamicTemplateDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private ICollection? MatchValue { get; set; } - private ICollection? MatchMappingTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchType? MatchPatternValue { get; set; } - private ICollection? PathMatchValue { get; set; } - private ICollection? PathUnmatchValue { get; set; } - private ICollection? UnmatchValue { get; set; } - private ICollection? UnmatchMappingTypeValue { get; set; } - - public DynamicTemplateDescriptor Match(ICollection? match) - { - MatchValue = match; - return Self; - } - - public DynamicTemplateDescriptor MatchMappingType(ICollection? matchMappingType) - { - MatchMappingTypeValue = matchMappingType; - return Self; - } - - public DynamicTemplateDescriptor MatchPattern(Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchType? matchPattern) - { - MatchPatternValue = matchPattern; - return Self; - } - - public DynamicTemplateDescriptor PathMatch(ICollection? pathMatch) - { - PathMatchValue = pathMatch; - return Self; - } - - public DynamicTemplateDescriptor PathUnmatch(ICollection? pathUnmatch) - { - PathUnmatchValue = pathUnmatch; - return Self; - } - - public DynamicTemplateDescriptor Unmatch(ICollection? unmatch) - { - UnmatchValue = unmatch; - return Self; - } - - public DynamicTemplateDescriptor UnmatchMappingType(ICollection? unmatchMappingType) - { - UnmatchMappingTypeValue = unmatchMappingType; - return Self; - } - - public DynamicTemplateDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty property) => Set(property, "mapping"); - public DynamicTemplateDescriptor Runtime(Elastic.Clients.Elasticsearch.Serverless.Mapping.IProperty property) => Set(property, "runtime"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (MatchValue is not null) - { - writer.WritePropertyName("match"); - SingleOrManySerializationHelper.Serialize(MatchValue, writer, options); - } - - if (MatchMappingTypeValue is not null) - { - writer.WritePropertyName("match_mapping_type"); - SingleOrManySerializationHelper.Serialize(MatchMappingTypeValue, writer, options); - } - - if (MatchPatternValue is not null) - { - writer.WritePropertyName("match_pattern"); - JsonSerializer.Serialize(writer, MatchPatternValue, options); - } - - if (PathMatchValue is not null) - { - writer.WritePropertyName("path_match"); - SingleOrManySerializationHelper.Serialize(PathMatchValue, writer, options); - } - - if (PathUnmatchValue is not null) - { - writer.WritePropertyName("path_unmatch"); - SingleOrManySerializationHelper.Serialize(PathUnmatchValue, writer, options); - } - - if (UnmatchValue is not null) - { - writer.WritePropertyName("unmatch"); - SingleOrManySerializationHelper.Serialize(UnmatchValue, writer, options); - } - - if (UnmatchMappingTypeValue is not null) - { - writer.WritePropertyName("unmatch_mapping_type"); - SingleOrManySerializationHelper.Serialize(UnmatchMappingTypeValue, writer, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldAliasProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldAliasProperty.g.cs deleted file mode 100644 index 13f46a7202b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldAliasProperty.g.cs +++ /dev/null @@ -1,355 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class FieldAliasProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Path { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "alias"; -} - -public sealed partial class FieldAliasPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal FieldAliasPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public FieldAliasPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public FieldAliasPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FieldAliasPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FieldAliasPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FieldAliasPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FieldAliasPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FieldAliasPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FieldAliasPropertyDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - public FieldAliasPropertyDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public FieldAliasPropertyDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public FieldAliasPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FieldAliasPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FieldAliasPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("alias"); - writer.WriteEndObject(); - } - - FieldAliasProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Path = PathValue, - Properties = PropertiesValue - }; -} - -public sealed partial class FieldAliasPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FieldAliasPropertyDescriptor(Action configure) => configure.Invoke(this); - - public FieldAliasPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public FieldAliasPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FieldAliasPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FieldAliasPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FieldAliasPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FieldAliasPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FieldAliasPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FieldAliasPropertyDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - public FieldAliasPropertyDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public FieldAliasPropertyDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public FieldAliasPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FieldAliasPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FieldAliasPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("alias"); - writer.WriteEndObject(); - } - - FieldAliasProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Path = PathValue, - Properties = PropertiesValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldNamesField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldNamesField.g.cs deleted file mode 100644 index 68f126f1dd7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FieldNamesField.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class FieldNamesField -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } -} - -public sealed partial class FieldNamesFieldDescriptor : SerializableDescriptor -{ - internal FieldNamesFieldDescriptor(Action configure) => configure.Invoke(this); - - public FieldNamesFieldDescriptor() : base() - { - } - - private bool EnabledValue { get; set; } - - public FieldNamesFieldDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FlattenedProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FlattenedProperty.g.cs deleted file mode 100644 index 4b889d7ed35..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FlattenedProperty.g.cs +++ /dev/null @@ -1,571 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class FlattenedProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("depth_limit")] - public int? DepthLimit { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("eager_global_ordinals")] - public bool? EagerGlobalOrdinals { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public string? NullValue { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } - [JsonInclude, JsonPropertyName("split_queries_on_whitespace")] - public bool? SplitQueriesOnWhitespace { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "flattened"; -} - -public sealed partial class FlattenedPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal FlattenedPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public FlattenedPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private int? DepthLimitValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } - private bool? SplitQueriesOnWhitespaceValue { get; set; } - - public FlattenedPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public FlattenedPropertyDescriptor DepthLimit(int? depthLimit) - { - DepthLimitValue = depthLimit; - return Self; - } - - public FlattenedPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public FlattenedPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FlattenedPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public FlattenedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FlattenedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public FlattenedPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public FlattenedPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FlattenedPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FlattenedPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public FlattenedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FlattenedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public FlattenedPropertyDescriptor SplitQueriesOnWhitespace(bool? splitQueriesOnWhitespace = true) - { - SplitQueriesOnWhitespaceValue = splitQueriesOnWhitespace; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DepthLimitValue.HasValue) - { - writer.WritePropertyName("depth_limit"); - writer.WriteNumberValue(DepthLimitValue.Value); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (SplitQueriesOnWhitespaceValue.HasValue) - { - writer.WritePropertyName("split_queries_on_whitespace"); - writer.WriteBooleanValue(SplitQueriesOnWhitespaceValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("flattened"); - writer.WriteEndObject(); - } - - FlattenedProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - DepthLimit = DepthLimitValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Similarity = SimilarityValue, - SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue - }; -} - -public sealed partial class FlattenedPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FlattenedPropertyDescriptor(Action configure) => configure.Invoke(this); - - public FlattenedPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private int? DepthLimitValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SimilarityValue { get; set; } - private bool? SplitQueriesOnWhitespaceValue { get; set; } - - public FlattenedPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public FlattenedPropertyDescriptor DepthLimit(int? depthLimit) - { - DepthLimitValue = depthLimit; - return Self; - } - - public FlattenedPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public FlattenedPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FlattenedPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public FlattenedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FlattenedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public FlattenedPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public FlattenedPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FlattenedPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FlattenedPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public FlattenedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FlattenedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FlattenedPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public FlattenedPropertyDescriptor SplitQueriesOnWhitespace(bool? splitQueriesOnWhitespace = true) - { - SplitQueriesOnWhitespaceValue = splitQueriesOnWhitespace; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DepthLimitValue.HasValue) - { - writer.WritePropertyName("depth_limit"); - writer.WriteNumberValue(DepthLimitValue.Value); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (SplitQueriesOnWhitespaceValue.HasValue) - { - writer.WritePropertyName("split_queries_on_whitespace"); - writer.WriteBooleanValue(SplitQueriesOnWhitespaceValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("flattened"); - writer.WriteEndObject(); - } - - FlattenedProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - DepthLimit = DepthLimitValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Similarity = SimilarityValue, - SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs deleted file mode 100644 index 209758f348f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class FloatNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public float? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "float"; -} - -public sealed partial class FloatNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal FloatNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public FloatNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private float? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public FloatNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public FloatNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public FloatNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public FloatNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public FloatNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public FloatNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public FloatNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FloatNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FloatNumberPropertyDescriptor NullValue(float? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public FloatNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public FloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public FloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public FloatNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public FloatNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("float"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - FloatNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class FloatNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FloatNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public FloatNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private float? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public FloatNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public FloatNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public FloatNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public FloatNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public FloatNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public FloatNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public FloatNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FloatNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FloatNumberPropertyDescriptor NullValue(float? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public FloatNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public FloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public FloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public FloatNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public FloatNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("float"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - FloatNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatRangeProperty.g.cs deleted file mode 100644 index 18e6057c59c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/FloatRangeProperty.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class FloatRangeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "float_range"; -} - -public sealed partial class FloatRangePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal FloatRangePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public FloatRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public FloatRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public FloatRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public FloatRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public FloatRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public FloatRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FloatRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FloatRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public FloatRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FloatRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FloatRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FloatRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("float_range"); - writer.WriteEndObject(); - } - - FloatRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class FloatRangePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal FloatRangePropertyDescriptor(Action configure) => configure.Invoke(this); - - public FloatRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public FloatRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public FloatRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public FloatRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public FloatRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public FloatRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public FloatRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public FloatRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public FloatRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public FloatRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FloatRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public FloatRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public FloatRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("float_range"); - writer.WriteEndObject(); - } - - FloatRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoPointProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoPointProperty.g.cs deleted file mode 100644 index 048ce25f474..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoPointProperty.g.cs +++ /dev/null @@ -1,680 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class GeoPointProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("ignore_z_value")] - public bool? IgnoreZValue { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "geo_point"; -} - -public sealed partial class GeoPointPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal GeoPointPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public GeoPointPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public GeoPointPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public GeoPointPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public GeoPointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public GeoPointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public GeoPointPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public GeoPointPropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - public GeoPointPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public GeoPointPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoPointPropertyDescriptor NullValue(Elastic.Clients.Elasticsearch.Serverless.GeoLocation? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public GeoPointPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public GeoPointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public GeoPointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public GeoPointPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public GeoPointPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public GeoPointPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("geo_point"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - GeoPointProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class GeoPointPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal GeoPointPropertyDescriptor(Action configure) => configure.Invoke(this); - - public GeoPointPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public GeoPointPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public GeoPointPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public GeoPointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public GeoPointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public GeoPointPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public GeoPointPropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - public GeoPointPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public GeoPointPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoPointPropertyDescriptor NullValue(Elastic.Clients.Elasticsearch.Serverless.GeoLocation? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public GeoPointPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public GeoPointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public GeoPointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoPointPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public GeoPointPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public GeoPointPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public GeoPointPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("geo_point"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - GeoPointProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoShapeProperty.g.cs deleted file mode 100644 index 30917b79567..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ /dev/null @@ -1,563 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -/// -/// -/// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles -/// and polygons. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class GeoShapeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("ignore_z_value")] - public bool? IgnoreZValue { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("orientation")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? Orientation { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("strategy")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? Strategy { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "geo_shape"; -} - -/// -/// -/// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles -/// and polygons. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class GeoShapePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal GeoShapePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public GeoShapePropertyDescriptor() : base() - { - } - - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? StrategyValue { get; set; } - - public GeoShapePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public GeoShapePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public GeoShapePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public GeoShapePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public GeoShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public GeoShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public GeoShapePropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public GeoShapePropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public GeoShapePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoShapePropertyDescriptor Orientation(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? orientation) - { - OrientationValue = orientation; - return Self; - } - - public GeoShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public GeoShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public GeoShapePropertyDescriptor Strategy(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? strategy) - { - StrategyValue = strategy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OrientationValue is not null) - { - writer.WritePropertyName("orientation"); - JsonSerializer.Serialize(writer, OrientationValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (StrategyValue is not null) - { - writer.WritePropertyName("strategy"); - JsonSerializer.Serialize(writer, StrategyValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("geo_shape"); - writer.WriteEndObject(); - } - - GeoShapeProperty IBuildableDescriptor.Build() => new() - { - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Meta = MetaValue, - Orientation = OrientationValue, - Properties = PropertiesValue, - Store = StoreValue, - Strategy = StrategyValue - }; -} - -/// -/// -/// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles -/// and polygons. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class GeoShapePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal GeoShapePropertyDescriptor(Action configure) => configure.Invoke(this); - - public GeoShapePropertyDescriptor() : base() - { - } - - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? StrategyValue { get; set; } - - public GeoShapePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public GeoShapePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public GeoShapePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public GeoShapePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public GeoShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public GeoShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public GeoShapePropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public GeoShapePropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public GeoShapePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoShapePropertyDescriptor Orientation(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? orientation) - { - OrientationValue = orientation; - return Self; - } - - public GeoShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public GeoShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public GeoShapePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public GeoShapePropertyDescriptor Strategy(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoStrategy? strategy) - { - StrategyValue = strategy; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OrientationValue is not null) - { - writer.WritePropertyName("orientation"); - JsonSerializer.Serialize(writer, OrientationValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (StrategyValue is not null) - { - writer.WritePropertyName("strategy"); - JsonSerializer.Serialize(writer, StrategyValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("geo_shape"); - writer.WriteEndObject(); - } - - GeoShapeProperty IBuildableDescriptor.Build() => new() - { - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Meta = MetaValue, - Orientation = OrientationValue, - Properties = PropertiesValue, - Store = StoreValue, - Strategy = StrategyValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs deleted file mode 100644 index 2ec7faa6a78..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class HalfFloatNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public float? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "half_float"; -} - -public sealed partial class HalfFloatNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal HalfFloatNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public HalfFloatNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private float? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public HalfFloatNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public HalfFloatNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public HalfFloatNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public HalfFloatNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public HalfFloatNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public HalfFloatNumberPropertyDescriptor NullValue(float? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("half_float"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - HalfFloatNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class HalfFloatNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HalfFloatNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public HalfFloatNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private float? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public HalfFloatNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public HalfFloatNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public HalfFloatNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public HalfFloatNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public HalfFloatNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public HalfFloatNumberPropertyDescriptor NullValue(float? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public HalfFloatNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("half_float"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - HalfFloatNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HistogramProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HistogramProperty.g.cs deleted file mode 100644 index 7a4ee2601c0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/HistogramProperty.g.cs +++ /dev/null @@ -1,331 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class HistogramProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "histogram"; -} - -public sealed partial class HistogramPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal HistogramPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public HistogramPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public HistogramPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public HistogramPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public HistogramPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HistogramPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HistogramPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public HistogramPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public HistogramPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public HistogramPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public HistogramPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public HistogramPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("histogram"); - writer.WriteEndObject(); - } - - HistogramProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Meta = MetaValue, - Properties = PropertiesValue - }; -} - -public sealed partial class HistogramPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal HistogramPropertyDescriptor(Action configure) => configure.Invoke(this); - - public HistogramPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public HistogramPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public HistogramPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public HistogramPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HistogramPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public HistogramPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public HistogramPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public HistogramPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public HistogramPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public HistogramPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public HistogramPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("histogram"); - writer.WriteEndObject(); - } - - HistogramProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Meta = MetaValue, - Properties = PropertiesValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs deleted file mode 100644 index 21424b05c95..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IcuCollationProperty.g.cs +++ /dev/null @@ -1,905 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class IcuCollationProperty : IProperty -{ - [JsonInclude, JsonPropertyName("alternate")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? Alternate { get; set; } - [JsonInclude, JsonPropertyName("case_first")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirst { get; set; } - [JsonInclude, JsonPropertyName("case_level")] - public bool? CaseLevel { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("country")] - public string? Country { get; set; } - [JsonInclude, JsonPropertyName("decomposition")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? Decomposition { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("hiragana_quaternary_mode")] - public bool? HiraganaQuaternaryMode { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Should the field be searchable? - /// - /// - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } - [JsonInclude, JsonPropertyName("language")] - public string? Language { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("norms")] - public bool? Norms { get; set; } - - /// - /// - /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. - /// - /// - [JsonInclude, JsonPropertyName("null_value")] - public string? NullValue { get; set; } - [JsonInclude, JsonPropertyName("numeric")] - public bool? Numeric { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("rules")] - public string? Rules { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("strength")] - public Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? Strength { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "icu_collation_keyword"; - - [JsonInclude, JsonPropertyName("variable_top")] - public string? VariableTop { get; set; } - [JsonInclude, JsonPropertyName("variant")] - public string? Variant { get; set; } -} - -public sealed partial class IcuCollationPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal IcuCollationPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public IcuCollationPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } - private bool? CaseLevelValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private string? CountryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private bool? HiraganaQuaternaryModeValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private string? LanguageValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private string? NullValueValue { get; set; } - private bool? NumericValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? RulesValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } - private string? VariableTopValue { get; set; } - private string? VariantValue { get; set; } - - public IcuCollationPropertyDescriptor Alternate(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? alternate) - { - AlternateValue = alternate; - return Self; - } - - public IcuCollationPropertyDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst) - { - CaseFirstValue = caseFirst; - return Self; - } - - public IcuCollationPropertyDescriptor CaseLevel(bool? caseLevel = true) - { - CaseLevelValue = caseLevel; - return Self; - } - - public IcuCollationPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IcuCollationPropertyDescriptor Country(string? country) - { - CountryValue = country; - return Self; - } - - public IcuCollationPropertyDescriptor Decomposition(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? decomposition) - { - DecompositionValue = decomposition; - return Self; - } - - public IcuCollationPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IcuCollationPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) - { - HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; - return Self; - } - - public IcuCollationPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Should the field be searchable? - /// - /// - public IcuCollationPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public IcuCollationPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public IcuCollationPropertyDescriptor Language(string? language) - { - LanguageValue = language; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IcuCollationPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IcuCollationPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - /// - /// - /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. - /// - /// - public IcuCollationPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public IcuCollationPropertyDescriptor Numeric(bool? numeric = true) - { - NumericValue = numeric; - return Self; - } - - public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor Rules(string? rules) - { - RulesValue = rules; - return Self; - } - - public IcuCollationPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? strength) - { - StrengthValue = strength; - return Self; - } - - public IcuCollationPropertyDescriptor VariableTop(string? variableTop) - { - VariableTopValue = variableTop; - return Self; - } - - public IcuCollationPropertyDescriptor Variant(string? variant) - { - VariantValue = variant; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlternateValue is not null) - { - writer.WritePropertyName("alternate"); - JsonSerializer.Serialize(writer, AlternateValue, options); - } - - if (CaseFirstValue is not null) - { - writer.WritePropertyName("case_first"); - JsonSerializer.Serialize(writer, CaseFirstValue, options); - } - - if (CaseLevelValue.HasValue) - { - writer.WritePropertyName("case_level"); - writer.WriteBooleanValue(CaseLevelValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (!string.IsNullOrEmpty(CountryValue)) - { - writer.WritePropertyName("country"); - writer.WriteStringValue(CountryValue); - } - - if (DecompositionValue is not null) - { - writer.WritePropertyName("decomposition"); - JsonSerializer.Serialize(writer, DecompositionValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (HiraganaQuaternaryModeValue.HasValue) - { - writer.WritePropertyName("hiragana_quaternary_mode"); - writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (!string.IsNullOrEmpty(LanguageValue)) - { - writer.WritePropertyName("language"); - writer.WriteStringValue(LanguageValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (NumericValue.HasValue) - { - writer.WritePropertyName("numeric"); - writer.WriteBooleanValue(NumericValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(RulesValue)) - { - writer.WritePropertyName("rules"); - writer.WriteStringValue(RulesValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (StrengthValue is not null) - { - writer.WritePropertyName("strength"); - JsonSerializer.Serialize(writer, StrengthValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_collation_keyword"); - if (!string.IsNullOrEmpty(VariableTopValue)) - { - writer.WritePropertyName("variable_top"); - writer.WriteStringValue(VariableTopValue); - } - - if (!string.IsNullOrEmpty(VariantValue)) - { - writer.WritePropertyName("variant"); - writer.WriteStringValue(VariantValue); - } - - writer.WriteEndObject(); - } - - IcuCollationProperty IBuildableDescriptor.Build() => new() - { - Alternate = AlternateValue, - CaseFirst = CaseFirstValue, - CaseLevel = CaseLevelValue, - CopyTo = CopyToValue, - Country = CountryValue, - Decomposition = DecompositionValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - Language = LanguageValue, - Meta = MetaValue, - Norms = NormsValue, - NullValue = NullValueValue, - Numeric = NumericValue, - Properties = PropertiesValue, - Rules = RulesValue, - Store = StoreValue, - Strength = StrengthValue, - VariableTop = VariableTopValue, - Variant = VariantValue - }; -} - -public sealed partial class IcuCollationPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IcuCollationPropertyDescriptor(Action configure) => configure.Invoke(this); - - public IcuCollationPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? AlternateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? CaseFirstValue { get; set; } - private bool? CaseLevelValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private string? CountryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? DecompositionValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private bool? HiraganaQuaternaryModeValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private string? LanguageValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private string? NullValueValue { get; set; } - private bool? NumericValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? RulesValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? StrengthValue { get; set; } - private string? VariableTopValue { get; set; } - private string? VariantValue { get; set; } - - public IcuCollationPropertyDescriptor Alternate(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationAlternate? alternate) - { - AlternateValue = alternate; - return Self; - } - - public IcuCollationPropertyDescriptor CaseFirst(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationCaseFirst? caseFirst) - { - CaseFirstValue = caseFirst; - return Self; - } - - public IcuCollationPropertyDescriptor CaseLevel(bool? caseLevel = true) - { - CaseLevelValue = caseLevel; - return Self; - } - - public IcuCollationPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IcuCollationPropertyDescriptor Country(string? country) - { - CountryValue = country; - return Self; - } - - public IcuCollationPropertyDescriptor Decomposition(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationDecomposition? decomposition) - { - DecompositionValue = decomposition; - return Self; - } - - public IcuCollationPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IcuCollationPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IcuCollationPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor HiraganaQuaternaryMode(bool? hiraganaQuaternaryMode = true) - { - HiraganaQuaternaryModeValue = hiraganaQuaternaryMode; - return Self; - } - - public IcuCollationPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Should the field be searchable? - /// - /// - public IcuCollationPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public IcuCollationPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public IcuCollationPropertyDescriptor Language(string? language) - { - LanguageValue = language; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IcuCollationPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IcuCollationPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - /// - /// - /// Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. - /// - /// - public IcuCollationPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public IcuCollationPropertyDescriptor Numeric(bool? numeric = true) - { - NumericValue = numeric; - return Self; - } - - public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IcuCollationPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IcuCollationPropertyDescriptor Rules(string? rules) - { - RulesValue = rules; - return Self; - } - - public IcuCollationPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuCollationStrength? strength) - { - StrengthValue = strength; - return Self; - } - - public IcuCollationPropertyDescriptor VariableTop(string? variableTop) - { - VariableTopValue = variableTop; - return Self; - } - - public IcuCollationPropertyDescriptor Variant(string? variant) - { - VariantValue = variant; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlternateValue is not null) - { - writer.WritePropertyName("alternate"); - JsonSerializer.Serialize(writer, AlternateValue, options); - } - - if (CaseFirstValue is not null) - { - writer.WritePropertyName("case_first"); - JsonSerializer.Serialize(writer, CaseFirstValue, options); - } - - if (CaseLevelValue.HasValue) - { - writer.WritePropertyName("case_level"); - writer.WriteBooleanValue(CaseLevelValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (!string.IsNullOrEmpty(CountryValue)) - { - writer.WritePropertyName("country"); - writer.WriteStringValue(CountryValue); - } - - if (DecompositionValue is not null) - { - writer.WritePropertyName("decomposition"); - JsonSerializer.Serialize(writer, DecompositionValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (HiraganaQuaternaryModeValue.HasValue) - { - writer.WritePropertyName("hiragana_quaternary_mode"); - writer.WriteBooleanValue(HiraganaQuaternaryModeValue.Value); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (!string.IsNullOrEmpty(LanguageValue)) - { - writer.WritePropertyName("language"); - writer.WriteStringValue(LanguageValue); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (NumericValue.HasValue) - { - writer.WritePropertyName("numeric"); - writer.WriteBooleanValue(NumericValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(RulesValue)) - { - writer.WritePropertyName("rules"); - writer.WriteStringValue(RulesValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (StrengthValue is not null) - { - writer.WritePropertyName("strength"); - JsonSerializer.Serialize(writer, StrengthValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("icu_collation_keyword"); - if (!string.IsNullOrEmpty(VariableTopValue)) - { - writer.WritePropertyName("variable_top"); - writer.WriteStringValue(VariableTopValue); - } - - if (!string.IsNullOrEmpty(VariantValue)) - { - writer.WritePropertyName("variant"); - writer.WriteStringValue(VariantValue); - } - - writer.WriteEndObject(); - } - - IcuCollationProperty IBuildableDescriptor.Build() => new() - { - Alternate = AlternateValue, - CaseFirst = CaseFirstValue, - CaseLevel = CaseLevelValue, - CopyTo = CopyToValue, - Country = CountryValue, - Decomposition = DecompositionValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - HiraganaQuaternaryMode = HiraganaQuaternaryModeValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - Language = LanguageValue, - Meta = MetaValue, - Norms = NormsValue, - NullValue = NullValueValue, - Numeric = NumericValue, - Properties = PropertiesValue, - Rules = RulesValue, - Store = StoreValue, - Strength = StrengthValue, - VariableTop = VariableTopValue, - Variant = VariantValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IndexField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IndexField.g.cs deleted file mode 100644 index 1761195b7f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IndexField.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class IndexField -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } -} - -public sealed partial class IndexFieldDescriptor : SerializableDescriptor -{ - internal IndexFieldDescriptor(Action configure) => configure.Invoke(this); - - public IndexFieldDescriptor() : base() - { - } - - private bool EnabledValue { get; set; } - - public IndexFieldDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs deleted file mode 100644 index 508c776da51..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class IntegerNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public int? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "integer"; -} - -public sealed partial class IntegerNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal IntegerNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public IntegerNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public IntegerNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IntegerNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public IntegerNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IntegerNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IntegerNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IntegerNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IntegerNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IntegerNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public IntegerNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IntegerNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IntegerNumberPropertyDescriptor NullValue(int? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public IntegerNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public IntegerNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IntegerNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public IntegerNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public IntegerNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public IntegerNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("integer"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - IntegerNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class IntegerNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IntegerNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public IntegerNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public IntegerNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IntegerNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public IntegerNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IntegerNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IntegerNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IntegerNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IntegerNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IntegerNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public IntegerNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IntegerNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IntegerNumberPropertyDescriptor NullValue(int? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public IntegerNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public IntegerNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IntegerNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public IntegerNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public IntegerNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public IntegerNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("integer"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - IntegerNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerRangeProperty.g.cs deleted file mode 100644 index 3f5480fa605..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IntegerRangeProperty.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class IntegerRangeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "integer_range"; -} - -public sealed partial class IntegerRangePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal IntegerRangePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public IntegerRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public IntegerRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IntegerRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public IntegerRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IntegerRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IntegerRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IntegerRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IntegerRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IntegerRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IntegerRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IntegerRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IntegerRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("integer_range"); - writer.WriteEndObject(); - } - - IntegerRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class IntegerRangePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IntegerRangePropertyDescriptor(Action configure) => configure.Invoke(this); - - public IntegerRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public IntegerRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IntegerRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public IntegerRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IntegerRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IntegerRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IntegerRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IntegerRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IntegerRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IntegerRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IntegerRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IntegerRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IntegerRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("integer_range"); - writer.WriteEndObject(); - } - - IntegerRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpProperty.g.cs deleted file mode 100644 index adffb9e4746..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpProperty.g.cs +++ /dev/null @@ -1,680 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class IpProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public string? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "ip"; -} - -public sealed partial class IpPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal IpPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public IpPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public IpPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IpPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IpPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IpPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IpPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IpPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IpPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public IpPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IpPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public IpPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public IpPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IpPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public IpPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public IpPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public IpPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("ip"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - IpProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class IpPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IpPropertyDescriptor(Action configure) => configure.Invoke(this); - - public IpPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public IpPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IpPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IpPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IpPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IpPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IpPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IpPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public IpPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IpPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public IpPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public IpPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IpPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public IpPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public IpPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public IpPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("ip"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - IpProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpRangeProperty.g.cs deleted file mode 100644 index e8bb6651899..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/IpRangeProperty.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class IpRangeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "ip_range"; -} - -public sealed partial class IpRangePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal IpRangePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public IpRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public IpRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IpRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public IpRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IpRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IpRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IpRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IpRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IpRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IpRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IpRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("ip_range"); - writer.WriteEndObject(); - } - - IpRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class IpRangePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal IpRangePropertyDescriptor(Action configure) => configure.Invoke(this); - - public IpRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public IpRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public IpRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public IpRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public IpRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public IpRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public IpRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public IpRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public IpRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public IpRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public IpRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public IpRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("ip_range"); - writer.WriteEndObject(); - } - - IpRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/JoinProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/JoinProperty.g.cs deleted file mode 100644 index 55736e7eda3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/JoinProperty.g.cs +++ /dev/null @@ -1,361 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class JoinProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("eager_global_ordinals")] - public bool? EagerGlobalOrdinals { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("relations")] - public IDictionary>>? Relations { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "join"; -} - -public sealed partial class JoinPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal JoinPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public JoinPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary>>? RelationsValue { get; set; } - - public JoinPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public JoinPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public JoinPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public JoinPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public JoinPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public JoinPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public JoinPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor Relations(Func>>, FluentDictionary>>> selector) - { - RelationsValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RelationsValue is not null) - { - writer.WritePropertyName("relations"); - JsonSerializer.Serialize(writer, RelationsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("join"); - writer.WriteEndObject(); - } - - JoinProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Relations = RelationsValue - }; -} - -public sealed partial class JoinPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal JoinPropertyDescriptor(Action configure) => configure.Invoke(this); - - public JoinPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private IDictionary>>? RelationsValue { get; set; } - - public JoinPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public JoinPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public JoinPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public JoinPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public JoinPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public JoinPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public JoinPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public JoinPropertyDescriptor Relations(Func>>, FluentDictionary>>> selector) - { - RelationsValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RelationsValue is not null) - { - writer.WritePropertyName("relations"); - JsonSerializer.Serialize(writer, RelationsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("join"); - writer.WriteEndObject(); - } - - JoinProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Relations = RelationsValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/KeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/KeywordProperty.g.cs deleted file mode 100644 index 2d120c42c28..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/KeywordProperty.g.cs +++ /dev/null @@ -1,830 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class KeywordProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("eager_global_ordinals")] - public bool? EagerGlobalOrdinals { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("normalizer")] - public string? Normalizer { get; set; } - [JsonInclude, JsonPropertyName("norms")] - public bool? Norms { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public string? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } - [JsonInclude, JsonPropertyName("split_queries_on_whitespace")] - public bool? SplitQueriesOnWhitespace { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "keyword"; -} - -public sealed partial class KeywordPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal KeywordPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public KeywordPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NormalizerValue { get; set; } - private bool? NormsValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } - private bool? SplitQueriesOnWhitespaceValue { get; set; } - private bool? StoreValue { get; set; } - - public KeywordPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public KeywordPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public KeywordPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public KeywordPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public KeywordPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public KeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public KeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public KeywordPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public KeywordPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public KeywordPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public KeywordPropertyDescriptor Normalizer(string? normalizer) - { - NormalizerValue = normalizer; - return Self; - } - - public KeywordPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public KeywordPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public KeywordPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public KeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public KeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public KeywordPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public KeywordPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public KeywordPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public KeywordPropertyDescriptor SplitQueriesOnWhitespace(bool? splitQueriesOnWhitespace = true) - { - SplitQueriesOnWhitespaceValue = splitQueriesOnWhitespace; - return Self; - } - - public KeywordPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NormalizerValue)) - { - writer.WritePropertyName("normalizer"); - writer.WriteStringValue(NormalizerValue); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (SplitQueriesOnWhitespaceValue.HasValue) - { - writer.WritePropertyName("split_queries_on_whitespace"); - writer.WriteBooleanValue(SplitQueriesOnWhitespaceValue.Value); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("keyword"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - KeywordProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - Meta = MetaValue, - Normalizer = NormalizerValue, - Norms = NormsValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Similarity = SimilarityValue, - SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue, - Store = StoreValue - }; -} - -public sealed partial class KeywordPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal KeywordPropertyDescriptor(Action configure) => configure.Invoke(this); - - public KeywordPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NormalizerValue { get; set; } - private bool? NormsValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private string? SimilarityValue { get; set; } - private bool? SplitQueriesOnWhitespaceValue { get; set; } - private bool? StoreValue { get; set; } - - public KeywordPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public KeywordPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public KeywordPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public KeywordPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public KeywordPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public KeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public KeywordPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public KeywordPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public KeywordPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public KeywordPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public KeywordPropertyDescriptor Normalizer(string? normalizer) - { - NormalizerValue = normalizer; - return Self; - } - - public KeywordPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public KeywordPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public KeywordPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public KeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public KeywordPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public KeywordPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public KeywordPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public KeywordPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public KeywordPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public KeywordPropertyDescriptor SplitQueriesOnWhitespace(bool? splitQueriesOnWhitespace = true) - { - SplitQueriesOnWhitespaceValue = splitQueriesOnWhitespace; - return Self; - } - - public KeywordPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NormalizerValue)) - { - writer.WritePropertyName("normalizer"); - writer.WriteStringValue(NormalizerValue); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (SplitQueriesOnWhitespaceValue.HasValue) - { - writer.WritePropertyName("split_queries_on_whitespace"); - writer.WriteBooleanValue(SplitQueriesOnWhitespaceValue.Value); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("keyword"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - KeywordProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - Meta = MetaValue, - Normalizer = NormalizerValue, - Norms = NormsValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Similarity = SimilarityValue, - SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongNumberProperty.g.cs deleted file mode 100644 index b96b7870eef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class LongNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public long? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "long"; -} - -public sealed partial class LongNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal LongNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public LongNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public LongNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public LongNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public LongNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public LongNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public LongNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public LongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public LongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public LongNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public LongNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public LongNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public LongNumberPropertyDescriptor NullValue(long? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public LongNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public LongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public LongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public LongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public LongNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public LongNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("long"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - LongNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class LongNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LongNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public LongNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public LongNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public LongNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public LongNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public LongNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public LongNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public LongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public LongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public LongNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public LongNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public LongNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public LongNumberPropertyDescriptor NullValue(long? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public LongNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public LongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public LongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public LongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public LongNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public LongNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("long"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - LongNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongRangeProperty.g.cs deleted file mode 100644 index 8237b58c9eb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/LongRangeProperty.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class LongRangeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "long_range"; -} - -public sealed partial class LongRangePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal LongRangePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public LongRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public LongRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public LongRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public LongRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public LongRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public LongRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public LongRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public LongRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public LongRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public LongRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public LongRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public LongRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("long_range"); - writer.WriteEndObject(); - } - - LongRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class LongRangePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal LongRangePropertyDescriptor(Action configure) => configure.Invoke(this); - - public LongRangePropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public LongRangePropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public LongRangePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public LongRangePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public LongRangePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public LongRangePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public LongRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public LongRangePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public LongRangePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public LongRangePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public LongRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public LongRangePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public LongRangePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("long_range"); - writer.WriteEndObject(); - } - - LongRangeProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs deleted file mode 100644 index 25409117667..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/MatchOnlyTextProperty.g.cs +++ /dev/null @@ -1,278 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -/// -/// -/// A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field -/// effectively stores data the same way as a text field that only indexes documents (index_options: docs) and -/// disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries -/// that need positions such as the match_phrase query perform slower as they need to look at the _source document -/// to verify whether a phrase matches. All queries return constant scores that are equal to 1.0. -/// -/// -public sealed partial class MatchOnlyTextProperty : IProperty -{ - /// - /// - /// Allows you to copy the values of multiple fields into a group - /// field, which can then be queried as a single field. - /// - /// - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - - /// - /// - /// Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one - /// field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "match_only_text"; -} - -/// -/// -/// A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field -/// effectively stores data the same way as a text field that only indexes documents (index_options: docs) and -/// disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries -/// that need positions such as the match_phrase query perform slower as they need to look at the _source document -/// to verify whether a phrase matches. All queries return constant scores that are equal to 1.0. -/// -/// -public sealed partial class MatchOnlyTextPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal MatchOnlyTextPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public MatchOnlyTextPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private IDictionary? MetaValue { get; set; } - - /// - /// - /// Allows you to copy the values of multiple fields into a group - /// field, which can then be queried as a single field. - /// - /// - public MatchOnlyTextPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - /// - /// - /// Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one - /// field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers. - /// - /// - public MatchOnlyTextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public MatchOnlyTextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public MatchOnlyTextPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public MatchOnlyTextPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("match_only_text"); - writer.WriteEndObject(); - } - - MatchOnlyTextProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Fields = FieldsValue, - Meta = MetaValue - }; -} - -/// -/// -/// A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field -/// effectively stores data the same way as a text field that only indexes documents (index_options: docs) and -/// disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries -/// that need positions such as the match_phrase query perform slower as they need to look at the _source document -/// to verify whether a phrase matches. All queries return constant scores that are equal to 1.0. -/// -/// -public sealed partial class MatchOnlyTextPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal MatchOnlyTextPropertyDescriptor(Action configure) => configure.Invoke(this); - - public MatchOnlyTextPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private IDictionary? MetaValue { get; set; } - - /// - /// - /// Allows you to copy the values of multiple fields into a group - /// field, which can then be queried as a single field. - /// - /// - public MatchOnlyTextPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - /// - /// - /// Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one - /// field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers. - /// - /// - public MatchOnlyTextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public MatchOnlyTextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public MatchOnlyTextPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public MatchOnlyTextPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("match_only_text"); - writer.WriteEndObject(); - } - - MatchOnlyTextProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Fields = FieldsValue, - Meta = MetaValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Murmur3HashProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Murmur3HashProperty.g.cs deleted file mode 100644 index 5c7491fbe11..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Murmur3HashProperty.g.cs +++ /dev/null @@ -1,392 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class Murmur3HashProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "murmur3"; -} - -public sealed partial class Murmur3HashPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal Murmur3HashPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public Murmur3HashPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public Murmur3HashPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public Murmur3HashPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public Murmur3HashPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public Murmur3HashPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public Murmur3HashPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public Murmur3HashPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public Murmur3HashPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("murmur3"); - writer.WriteEndObject(); - } - - Murmur3HashProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class Murmur3HashPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal Murmur3HashPropertyDescriptor(Action configure) => configure.Invoke(this); - - public Murmur3HashPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public Murmur3HashPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public Murmur3HashPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public Murmur3HashPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public Murmur3HashPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public Murmur3HashPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public Murmur3HashPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public Murmur3HashPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public Murmur3HashPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("murmur3"); - writer.WriteEndObject(); - } - - Murmur3HashProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/NestedProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/NestedProperty.g.cs deleted file mode 100644 index e632c686608..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/NestedProperty.g.cs +++ /dev/null @@ -1,452 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class NestedProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("include_in_parent")] - public bool? IncludeInParent { get; set; } - [JsonInclude, JsonPropertyName("include_in_root")] - public bool? IncludeInRoot { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "nested"; -} - -public sealed partial class NestedPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal NestedPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public NestedPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IncludeInParentValue { get; set; } - private bool? IncludeInRootValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public NestedPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public NestedPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public NestedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public NestedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public NestedPropertyDescriptor IncludeInParent(bool? includeInParent = true) - { - IncludeInParentValue = includeInParent; - return Self; - } - - public NestedPropertyDescriptor IncludeInRoot(bool? includeInRoot = true) - { - IncludeInRootValue = includeInRoot; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public NestedPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public NestedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public NestedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IncludeInParentValue.HasValue) - { - writer.WritePropertyName("include_in_parent"); - writer.WriteBooleanValue(IncludeInParentValue.Value); - } - - if (IncludeInRootValue.HasValue) - { - writer.WritePropertyName("include_in_root"); - writer.WriteBooleanValue(IncludeInRootValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("nested"); - writer.WriteEndObject(); - } - - NestedProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IncludeInParent = IncludeInParentValue, - IncludeInRoot = IncludeInRootValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class NestedPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal NestedPropertyDescriptor(Action configure) => configure.Invoke(this); - - public NestedPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IncludeInParentValue { get; set; } - private bool? IncludeInRootValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public NestedPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public NestedPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public NestedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public NestedPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public NestedPropertyDescriptor IncludeInParent(bool? includeInParent = true) - { - IncludeInParentValue = includeInParent; - return Self; - } - - public NestedPropertyDescriptor IncludeInRoot(bool? includeInRoot = true) - { - IncludeInRootValue = includeInRoot; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public NestedPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public NestedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public NestedPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public NestedPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IncludeInParentValue.HasValue) - { - writer.WritePropertyName("include_in_parent"); - writer.WriteBooleanValue(IncludeInParentValue.Value); - } - - if (IncludeInRootValue.HasValue) - { - writer.WritePropertyName("include_in_root"); - writer.WriteBooleanValue(IncludeInRootValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("nested"); - writer.WriteEndObject(); - } - - NestedProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IncludeInParent = IncludeInParentValue, - IncludeInRoot = IncludeInRootValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ObjectProperty.g.cs deleted file mode 100644 index 39d02cbef85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ObjectProperty.g.cs +++ /dev/null @@ -1,422 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class ObjectProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("subobjects")] - public bool? Subobjects { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "object"; -} - -public sealed partial class ObjectPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal ObjectPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public ObjectPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private bool? SubobjectsValue { get; set; } - - public ObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ObjectPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ObjectPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public ObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ObjectPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public ObjectPropertyDescriptor Subobjects(bool? subobjects = true) - { - SubobjectsValue = subobjects; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (SubobjectsValue.HasValue) - { - writer.WritePropertyName("subobjects"); - writer.WriteBooleanValue(SubobjectsValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("object"); - writer.WriteEndObject(); - } - - ObjectProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue, - Subobjects = SubobjectsValue - }; -} - -public sealed partial class ObjectPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ObjectPropertyDescriptor(Action configure) => configure.Invoke(this); - - public ObjectPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private bool? SubobjectsValue { get; set; } - - public ObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ObjectPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ObjectPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public ObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ObjectPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ObjectPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public ObjectPropertyDescriptor Subobjects(bool? subobjects = true) - { - SubobjectsValue = subobjects; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (SubobjectsValue.HasValue) - { - writer.WritePropertyName("subobjects"); - writer.WriteBooleanValue(SubobjectsValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("object"); - writer.WriteEndObject(); - } - - ObjectProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue, - Subobjects = SubobjectsValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs deleted file mode 100644 index d7451d3544d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs +++ /dev/null @@ -1,452 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class PassthroughObjectProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("time_series_dimension")] - public bool? TimeSeriesDimension { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "passthrough"; -} - -public sealed partial class PassthroughObjectPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal PassthroughObjectPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public PassthroughObjectPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private bool? TimeSeriesDimensionValue { get; set; } - - public PassthroughObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public PassthroughObjectPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PassthroughObjectPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PassthroughObjectPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PassthroughObjectPropertyDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public PassthroughObjectPropertyDescriptor TimeSeriesDimension(bool? timeSeriesDimension = true) - { - TimeSeriesDimensionValue = timeSeriesDimension; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TimeSeriesDimensionValue.HasValue) - { - writer.WritePropertyName("time_series_dimension"); - writer.WriteBooleanValue(TimeSeriesDimensionValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("passthrough"); - writer.WriteEndObject(); - } - - PassthroughObjectProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Priority = PriorityValue, - Properties = PropertiesValue, - Store = StoreValue, - TimeSeriesDimension = TimeSeriesDimensionValue - }; -} - -public sealed partial class PassthroughObjectPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PassthroughObjectPropertyDescriptor(Action configure) => configure.Invoke(this); - - public PassthroughObjectPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private bool? TimeSeriesDimensionValue { get; set; } - - public PassthroughObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public PassthroughObjectPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PassthroughObjectPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PassthroughObjectPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PassthroughObjectPropertyDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public PassthroughObjectPropertyDescriptor TimeSeriesDimension(bool? timeSeriesDimension = true) - { - TimeSeriesDimensionValue = timeSeriesDimension; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TimeSeriesDimensionValue.HasValue) - { - writer.WritePropertyName("time_series_dimension"); - writer.WriteBooleanValue(TimeSeriesDimensionValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("passthrough"); - writer.WriteEndObject(); - } - - PassthroughObjectProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Priority = PriorityValue, - Properties = PropertiesValue, - Store = StoreValue, - TimeSeriesDimension = TimeSeriesDimensionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PercolatorProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PercolatorProperty.g.cs deleted file mode 100644 index 444ced0fdfd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PercolatorProperty.g.cs +++ /dev/null @@ -1,301 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class PercolatorProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "percolator"; -} - -public sealed partial class PercolatorPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal PercolatorPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public PercolatorPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public PercolatorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PercolatorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PercolatorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PercolatorPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PercolatorPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PercolatorPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PercolatorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PercolatorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PercolatorPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("percolator"); - writer.WriteEndObject(); - } - - PercolatorProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue - }; -} - -public sealed partial class PercolatorPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PercolatorPropertyDescriptor(Action configure) => configure.Invoke(this); - - public PercolatorPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public PercolatorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PercolatorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PercolatorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PercolatorPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PercolatorPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PercolatorPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PercolatorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PercolatorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PercolatorPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("percolator"); - writer.WriteEndObject(); - } - - PercolatorProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PointProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PointProperty.g.cs deleted file mode 100644 index 5dae9fbd8da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/PointProperty.g.cs +++ /dev/null @@ -1,482 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class PointProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("ignore_z_value")] - public bool? IgnoreZValue { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public string? NullValue { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "point"; -} - -public sealed partial class PointPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal PointPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public PointPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public PointPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public PointPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public PointPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public PointPropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PointPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PointPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public PointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("point"); - writer.WriteEndObject(); - } - - PointProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class PointPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PointPropertyDescriptor(Action configure) => configure.Invoke(this); - - public PointPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public PointPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public PointPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PointPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public PointPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public PointPropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PointPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PointPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public PointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PointPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("point"); - writer.WriteEndObject(); - } - - PointProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs deleted file mode 100644 index 1b9d4985eae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs +++ /dev/null @@ -1,612 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public partial class Properties : IsADictionary -{ - public Properties() - { - } - - public Properties(IDictionary container) : base(container) - { - } - - public void Add(Elastic.Clients.Elasticsearch.Serverless.PropertyName name, IProperty property) => BackingDictionary.Add(Sanitize(name), property); - public bool TryGetProperty(Elastic.Clients.Elasticsearch.Serverless.PropertyName name, [NotNullWhen(returnValue: true)] out IProperty property) => BackingDictionary.TryGetValue(Sanitize(name), out property); - - public bool TryGetProperty(Elastic.Clients.Elasticsearch.Serverless.PropertyName name, [NotNullWhen(returnValue: true)] out T? property) where T : class, IProperty - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - property = finalValue; - return true; - } - - property = null; - return false; - } -} - -public sealed partial class PropertiesDescriptor : IsADictionaryDescriptor, Properties, Elastic.Clients.Elasticsearch.Serverless.PropertyName, IProperty> -{ - public PropertiesDescriptor() : base(new Properties()) - { - } - - public PropertiesDescriptor(Properties properties) : base(properties ?? new Properties()) - { - } - - public PropertiesDescriptor AggregateMetricDouble(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, AggregateMetricDoubleProperty>(propertyName, null); - public PropertiesDescriptor AggregateMetricDouble(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, AggregateMetricDoubleProperty>(propertyName, configure); - public PropertiesDescriptor AggregateMetricDouble(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, AggregateMetricDoubleProperty aggregateMetricDoubleProperty) => AssignVariant(propertyName, aggregateMetricDoubleProperty); - public PropertiesDescriptor AggregateMetricDouble(Expression> propertyName) => AssignVariant, AggregateMetricDoubleProperty>(propertyName, null); - public PropertiesDescriptor AggregateMetricDouble(Expression> propertyName, Action> configure) => AssignVariant, AggregateMetricDoubleProperty>(propertyName, configure); - public PropertiesDescriptor Binary(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, BinaryProperty>(propertyName, null); - public PropertiesDescriptor Binary(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, BinaryProperty>(propertyName, configure); - public PropertiesDescriptor Binary(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, BinaryProperty binaryProperty) => AssignVariant(propertyName, binaryProperty); - public PropertiesDescriptor Binary(Expression> propertyName) => AssignVariant, BinaryProperty>(propertyName, null); - public PropertiesDescriptor Binary(Expression> propertyName, Action> configure) => AssignVariant, BinaryProperty>(propertyName, configure); - public PropertiesDescriptor Boolean(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, BooleanProperty>(propertyName, null); - public PropertiesDescriptor Boolean(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, BooleanProperty>(propertyName, configure); - public PropertiesDescriptor Boolean(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, BooleanProperty booleanProperty) => AssignVariant(propertyName, booleanProperty); - public PropertiesDescriptor Boolean(Expression> propertyName) => AssignVariant, BooleanProperty>(propertyName, null); - public PropertiesDescriptor Boolean(Expression> propertyName, Action> configure) => AssignVariant, BooleanProperty>(propertyName, configure); - public PropertiesDescriptor ByteNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, ByteNumberProperty>(propertyName, null); - public PropertiesDescriptor ByteNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, ByteNumberProperty>(propertyName, configure); - public PropertiesDescriptor ByteNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, ByteNumberProperty byteNumberProperty) => AssignVariant(propertyName, byteNumberProperty); - public PropertiesDescriptor ByteNumber(Expression> propertyName) => AssignVariant, ByteNumberProperty>(propertyName, null); - public PropertiesDescriptor ByteNumber(Expression> propertyName, Action> configure) => AssignVariant, ByteNumberProperty>(propertyName, configure); - public PropertiesDescriptor Completion(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, CompletionProperty>(propertyName, null); - public PropertiesDescriptor Completion(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, CompletionProperty>(propertyName, configure); - public PropertiesDescriptor Completion(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, CompletionProperty completionProperty) => AssignVariant(propertyName, completionProperty); - public PropertiesDescriptor Completion(Expression> propertyName) => AssignVariant, CompletionProperty>(propertyName, null); - public PropertiesDescriptor Completion(Expression> propertyName, Action> configure) => AssignVariant, CompletionProperty>(propertyName, configure); - public PropertiesDescriptor ConstantKeyword(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, ConstantKeywordProperty>(propertyName, null); - public PropertiesDescriptor ConstantKeyword(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, ConstantKeywordProperty>(propertyName, configure); - public PropertiesDescriptor ConstantKeyword(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, ConstantKeywordProperty constantKeywordProperty) => AssignVariant(propertyName, constantKeywordProperty); - public PropertiesDescriptor ConstantKeyword(Expression> propertyName) => AssignVariant, ConstantKeywordProperty>(propertyName, null); - public PropertiesDescriptor ConstantKeyword(Expression> propertyName, Action> configure) => AssignVariant, ConstantKeywordProperty>(propertyName, configure); - public PropertiesDescriptor DateNanos(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DateNanosProperty>(propertyName, null); - public PropertiesDescriptor DateNanos(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DateNanosProperty>(propertyName, configure); - public PropertiesDescriptor DateNanos(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DateNanosProperty dateNanosProperty) => AssignVariant(propertyName, dateNanosProperty); - public PropertiesDescriptor DateNanos(Expression> propertyName) => AssignVariant, DateNanosProperty>(propertyName, null); - public PropertiesDescriptor DateNanos(Expression> propertyName, Action> configure) => AssignVariant, DateNanosProperty>(propertyName, configure); - public PropertiesDescriptor Date(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DateProperty>(propertyName, null); - public PropertiesDescriptor Date(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DateProperty>(propertyName, configure); - public PropertiesDescriptor Date(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DateProperty dateProperty) => AssignVariant(propertyName, dateProperty); - public PropertiesDescriptor Date(Expression> propertyName) => AssignVariant, DateProperty>(propertyName, null); - public PropertiesDescriptor Date(Expression> propertyName, Action> configure) => AssignVariant, DateProperty>(propertyName, configure); - public PropertiesDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DateRangeProperty>(propertyName, null); - public PropertiesDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DateRangeProperty>(propertyName, configure); - public PropertiesDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DateRangeProperty dateRangeProperty) => AssignVariant(propertyName, dateRangeProperty); - public PropertiesDescriptor DateRange(Expression> propertyName) => AssignVariant, DateRangeProperty>(propertyName, null); - public PropertiesDescriptor DateRange(Expression> propertyName, Action> configure) => AssignVariant, DateRangeProperty>(propertyName, configure); - public PropertiesDescriptor DenseVector(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DenseVectorProperty>(propertyName, null); - public PropertiesDescriptor DenseVector(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DenseVectorProperty>(propertyName, configure); - public PropertiesDescriptor DenseVector(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DenseVectorProperty denseVectorProperty) => AssignVariant(propertyName, denseVectorProperty); - public PropertiesDescriptor DenseVector(Expression> propertyName) => AssignVariant, DenseVectorProperty>(propertyName, null); - public PropertiesDescriptor DenseVector(Expression> propertyName, Action> configure) => AssignVariant, DenseVectorProperty>(propertyName, configure); - public PropertiesDescriptor DoubleNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DoubleNumberProperty>(propertyName, null); - public PropertiesDescriptor DoubleNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DoubleNumberProperty>(propertyName, configure); - public PropertiesDescriptor DoubleNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DoubleNumberProperty doubleNumberProperty) => AssignVariant(propertyName, doubleNumberProperty); - public PropertiesDescriptor DoubleNumber(Expression> propertyName) => AssignVariant, DoubleNumberProperty>(propertyName, null); - public PropertiesDescriptor DoubleNumber(Expression> propertyName, Action> configure) => AssignVariant, DoubleNumberProperty>(propertyName, configure); - public PropertiesDescriptor DoubleRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DoubleRangeProperty>(propertyName, null); - public PropertiesDescriptor DoubleRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DoubleRangeProperty>(propertyName, configure); - public PropertiesDescriptor DoubleRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DoubleRangeProperty doubleRangeProperty) => AssignVariant(propertyName, doubleRangeProperty); - public PropertiesDescriptor DoubleRange(Expression> propertyName) => AssignVariant, DoubleRangeProperty>(propertyName, null); - public PropertiesDescriptor DoubleRange(Expression> propertyName, Action> configure) => AssignVariant, DoubleRangeProperty>(propertyName, configure); - public PropertiesDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, DynamicProperty>(propertyName, null); - public PropertiesDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, DynamicProperty>(propertyName, configure); - public PropertiesDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, DynamicProperty dynamicProperty) => AssignVariant(propertyName, dynamicProperty); - public PropertiesDescriptor Dynamic(Expression> propertyName) => AssignVariant, DynamicProperty>(propertyName, null); - public PropertiesDescriptor Dynamic(Expression> propertyName, Action> configure) => AssignVariant, DynamicProperty>(propertyName, configure); - public PropertiesDescriptor FieldAlias(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, FieldAliasProperty>(propertyName, null); - public PropertiesDescriptor FieldAlias(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, FieldAliasProperty>(propertyName, configure); - public PropertiesDescriptor FieldAlias(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, FieldAliasProperty fieldAliasProperty) => AssignVariant(propertyName, fieldAliasProperty); - public PropertiesDescriptor FieldAlias(Expression> propertyName) => AssignVariant, FieldAliasProperty>(propertyName, null); - public PropertiesDescriptor FieldAlias(Expression> propertyName, Action> configure) => AssignVariant, FieldAliasProperty>(propertyName, configure); - public PropertiesDescriptor Flattened(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, FlattenedProperty>(propertyName, null); - public PropertiesDescriptor Flattened(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, FlattenedProperty>(propertyName, configure); - public PropertiesDescriptor Flattened(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, FlattenedProperty flattenedProperty) => AssignVariant(propertyName, flattenedProperty); - public PropertiesDescriptor Flattened(Expression> propertyName) => AssignVariant, FlattenedProperty>(propertyName, null); - public PropertiesDescriptor Flattened(Expression> propertyName, Action> configure) => AssignVariant, FlattenedProperty>(propertyName, configure); - public PropertiesDescriptor FloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, FloatNumberProperty>(propertyName, null); - public PropertiesDescriptor FloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, FloatNumberProperty>(propertyName, configure); - public PropertiesDescriptor FloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, FloatNumberProperty floatNumberProperty) => AssignVariant(propertyName, floatNumberProperty); - public PropertiesDescriptor FloatNumber(Expression> propertyName) => AssignVariant, FloatNumberProperty>(propertyName, null); - public PropertiesDescriptor FloatNumber(Expression> propertyName, Action> configure) => AssignVariant, FloatNumberProperty>(propertyName, configure); - public PropertiesDescriptor FloatRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, FloatRangeProperty>(propertyName, null); - public PropertiesDescriptor FloatRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, FloatRangeProperty>(propertyName, configure); - public PropertiesDescriptor FloatRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, FloatRangeProperty floatRangeProperty) => AssignVariant(propertyName, floatRangeProperty); - public PropertiesDescriptor FloatRange(Expression> propertyName) => AssignVariant, FloatRangeProperty>(propertyName, null); - public PropertiesDescriptor FloatRange(Expression> propertyName, Action> configure) => AssignVariant, FloatRangeProperty>(propertyName, configure); - public PropertiesDescriptor GeoPoint(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, GeoPointProperty>(propertyName, null); - public PropertiesDescriptor GeoPoint(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, GeoPointProperty>(propertyName, configure); - public PropertiesDescriptor GeoPoint(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, GeoPointProperty geoPointProperty) => AssignVariant(propertyName, geoPointProperty); - public PropertiesDescriptor GeoPoint(Expression> propertyName) => AssignVariant, GeoPointProperty>(propertyName, null); - public PropertiesDescriptor GeoPoint(Expression> propertyName, Action> configure) => AssignVariant, GeoPointProperty>(propertyName, configure); - public PropertiesDescriptor GeoShape(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, GeoShapeProperty>(propertyName, null); - public PropertiesDescriptor GeoShape(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, GeoShapeProperty>(propertyName, configure); - public PropertiesDescriptor GeoShape(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, GeoShapeProperty geoShapeProperty) => AssignVariant(propertyName, geoShapeProperty); - public PropertiesDescriptor GeoShape(Expression> propertyName) => AssignVariant, GeoShapeProperty>(propertyName, null); - public PropertiesDescriptor GeoShape(Expression> propertyName, Action> configure) => AssignVariant, GeoShapeProperty>(propertyName, configure); - public PropertiesDescriptor HalfFloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, HalfFloatNumberProperty>(propertyName, null); - public PropertiesDescriptor HalfFloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, HalfFloatNumberProperty>(propertyName, configure); - public PropertiesDescriptor HalfFloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, HalfFloatNumberProperty halfFloatNumberProperty) => AssignVariant(propertyName, halfFloatNumberProperty); - public PropertiesDescriptor HalfFloatNumber(Expression> propertyName) => AssignVariant, HalfFloatNumberProperty>(propertyName, null); - public PropertiesDescriptor HalfFloatNumber(Expression> propertyName, Action> configure) => AssignVariant, HalfFloatNumberProperty>(propertyName, configure); - public PropertiesDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, HistogramProperty>(propertyName, null); - public PropertiesDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, HistogramProperty>(propertyName, configure); - public PropertiesDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, HistogramProperty histogramProperty) => AssignVariant(propertyName, histogramProperty); - public PropertiesDescriptor Histogram(Expression> propertyName) => AssignVariant, HistogramProperty>(propertyName, null); - public PropertiesDescriptor Histogram(Expression> propertyName, Action> configure) => AssignVariant, HistogramProperty>(propertyName, configure); - public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IcuCollationProperty>(propertyName, null); - public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IcuCollationProperty>(propertyName, configure); - public PropertiesDescriptor IcuCollation(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IcuCollationProperty icuCollationProperty) => AssignVariant(propertyName, icuCollationProperty); - public PropertiesDescriptor IcuCollation(Expression> propertyName) => AssignVariant, IcuCollationProperty>(propertyName, null); - public PropertiesDescriptor IcuCollation(Expression> propertyName, Action> configure) => AssignVariant, IcuCollationProperty>(propertyName, configure); - public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IntegerNumberProperty>(propertyName, null); - public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IntegerNumberProperty>(propertyName, configure); - public PropertiesDescriptor IntegerNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IntegerNumberProperty integerNumberProperty) => AssignVariant(propertyName, integerNumberProperty); - public PropertiesDescriptor IntegerNumber(Expression> propertyName) => AssignVariant, IntegerNumberProperty>(propertyName, null); - public PropertiesDescriptor IntegerNumber(Expression> propertyName, Action> configure) => AssignVariant, IntegerNumberProperty>(propertyName, configure); - public PropertiesDescriptor IntegerRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IntegerRangeProperty>(propertyName, null); - public PropertiesDescriptor IntegerRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IntegerRangeProperty>(propertyName, configure); - public PropertiesDescriptor IntegerRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IntegerRangeProperty integerRangeProperty) => AssignVariant(propertyName, integerRangeProperty); - public PropertiesDescriptor IntegerRange(Expression> propertyName) => AssignVariant, IntegerRangeProperty>(propertyName, null); - public PropertiesDescriptor IntegerRange(Expression> propertyName, Action> configure) => AssignVariant, IntegerRangeProperty>(propertyName, configure); - public PropertiesDescriptor Ip(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IpProperty>(propertyName, null); - public PropertiesDescriptor Ip(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IpProperty>(propertyName, configure); - public PropertiesDescriptor Ip(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IpProperty ipProperty) => AssignVariant(propertyName, ipProperty); - public PropertiesDescriptor Ip(Expression> propertyName) => AssignVariant, IpProperty>(propertyName, null); - public PropertiesDescriptor Ip(Expression> propertyName, Action> configure) => AssignVariant, IpProperty>(propertyName, configure); - public PropertiesDescriptor IpRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, IpRangeProperty>(propertyName, null); - public PropertiesDescriptor IpRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, IpRangeProperty>(propertyName, configure); - public PropertiesDescriptor IpRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, IpRangeProperty ipRangeProperty) => AssignVariant(propertyName, ipRangeProperty); - public PropertiesDescriptor IpRange(Expression> propertyName) => AssignVariant, IpRangeProperty>(propertyName, null); - public PropertiesDescriptor IpRange(Expression> propertyName, Action> configure) => AssignVariant, IpRangeProperty>(propertyName, configure); - public PropertiesDescriptor Join(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, JoinProperty>(propertyName, null); - public PropertiesDescriptor Join(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, JoinProperty>(propertyName, configure); - public PropertiesDescriptor Join(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, JoinProperty joinProperty) => AssignVariant(propertyName, joinProperty); - public PropertiesDescriptor Join(Expression> propertyName) => AssignVariant, JoinProperty>(propertyName, null); - public PropertiesDescriptor Join(Expression> propertyName, Action> configure) => AssignVariant, JoinProperty>(propertyName, configure); - public PropertiesDescriptor Keyword(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, KeywordProperty>(propertyName, null); - public PropertiesDescriptor Keyword(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, KeywordProperty>(propertyName, configure); - public PropertiesDescriptor Keyword(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, KeywordProperty keywordProperty) => AssignVariant(propertyName, keywordProperty); - public PropertiesDescriptor Keyword(Expression> propertyName) => AssignVariant, KeywordProperty>(propertyName, null); - public PropertiesDescriptor Keyword(Expression> propertyName, Action> configure) => AssignVariant, KeywordProperty>(propertyName, configure); - public PropertiesDescriptor LongNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, LongNumberProperty>(propertyName, null); - public PropertiesDescriptor LongNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, LongNumberProperty>(propertyName, configure); - public PropertiesDescriptor LongNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, LongNumberProperty longNumberProperty) => AssignVariant(propertyName, longNumberProperty); - public PropertiesDescriptor LongNumber(Expression> propertyName) => AssignVariant, LongNumberProperty>(propertyName, null); - public PropertiesDescriptor LongNumber(Expression> propertyName, Action> configure) => AssignVariant, LongNumberProperty>(propertyName, configure); - public PropertiesDescriptor LongRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, LongRangeProperty>(propertyName, null); - public PropertiesDescriptor LongRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, LongRangeProperty>(propertyName, configure); - public PropertiesDescriptor LongRange(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, LongRangeProperty longRangeProperty) => AssignVariant(propertyName, longRangeProperty); - public PropertiesDescriptor LongRange(Expression> propertyName) => AssignVariant, LongRangeProperty>(propertyName, null); - public PropertiesDescriptor LongRange(Expression> propertyName, Action> configure) => AssignVariant, LongRangeProperty>(propertyName, configure); - public PropertiesDescriptor MatchOnlyText(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, MatchOnlyTextProperty>(propertyName, null); - public PropertiesDescriptor MatchOnlyText(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, MatchOnlyTextProperty>(propertyName, configure); - public PropertiesDescriptor MatchOnlyText(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, MatchOnlyTextProperty matchOnlyTextProperty) => AssignVariant(propertyName, matchOnlyTextProperty); - public PropertiesDescriptor MatchOnlyText(Expression> propertyName) => AssignVariant, MatchOnlyTextProperty>(propertyName, null); - public PropertiesDescriptor MatchOnlyText(Expression> propertyName, Action> configure) => AssignVariant, MatchOnlyTextProperty>(propertyName, configure); - public PropertiesDescriptor Murmur3Hash(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, Murmur3HashProperty>(propertyName, null); - public PropertiesDescriptor Murmur3Hash(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, Murmur3HashProperty>(propertyName, configure); - public PropertiesDescriptor Murmur3Hash(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Murmur3HashProperty murmur3HashProperty) => AssignVariant(propertyName, murmur3HashProperty); - public PropertiesDescriptor Murmur3Hash(Expression> propertyName) => AssignVariant, Murmur3HashProperty>(propertyName, null); - public PropertiesDescriptor Murmur3Hash(Expression> propertyName, Action> configure) => AssignVariant, Murmur3HashProperty>(propertyName, configure); - public PropertiesDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, NestedProperty>(propertyName, null); - public PropertiesDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, NestedProperty>(propertyName, configure); - public PropertiesDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, NestedProperty nestedProperty) => AssignVariant(propertyName, nestedProperty); - public PropertiesDescriptor Nested(Expression> propertyName) => AssignVariant, NestedProperty>(propertyName, null); - public PropertiesDescriptor Nested(Expression> propertyName, Action> configure) => AssignVariant, NestedProperty>(propertyName, configure); - public PropertiesDescriptor Object(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, ObjectProperty>(propertyName, null); - public PropertiesDescriptor Object(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, ObjectProperty>(propertyName, configure); - public PropertiesDescriptor Object(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, ObjectProperty objectProperty) => AssignVariant(propertyName, objectProperty); - public PropertiesDescriptor Object(Expression> propertyName) => AssignVariant, ObjectProperty>(propertyName, null); - public PropertiesDescriptor Object(Expression> propertyName, Action> configure) => AssignVariant, ObjectProperty>(propertyName, configure); - public PropertiesDescriptor PassthroughObject(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, PassthroughObjectProperty>(propertyName, null); - public PropertiesDescriptor PassthroughObject(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, PassthroughObjectProperty>(propertyName, configure); - public PropertiesDescriptor PassthroughObject(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, PassthroughObjectProperty passthroughObjectProperty) => AssignVariant(propertyName, passthroughObjectProperty); - public PropertiesDescriptor PassthroughObject(Expression> propertyName) => AssignVariant, PassthroughObjectProperty>(propertyName, null); - public PropertiesDescriptor PassthroughObject(Expression> propertyName, Action> configure) => AssignVariant, PassthroughObjectProperty>(propertyName, configure); - public PropertiesDescriptor Percolator(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, PercolatorProperty>(propertyName, null); - public PropertiesDescriptor Percolator(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, PercolatorProperty>(propertyName, configure); - public PropertiesDescriptor Percolator(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, PercolatorProperty percolatorProperty) => AssignVariant(propertyName, percolatorProperty); - public PropertiesDescriptor Percolator(Expression> propertyName) => AssignVariant, PercolatorProperty>(propertyName, null); - public PropertiesDescriptor Percolator(Expression> propertyName, Action> configure) => AssignVariant, PercolatorProperty>(propertyName, configure); - public PropertiesDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, PointProperty>(propertyName, null); - public PropertiesDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, PointProperty>(propertyName, configure); - public PropertiesDescriptor Point(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, PointProperty pointProperty) => AssignVariant(propertyName, pointProperty); - public PropertiesDescriptor Point(Expression> propertyName) => AssignVariant, PointProperty>(propertyName, null); - public PropertiesDescriptor Point(Expression> propertyName, Action> configure) => AssignVariant, PointProperty>(propertyName, configure); - public PropertiesDescriptor RankFeature(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, RankFeatureProperty>(propertyName, null); - public PropertiesDescriptor RankFeature(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, RankFeatureProperty>(propertyName, configure); - public PropertiesDescriptor RankFeature(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, RankFeatureProperty rankFeatureProperty) => AssignVariant(propertyName, rankFeatureProperty); - public PropertiesDescriptor RankFeature(Expression> propertyName) => AssignVariant, RankFeatureProperty>(propertyName, null); - public PropertiesDescriptor RankFeature(Expression> propertyName, Action> configure) => AssignVariant, RankFeatureProperty>(propertyName, configure); - public PropertiesDescriptor RankFeatures(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, RankFeaturesProperty>(propertyName, null); - public PropertiesDescriptor RankFeatures(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, RankFeaturesProperty>(propertyName, configure); - public PropertiesDescriptor RankFeatures(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, RankFeaturesProperty rankFeaturesProperty) => AssignVariant(propertyName, rankFeaturesProperty); - public PropertiesDescriptor RankFeatures(Expression> propertyName) => AssignVariant, RankFeaturesProperty>(propertyName, null); - public PropertiesDescriptor RankFeatures(Expression> propertyName, Action> configure) => AssignVariant, RankFeaturesProperty>(propertyName, configure); - public PropertiesDescriptor ScaledFloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, ScaledFloatNumberProperty>(propertyName, null); - public PropertiesDescriptor ScaledFloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, ScaledFloatNumberProperty>(propertyName, configure); - public PropertiesDescriptor ScaledFloatNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, ScaledFloatNumberProperty scaledFloatNumberProperty) => AssignVariant(propertyName, scaledFloatNumberProperty); - public PropertiesDescriptor ScaledFloatNumber(Expression> propertyName) => AssignVariant, ScaledFloatNumberProperty>(propertyName, null); - public PropertiesDescriptor ScaledFloatNumber(Expression> propertyName, Action> configure) => AssignVariant, ScaledFloatNumberProperty>(propertyName, configure); - public PropertiesDescriptor SearchAsYouType(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, SearchAsYouTypeProperty>(propertyName, null); - public PropertiesDescriptor SearchAsYouType(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, SearchAsYouTypeProperty>(propertyName, configure); - public PropertiesDescriptor SearchAsYouType(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, SearchAsYouTypeProperty searchAsYouTypeProperty) => AssignVariant(propertyName, searchAsYouTypeProperty); - public PropertiesDescriptor SearchAsYouType(Expression> propertyName) => AssignVariant, SearchAsYouTypeProperty>(propertyName, null); - public PropertiesDescriptor SearchAsYouType(Expression> propertyName, Action> configure) => AssignVariant, SearchAsYouTypeProperty>(propertyName, configure); - public PropertiesDescriptor SemanticText(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant(propertyName, null); - public PropertiesDescriptor SemanticText(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action configure) => AssignVariant(propertyName, configure); - public PropertiesDescriptor SemanticText(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, SemanticTextProperty semanticTextProperty) => AssignVariant(propertyName, semanticTextProperty); - public PropertiesDescriptor SemanticText(Expression> propertyName) => AssignVariant(propertyName, null); - public PropertiesDescriptor SemanticText(Expression> propertyName, Action configure) => AssignVariant(propertyName, configure); - public PropertiesDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, ShapeProperty>(propertyName, null); - public PropertiesDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, ShapeProperty>(propertyName, configure); - public PropertiesDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, ShapeProperty shapeProperty) => AssignVariant(propertyName, shapeProperty); - public PropertiesDescriptor Shape(Expression> propertyName) => AssignVariant, ShapeProperty>(propertyName, null); - public PropertiesDescriptor Shape(Expression> propertyName, Action> configure) => AssignVariant, ShapeProperty>(propertyName, configure); - public PropertiesDescriptor ShortNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, ShortNumberProperty>(propertyName, null); - public PropertiesDescriptor ShortNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, ShortNumberProperty>(propertyName, configure); - public PropertiesDescriptor ShortNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, ShortNumberProperty shortNumberProperty) => AssignVariant(propertyName, shortNumberProperty); - public PropertiesDescriptor ShortNumber(Expression> propertyName) => AssignVariant, ShortNumberProperty>(propertyName, null); - public PropertiesDescriptor ShortNumber(Expression> propertyName, Action> configure) => AssignVariant, ShortNumberProperty>(propertyName, configure); - public PropertiesDescriptor SparseVector(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, SparseVectorProperty>(propertyName, null); - public PropertiesDescriptor SparseVector(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, SparseVectorProperty>(propertyName, configure); - public PropertiesDescriptor SparseVector(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, SparseVectorProperty sparseVectorProperty) => AssignVariant(propertyName, sparseVectorProperty); - public PropertiesDescriptor SparseVector(Expression> propertyName) => AssignVariant, SparseVectorProperty>(propertyName, null); - public PropertiesDescriptor SparseVector(Expression> propertyName, Action> configure) => AssignVariant, SparseVectorProperty>(propertyName, configure); - public PropertiesDescriptor Text(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, TextProperty>(propertyName, null); - public PropertiesDescriptor Text(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, TextProperty>(propertyName, configure); - public PropertiesDescriptor Text(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, TextProperty textProperty) => AssignVariant(propertyName, textProperty); - public PropertiesDescriptor Text(Expression> propertyName) => AssignVariant, TextProperty>(propertyName, null); - public PropertiesDescriptor Text(Expression> propertyName, Action> configure) => AssignVariant, TextProperty>(propertyName, configure); - public PropertiesDescriptor TokenCount(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, TokenCountProperty>(propertyName, null); - public PropertiesDescriptor TokenCount(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, TokenCountProperty>(propertyName, configure); - public PropertiesDescriptor TokenCount(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, TokenCountProperty tokenCountProperty) => AssignVariant(propertyName, tokenCountProperty); - public PropertiesDescriptor TokenCount(Expression> propertyName) => AssignVariant, TokenCountProperty>(propertyName, null); - public PropertiesDescriptor TokenCount(Expression> propertyName, Action> configure) => AssignVariant, TokenCountProperty>(propertyName, configure); - public PropertiesDescriptor UnsignedLongNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, UnsignedLongNumberProperty>(propertyName, null); - public PropertiesDescriptor UnsignedLongNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, UnsignedLongNumberProperty>(propertyName, configure); - public PropertiesDescriptor UnsignedLongNumber(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, UnsignedLongNumberProperty unsignedLongNumberProperty) => AssignVariant(propertyName, unsignedLongNumberProperty); - public PropertiesDescriptor UnsignedLongNumber(Expression> propertyName) => AssignVariant, UnsignedLongNumberProperty>(propertyName, null); - public PropertiesDescriptor UnsignedLongNumber(Expression> propertyName, Action> configure) => AssignVariant, UnsignedLongNumberProperty>(propertyName, configure); - public PropertiesDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, VersionProperty>(propertyName, null); - public PropertiesDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, VersionProperty>(propertyName, configure); - public PropertiesDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, VersionProperty versionProperty) => AssignVariant(propertyName, versionProperty); - public PropertiesDescriptor Version(Expression> propertyName) => AssignVariant, VersionProperty>(propertyName, null); - public PropertiesDescriptor Version(Expression> propertyName, Action> configure) => AssignVariant, VersionProperty>(propertyName, configure); - public PropertiesDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName) => AssignVariant, WildcardProperty>(propertyName, null); - public PropertiesDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, Action> configure) => AssignVariant, WildcardProperty>(propertyName, configure); - public PropertiesDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.PropertyName propertyName, WildcardProperty wildcardProperty) => AssignVariant(propertyName, wildcardProperty); - public PropertiesDescriptor Wildcard(Expression> propertyName) => AssignVariant, WildcardProperty>(propertyName, null); - public PropertiesDescriptor Wildcard(Expression> propertyName, Action> configure) => AssignVariant, WildcardProperty>(propertyName, configure); -} - -internal sealed partial class PropertyInterfaceConverter : JsonConverter -{ - public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "aggregate_metric_double": - return JsonSerializer.Deserialize(ref reader, options); - case "binary": - return JsonSerializer.Deserialize(ref reader, options); - case "boolean": - return JsonSerializer.Deserialize(ref reader, options); - case "byte": - return JsonSerializer.Deserialize(ref reader, options); - case "completion": - return JsonSerializer.Deserialize(ref reader, options); - case "constant_keyword": - return JsonSerializer.Deserialize(ref reader, options); - case "date_nanos": - return JsonSerializer.Deserialize(ref reader, options); - case "date": - return JsonSerializer.Deserialize(ref reader, options); - case "date_range": - return JsonSerializer.Deserialize(ref reader, options); - case "dense_vector": - return JsonSerializer.Deserialize(ref reader, options); - case "double": - return JsonSerializer.Deserialize(ref reader, options); - case "double_range": - return JsonSerializer.Deserialize(ref reader, options); - case "{dynamic_type}": - return JsonSerializer.Deserialize(ref reader, options); - case "alias": - return JsonSerializer.Deserialize(ref reader, options); - case "flattened": - return JsonSerializer.Deserialize(ref reader, options); - case "float": - return JsonSerializer.Deserialize(ref reader, options); - case "float_range": - return JsonSerializer.Deserialize(ref reader, options); - case "geo_point": - return JsonSerializer.Deserialize(ref reader, options); - case "geo_shape": - return JsonSerializer.Deserialize(ref reader, options); - case "half_float": - return JsonSerializer.Deserialize(ref reader, options); - case "histogram": - return JsonSerializer.Deserialize(ref reader, options); - case "icu_collation_keyword": - return JsonSerializer.Deserialize(ref reader, options); - case "integer": - return JsonSerializer.Deserialize(ref reader, options); - case "integer_range": - return JsonSerializer.Deserialize(ref reader, options); - case "ip": - return JsonSerializer.Deserialize(ref reader, options); - case "ip_range": - return JsonSerializer.Deserialize(ref reader, options); - case "join": - return JsonSerializer.Deserialize(ref reader, options); - case "keyword": - return JsonSerializer.Deserialize(ref reader, options); - case "long": - return JsonSerializer.Deserialize(ref reader, options); - case "long_range": - return JsonSerializer.Deserialize(ref reader, options); - case "match_only_text": - return JsonSerializer.Deserialize(ref reader, options); - case "murmur3": - return JsonSerializer.Deserialize(ref reader, options); - case "nested": - return JsonSerializer.Deserialize(ref reader, options); - case "object": - return JsonSerializer.Deserialize(ref reader, options); - case "passthrough": - return JsonSerializer.Deserialize(ref reader, options); - case "percolator": - return JsonSerializer.Deserialize(ref reader, options); - case "point": - return JsonSerializer.Deserialize(ref reader, options); - case "rank_feature": - return JsonSerializer.Deserialize(ref reader, options); - case "rank_features": - return JsonSerializer.Deserialize(ref reader, options); - case "scaled_float": - return JsonSerializer.Deserialize(ref reader, options); - case "search_as_you_type": - return JsonSerializer.Deserialize(ref reader, options); - case "semantic_text": - return JsonSerializer.Deserialize(ref reader, options); - case "shape": - return JsonSerializer.Deserialize(ref reader, options); - case "short": - return JsonSerializer.Deserialize(ref reader, options); - case "sparse_vector": - return JsonSerializer.Deserialize(ref reader, options); - case "text": - return JsonSerializer.Deserialize(ref reader, options); - case "token_count": - return JsonSerializer.Deserialize(ref reader, options); - case "unsigned_long": - return JsonSerializer.Deserialize(ref reader, options); - case "version": - return JsonSerializer.Deserialize(ref reader, options); - case "wildcard": - return JsonSerializer.Deserialize(ref reader, options); - default: - return JsonSerializer.Deserialize(ref reader, options); - } - } - - public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "aggregate_metric_double": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.AggregateMetricDoubleProperty), options); - return; - case "binary": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.BinaryProperty), options); - return; - case "boolean": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.BooleanProperty), options); - return; - case "byte": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.ByteNumberProperty), options); - return; - case "completion": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.CompletionProperty), options); - return; - case "constant_keyword": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.ConstantKeywordProperty), options); - return; - case "date_nanos": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DateNanosProperty), options); - return; - case "date": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DateProperty), options); - return; - case "date_range": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DateRangeProperty), options); - return; - case "dense_vector": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DenseVectorProperty), options); - return; - case "double": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DoubleNumberProperty), options); - return; - case "double_range": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DoubleRangeProperty), options); - return; - case "{dynamic_type}": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicProperty), options); - return; - case "alias": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldAliasProperty), options); - return; - case "flattened": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.FlattenedProperty), options); - return; - case "float": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.FloatNumberProperty), options); - return; - case "float_range": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.FloatRangeProperty), options); - return; - case "geo_point": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoPointProperty), options); - return; - case "geo_shape": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoShapeProperty), options); - return; - case "half_float": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.HalfFloatNumberProperty), options); - return; - case "histogram": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.HistogramProperty), options); - return; - case "icu_collation_keyword": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IcuCollationProperty), options); - return; - case "integer": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IntegerNumberProperty), options); - return; - case "integer_range": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IntegerRangeProperty), options); - return; - case "ip": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IpProperty), options); - return; - case "ip_range": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.IpRangeProperty), options); - return; - case "join": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.JoinProperty), options); - return; - case "keyword": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.KeywordProperty), options); - return; - case "long": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.LongNumberProperty), options); - return; - case "long_range": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.LongRangeProperty), options); - return; - case "match_only_text": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.MatchOnlyTextProperty), options); - return; - case "murmur3": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.Murmur3HashProperty), options); - return; - case "nested": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.NestedProperty), options); - return; - case "object": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.ObjectProperty), options); - return; - case "passthrough": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.PassthroughObjectProperty), options); - return; - case "percolator": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.PercolatorProperty), options); - return; - case "point": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.PointProperty), options); - return; - case "rank_feature": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.RankFeatureProperty), options); - return; - case "rank_features": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.RankFeaturesProperty), options); - return; - case "scaled_float": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.ScaledFloatNumberProperty), options); - return; - case "search_as_you_type": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.SearchAsYouTypeProperty), options); - return; - case "semantic_text": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.SemanticTextProperty), options); - return; - case "shape": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.ShapeProperty), options); - return; - case "short": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.ShortNumberProperty), options); - return; - case "sparse_vector": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.SparseVectorProperty), options); - return; - case "text": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextProperty), options); - return; - case "token_count": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.TokenCountProperty), options); - return; - case "unsigned_long": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.UnsignedLongNumberProperty), options); - return; - case "version": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.VersionProperty), options); - return; - case "wildcard": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.WildcardProperty), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(PropertyInterfaceConverter))] -public partial interface IProperty -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeatureProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeatureProperty.g.cs deleted file mode 100644 index 4e13126ae90..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeatureProperty.g.cs +++ /dev/null @@ -1,331 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class RankFeatureProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("positive_score_impact")] - public bool? PositiveScoreImpact { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "rank_feature"; -} - -public sealed partial class RankFeaturePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal RankFeaturePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public RankFeaturePropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? PositiveScoreImpactValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public RankFeaturePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public RankFeaturePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public RankFeaturePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public RankFeaturePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public RankFeaturePropertyDescriptor PositiveScoreImpact(bool? positiveScoreImpact = true) - { - PositiveScoreImpactValue = positiveScoreImpact; - return Self; - } - - public RankFeaturePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public RankFeaturePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PositiveScoreImpactValue.HasValue) - { - writer.WritePropertyName("positive_score_impact"); - writer.WriteBooleanValue(PositiveScoreImpactValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("rank_feature"); - writer.WriteEndObject(); - } - - RankFeatureProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - PositiveScoreImpact = PositiveScoreImpactValue, - Properties = PropertiesValue - }; -} - -public sealed partial class RankFeaturePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal RankFeaturePropertyDescriptor(Action configure) => configure.Invoke(this); - - public RankFeaturePropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? PositiveScoreImpactValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public RankFeaturePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public RankFeaturePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public RankFeaturePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public RankFeaturePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public RankFeaturePropertyDescriptor PositiveScoreImpact(bool? positiveScoreImpact = true) - { - PositiveScoreImpactValue = positiveScoreImpact; - return Self; - } - - public RankFeaturePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public RankFeaturePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PositiveScoreImpactValue.HasValue) - { - writer.WritePropertyName("positive_score_impact"); - writer.WriteBooleanValue(PositiveScoreImpactValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("rank_feature"); - writer.WriteEndObject(); - } - - RankFeatureProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - PositiveScoreImpact = PositiveScoreImpactValue, - Properties = PropertiesValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeaturesProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeaturesProperty.g.cs deleted file mode 100644 index 55b90f3c44c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RankFeaturesProperty.g.cs +++ /dev/null @@ -1,331 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class RankFeaturesProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("positive_score_impact")] - public bool? PositiveScoreImpact { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "rank_features"; -} - -public sealed partial class RankFeaturesPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal RankFeaturesPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public RankFeaturesPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? PositiveScoreImpactValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public RankFeaturesPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public RankFeaturesPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public RankFeaturesPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturesPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturesPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public RankFeaturesPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public RankFeaturesPropertyDescriptor PositiveScoreImpact(bool? positiveScoreImpact = true) - { - PositiveScoreImpactValue = positiveScoreImpact; - return Self; - } - - public RankFeaturesPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public RankFeaturesPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturesPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PositiveScoreImpactValue.HasValue) - { - writer.WritePropertyName("positive_score_impact"); - writer.WriteBooleanValue(PositiveScoreImpactValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("rank_features"); - writer.WriteEndObject(); - } - - RankFeaturesProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - PositiveScoreImpact = PositiveScoreImpactValue, - Properties = PropertiesValue - }; -} - -public sealed partial class RankFeaturesPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal RankFeaturesPropertyDescriptor(Action configure) => configure.Invoke(this); - - public RankFeaturesPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? PositiveScoreImpactValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public RankFeaturesPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public RankFeaturesPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public RankFeaturesPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturesPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturesPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public RankFeaturesPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public RankFeaturesPropertyDescriptor PositiveScoreImpact(bool? positiveScoreImpact = true) - { - PositiveScoreImpactValue = positiveScoreImpact; - return Self; - } - - public RankFeaturesPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public RankFeaturesPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public RankFeaturesPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PositiveScoreImpactValue.HasValue) - { - writer.WritePropertyName("positive_score_impact"); - writer.WriteBooleanValue(PositiveScoreImpactValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("rank_features"); - writer.WriteEndObject(); - } - - RankFeaturesProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - PositiveScoreImpact = PositiveScoreImpactValue, - Properties = PropertiesValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RoutingField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RoutingField.g.cs deleted file mode 100644 index f83e863b71d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RoutingField.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class RoutingField -{ - [JsonInclude, JsonPropertyName("required")] - public bool Required { get; set; } -} - -public sealed partial class RoutingFieldDescriptor : SerializableDescriptor -{ - internal RoutingFieldDescriptor(Action configure) => configure.Invoke(this); - - public RoutingFieldDescriptor() : base() - { - } - - private bool RequiredValue { get; set; } - - public RoutingFieldDescriptor Required(bool required = true) - { - RequiredValue = required; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("required"); - writer.WriteBooleanValue(RequiredValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeField.g.cs deleted file mode 100644 index 369a886cd0a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeField.g.cs +++ /dev/null @@ -1,671 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class RuntimeField -{ - /// - /// - /// For type lookup - /// - /// - [JsonInclude, JsonPropertyName("fetch_fields")] - public ICollection? FetchFields { get; set; } - - /// - /// - /// For type composite - /// - /// - [JsonInclude, JsonPropertyName("fields")] - public IDictionary? Fields { get; set; } - - /// - /// - /// A custom format for date type runtime fields. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// - /// For type lookup - /// - /// - [JsonInclude, JsonPropertyName("input_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? InputField { get; set; } - - /// - /// - /// Painless script executed at query time. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - - /// - /// - /// For type lookup - /// - /// - [JsonInclude, JsonPropertyName("target_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; } - - /// - /// - /// For type lookup - /// - /// - [JsonInclude, JsonPropertyName("target_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? TargetIndex { get; set; } - - /// - /// - /// Field type, which can be: boolean, composite, date, double, geo_point, ip,keyword, long, or lookup. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType Type { get; set; } -} - -public sealed partial class RuntimeFieldDescriptor : SerializableDescriptor> -{ - internal RuntimeFieldDescriptor(Action> configure) => configure.Invoke(this); - - public RuntimeFieldDescriptor() : base() - { - } - - private ICollection? FetchFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor FetchFieldsDescriptor { get; set; } - private Action> FetchFieldsDescriptorAction { get; set; } - private Action>[] FetchFieldsDescriptorActions { get; set; } - private IDictionary FieldsValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? InputFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? TargetIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType TypeValue { get; set; } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor FetchFields(ICollection? fetchFields) - { - FetchFieldsDescriptor = null; - FetchFieldsDescriptorAction = null; - FetchFieldsDescriptorActions = null; - FetchFieldsValue = fetchFields; - return Self; - } - - public RuntimeFieldDescriptor FetchFields(Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor descriptor) - { - FetchFieldsValue = null; - FetchFieldsDescriptorAction = null; - FetchFieldsDescriptorActions = null; - FetchFieldsDescriptor = descriptor; - return Self; - } - - public RuntimeFieldDescriptor FetchFields(Action> configure) - { - FetchFieldsValue = null; - FetchFieldsDescriptor = null; - FetchFieldsDescriptorActions = null; - FetchFieldsDescriptorAction = configure; - return Self; - } - - public RuntimeFieldDescriptor FetchFields(params Action>[] configure) - { - FetchFieldsValue = null; - FetchFieldsDescriptor = null; - FetchFieldsDescriptorAction = null; - FetchFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// For type composite - /// - /// - public RuntimeFieldDescriptor Fields(Func, FluentDescriptorDictionary> selector) - { - FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// A custom format for date type runtime fields. - /// - /// - public RuntimeFieldDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor InputField(Elastic.Clients.Elasticsearch.Serverless.Field? inputField) - { - InputFieldValue = inputField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor InputField(Expression> inputField) - { - InputFieldValue = inputField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor InputField(Expression> inputField) - { - InputFieldValue = inputField; - return Self; - } - - /// - /// - /// Painless script executed at query time. - /// - /// - public RuntimeFieldDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public RuntimeFieldDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public RuntimeFieldDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetIndex(Elastic.Clients.Elasticsearch.Serverless.IndexName? targetIndex) - { - TargetIndexValue = targetIndex; - return Self; - } - - /// - /// - /// Field type, which can be: boolean, composite, date, double, geo_point, ip,keyword, long, or lookup. - /// - /// - public RuntimeFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FetchFieldsDescriptor is not null) - { - writer.WritePropertyName("fetch_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FetchFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FetchFieldsDescriptorAction is not null) - { - writer.WritePropertyName("fetch_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor(FetchFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FetchFieldsDescriptorActions is not null) - { - writer.WritePropertyName("fetch_fields"); - writer.WriteStartArray(); - foreach (var action in FetchFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FetchFieldsValue is not null) - { - writer.WritePropertyName("fetch_fields"); - JsonSerializer.Serialize(writer, FetchFieldsValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (InputFieldValue is not null) - { - writer.WritePropertyName("input_field"); - JsonSerializer.Serialize(writer, InputFieldValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (TargetIndexValue is not null) - { - writer.WritePropertyName("target_index"); - JsonSerializer.Serialize(writer, TargetIndexValue, options); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class RuntimeFieldDescriptor : SerializableDescriptor -{ - internal RuntimeFieldDescriptor(Action configure) => configure.Invoke(this); - - public RuntimeFieldDescriptor() : base() - { - } - - private ICollection? FetchFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor FetchFieldsDescriptor { get; set; } - private Action FetchFieldsDescriptorAction { get; set; } - private Action[] FetchFieldsDescriptorActions { get; set; } - private IDictionary FieldsValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? InputFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? TargetIndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType TypeValue { get; set; } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor FetchFields(ICollection? fetchFields) - { - FetchFieldsDescriptor = null; - FetchFieldsDescriptorAction = null; - FetchFieldsDescriptorActions = null; - FetchFieldsValue = fetchFields; - return Self; - } - - public RuntimeFieldDescriptor FetchFields(Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor descriptor) - { - FetchFieldsValue = null; - FetchFieldsDescriptorAction = null; - FetchFieldsDescriptorActions = null; - FetchFieldsDescriptor = descriptor; - return Self; - } - - public RuntimeFieldDescriptor FetchFields(Action configure) - { - FetchFieldsValue = null; - FetchFieldsDescriptor = null; - FetchFieldsDescriptorActions = null; - FetchFieldsDescriptorAction = configure; - return Self; - } - - public RuntimeFieldDescriptor FetchFields(params Action[] configure) - { - FetchFieldsValue = null; - FetchFieldsDescriptor = null; - FetchFieldsDescriptorAction = null; - FetchFieldsDescriptorActions = configure; - return Self; - } - - /// - /// - /// For type composite - /// - /// - public RuntimeFieldDescriptor Fields(Func, FluentDescriptorDictionary> selector) - { - FieldsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// A custom format for date type runtime fields. - /// - /// - public RuntimeFieldDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor InputField(Elastic.Clients.Elasticsearch.Serverless.Field? inputField) - { - InputFieldValue = inputField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor InputField(Expression> inputField) - { - InputFieldValue = inputField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor InputField(Expression> inputField) - { - InputFieldValue = inputField; - return Self; - } - - /// - /// - /// Painless script executed at query time. - /// - /// - public RuntimeFieldDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public RuntimeFieldDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public RuntimeFieldDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetField(Expression> targetField) - { - TargetFieldValue = targetField; - return Self; - } - - /// - /// - /// For type lookup - /// - /// - public RuntimeFieldDescriptor TargetIndex(Elastic.Clients.Elasticsearch.Serverless.IndexName? targetIndex) - { - TargetIndexValue = targetIndex; - return Self; - } - - /// - /// - /// Field type, which can be: boolean, composite, date, double, geo_point, ip,keyword, long, or lookup. - /// - /// - public RuntimeFieldDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FetchFieldsDescriptor is not null) - { - writer.WritePropertyName("fetch_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FetchFieldsDescriptor, options); - writer.WriteEndArray(); - } - else if (FetchFieldsDescriptorAction is not null) - { - writer.WritePropertyName("fetch_fields"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor(FetchFieldsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FetchFieldsDescriptorActions is not null) - { - writer.WritePropertyName("fetch_fields"); - writer.WriteStartArray(); - foreach (var action in FetchFieldsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldFetchFieldsDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FetchFieldsValue is not null) - { - writer.WritePropertyName("fetch_fields"); - JsonSerializer.Serialize(writer, FetchFieldsValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (InputFieldValue is not null) - { - writer.WritePropertyName("input_field"); - JsonSerializer.Serialize(writer, InputFieldValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TargetFieldValue is not null) - { - writer.WritePropertyName("target_field"); - JsonSerializer.Serialize(writer, TargetFieldValue, options); - } - - if (TargetIndexValue is not null) - { - writer.WritePropertyName("target_index"); - JsonSerializer.Serialize(writer, TargetIndexValue, options); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeFieldFetchFields.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeFieldFetchFields.g.cs deleted file mode 100644 index 8529c1ecd63..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/RuntimeFieldFetchFields.g.cs +++ /dev/null @@ -1,136 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class RuntimeFieldFetchFields -{ - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } -} - -public sealed partial class RuntimeFieldFetchFieldsDescriptor : SerializableDescriptor> -{ - internal RuntimeFieldFetchFieldsDescriptor(Action> configure) => configure.Invoke(this); - - public RuntimeFieldFetchFieldsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - - public RuntimeFieldFetchFieldsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public RuntimeFieldFetchFieldsDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RuntimeFieldFetchFieldsDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RuntimeFieldFetchFieldsDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RuntimeFieldFetchFieldsDescriptor : SerializableDescriptor -{ - internal RuntimeFieldFetchFieldsDescriptor(Action configure) => configure.Invoke(this); - - public RuntimeFieldFetchFieldsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - - public RuntimeFieldFetchFieldsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public RuntimeFieldFetchFieldsDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RuntimeFieldFetchFieldsDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RuntimeFieldFetchFieldsDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs deleted file mode 100644 index 2f3f8288c6f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs +++ /dev/null @@ -1,740 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class ScaledFloatNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public double? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("scaling_factor")] - public double? ScalingFactor { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "scaled_float"; -} - -public sealed partial class ScaledFloatNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal ScaledFloatNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public ScaledFloatNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private double? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private double? ScalingFactorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public ScaledFloatNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ScaledFloatNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ScaledFloatNumberPropertyDescriptor NullValue(double? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor ScalingFactor(double? scalingFactor) - { - ScalingFactorValue = scalingFactor; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScalingFactorValue.HasValue) - { - writer.WritePropertyName("scaling_factor"); - writer.WriteNumberValue(ScalingFactorValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("scaled_float"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ScaledFloatNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - ScalingFactor = ScalingFactorValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class ScaledFloatNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ScaledFloatNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public ScaledFloatNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private double? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private double? ScalingFactorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public ScaledFloatNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ScaledFloatNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ScaledFloatNumberPropertyDescriptor NullValue(double? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor ScalingFactor(double? scalingFactor) - { - ScalingFactorValue = scalingFactor; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ScaledFloatNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScalingFactorValue.HasValue) - { - writer.WritePropertyName("scaling_factor"); - writer.WriteNumberValue(ScalingFactorValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("scaled_float"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ScaledFloatNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - ScalingFactor = ScalingFactorValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs deleted file mode 100644 index ac3109d0e5a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs +++ /dev/null @@ -1,632 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class SearchAsYouTypeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } - [JsonInclude, JsonPropertyName("max_shingle_size")] - public int? MaxShingleSize { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("norms")] - public bool? Norms { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("search_analyzer")] - public string? SearchAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("search_quote_analyzer")] - public string? SearchQuoteAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("term_vector")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVector { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "search_as_you_type"; -} - -public sealed partial class SearchAsYouTypePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal SearchAsYouTypePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public SearchAsYouTypePropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private int? MaxShingleSizeValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SearchAnalyzerValue { get; set; } - private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } - - public SearchAsYouTypePropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public SearchAsYouTypePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public SearchAsYouTypePropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public SearchAsYouTypePropertyDescriptor MaxShingleSize(int? maxShingleSize) - { - MaxShingleSizeValue = maxShingleSize; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public SearchAsYouTypePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SearchAsYouTypePropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public SearchAsYouTypePropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer) - { - SearchQuoteAnalyzerValue = searchQuoteAnalyzer; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public SearchAsYouTypePropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? termVector) - { - TermVectorValue = termVector; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MaxShingleSizeValue.HasValue) - { - writer.WritePropertyName("max_shingle_size"); - writer.WriteNumberValue(MaxShingleSizeValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SearchQuoteAnalyzerValue)) - { - writer.WritePropertyName("search_quote_analyzer"); - writer.WriteStringValue(SearchQuoteAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TermVectorValue is not null) - { - writer.WritePropertyName("term_vector"); - JsonSerializer.Serialize(writer, TermVectorValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("search_as_you_type"); - writer.WriteEndObject(); - } - - SearchAsYouTypeProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - MaxShingleSize = MaxShingleSizeValue, - Meta = MetaValue, - Norms = NormsValue, - Properties = PropertiesValue, - SearchAnalyzer = SearchAnalyzerValue, - SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, - Store = StoreValue, - TermVector = TermVectorValue - }; -} - -public sealed partial class SearchAsYouTypePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SearchAsYouTypePropertyDescriptor(Action configure) => configure.Invoke(this); - - public SearchAsYouTypePropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private int? MaxShingleSizeValue { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SearchAnalyzerValue { get; set; } - private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } - - public SearchAsYouTypePropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public SearchAsYouTypePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public SearchAsYouTypePropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public SearchAsYouTypePropertyDescriptor MaxShingleSize(int? maxShingleSize) - { - MaxShingleSizeValue = maxShingleSize; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public SearchAsYouTypePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SearchAsYouTypePropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public SearchAsYouTypePropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public SearchAsYouTypePropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer) - { - SearchQuoteAnalyzerValue = searchQuoteAnalyzer; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public SearchAsYouTypePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public SearchAsYouTypePropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? termVector) - { - TermVectorValue = termVector; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (MaxShingleSizeValue.HasValue) - { - writer.WritePropertyName("max_shingle_size"); - writer.WriteNumberValue(MaxShingleSizeValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SearchQuoteAnalyzerValue)) - { - writer.WritePropertyName("search_quote_analyzer"); - writer.WriteStringValue(SearchQuoteAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TermVectorValue is not null) - { - writer.WritePropertyName("term_vector"); - JsonSerializer.Serialize(writer, TermVectorValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("search_as_you_type"); - writer.WriteEndObject(); - } - - SearchAsYouTypeProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - MaxShingleSize = MaxShingleSizeValue, - Meta = MetaValue, - Norms = NormsValue, - Properties = PropertiesValue, - SearchAnalyzer = SearchAnalyzerValue, - SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, - Store = StoreValue, - TermVector = TermVectorValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SemanticTextProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SemanticTextProperty.g.cs deleted file mode 100644 index 4136cce6a59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SemanticTextProperty.g.cs +++ /dev/null @@ -1,85 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class SemanticTextProperty : IProperty -{ - [JsonInclude, JsonPropertyName("inference_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id InferenceId { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "semantic_text"; -} - -public sealed partial class SemanticTextPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SemanticTextPropertyDescriptor(Action configure) => configure.Invoke(this); - - public SemanticTextPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id InferenceIdValue { get; set; } - private IDictionary? MetaValue { get; set; } - - public SemanticTextPropertyDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) - { - InferenceIdValue = inferenceId; - return Self; - } - - public SemanticTextPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("inference_id"); - JsonSerializer.Serialize(writer, InferenceIdValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("semantic_text"); - writer.WriteEndObject(); - } - - SemanticTextProperty IBuildableDescriptor.Build() => new() - { - InferenceId = InferenceIdValue, - Meta = MetaValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShapeProperty.g.cs deleted file mode 100644 index 18ab1659da1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShapeProperty.g.cs +++ /dev/null @@ -1,533 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -/// -/// -/// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as -/// rectangles and polygons. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class ShapeProperty : IProperty -{ - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("ignore_z_value")] - public bool? IgnoreZValue { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("orientation")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? Orientation { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "shape"; -} - -/// -/// -/// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as -/// rectangles and polygons. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class ShapePropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal ShapePropertyDescriptor(Action> configure) => configure.Invoke(this); - - public ShapePropertyDescriptor() : base() - { - } - - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public ShapePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ShapePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ShapePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ShapePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ShapePropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ShapePropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ShapePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ShapePropertyDescriptor Orientation(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? orientation) - { - OrientationValue = orientation; - return Self; - } - - public ShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OrientationValue is not null) - { - writer.WritePropertyName("orientation"); - JsonSerializer.Serialize(writer, OrientationValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("shape"); - writer.WriteEndObject(); - } - - ShapeProperty IBuildableDescriptor.Build() => new() - { - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Meta = MetaValue, - Orientation = OrientationValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -/// -/// -/// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as -/// rectangles and polygons. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class ShapePropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ShapePropertyDescriptor(Action configure) => configure.Invoke(this); - - public ShapePropertyDescriptor() : base() - { - } - - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IgnoreZValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? OrientationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public ShapePropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ShapePropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ShapePropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ShapePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ShapePropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ShapePropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ShapePropertyDescriptor IgnoreZValue(bool? ignoreZValue = true) - { - IgnoreZValueValue = ignoreZValue; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ShapePropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ShapePropertyDescriptor Orientation(Elastic.Clients.Elasticsearch.Serverless.Mapping.GeoOrientation? orientation) - { - OrientationValue = orientation; - return Self; - } - - public ShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ShapePropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShapePropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IgnoreZValueValue.HasValue) - { - writer.WritePropertyName("ignore_z_value"); - writer.WriteBooleanValue(IgnoreZValueValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (OrientationValue is not null) - { - writer.WritePropertyName("orientation"); - JsonSerializer.Serialize(writer, OrientationValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("shape"); - writer.WriteEndObject(); - } - - ShapeProperty IBuildableDescriptor.Build() => new() - { - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - IgnoreZValue = IgnoreZValueValue, - Meta = MetaValue, - Orientation = OrientationValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShortNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShortNumberProperty.g.cs deleted file mode 100644 index d83c6802a26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/ShortNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class ShortNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public short? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "short"; -} - -public sealed partial class ShortNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal ShortNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public ShortNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private short? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public ShortNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public ShortNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ShortNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ShortNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ShortNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ShortNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ShortNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ShortNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ShortNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ShortNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ShortNumberPropertyDescriptor NullValue(short? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public ShortNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public ShortNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ShortNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ShortNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ShortNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ShortNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("short"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ShortNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class ShortNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ShortNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public ShortNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private short? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public ShortNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public ShortNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public ShortNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public ShortNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public ShortNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public ShortNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public ShortNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public ShortNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public ShortNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public ShortNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ShortNumberPropertyDescriptor NullValue(short? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public ShortNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public ShortNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public ShortNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public ShortNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ShortNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ShortNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ShortNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("short"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ShortNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SizeField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SizeField.g.cs deleted file mode 100644 index 87b37992329..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SizeField.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class SizeField -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; set; } -} - -public sealed partial class SizeFieldDescriptor : SerializableDescriptor -{ - internal SizeFieldDescriptor(Action configure) => configure.Invoke(this); - - public SizeFieldDescriptor() : base() - { - } - - private bool EnabledValue { get; set; } - - public SizeFieldDescriptor Enabled(bool enabled = true) - { - EnabledValue = enabled; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SourceField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SourceField.g.cs deleted file mode 100644 index a198f729c50..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SourceField.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class SourceField -{ - [JsonInclude, JsonPropertyName("compress")] - public bool? Compress { get; set; } - [JsonInclude, JsonPropertyName("compress_threshold")] - public string? CompressThreshold { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("excludes")] - public ICollection? Excludes { get; set; } - [JsonInclude, JsonPropertyName("includes")] - public ICollection? Includes { get; set; } - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldMode? Mode { get; set; } -} - -public sealed partial class SourceFieldDescriptor : SerializableDescriptor -{ - internal SourceFieldDescriptor(Action configure) => configure.Invoke(this); - - public SourceFieldDescriptor() : base() - { - } - - private bool? CompressValue { get; set; } - private string? CompressThresholdValue { get; set; } - private bool? EnabledValue { get; set; } - private ICollection? ExcludesValue { get; set; } - private ICollection? IncludesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldMode? ModeValue { get; set; } - - public SourceFieldDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public SourceFieldDescriptor CompressThreshold(string? compressThreshold) - { - CompressThresholdValue = compressThreshold; - return Self; - } - - public SourceFieldDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public SourceFieldDescriptor Excludes(ICollection? excludes) - { - ExcludesValue = excludes; - return Self; - } - - public SourceFieldDescriptor Includes(ICollection? includes) - { - IncludesValue = includes; - return Self; - } - - public SourceFieldDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldMode? mode) - { - ModeValue = mode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - if (!string.IsNullOrEmpty(CompressThresholdValue)) - { - writer.WritePropertyName("compress_threshold"); - writer.WriteStringValue(CompressThresholdValue); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (ExcludesValue is not null) - { - writer.WritePropertyName("excludes"); - JsonSerializer.Serialize(writer, ExcludesValue, options); - } - - if (IncludesValue is not null) - { - writer.WritePropertyName("includes"); - JsonSerializer.Serialize(writer, IncludesValue, options); - } - - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs deleted file mode 100644 index 248ed867b51..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SparseVectorProperty.g.cs +++ /dev/null @@ -1,301 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class SparseVectorProperty : IProperty -{ - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "sparse_vector"; -} - -public sealed partial class SparseVectorPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal SparseVectorPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public SparseVectorPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SparseVectorPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SparseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public SparseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public SparseVectorPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("sparse_vector"); - writer.WriteEndObject(); - } - - SparseVectorProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue - }; -} - -public sealed partial class SparseVectorPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SparseVectorPropertyDescriptor(Action configure) => configure.Invoke(this); - - public SparseVectorPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - - public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public SparseVectorPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SparseVectorPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public SparseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public SparseVectorPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public SparseVectorPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public SparseVectorPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("sparse_vector"); - writer.WriteEndObject(); - } - - SparseVectorProperty IBuildableDescriptor.Build() => new() - { - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SuggestContext.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SuggestContext.g.cs deleted file mode 100644 index bfefef311a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/SuggestContext.g.cs +++ /dev/null @@ -1,184 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class SuggestContext -{ - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name Name { get; set; } - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Path { get; set; } - [JsonInclude, JsonPropertyName("precision")] - public object? Precision { get; set; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; set; } -} - -public sealed partial class SuggestContextDescriptor : SerializableDescriptor> -{ - internal SuggestContextDescriptor(Action> configure) => configure.Invoke(this); - - public SuggestContextDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - private object? PrecisionValue { get; set; } - private string TypeValue { get; set; } - - public SuggestContextDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - public SuggestContextDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - public SuggestContextDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public SuggestContextDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public SuggestContextDescriptor Precision(object? precision) - { - PrecisionValue = precision; - return Self; - } - - public SuggestContextDescriptor Type(string type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - writer.WriteEndObject(); - } -} - -public sealed partial class SuggestContextDescriptor : SerializableDescriptor -{ - internal SuggestContextDescriptor(Action configure) => configure.Invoke(this); - - public SuggestContextDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - private object? PrecisionValue { get; set; } - private string TypeValue { get; set; } - - public SuggestContextDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - public SuggestContextDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - public SuggestContextDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public SuggestContextDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public SuggestContextDescriptor Precision(object? precision) - { - PrecisionValue = precision; - return Self; - } - - public SuggestContextDescriptor Type(string type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - if (PrecisionValue is not null) - { - writer.WritePropertyName("precision"); - JsonSerializer.Serialize(writer, PrecisionValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextIndexPrefixes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextIndexPrefixes.g.cs deleted file mode 100644 index 4a5f6151233..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextIndexPrefixes.g.cs +++ /dev/null @@ -1,70 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class TextIndexPrefixes -{ - [JsonInclude, JsonPropertyName("max_chars")] - public int MaxChars { get; set; } - [JsonInclude, JsonPropertyName("min_chars")] - public int MinChars { get; set; } -} - -public sealed partial class TextIndexPrefixesDescriptor : SerializableDescriptor -{ - internal TextIndexPrefixesDescriptor(Action configure) => configure.Invoke(this); - - public TextIndexPrefixesDescriptor() : base() - { - } - - private int MaxCharsValue { get; set; } - private int MinCharsValue { get; set; } - - public TextIndexPrefixesDescriptor MaxChars(int maxChars) - { - MaxCharsValue = maxChars; - return Self; - } - - public TextIndexPrefixesDescriptor MinChars(int minChars) - { - MinCharsValue = minChars; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("max_chars"); - writer.WriteNumberValue(MaxCharsValue); - writer.WritePropertyName("min_chars"); - writer.WriteNumberValue(MinCharsValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextProperty.g.cs deleted file mode 100644 index 75c78c9a1b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TextProperty.g.cs +++ /dev/null @@ -1,1028 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class TextProperty : IProperty -{ - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("eager_global_ordinals")] - public bool? EagerGlobalOrdinals { get; set; } - [JsonInclude, JsonPropertyName("fielddata")] - public bool? Fielddata { get; set; } - [JsonInclude, JsonPropertyName("fielddata_frequency_filter")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? FielddataFrequencyFilter { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - [JsonInclude, JsonPropertyName("index_options")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptions { get; set; } - [JsonInclude, JsonPropertyName("index_phrases")] - public bool? IndexPhrases { get; set; } - [JsonInclude, JsonPropertyName("index_prefixes")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? IndexPrefixes { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("norms")] - public bool? Norms { get; set; } - [JsonInclude, JsonPropertyName("position_increment_gap")] - public int? PositionIncrementGap { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("search_analyzer")] - public string? SearchAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("search_quote_analyzer")] - public string? SearchQuoteAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("similarity")] - public string? Similarity { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("term_vector")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVector { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "text"; -} - -public sealed partial class TextPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal TextPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public TextPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private bool? FielddataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? FielddataFrequencyFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor FielddataFrequencyFilterDescriptor { get; set; } - private Action FielddataFrequencyFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private bool? IndexPhrasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? IndexPrefixesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor IndexPrefixesDescriptor { get; set; } - private Action IndexPrefixesDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private int? PositionIncrementGapValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SearchAnalyzerValue { get; set; } - private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } - - public TextPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public TextPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public TextPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public TextPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public TextPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public TextPropertyDescriptor Fielddata(bool? fielddata = true) - { - FielddataValue = fielddata; - return Self; - } - - public TextPropertyDescriptor FielddataFrequencyFilter(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? fielddataFrequencyFilter) - { - FielddataFrequencyFilterDescriptor = null; - FielddataFrequencyFilterDescriptorAction = null; - FielddataFrequencyFilterValue = fielddataFrequencyFilter; - return Self; - } - - public TextPropertyDescriptor FielddataFrequencyFilter(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor descriptor) - { - FielddataFrequencyFilterValue = null; - FielddataFrequencyFilterDescriptorAction = null; - FielddataFrequencyFilterDescriptor = descriptor; - return Self; - } - - public TextPropertyDescriptor FielddataFrequencyFilter(Action configure) - { - FielddataFrequencyFilterValue = null; - FielddataFrequencyFilterDescriptor = null; - FielddataFrequencyFilterDescriptorAction = configure; - return Self; - } - - public TextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public TextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public TextPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public TextPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public TextPropertyDescriptor IndexPhrases(bool? indexPhrases = true) - { - IndexPhrasesValue = indexPhrases; - return Self; - } - - public TextPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? indexPrefixes) - { - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesValue = indexPrefixes; - return Self; - } - - public TextPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor descriptor) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesDescriptor = descriptor; - return Self; - } - - public TextPropertyDescriptor IndexPrefixes(Action configure) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = configure; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public TextPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TextPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public TextPropertyDescriptor PositionIncrementGap(int? positionIncrementGap) - { - PositionIncrementGapValue = positionIncrementGap; - return Self; - } - - public TextPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public TextPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public TextPropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer) - { - SearchQuoteAnalyzerValue = searchQuoteAnalyzer; - return Self; - } - - public TextPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public TextPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public TextPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? termVector) - { - TermVectorValue = termVector; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FielddataValue.HasValue) - { - writer.WritePropertyName("fielddata"); - writer.WriteBooleanValue(FielddataValue.Value); - } - - if (FielddataFrequencyFilterDescriptor is not null) - { - writer.WritePropertyName("fielddata_frequency_filter"); - JsonSerializer.Serialize(writer, FielddataFrequencyFilterDescriptor, options); - } - else if (FielddataFrequencyFilterDescriptorAction is not null) - { - writer.WritePropertyName("fielddata_frequency_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor(FielddataFrequencyFilterDescriptorAction), options); - } - else if (FielddataFrequencyFilterValue is not null) - { - writer.WritePropertyName("fielddata_frequency_filter"); - JsonSerializer.Serialize(writer, FielddataFrequencyFilterValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (IndexPhrasesValue.HasValue) - { - writer.WritePropertyName("index_phrases"); - writer.WriteBooleanValue(IndexPhrasesValue.Value); - } - - if (IndexPrefixesDescriptor is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesDescriptor, options); - } - else if (IndexPrefixesDescriptorAction is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction), options); - } - else if (IndexPrefixesValue is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (PositionIncrementGapValue.HasValue) - { - writer.WritePropertyName("position_increment_gap"); - writer.WriteNumberValue(PositionIncrementGapValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SearchQuoteAnalyzerValue)) - { - writer.WritePropertyName("search_quote_analyzer"); - writer.WriteStringValue(SearchQuoteAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TermVectorValue is not null) - { - writer.WritePropertyName("term_vector"); - JsonSerializer.Serialize(writer, TermVectorValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("text"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? BuildFielddataFrequencyFilter() - { - if (FielddataFrequencyFilterValue is not null) - { - return FielddataFrequencyFilterValue; - } - - if ((object)FielddataFrequencyFilterDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (FielddataFrequencyFilterDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor(FielddataFrequencyFilterDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? BuildIndexPrefixes() - { - if (IndexPrefixesValue is not null) - { - return IndexPrefixesValue; - } - - if ((object)IndexPrefixesDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (IndexPrefixesDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - TextProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Boost = BoostValue, - CopyTo = CopyToValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fielddata = FielddataValue, - FielddataFrequencyFilter = BuildFielddataFrequencyFilter(), - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - IndexPhrases = IndexPhrasesValue, - IndexPrefixes = BuildIndexPrefixes(), - Meta = MetaValue, - Norms = NormsValue, - PositionIncrementGap = PositionIncrementGapValue, - Properties = PropertiesValue, - SearchAnalyzer = SearchAnalyzerValue, - SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, - Store = StoreValue, - TermVector = TermVectorValue - }; -} - -public sealed partial class TextPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal TextPropertyDescriptor(Action configure) => configure.Invoke(this); - - public TextPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EagerGlobalOrdinalsValue { get; set; } - private bool? FielddataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? FielddataFrequencyFilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor FielddataFrequencyFilterDescriptor { get; set; } - private Action FielddataFrequencyFilterDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? IndexOptionsValue { get; set; } - private bool? IndexPhrasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? IndexPrefixesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor IndexPrefixesDescriptor { get; set; } - private Action IndexPrefixesDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NormsValue { get; set; } - private int? PositionIncrementGapValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private string? SearchAnalyzerValue { get; set; } - private string? SearchQuoteAnalyzerValue { get; set; } - private string? SimilarityValue { get; set; } - private bool? StoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? TermVectorValue { get; set; } - - public TextPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public TextPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public TextPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public TextPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public TextPropertyDescriptor EagerGlobalOrdinals(bool? eagerGlobalOrdinals = true) - { - EagerGlobalOrdinalsValue = eagerGlobalOrdinals; - return Self; - } - - public TextPropertyDescriptor Fielddata(bool? fielddata = true) - { - FielddataValue = fielddata; - return Self; - } - - public TextPropertyDescriptor FielddataFrequencyFilter(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? fielddataFrequencyFilter) - { - FielddataFrequencyFilterDescriptor = null; - FielddataFrequencyFilterDescriptorAction = null; - FielddataFrequencyFilterValue = fielddataFrequencyFilter; - return Self; - } - - public TextPropertyDescriptor FielddataFrequencyFilter(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor descriptor) - { - FielddataFrequencyFilterValue = null; - FielddataFrequencyFilterDescriptorAction = null; - FielddataFrequencyFilterDescriptor = descriptor; - return Self; - } - - public TextPropertyDescriptor FielddataFrequencyFilter(Action configure) - { - FielddataFrequencyFilterValue = null; - FielddataFrequencyFilterDescriptor = null; - FielddataFrequencyFilterDescriptorAction = configure; - return Self; - } - - public TextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public TextPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public TextPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - public TextPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexOptions? indexOptions) - { - IndexOptionsValue = indexOptions; - return Self; - } - - public TextPropertyDescriptor IndexPhrases(bool? indexPhrases = true) - { - IndexPhrasesValue = indexPhrases; - return Self; - } - - public TextPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? indexPrefixes) - { - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesValue = indexPrefixes; - return Self; - } - - public TextPropertyDescriptor IndexPrefixes(Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor descriptor) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptorAction = null; - IndexPrefixesDescriptor = descriptor; - return Self; - } - - public TextPropertyDescriptor IndexPrefixes(Action configure) - { - IndexPrefixesValue = null; - IndexPrefixesDescriptor = null; - IndexPrefixesDescriptorAction = configure; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public TextPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TextPropertyDescriptor Norms(bool? norms = true) - { - NormsValue = norms; - return Self; - } - - public TextPropertyDescriptor PositionIncrementGap(int? positionIncrementGap) - { - PositionIncrementGapValue = positionIncrementGap; - return Self; - } - - public TextPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public TextPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TextPropertyDescriptor SearchAnalyzer(string? searchAnalyzer) - { - SearchAnalyzerValue = searchAnalyzer; - return Self; - } - - public TextPropertyDescriptor SearchQuoteAnalyzer(string? searchQuoteAnalyzer) - { - SearchQuoteAnalyzerValue = searchQuoteAnalyzer; - return Self; - } - - public TextPropertyDescriptor Similarity(string? similarity) - { - SimilarityValue = similarity; - return Self; - } - - public TextPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public TextPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Serverless.Mapping.TermVectorOption? termVector) - { - TermVectorValue = termVector; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EagerGlobalOrdinalsValue.HasValue) - { - writer.WritePropertyName("eager_global_ordinals"); - writer.WriteBooleanValue(EagerGlobalOrdinalsValue.Value); - } - - if (FielddataValue.HasValue) - { - writer.WritePropertyName("fielddata"); - writer.WriteBooleanValue(FielddataValue.Value); - } - - if (FielddataFrequencyFilterDescriptor is not null) - { - writer.WritePropertyName("fielddata_frequency_filter"); - JsonSerializer.Serialize(writer, FielddataFrequencyFilterDescriptor, options); - } - else if (FielddataFrequencyFilterDescriptorAction is not null) - { - writer.WritePropertyName("fielddata_frequency_filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor(FielddataFrequencyFilterDescriptorAction), options); - } - else if (FielddataFrequencyFilterValue is not null) - { - writer.WritePropertyName("fielddata_frequency_filter"); - JsonSerializer.Serialize(writer, FielddataFrequencyFilterValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (IndexOptionsValue is not null) - { - writer.WritePropertyName("index_options"); - JsonSerializer.Serialize(writer, IndexOptionsValue, options); - } - - if (IndexPhrasesValue.HasValue) - { - writer.WritePropertyName("index_phrases"); - writer.WriteBooleanValue(IndexPhrasesValue.Value); - } - - if (IndexPrefixesDescriptor is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesDescriptor, options); - } - else if (IndexPrefixesDescriptorAction is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction), options); - } - else if (IndexPrefixesValue is not null) - { - writer.WritePropertyName("index_prefixes"); - JsonSerializer.Serialize(writer, IndexPrefixesValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NormsValue.HasValue) - { - writer.WritePropertyName("norms"); - writer.WriteBooleanValue(NormsValue.Value); - } - - if (PositionIncrementGapValue.HasValue) - { - writer.WritePropertyName("position_increment_gap"); - writer.WriteNumberValue(PositionIncrementGapValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (!string.IsNullOrEmpty(SearchAnalyzerValue)) - { - writer.WritePropertyName("search_analyzer"); - writer.WriteStringValue(SearchAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SearchQuoteAnalyzerValue)) - { - writer.WritePropertyName("search_quote_analyzer"); - writer.WriteStringValue(SearchQuoteAnalyzerValue); - } - - if (!string.IsNullOrEmpty(SimilarityValue)) - { - writer.WritePropertyName("similarity"); - writer.WriteStringValue(SimilarityValue); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TermVectorValue is not null) - { - writer.WritePropertyName("term_vector"); - JsonSerializer.Serialize(writer, TermVectorValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("text"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilter? BuildFielddataFrequencyFilter() - { - if (FielddataFrequencyFilterValue is not null) - { - return FielddataFrequencyFilterValue; - } - - if ((object)FielddataFrequencyFilterDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (FielddataFrequencyFilterDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.FielddataFrequencyFilterDescriptor(FielddataFrequencyFilterDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixes? BuildIndexPrefixes() - { - if (IndexPrefixesValue is not null) - { - return IndexPrefixesValue; - } - - if ((object)IndexPrefixesDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (IndexPrefixesDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.TextIndexPrefixesDescriptor(IndexPrefixesDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - TextProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Boost = BoostValue, - CopyTo = CopyToValue, - Dynamic = DynamicValue, - EagerGlobalOrdinals = EagerGlobalOrdinalsValue, - Fielddata = FielddataValue, - FielddataFrequencyFilter = BuildFielddataFrequencyFilter(), - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - IndexOptions = IndexOptionsValue, - IndexPhrases = IndexPhrasesValue, - IndexPrefixes = BuildIndexPrefixes(), - Meta = MetaValue, - Norms = NormsValue, - PositionIncrementGap = PositionIncrementGapValue, - Properties = PropertiesValue, - SearchAnalyzer = SearchAnalyzerValue, - SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, - Similarity = SimilarityValue, - Store = StoreValue, - TermVector = TermVectorValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TokenCountProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TokenCountProperty.g.cs deleted file mode 100644 index 8f5f9b0aaa7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TokenCountProperty.g.cs +++ /dev/null @@ -1,542 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class TokenCountProperty : IProperty -{ - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("enable_position_increments")] - public bool? EnablePositionIncrements { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public double? NullValue { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "token_count"; -} - -public sealed partial class TokenCountPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal TokenCountPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public TokenCountPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnablePositionIncrementsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private double? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public TokenCountPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public TokenCountPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public TokenCountPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public TokenCountPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public TokenCountPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public TokenCountPropertyDescriptor EnablePositionIncrements(bool? enablePositionIncrements = true) - { - EnablePositionIncrementsValue = enablePositionIncrements; - return Self; - } - - public TokenCountPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public TokenCountPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public TokenCountPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public TokenCountPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TokenCountPropertyDescriptor NullValue(double? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public TokenCountPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public TokenCountPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnablePositionIncrementsValue.HasValue) - { - writer.WritePropertyName("enable_position_increments"); - writer.WriteBooleanValue(EnablePositionIncrementsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("token_count"); - writer.WriteEndObject(); - } - - TokenCountProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EnablePositionIncrements = EnablePositionIncrementsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class TokenCountPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal TokenCountPropertyDescriptor(Action configure) => configure.Invoke(this); - - public TokenCountPropertyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnablePositionIncrementsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private double? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public TokenCountPropertyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - public TokenCountPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public TokenCountPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public TokenCountPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public TokenCountPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public TokenCountPropertyDescriptor EnablePositionIncrements(bool? enablePositionIncrements = true) - { - EnablePositionIncrementsValue = enablePositionIncrements; - return Self; - } - - public TokenCountPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public TokenCountPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public TokenCountPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public TokenCountPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TokenCountPropertyDescriptor NullValue(double? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public TokenCountPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public TokenCountPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TokenCountPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnablePositionIncrementsValue.HasValue) - { - writer.WritePropertyName("enable_position_increments"); - writer.WriteBooleanValue(EnablePositionIncrementsValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("token_count"); - writer.WriteEndObject(); - } - - TokenCountProperty IBuildableDescriptor.Build() => new() - { - Analyzer = AnalyzerValue, - Boost = BoostValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - EnablePositionIncrements = EnablePositionIncrementsValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs deleted file mode 100644 index 00444c58a91..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/TypeMapping.g.cs +++ /dev/null @@ -1,988 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class TypeMapping -{ - [JsonInclude, JsonPropertyName("all_field")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllField { get; set; } - [JsonInclude, JsonPropertyName("_data_stream_timestamp")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? DataStreamTimestamp { get; set; } - [JsonInclude, JsonPropertyName("date_detection")] - public bool? DateDetection { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("dynamic_date_formats")] - public ICollection? DynamicDateFormats { get; set; } - [JsonInclude, JsonPropertyName("dynamic_templates")] - public ICollection>? DynamicTemplates { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("_field_names")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNames { get; set; } - [JsonInclude, JsonPropertyName("index_field")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexField { get; set; } - [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("numeric_detection")] - public bool? NumericDetection { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("_routing")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? Routing { get; set; } - [JsonInclude, JsonPropertyName("runtime")] - public IDictionary? Runtime { get; set; } - [JsonInclude, JsonPropertyName("_size")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? Size { get; set; } - [JsonInclude, JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? Source { get; set; } - [JsonInclude, JsonPropertyName("subobjects")] - public bool? Subobjects { get; set; } -} - -public sealed partial class TypeMappingDescriptor : SerializableDescriptor> -{ - internal TypeMappingDescriptor(Action> configure) => configure.Invoke(this); - - public TypeMappingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllFieldDescriptor AllFieldDescriptor { get; set; } - private Action AllFieldDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? DataStreamTimestampValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestampDescriptor DataStreamTimestampDescriptor { get; set; } - private Action DataStreamTimestampDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } - private Action FieldNamesDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexFieldDescriptor IndexFieldDescriptor { get; set; } - private Action IndexFieldDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } - private Action RoutingDescriptorAction { get; set; } - private IDictionary> RuntimeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeFieldDescriptor SizeDescriptor { get; set; } - private Action SizeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - private bool? SubobjectsValue { get; set; } - - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? allField) - { - AllFieldDescriptor = null; - AllFieldDescriptorAction = null; - AllFieldValue = allField; - return Self; - } - - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllFieldDescriptor descriptor) - { - AllFieldValue = null; - AllFieldDescriptorAction = null; - AllFieldDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor AllField(Action configure) - { - AllFieldValue = null; - AllFieldDescriptor = null; - AllFieldDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? dataStreamTimestamp) - { - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampValue = dataStreamTimestamp; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestampDescriptor descriptor) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Action configure) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor DateDetection(bool? dateDetection = true) - { - DateDetectionValue = dateDetection; - return Self; - } - - public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) - { - DynamicDateFormatsValue = dynamicDateFormats; - return Self; - } - - public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) - { - DynamicTemplatesValue = dynamicTemplates; - return Self; - } - - public TypeMappingDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor FieldNames(Action configure) - { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? indexField) - { - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = null; - IndexFieldValue = indexField; - return Self; - } - - public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexFieldDescriptor descriptor) - { - IndexFieldValue = null; - IndexFieldDescriptorAction = null; - IndexFieldDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor IndexField(Action configure) - { - IndexFieldValue = null; - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) - { - NumericDetectionValue = numericDetection; - return Self; - } - - public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TypeMappingDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Runtime(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? size) - { - SizeDescriptor = null; - SizeDescriptorAction = null; - SizeValue = size; - return Self; - } - - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeFieldDescriptor descriptor) - { - SizeValue = null; - SizeDescriptorAction = null; - SizeDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Size(Action configure) - { - SizeValue = null; - SizeDescriptor = null; - SizeDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Subobjects(bool? subobjects = true) - { - SubobjectsValue = subobjects; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllFieldDescriptor is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldDescriptor, options); - } - else if (AllFieldDescriptorAction is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.AllFieldDescriptor(AllFieldDescriptorAction), options); - } - else if (AllFieldValue is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldValue, options); - } - - if (DataStreamTimestampDescriptor is not null) - { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, DataStreamTimestampDescriptor, options); - } - else if (DataStreamTimestampDescriptorAction is not null) - { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestampDescriptor(DataStreamTimestampDescriptorAction), options); - } - else if (DataStreamTimestampValue is not null) - { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, DataStreamTimestampValue, options); - } - - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldNamesDescriptor is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesDescriptor, options); - } - else if (FieldNamesDescriptorAction is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor(FieldNamesDescriptorAction), options); - } - else if (FieldNamesValue is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesValue, options); - } - - if (IndexFieldDescriptor is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); - } - else if (IndexFieldDescriptorAction is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexFieldDescriptor(IndexFieldDescriptorAction), options); - } - else if (IndexFieldValue is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RoutingDescriptor is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingDescriptor, options); - } - else if (RoutingDescriptorAction is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor(RoutingDescriptorAction), options); - } - else if (RoutingValue is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - - if (SizeDescriptor is not null) - { - writer.WritePropertyName("_size"); - JsonSerializer.Serialize(writer, SizeDescriptor, options); - } - else if (SizeDescriptorAction is not null) - { - writer.WritePropertyName("_size"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeFieldDescriptor(SizeDescriptorAction), options); - } - else if (SizeValue is not null) - { - writer.WritePropertyName("_size"); - JsonSerializer.Serialize(writer, SizeValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SubobjectsValue.HasValue) - { - writer.WritePropertyName("subobjects"); - writer.WriteBooleanValue(SubobjectsValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TypeMappingDescriptor : SerializableDescriptor -{ - internal TypeMappingDescriptor(Action configure) => configure.Invoke(this); - - public TypeMappingDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? AllFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.AllFieldDescriptor AllFieldDescriptor { get; set; } - private Action AllFieldDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? DataStreamTimestampValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestampDescriptor DataStreamTimestampDescriptor { get; set; } - private Action DataStreamTimestampDescriptorAction { get; set; } - private bool? DateDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private ICollection? DynamicDateFormatsValue { get; set; } - private ICollection>? DynamicTemplatesValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? FieldNamesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor FieldNamesDescriptor { get; set; } - private Action FieldNamesDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? IndexFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexFieldDescriptor IndexFieldDescriptor { get; set; } - private Action IndexFieldDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private bool? NumericDetectionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? RoutingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor RoutingDescriptor { get; set; } - private Action RoutingDescriptorAction { get; set; } - private IDictionary RuntimeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeFieldDescriptor SizeDescriptor { get; set; } - private Action SizeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? SourceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } - private bool? SubobjectsValue { get; set; } - - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllField? allField) - { - AllFieldDescriptor = null; - AllFieldDescriptorAction = null; - AllFieldValue = allField; - return Self; - } - - public TypeMappingDescriptor AllField(Elastic.Clients.Elasticsearch.Serverless.Mapping.AllFieldDescriptor descriptor) - { - AllFieldValue = null; - AllFieldDescriptorAction = null; - AllFieldDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor AllField(Action configure) - { - AllFieldValue = null; - AllFieldDescriptor = null; - AllFieldDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestamp? dataStreamTimestamp) - { - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampValue = dataStreamTimestamp; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestampDescriptor descriptor) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptorAction = null; - DataStreamTimestampDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor DataStreamTimestamp(Action configure) - { - DataStreamTimestampValue = null; - DataStreamTimestampDescriptor = null; - DataStreamTimestampDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor DateDetection(bool? dateDetection = true) - { - DateDetectionValue = dateDetection; - return Self; - } - - public TypeMappingDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public TypeMappingDescriptor DynamicDateFormats(ICollection? dynamicDateFormats) - { - DynamicDateFormatsValue = dynamicDateFormats; - return Self; - } - - public TypeMappingDescriptor DynamicTemplates(ICollection>? dynamicTemplates) - { - DynamicTemplatesValue = dynamicTemplates; - return Self; - } - - public TypeMappingDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesField? fieldNames) - { - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = null; - FieldNamesValue = fieldNames; - return Self; - } - - public TypeMappingDescriptor FieldNames(Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor descriptor) - { - FieldNamesValue = null; - FieldNamesDescriptorAction = null; - FieldNamesDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor FieldNames(Action configure) - { - FieldNamesValue = null; - FieldNamesDescriptor = null; - FieldNamesDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexField? indexField) - { - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = null; - IndexFieldValue = indexField; - return Self; - } - - public TypeMappingDescriptor IndexField(Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexFieldDescriptor descriptor) - { - IndexFieldValue = null; - IndexFieldDescriptorAction = null; - IndexFieldDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor IndexField(Action configure) - { - IndexFieldValue = null; - IndexFieldDescriptor = null; - IndexFieldDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TypeMappingDescriptor NumericDetection(bool? numericDetection = true) - { - NumericDetectionValue = numericDetection; - return Self; - } - - public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public TypeMappingDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TypeMappingDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingField? routing) - { - RoutingDescriptor = null; - RoutingDescriptorAction = null; - RoutingValue = routing; - return Self; - } - - public TypeMappingDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor descriptor) - { - RoutingValue = null; - RoutingDescriptorAction = null; - RoutingDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Routing(Action configure) - { - RoutingValue = null; - RoutingDescriptor = null; - RoutingDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Runtime(Func, FluentDescriptorDictionary> selector) - { - RuntimeValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeField? size) - { - SizeDescriptor = null; - SizeDescriptorAction = null; - SizeValue = size; - return Self; - } - - public TypeMappingDescriptor Size(Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeFieldDescriptor descriptor) - { - SizeValue = null; - SizeDescriptorAction = null; - SizeDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Size(Action configure) - { - SizeValue = null; - SizeDescriptor = null; - SizeDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceField? source) - { - SourceDescriptor = null; - SourceDescriptorAction = null; - SourceValue = source; - return Self; - } - - public TypeMappingDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor descriptor) - { - SourceValue = null; - SourceDescriptorAction = null; - SourceDescriptor = descriptor; - return Self; - } - - public TypeMappingDescriptor Source(Action configure) - { - SourceValue = null; - SourceDescriptor = null; - SourceDescriptorAction = configure; - return Self; - } - - public TypeMappingDescriptor Subobjects(bool? subobjects = true) - { - SubobjectsValue = subobjects; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllFieldDescriptor is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldDescriptor, options); - } - else if (AllFieldDescriptorAction is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.AllFieldDescriptor(AllFieldDescriptorAction), options); - } - else if (AllFieldValue is not null) - { - writer.WritePropertyName("all_field"); - JsonSerializer.Serialize(writer, AllFieldValue, options); - } - - if (DataStreamTimestampDescriptor is not null) - { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, DataStreamTimestampDescriptor, options); - } - else if (DataStreamTimestampDescriptorAction is not null) - { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.DataStreamTimestampDescriptor(DataStreamTimestampDescriptorAction), options); - } - else if (DataStreamTimestampValue is not null) - { - writer.WritePropertyName("_data_stream_timestamp"); - JsonSerializer.Serialize(writer, DataStreamTimestampValue, options); - } - - if (DateDetectionValue.HasValue) - { - writer.WritePropertyName("date_detection"); - writer.WriteBooleanValue(DateDetectionValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (DynamicDateFormatsValue is not null) - { - writer.WritePropertyName("dynamic_date_formats"); - JsonSerializer.Serialize(writer, DynamicDateFormatsValue, options); - } - - if (DynamicTemplatesValue is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, DynamicTemplatesValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldNamesDescriptor is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesDescriptor, options); - } - else if (FieldNamesDescriptorAction is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.FieldNamesFieldDescriptor(FieldNamesDescriptorAction), options); - } - else if (FieldNamesValue is not null) - { - writer.WritePropertyName("_field_names"); - JsonSerializer.Serialize(writer, FieldNamesValue, options); - } - - if (IndexFieldDescriptor is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldDescriptor, options); - } - else if (IndexFieldDescriptorAction is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.IndexFieldDescriptor(IndexFieldDescriptorAction), options); - } - else if (IndexFieldValue is not null) - { - writer.WritePropertyName("index_field"); - JsonSerializer.Serialize(writer, IndexFieldValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NumericDetectionValue.HasValue) - { - writer.WritePropertyName("numeric_detection"); - writer.WriteBooleanValue(NumericDetectionValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (RoutingDescriptor is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingDescriptor, options); - } - else if (RoutingDescriptorAction is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.RoutingFieldDescriptor(RoutingDescriptorAction), options); - } - else if (RoutingValue is not null) - { - writer.WritePropertyName("_routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (RuntimeValue is not null) - { - writer.WritePropertyName("runtime"); - JsonSerializer.Serialize(writer, RuntimeValue, options); - } - - if (SizeDescriptor is not null) - { - writer.WritePropertyName("_size"); - JsonSerializer.Serialize(writer, SizeDescriptor, options); - } - else if (SizeDescriptorAction is not null) - { - writer.WritePropertyName("_size"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SizeFieldDescriptor(SizeDescriptorAction), options); - } - else if (SizeValue is not null) - { - writer.WritePropertyName("_size"); - JsonSerializer.Serialize(writer, SizeValue, options); - } - - if (SourceDescriptor is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceDescriptor, options); - } - else if (SourceDescriptorAction is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.SourceFieldDescriptor(SourceDescriptorAction), options); - } - else if (SourceValue is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, SourceValue, options); - } - - if (SubobjectsValue.HasValue) - { - writer.WritePropertyName("subobjects"); - writer.WriteBooleanValue(SubobjectsValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs deleted file mode 100644 index fbf3e48aad7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs +++ /dev/null @@ -1,710 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class UnsignedLongNumberProperty : IProperty -{ - [JsonInclude, JsonPropertyName("boost")] - public double? Boost { get; set; } - [JsonInclude, JsonPropertyName("coerce")] - public bool? Coerce { get; set; } - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } - [JsonInclude, JsonPropertyName("index")] - public bool? Index { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public long? NullValue { get; set; } - [JsonInclude, JsonPropertyName("on_script_error")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptError { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "unsigned_long"; -} - -public sealed partial class UnsignedLongNumberPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal UnsignedLongNumberPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public UnsignedLongNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public UnsignedLongNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public UnsignedLongNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public UnsignedLongNumberPropertyDescriptor NullValue(long? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("unsigned_long"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - UnsignedLongNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} - -public sealed partial class UnsignedLongNumberPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal UnsignedLongNumberPropertyDescriptor(Action configure) => configure.Invoke(this); - - public UnsignedLongNumberPropertyDescriptor() : base() - { - } - - private double? BoostValue { get; set; } - private bool? CoerceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private bool? IgnoreMalformedValue { get; set; } - private bool? IndexValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? OnScriptErrorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private bool? StoreValue { get; set; } - - public UnsignedLongNumberPropertyDescriptor Boost(double? boost) - { - BoostValue = boost; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Coerce(bool? coerce = true) - { - CoerceValue = coerce; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor IgnoreMalformed(bool? ignoreMalformed = true) - { - IgnoreMalformedValue = ignoreMalformed; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Index(bool? index = true) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public UnsignedLongNumberPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public UnsignedLongNumberPropertyDescriptor NullValue(long? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor OnScriptError(Elastic.Clients.Elasticsearch.Serverless.Mapping.OnScriptError? onScriptError) - { - OnScriptErrorValue = onScriptError; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public UnsignedLongNumberPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CoerceValue.HasValue) - { - writer.WritePropertyName("coerce"); - writer.WriteBooleanValue(CoerceValue.Value); - } - - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (IgnoreMalformedValue.HasValue) - { - writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); - } - - if (IndexValue.HasValue) - { - writer.WritePropertyName("index"); - writer.WriteBooleanValue(IndexValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (NullValueValue.HasValue) - { - writer.WritePropertyName("null_value"); - writer.WriteNumberValue(NullValueValue.Value); - } - - if (OnScriptErrorValue is not null) - { - writer.WritePropertyName("on_script_error"); - JsonSerializer.Serialize(writer, OnScriptErrorValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else if (ScriptValue is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("unsigned_long"); - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Script? BuildScript() - { - if (ScriptValue is not null) - { - return ScriptValue; - } - - if ((object)ScriptDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (ScriptDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - UnsignedLongNumberProperty IBuildableDescriptor.Build() => new() - { - Boost = BoostValue, - Coerce = CoerceValue, - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - IgnoreMalformed = IgnoreMalformedValue, - Index = IndexValue, - Meta = MetaValue, - NullValue = NullValueValue, - OnScriptError = OnScriptErrorValue, - Properties = PropertiesValue, - Script = BuildScript(), - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/VersionProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/VersionProperty.g.cs deleted file mode 100644 index 44e9c097d81..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/VersionProperty.g.cs +++ /dev/null @@ -1,392 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class VersionProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "version"; -} - -public sealed partial class VersionPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal VersionPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public VersionPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public VersionPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public VersionPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public VersionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public VersionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public VersionPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public VersionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public VersionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("version"); - writer.WriteEndObject(); - } - - VersionProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class VersionPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal VersionPropertyDescriptor(Action configure) => configure.Invoke(this); - - public VersionPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public VersionPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public VersionPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public VersionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public VersionPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public VersionPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public VersionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public VersionPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public VersionPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("version"); - writer.WriteEndObject(); - } - - VersionProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/WildcardProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/WildcardProperty.g.cs deleted file mode 100644 index 3361d4ac704..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/WildcardProperty.g.cs +++ /dev/null @@ -1,422 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; - -public sealed partial class WildcardProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("doc_values")] - public bool? DocValues { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("null_value")] - public string? NullValue { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "wildcard"; -} - -public sealed partial class WildcardPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal WildcardPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public WildcardPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public WildcardPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public WildcardPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public WildcardPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public WildcardPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public WildcardPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WildcardPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public WildcardPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public WildcardPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("wildcard"); - writer.WriteEndObject(); - } - - WildcardProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} - -public sealed partial class WildcardPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal WildcardPropertyDescriptor(Action configure) => configure.Invoke(this); - - public WildcardPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? CopyToValue { get; set; } - private bool? DocValuesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - - public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Serverless.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public WildcardPropertyDescriptor DocValues(bool? docValues = true) - { - DocValuesValue = docValues; - return Self; - } - - public WildcardPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public WildcardPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public WildcardPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public WildcardPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WildcardPropertyDescriptor NullValue(string? nullValue) - { - NullValueValue = nullValue; - return Self; - } - - public WildcardPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public WildcardPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public WildcardPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DocValuesValue.HasValue) - { - writer.WritePropertyName("doc_values"); - writer.WriteBooleanValue(DocValuesValue.Value); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NullValueValue)) - { - writer.WritePropertyName("null_value"); - writer.WriteStringValue(NullValueValue); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("wildcard"); - writer.WriteEndObject(); - } - - WildcardProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - DocValues = DocValuesValue, - Dynamic = DynamicValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - NullValue = NullValueValue, - Properties = PropertiesValue, - Store = StoreValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MergesStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MergesStats.g.cs deleted file mode 100644 index 753e79b1df6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/MergesStats.g.cs +++ /dev/null @@ -1,64 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class MergesStats -{ - [JsonInclude, JsonPropertyName("current")] - public long Current { get; init; } - [JsonInclude, JsonPropertyName("current_docs")] - public long CurrentDocs { get; init; } - [JsonInclude, JsonPropertyName("current_size")] - public string? CurrentSize { get; init; } - [JsonInclude, JsonPropertyName("current_size_in_bytes")] - public long CurrentSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } - [JsonInclude, JsonPropertyName("total_auto_throttle")] - public string? TotalAutoThrottle { get; init; } - [JsonInclude, JsonPropertyName("total_auto_throttle_in_bytes")] - public long TotalAutoThrottleInBytes { get; init; } - [JsonInclude, JsonPropertyName("total_docs")] - public long TotalDocs { get; init; } - [JsonInclude, JsonPropertyName("total_size")] - public string? TotalSize { get; init; } - [JsonInclude, JsonPropertyName("total_size_in_bytes")] - public long TotalSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("total_stopped_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalStoppedTime { get; init; } - [JsonInclude, JsonPropertyName("total_stopped_time_in_millis")] - public long TotalStoppedTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total_throttled_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalThrottledTime { get; init; } - [JsonInclude, JsonPropertyName("total_throttled_time_in_millis")] - public long TotalThrottledTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs deleted file mode 100644 index 5178d99e8b7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NestedSortValue.g.cs +++ /dev/null @@ -1,312 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class NestedSortValue -{ - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - [JsonInclude, JsonPropertyName("max_children")] - public int? MaxChildren { get; set; } - [JsonInclude, JsonPropertyName("nested")] - public Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? Nested { get; set; } - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field Path { get; set; } -} - -public sealed partial class NestedSortValueDescriptor : SerializableDescriptor> -{ - internal NestedSortValueDescriptor(Action> configure) => configure.Invoke(this); - - public NestedSortValueDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action> NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } - - public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public NestedSortValueDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public NestedSortValueDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public NestedSortValueDescriptor Nested(Action> configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public NestedSortValueDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - public NestedSortValueDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public NestedSortValueDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class NestedSortValueDescriptor : SerializableDescriptor -{ - internal NestedSortValueDescriptor(Action configure) => configure.Invoke(this); - - public NestedSortValueDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } - - public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public NestedSortValueDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public NestedSortValueDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public NestedSortValueDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public NestedSortValueDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public NestedSortValueDescriptor Nested(Action configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public NestedSortValueDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - public NestedSortValueDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public NestedSortValueDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NodeStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NodeStatistics.g.cs deleted file mode 100644 index 7801aab5bc2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/NodeStatistics.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// Contains statistics about the number of nodes selected by the request. -/// -/// -public sealed partial class NodeStatistics -{ - /// - /// - /// Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response. - /// - /// - [JsonInclude, JsonPropertyName("failed")] - public int Failed { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - - /// - /// - /// Number of nodes that responded successfully to the request. - /// - /// - [JsonInclude, JsonPropertyName("successful")] - public int Successful { get; init; } - - /// - /// - /// Total number of nodes selected by the request. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/AdaptiveSelection.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/AdaptiveSelection.g.cs deleted file mode 100644 index b4d43a43aae..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/AdaptiveSelection.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class AdaptiveSelection -{ - /// - /// - /// The exponentially weighted moving average queue size of search requests on the keyed node. - /// - /// - [JsonInclude, JsonPropertyName("avg_queue_size")] - public long? AvgQueueSize { get; init; } - - /// - /// - /// The exponentially weighted moving average response time of search requests on the keyed node. - /// - /// - [JsonInclude, JsonPropertyName("avg_response_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? AvgResponseTime { get; init; } - - /// - /// - /// The exponentially weighted moving average response time, in nanoseconds, of search requests on the keyed node. - /// - /// - [JsonInclude, JsonPropertyName("avg_response_time_ns")] - public long? AvgResponseTimeNs { get; init; } - - /// - /// - /// The exponentially weighted moving average service time of search requests on the keyed node. - /// - /// - [JsonInclude, JsonPropertyName("avg_service_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? AvgServiceTime { get; init; } - - /// - /// - /// The exponentially weighted moving average service time, in nanoseconds, of search requests on the keyed node. - /// - /// - [JsonInclude, JsonPropertyName("avg_service_time_ns")] - public long? AvgServiceTimeNs { get; init; } - - /// - /// - /// The number of outstanding search requests to the keyed node from the node these stats are for. - /// - /// - [JsonInclude, JsonPropertyName("outgoing_searches")] - public long? OutgoingSearches { get; init; } - - /// - /// - /// The rank of this node; used for shard selection when routing search requests. - /// - /// - [JsonInclude, JsonPropertyName("rank")] - public string? Rank { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Breaker.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Breaker.g.cs deleted file mode 100644 index fab0d9d7aa7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Breaker.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Breaker -{ - /// - /// - /// Estimated memory used for the operation. - /// - /// - [JsonInclude, JsonPropertyName("estimated_size")] - public string? EstimatedSize { get; init; } - - /// - /// - /// Estimated memory used, in bytes, for the operation. - /// - /// - [JsonInclude, JsonPropertyName("estimated_size_in_bytes")] - public long? EstimatedSizeInBytes { get; init; } - - /// - /// - /// Memory limit for the circuit breaker. - /// - /// - [JsonInclude, JsonPropertyName("limit_size")] - public string? LimitSize { get; init; } - - /// - /// - /// Memory limit, in bytes, for the circuit breaker. - /// - /// - [JsonInclude, JsonPropertyName("limit_size_in_bytes")] - public long? LimitSizeInBytes { get; init; } - - /// - /// - /// A constant that all estimates for the circuit breaker are multiplied with to calculate a final estimate. - /// - /// - [JsonInclude, JsonPropertyName("overhead")] - public float? Overhead { get; init; } - - /// - /// - /// Total number of times the circuit breaker has been triggered and prevented an out of memory error. - /// - /// - [JsonInclude, JsonPropertyName("tripped")] - public float? Tripped { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cgroup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cgroup.g.cs deleted file mode 100644 index 2674954d9dd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cgroup.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Cgroup -{ - /// - /// - /// Contains statistics about cpu control group for the node. - /// - /// - [JsonInclude, JsonPropertyName("cpu")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.CgroupCpu? Cpu { get; init; } - - /// - /// - /// Contains statistics about cpuacct control group for the node. - /// - /// - [JsonInclude, JsonPropertyName("cpuacct")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.CpuAcct? Cpuacct { get; init; } - - /// - /// - /// Contains statistics about the memory control group for the node. - /// - /// - [JsonInclude, JsonPropertyName("memory")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.CgroupMemory? Memory { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpu.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpu.g.cs deleted file mode 100644 index ac316444b9e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpu.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class CgroupCpu -{ - /// - /// - /// The period of time, in microseconds, for how regularly all tasks in the same cgroup as the Elasticsearch process should have their access to CPU resources reallocated. - /// - /// - [JsonInclude, JsonPropertyName("cfs_period_micros")] - public int? CfsPeriodMicros { get; init; } - - /// - /// - /// The total amount of time, in microseconds, for which all tasks in the same cgroup as the Elasticsearch process can run during one period cfs_period_micros. - /// - /// - [JsonInclude, JsonPropertyName("cfs_quota_micros")] - public int? CfsQuotaMicros { get; init; } - - /// - /// - /// The cpu control group to which the Elasticsearch process belongs. - /// - /// - [JsonInclude, JsonPropertyName("control_group")] - public string? ControlGroup { get; init; } - - /// - /// - /// Contains CPU statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("stat")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.CgroupCpuStat? Stat { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpuStat.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpuStat.g.cs deleted file mode 100644 index 9e67a624179..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupCpuStat.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class CgroupCpuStat -{ - /// - /// - /// The number of reporting periods (as specified by cfs_period_micros) that have elapsed. - /// - /// - [JsonInclude, JsonPropertyName("number_of_elapsed_periods")] - public long? NumberOfElapsedPeriods { get; init; } - - /// - /// - /// The number of times all tasks in the same cgroup as the Elasticsearch process have been throttled. - /// - /// - [JsonInclude, JsonPropertyName("number_of_times_throttled")] - public long? NumberOfTimesThrottled { get; init; } - - /// - /// - /// The total amount of time, in nanoseconds, for which all tasks in the same cgroup as the Elasticsearch process have been throttled. - /// - /// - [JsonInclude, JsonPropertyName("time_throttled_nanos")] - public long? TimeThrottledNanos { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupMemory.g.cs deleted file mode 100644 index 9a4633174a2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CgroupMemory.g.cs +++ /dev/null @@ -1,58 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class CgroupMemory -{ - /// - /// - /// The memory control group to which the Elasticsearch process belongs. - /// - /// - [JsonInclude, JsonPropertyName("control_group")] - public string? ControlGroup { get; init; } - - /// - /// - /// The maximum amount of user memory (including file cache) allowed for all tasks in the same cgroup as the Elasticsearch process. - /// This value can be too big to store in a long, so is returned as a string so that the value returned can exactly match what the underlying operating system interface returns. - /// Any value that is too large to parse into a long almost certainly means no limit has been set for the cgroup. - /// - /// - [JsonInclude, JsonPropertyName("limit_in_bytes")] - public string? LimitInBytes { get; init; } - - /// - /// - /// The total current memory usage by processes in the cgroup, in bytes, by all tasks in the same cgroup as the Elasticsearch process. - /// This value is stored as a string for consistency with limit_in_bytes. - /// - /// - [JsonInclude, JsonPropertyName("usage_in_bytes")] - public string? UsageInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Client.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Client.g.cs deleted file mode 100644 index cb3c999c09c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Client.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Client -{ - /// - /// - /// Reported agent for the HTTP client. - /// If unavailable, this property is not included in the response. - /// - /// - [JsonInclude, JsonPropertyName("agent")] - public string? Agent { get; init; } - - /// - /// - /// Time at which the client closed the connection if the connection is closed. - /// - /// - [JsonInclude, JsonPropertyName("closed_time_millis")] - public long? ClosedTimeMillis { get; init; } - - /// - /// - /// Unique ID for the HTTP client. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public long? Id { get; init; } - - /// - /// - /// Time of the most recent request from this client. - /// - /// - [JsonInclude, JsonPropertyName("last_request_time_millis")] - public long? LastRequestTimeMillis { get; init; } - - /// - /// - /// The URI of the client’s most recent request. - /// - /// - [JsonInclude, JsonPropertyName("last_uri")] - public string? LastUri { get; init; } - - /// - /// - /// Local address for the HTTP connection. - /// - /// - [JsonInclude, JsonPropertyName("local_address")] - public string? LocalAddress { get; init; } - - /// - /// - /// Time at which the client opened the connection. - /// - /// - [JsonInclude, JsonPropertyName("opened_time_millis")] - public long? OpenedTimeMillis { get; init; } - - /// - /// - /// Remote address for the HTTP connection. - /// - /// - [JsonInclude, JsonPropertyName("remote_address")] - public string? RemoteAddress { get; init; } - - /// - /// - /// Number of requests from this client. - /// - /// - [JsonInclude, JsonPropertyName("request_count")] - public long? RequestCount { get; init; } - - /// - /// - /// Cumulative size in bytes of all requests from this client. - /// - /// - [JsonInclude, JsonPropertyName("request_size_bytes")] - public long? RequestSizeBytes { get; init; } - - /// - /// - /// Value from the client’s x-opaque-id HTTP header. - /// If unavailable, this property is not included in the response. - /// - /// - [JsonInclude, JsonPropertyName("x_opaque_id")] - public string? XOpaqueId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterAppliedStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterAppliedStats.g.cs deleted file mode 100644 index 9aabe531713..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterAppliedStats.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class ClusterAppliedStats -{ - [JsonInclude, JsonPropertyName("recordings")] - public IReadOnlyCollection? Recordings { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateQueue.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateQueue.g.cs deleted file mode 100644 index c1810c4bf7b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateQueue.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class ClusterStateQueue -{ - /// - /// - /// Number of committed cluster states in queue. - /// - /// - [JsonInclude, JsonPropertyName("committed")] - public long? Committed { get; init; } - - /// - /// - /// Number of pending cluster states in queue. - /// - /// - [JsonInclude, JsonPropertyName("pending")] - public long? Pending { get; init; } - - /// - /// - /// Total number of cluster states in queue. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public long? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateUpdate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateUpdate.g.cs deleted file mode 100644 index 7db3719e5dc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ClusterStateUpdate.g.cs +++ /dev/null @@ -1,155 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class ClusterStateUpdate -{ - /// - /// - /// The cumulative amount of time spent waiting for a successful cluster state update to commit, which measures the time from the start of each publication until a majority of the master-eligible nodes have written the state to disk and confirmed the write to the elected master. - /// - /// - [JsonInclude, JsonPropertyName("commit_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? CommitTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent waiting for a successful cluster state update to commit, which measures the time from the start of each publication until a majority of the master-eligible nodes have written the state to disk and confirmed the write to the elected master. - /// - /// - [JsonInclude, JsonPropertyName("commit_time_millis")] - public long? CommitTimeMillis { get; init; } - - /// - /// - /// The cumulative amount of time spent waiting for a successful cluster state update to complete, which measures the time from the start of each publication until all the other nodes have notified the elected master that they have applied the cluster state. - /// - /// - [JsonInclude, JsonPropertyName("completion_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? CompletionTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent waiting for a successful cluster state update to complete, which measures the time from the start of each publication until all the other nodes have notified the elected master that they have applied the cluster state. - /// - /// - [JsonInclude, JsonPropertyName("completion_time_millis")] - public long? CompletionTimeMillis { get; init; } - - /// - /// - /// The cumulative amount of time spent computing no-op cluster state updates since the node started. - /// - /// - [JsonInclude, JsonPropertyName("computation_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ComputationTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent computing no-op cluster state updates since the node started. - /// - /// - [JsonInclude, JsonPropertyName("computation_time_millis")] - public long? ComputationTimeMillis { get; init; } - - /// - /// - /// The cumulative amount of time spent constructing a publication context since the node started for publications that ultimately succeeded. - /// This statistic includes the time spent computing the difference between the current and new cluster state preparing a serialized representation of this difference. - /// - /// - [JsonInclude, JsonPropertyName("context_construction_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ContextConstructionTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent constructing a publication context since the node started for publications that ultimately succeeded. - /// This statistic includes the time spent computing the difference between the current and new cluster state preparing a serialized representation of this difference. - /// - /// - [JsonInclude, JsonPropertyName("context_construction_time_millis")] - public long? ContextConstructionTimeMillis { get; init; } - - /// - /// - /// The number of cluster state update attempts that did not change the cluster state since the node started. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// The cumulative amount of time spent successfully applying cluster state updates on the elected master since the node started. - /// - /// - [JsonInclude, JsonPropertyName("master_apply_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterApplyTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent successfully applying cluster state updates on the elected master since the node started. - /// - /// - [JsonInclude, JsonPropertyName("master_apply_time_millis")] - public long? MasterApplyTimeMillis { get; init; } - - /// - /// - /// The cumulative amount of time spent notifying listeners of a no-op cluster state update since the node started. - /// - /// - [JsonInclude, JsonPropertyName("notification_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? NotificationTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent notifying listeners of a no-op cluster state update since the node started. - /// - /// - [JsonInclude, JsonPropertyName("notification_time_millis")] - public long? NotificationTimeMillis { get; init; } - - /// - /// - /// The cumulative amount of time spent publishing cluster state updates which ultimately succeeded, which includes everything from the start of the publication (just after the computation of the new cluster state) until the publication has finished and the master node is ready to start processing the next state update. - /// This includes the time measured by context_construction_time, commit_time, completion_time and master_apply_time. - /// - /// - [JsonInclude, JsonPropertyName("publication_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? PublicationTime { get; init; } - - /// - /// - /// The cumulative amount of time, in milliseconds, spent publishing cluster state updates which ultimately succeeded, which includes everything from the start of the publication (just after the computation of the new cluster state) until the publication has finished and the master node is ready to start processing the next state update. - /// This includes the time measured by context_construction_time, commit_time, completion_time and master_apply_time. - /// - /// - [JsonInclude, JsonPropertyName("publication_time_millis")] - public long? PublicationTimeMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Context.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Context.g.cs deleted file mode 100644 index 8b398ba6123..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Context.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Context -{ - [JsonInclude, JsonPropertyName("cache_evictions")] - public long? CacheEvictions { get; init; } - [JsonInclude, JsonPropertyName("compilation_limit_triggered")] - public long? CompilationLimitTriggered { get; init; } - [JsonInclude, JsonPropertyName("compilations")] - public long? Compilations { get; init; } - [JsonInclude, JsonPropertyName("context")] - public string? Context2 { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cpu.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cpu.g.cs deleted file mode 100644 index 8bb79a6c6bc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Cpu.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Cpu -{ - [JsonInclude, JsonPropertyName("load_average")] - public IReadOnlyDictionary? LoadAverage { get; init; } - [JsonInclude, JsonPropertyName("percent")] - public int? Percent { get; init; } - [JsonInclude, JsonPropertyName("sys")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Sys { get; init; } - [JsonInclude, JsonPropertyName("sys_in_millis")] - public long? SysInMillis { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Total { get; init; } - [JsonInclude, JsonPropertyName("total_in_millis")] - public long? TotalInMillis { get; init; } - [JsonInclude, JsonPropertyName("user")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? User { get; init; } - [JsonInclude, JsonPropertyName("user_in_millis")] - public long? UserInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CpuAcct.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CpuAcct.g.cs deleted file mode 100644 index a3e9e956630..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/CpuAcct.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class CpuAcct -{ - /// - /// - /// The cpuacct control group to which the Elasticsearch process belongs. - /// - /// - [JsonInclude, JsonPropertyName("control_group")] - public string? ControlGroup { get; init; } - - /// - /// - /// The total CPU time, in nanoseconds, consumed by all tasks in the same cgroup as the Elasticsearch process. - /// - /// - [JsonInclude, JsonPropertyName("usage_nanos")] - public long? UsageNanos { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DataPathStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DataPathStats.g.cs deleted file mode 100644 index 683715551ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DataPathStats.g.cs +++ /dev/null @@ -1,117 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class DataPathStats -{ - /// - /// - /// Total amount of disk space available to this Java virtual machine on this file store. - /// - /// - [JsonInclude, JsonPropertyName("available")] - public string? Available { get; init; } - - /// - /// - /// Total number of bytes available to this Java virtual machine on this file store. - /// - /// - [JsonInclude, JsonPropertyName("available_in_bytes")] - public long? AvailableInBytes { get; init; } - [JsonInclude, JsonPropertyName("disk_queue")] - public string? DiskQueue { get; init; } - [JsonInclude, JsonPropertyName("disk_reads")] - public long? DiskReads { get; init; } - [JsonInclude, JsonPropertyName("disk_read_size")] - public string? DiskReadSize { get; init; } - [JsonInclude, JsonPropertyName("disk_read_size_in_bytes")] - public long? DiskReadSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("disk_writes")] - public long? DiskWrites { get; init; } - [JsonInclude, JsonPropertyName("disk_write_size")] - public string? DiskWriteSize { get; init; } - [JsonInclude, JsonPropertyName("disk_write_size_in_bytes")] - public long? DiskWriteSizeInBytes { get; init; } - - /// - /// - /// Total amount of unallocated disk space in the file store. - /// - /// - [JsonInclude, JsonPropertyName("free")] - public string? Free { get; init; } - - /// - /// - /// Total number of unallocated bytes in the file store. - /// - /// - [JsonInclude, JsonPropertyName("free_in_bytes")] - public long? FreeInBytes { get; init; } - - /// - /// - /// Mount point of the file store (for example: /dev/sda2). - /// - /// - [JsonInclude, JsonPropertyName("mount")] - public string? Mount { get; init; } - - /// - /// - /// Path to the file store. - /// - /// - [JsonInclude, JsonPropertyName("path")] - public string? Path { get; init; } - - /// - /// - /// Total size of the file store. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public string? Total { get; init; } - - /// - /// - /// Total size of the file store in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long? TotalInBytes { get; init; } - - /// - /// - /// Type of the file store (ex: ext4). - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string? Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DeprecationIndexing.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DeprecationIndexing.g.cs deleted file mode 100644 index 8cb72e5d710..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/DeprecationIndexing.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class DeprecationIndexing -{ - [JsonInclude, JsonPropertyName("enabled")] - public object Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Discovery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Discovery.g.cs deleted file mode 100644 index 52403657f79..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Discovery.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Discovery -{ - [JsonInclude, JsonPropertyName("cluster_applier_stats")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.ClusterAppliedStats? ClusterApplierStats { get; init; } - - /// - /// - /// Contains statistics for the cluster state queue of the node. - /// - /// - [JsonInclude, JsonPropertyName("cluster_state_queue")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.ClusterStateQueue? ClusterStateQueue { get; init; } - - /// - /// - /// Contains low-level statistics about how long various activities took during cluster state updates while the node was the elected master. - /// Omitted if the node is not master-eligible. - /// Every field whose name ends in _time within this object is also represented as a raw number of milliseconds in a field whose name ends in _time_millis. - /// The human-readable fields with a _time suffix are only returned if requested with the ?human=true query parameter. - /// - /// - [JsonInclude, JsonPropertyName("cluster_state_update")] - public IReadOnlyDictionary? ClusterStateUpdate { get; init; } - - /// - /// - /// Contains statistics for the published cluster states of the node. - /// - /// - [JsonInclude, JsonPropertyName("published_cluster_states")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.PublishedClusterStates? PublishedClusterStates { get; init; } - [JsonInclude, JsonPropertyName("serialized_cluster_states")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.SerializedClusterState? SerializedClusterStates { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs deleted file mode 100644 index aebd1ec5b6e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs +++ /dev/null @@ -1,92 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class ExtendedMemoryStats -{ - /// - /// - /// If the amount of physical memory has been overridden using the es.total_memory_bytes system property then this reports the overridden value in bytes. - /// Otherwise it reports the same value as total_in_bytes. - /// - /// - [JsonInclude, JsonPropertyName("adjusted_total_in_bytes")] - public long? AdjustedTotalInBytes { get; init; } - - /// - /// - /// Amount of free physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("free_in_bytes")] - public long? FreeInBytes { get; init; } - - /// - /// - /// Percentage of free memory. - /// - /// - [JsonInclude, JsonPropertyName("free_percent")] - public int? FreePercent { get; init; } - [JsonInclude, JsonPropertyName("resident")] - public string? Resident { get; init; } - [JsonInclude, JsonPropertyName("resident_in_bytes")] - public long? ResidentInBytes { get; init; } - [JsonInclude, JsonPropertyName("share")] - public string? Share { get; init; } - [JsonInclude, JsonPropertyName("share_in_bytes")] - public long? ShareInBytes { get; init; } - - /// - /// - /// Total amount of physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long? TotalInBytes { get; init; } - [JsonInclude, JsonPropertyName("total_virtual")] - public string? TotalVirtual { get; init; } - [JsonInclude, JsonPropertyName("total_virtual_in_bytes")] - public long? TotalVirtualInBytes { get; init; } - - /// - /// - /// Amount of used physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("used_in_bytes")] - public long? UsedInBytes { get; init; } - - /// - /// - /// Percentage of used memory. - /// - /// - [JsonInclude, JsonPropertyName("used_percent")] - public int? UsedPercent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystem.g.cs deleted file mode 100644 index 3282bb8dbc4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystem.g.cs +++ /dev/null @@ -1,64 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class FileSystem -{ - /// - /// - /// List of all file stores. - /// - /// - [JsonInclude, JsonPropertyName("data")] - public IReadOnlyCollection? Data { get; init; } - - /// - /// - /// Contains I/O statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("io_stats")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.IoStats? IoStats { get; init; } - - /// - /// - /// Last time the file stores statistics were refreshed. - /// Recorded in milliseconds since the Unix Epoch. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } - - /// - /// - /// Contains statistics for all file stores of the node. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.FileSystemTotal? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystemTotal.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystemTotal.g.cs deleted file mode 100644 index 72d413c736d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/FileSystemTotal.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class FileSystemTotal -{ - /// - /// - /// Total disk space available to this Java virtual machine on all file stores. - /// Depending on OS or process level restrictions, this might appear less than free. - /// This is the actual amount of free disk space the Elasticsearch node can utilise. - /// - /// - [JsonInclude, JsonPropertyName("available")] - public string? Available { get; init; } - - /// - /// - /// Total number of bytes available to this Java virtual machine on all file stores. - /// Depending on OS or process level restrictions, this might appear less than free_in_bytes. - /// This is the actual amount of free disk space the Elasticsearch node can utilise. - /// - /// - [JsonInclude, JsonPropertyName("available_in_bytes")] - public long? AvailableInBytes { get; init; } - - /// - /// - /// Total unallocated disk space in all file stores. - /// - /// - [JsonInclude, JsonPropertyName("free")] - public string? Free { get; init; } - - /// - /// - /// Total number of unallocated bytes in all file stores. - /// - /// - [JsonInclude, JsonPropertyName("free_in_bytes")] - public long? FreeInBytes { get; init; } - - /// - /// - /// Total size of all file stores. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public string? Total { get; init; } - - /// - /// - /// Total size of all file stores in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long? TotalInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollector.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollector.g.cs deleted file mode 100644 index 41ea9bdbf34..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollector.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class GarbageCollector -{ - /// - /// - /// Contains statistics about JVM garbage collectors for the node. - /// - /// - [JsonInclude, JsonPropertyName("collectors")] - public IReadOnlyDictionary? Collectors { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs deleted file mode 100644 index d607a1a0849..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class GarbageCollectorTotal -{ - /// - /// - /// Total number of JVM garbage collectors that collect objects. - /// - /// - [JsonInclude, JsonPropertyName("collection_count")] - public long? CollectionCount { get; init; } - - /// - /// - /// Total time spent by JVM collecting objects. - /// - /// - [JsonInclude, JsonPropertyName("collection_time")] - public string? CollectionTime { get; init; } - - /// - /// - /// Total time, in milliseconds, spent by JVM collecting objects. - /// - /// - [JsonInclude, JsonPropertyName("collection_time_in_millis")] - public long? CollectionTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Http.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Http.g.cs deleted file mode 100644 index 460c81005a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Http.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Http -{ - /// - /// - /// Information on current and recently-closed HTTP client connections. - /// Clients that have been closed longer than the http.client_stats.closed_channels.max_age setting will not be represented here. - /// - /// - [JsonInclude, JsonPropertyName("clients")] - public IReadOnlyCollection? Clients { get; init; } - - /// - /// - /// Current number of open HTTP connections for the node. - /// - /// - [JsonInclude, JsonPropertyName("current_open")] - public int? CurrentOpen { get; init; } - - /// - /// - /// Total number of HTTP connections opened for the node. - /// - /// - [JsonInclude, JsonPropertyName("total_opened")] - public long? TotalOpened { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressure.g.cs deleted file mode 100644 index 371c8bc550d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressure.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class IndexingPressure -{ - /// - /// - /// Contains statistics for memory consumption from indexing load. - /// - /// - [JsonInclude, JsonPropertyName("memory")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.IndexingPressureMemory? Memory { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressureMemory.g.cs deleted file mode 100644 index 0becf6f3507..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IndexingPressureMemory.g.cs +++ /dev/null @@ -1,65 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class IndexingPressureMemory -{ - /// - /// - /// Contains statistics for current indexing load. - /// - /// - [JsonInclude, JsonPropertyName("current")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.PressureMemory? Current { get; init; } - - /// - /// - /// Configured memory limit for the indexing requests. - /// Replica requests have an automatic limit that is 1.5x this value. - /// - /// - [JsonInclude, JsonPropertyName("limit")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Limit { get; init; } - - /// - /// - /// Configured memory limit, in bytes, for the indexing requests. - /// Replica requests have an automatic limit that is 1.5x this value. - /// - /// - [JsonInclude, JsonPropertyName("limit_in_bytes")] - public long? LimitInBytes { get; init; } - - /// - /// - /// Contains statistics for the cumulative indexing load since the node started. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.PressureMemory? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Ingest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Ingest.g.cs deleted file mode 100644 index c2e5fcfda51..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Ingest.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Ingest -{ - /// - /// - /// Contains statistics about ingest pipelines for the node. - /// - /// - [JsonInclude, JsonPropertyName("pipelines")] - public IReadOnlyDictionary? Pipelines { get; init; } - - /// - /// - /// Contains statistics about ingest operations for the node. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.IngestTotal? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs deleted file mode 100644 index 14f02675ad2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs +++ /dev/null @@ -1,92 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class IngestStats -{ - /// - /// - /// Total number of documents ingested during the lifetime of this node. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// Total number of documents currently being ingested. - /// - /// - [JsonInclude, JsonPropertyName("current")] - public long Current { get; init; } - - /// - /// - /// Total number of failed ingest operations during the lifetime of this node. - /// - /// - [JsonInclude, JsonPropertyName("failed")] - public long Failed { get; init; } - - /// - /// - /// Total number of bytes of all documents ingested by the pipeline. - /// This field is only present on pipelines which are the first to process a document. - /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. - /// - /// - [JsonInclude, JsonPropertyName("ingested_as_first_pipeline_in_bytes")] - public long IngestedAsFirstPipelineInBytes { get; init; } - - /// - /// - /// Total number of ingest processors. - /// - /// - [JsonInclude, JsonPropertyName("processors")] - public IReadOnlyCollection> Processors { get; init; } - - /// - /// - /// Total number of bytes of all documents produced by the pipeline. - /// This field is only present on pipelines which are the first to process a document. - /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. - /// In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run. - /// - /// - [JsonInclude, JsonPropertyName("produced_as_first_pipeline_in_bytes")] - public long ProducedAsFirstPipelineInBytes { get; init; } - - /// - /// - /// Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node. - /// - /// - [JsonInclude, JsonPropertyName("time_in_millis")] - public long TimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.cs deleted file mode 100644 index 353d8167d58..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestTotal.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class IngestTotal -{ - /// - /// - /// Total number of documents ingested during the lifetime of this node. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - - /// - /// - /// Total number of documents currently being ingested. - /// - /// - [JsonInclude, JsonPropertyName("current")] - public long Current { get; init; } - - /// - /// - /// Total number of failed ingest operations during the lifetime of this node. - /// - /// - [JsonInclude, JsonPropertyName("failed")] - public long Failed { get; init; } - - /// - /// - /// Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node. - /// - /// - [JsonInclude, JsonPropertyName("time_in_millis")] - public long TimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStatDevice.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStatDevice.g.cs deleted file mode 100644 index 2eb4d020c26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStatDevice.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class IoStatDevice -{ - /// - /// - /// The Linux device name. - /// - /// - [JsonInclude, JsonPropertyName("device_name")] - public string? DeviceName { get; init; } - - /// - /// - /// The total number of read and write operations for the device completed since starting Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("operations")] - public long? Operations { get; init; } - - /// - /// - /// The total number of kilobytes read for the device since starting Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("read_kilobytes")] - public long? ReadKilobytes { get; init; } - - /// - /// - /// The total number of read operations for the device completed since starting Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("read_operations")] - public long? ReadOperations { get; init; } - - /// - /// - /// The total number of kilobytes written for the device since starting Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("write_kilobytes")] - public long? WriteKilobytes { get; init; } - - /// - /// - /// The total number of write operations for the device completed since starting Elasticsearch. - /// - /// - [JsonInclude, JsonPropertyName("write_operations")] - public long? WriteOperations { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStats.g.cs deleted file mode 100644 index 8ca58841b1d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IoStats.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class IoStats -{ - /// - /// - /// Array of disk metrics for each device that is backing an Elasticsearch data path. - /// These disk metrics are probed periodically and averages between the last probe and the current probe are computed. - /// - /// - [JsonInclude, JsonPropertyName("devices")] - public IReadOnlyCollection? Devices { get; init; } - - /// - /// - /// The sum of the disk metrics for all devices that back an Elasticsearch data path. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.IoStatDevice? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Jvm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Jvm.g.cs deleted file mode 100644 index ab1f138066c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Jvm.g.cs +++ /dev/null @@ -1,96 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Jvm -{ - /// - /// - /// Contains statistics about JVM buffer pools for the node. - /// - /// - [JsonInclude, JsonPropertyName("buffer_pools")] - public IReadOnlyDictionary? BufferPools { get; init; } - - /// - /// - /// Contains statistics about classes loaded by JVM for the node. - /// - /// - [JsonInclude, JsonPropertyName("classes")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.JvmClasses? Classes { get; init; } - - /// - /// - /// Contains statistics about JVM garbage collectors for the node. - /// - /// - [JsonInclude, JsonPropertyName("gc")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.GarbageCollector? Gc { get; init; } - - /// - /// - /// Contains JVM memory usage statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.JvmMemoryStats? Mem { get; init; } - - /// - /// - /// Contains statistics about JVM thread usage for the node. - /// - /// - [JsonInclude, JsonPropertyName("threads")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.JvmThreads? Threads { get; init; } - - /// - /// - /// Last time JVM statistics were refreshed. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } - - /// - /// - /// Human-readable JVM uptime. - /// Only returned if the human query parameter is true. - /// - /// - [JsonInclude, JsonPropertyName("uptime")] - public string? Uptime { get; init; } - - /// - /// - /// JVM uptime in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("uptime_in_millis")] - public long? UptimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmClasses.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmClasses.g.cs deleted file mode 100644 index 6bf3db7780e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmClasses.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class JvmClasses -{ - /// - /// - /// Number of classes currently loaded by JVM. - /// - /// - [JsonInclude, JsonPropertyName("current_loaded_count")] - public long? CurrentLoadedCount { get; init; } - - /// - /// - /// Total number of classes loaded since the JVM started. - /// - /// - [JsonInclude, JsonPropertyName("total_loaded_count")] - public long? TotalLoadedCount { get; init; } - - /// - /// - /// Total number of classes unloaded since the JVM started. - /// - /// - [JsonInclude, JsonPropertyName("total_unloaded_count")] - public long? TotalUnloadedCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmMemoryStats.g.cs deleted file mode 100644 index addf31ae4c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmMemoryStats.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class JvmMemoryStats -{ - /// - /// - /// Amount of memory, in bytes, available for use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("heap_committed_in_bytes")] - public long? HeapCommittedInBytes { get; init; } - - /// - /// - /// Maximum amount of memory, in bytes, available for use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("heap_max_in_bytes")] - public long? HeapMaxInBytes { get; init; } - - /// - /// - /// Memory, in bytes, currently in use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("heap_used_in_bytes")] - public long? HeapUsedInBytes { get; init; } - - /// - /// - /// Percentage of memory currently in use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("heap_used_percent")] - public long? HeapUsedPercent { get; init; } - - /// - /// - /// Amount of non-heap memory available, in bytes. - /// - /// - [JsonInclude, JsonPropertyName("non_heap_committed_in_bytes")] - public long? NonHeapCommittedInBytes { get; init; } - - /// - /// - /// Non-heap memory used, in bytes. - /// - /// - [JsonInclude, JsonPropertyName("non_heap_used_in_bytes")] - public long? NonHeapUsedInBytes { get; init; } - - /// - /// - /// Contains statistics about heap memory usage for the node. - /// - /// - [JsonInclude, JsonPropertyName("pools")] - public IReadOnlyDictionary? Pools { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmThreads.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmThreads.g.cs deleted file mode 100644 index 5152f8dc6bf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/JvmThreads.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class JvmThreads -{ - /// - /// - /// Number of active threads in use by JVM. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } - - /// - /// - /// Highest number of threads used by JVM. - /// - /// - [JsonInclude, JsonPropertyName("peak_count")] - public long? PeakCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/KeyedProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/KeyedProcessor.g.cs deleted file mode 100644 index 244d17c4937..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/KeyedProcessor.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class KeyedProcessor -{ - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Processor? Stats { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string? Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/MemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/MemoryStats.g.cs deleted file mode 100644 index 8f65065e537..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/MemoryStats.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class MemoryStats -{ - /// - /// - /// If the amount of physical memory has been overridden using the es.total_memory_bytes system property then this reports the overridden value in bytes. - /// Otherwise it reports the same value as total_in_bytes. - /// - /// - [JsonInclude, JsonPropertyName("adjusted_total_in_bytes")] - public long? AdjustedTotalInBytes { get; init; } - - /// - /// - /// Amount of free physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("free_in_bytes")] - public long? FreeInBytes { get; init; } - [JsonInclude, JsonPropertyName("resident")] - public string? Resident { get; init; } - [JsonInclude, JsonPropertyName("resident_in_bytes")] - public long? ResidentInBytes { get; init; } - [JsonInclude, JsonPropertyName("share")] - public string? Share { get; init; } - [JsonInclude, JsonPropertyName("share_in_bytes")] - public long? ShareInBytes { get; init; } - - /// - /// - /// Total amount of physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long? TotalInBytes { get; init; } - [JsonInclude, JsonPropertyName("total_virtual")] - public string? TotalVirtual { get; init; } - [JsonInclude, JsonPropertyName("total_virtual_in_bytes")] - public long? TotalVirtualInBytes { get; init; } - - /// - /// - /// Amount of used physical memory in bytes. - /// - /// - [JsonInclude, JsonPropertyName("used_in_bytes")] - public long? UsedInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeBufferPool.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeBufferPool.g.cs deleted file mode 100644 index e5e0f06863c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeBufferPool.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeBufferPool -{ - /// - /// - /// Number of buffer pools. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } - - /// - /// - /// Total capacity of buffer pools. - /// - /// - [JsonInclude, JsonPropertyName("total_capacity")] - public string? TotalCapacity { get; init; } - - /// - /// - /// Total capacity of buffer pools in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_capacity_in_bytes")] - public long? TotalCapacityInBytes { get; init; } - - /// - /// - /// Size of buffer pools. - /// - /// - [JsonInclude, JsonPropertyName("used")] - public string? Used { get; init; } - - /// - /// - /// Size of buffer pools in bytes. - /// - /// - [JsonInclude, JsonPropertyName("used_in_bytes")] - public long? UsedInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfo.g.cs deleted file mode 100644 index 092befcffef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfo.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfo -{ - [JsonInclude, JsonPropertyName("aggregations")] - public IReadOnlyDictionary? Aggregations { get; init; } - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary Attributes { get; init; } - [JsonInclude, JsonPropertyName("build_flavor")] - public string BuildFlavor { get; init; } - - /// - /// - /// Short hash of the last git commit in this release. - /// - /// - [JsonInclude, JsonPropertyName("build_hash")] - public string BuildHash { get; init; } - [JsonInclude, JsonPropertyName("build_type")] - public string BuildType { get; init; } - - /// - /// - /// The node’s host name. - /// - /// - [JsonInclude, JsonPropertyName("host")] - public string Host { get; init; } - [JsonInclude, JsonPropertyName("http")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoHttp? Http { get; init; } - [JsonInclude, JsonPropertyName("ingest")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngest? Ingest { get; init; } - - /// - /// - /// The node’s IP address. - /// - /// - [JsonInclude, JsonPropertyName("ip")] - public string Ip { get; init; } - [JsonInclude, JsonPropertyName("jvm")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeJvmInfo? Jvm { get; init; } - [JsonInclude, JsonPropertyName("modules")] - public IReadOnlyCollection? Modules { get; init; } - - /// - /// - /// The node's name - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("network")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoNetwork? Network { get; init; } - [JsonInclude, JsonPropertyName("os")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeOperatingSystemInfo? Os { get; init; } - [JsonInclude, JsonPropertyName("plugins")] - public IReadOnlyCollection? Plugins { get; init; } - [JsonInclude, JsonPropertyName("process")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeProcessInfo? Process { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettings? Settings { get; init; } - [JsonInclude, JsonPropertyName("thread_pool")] - public IReadOnlyDictionary? ThreadPool { get; init; } - - /// - /// - /// Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. - /// - /// - [JsonInclude, JsonPropertyName("total_indexing_buffer")] - public long? TotalIndexingBuffer { get; init; } - - /// - /// - /// Same as total_indexing_buffer, but expressed in bytes. - /// - /// - [JsonInclude, JsonPropertyName("total_indexing_buffer_in_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TotalIndexingBufferInBytes { get; init; } - [JsonInclude, JsonPropertyName("transport")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoTransport? Transport { get; init; } - - /// - /// - /// Host and port where transport HTTP connections are accepted. - /// - /// - [JsonInclude, JsonPropertyName("transport_address")] - public string TransportAddress { get; init; } - - /// - /// - /// Elasticsearch version running on this node. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAction.g.cs deleted file mode 100644 index 6b90ccb9ef4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAction.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoAction -{ - [JsonInclude, JsonPropertyName("destructive_requires_name")] - public string DestructiveRequiresName { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAggregation.g.cs deleted file mode 100644 index 94978daa040..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoAggregation.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoAggregation -{ - [JsonInclude, JsonPropertyName("types")] - public IReadOnlyCollection Types { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoBootstrap.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoBootstrap.g.cs deleted file mode 100644 index d8412af0e41..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoBootstrap.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoBootstrap -{ - [JsonInclude, JsonPropertyName("memory_lock")] - public string MemoryLock { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoClient.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoClient.g.cs deleted file mode 100644 index 6bad11d739c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoClient.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoClient -{ - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoDiscover.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoDiscover.g.cs deleted file mode 100644 index ab16ddd86ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoDiscover.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -internal sealed partial class NodeInfoDiscoverConverter : JsonConverter -{ - public override NodeInfoDiscover Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyCollection? seedHosts = default; - IReadOnlyCollection? seedProviders = default; - string? type = default; - Dictionary additionalProperties = null; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "seed_hosts") - { - seedHosts = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "seed_providers") - { - seedProviders = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "type") - { - type = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - additionalProperties ??= new Dictionary(); - var additionalValue = JsonSerializer.Deserialize(ref reader, options); - additionalProperties.Add(property, additionalValue); - } - } - - return new NodeInfoDiscover { SeedHosts = seedHosts, SeedProviders = seedProviders, Settings = additionalProperties, Type = type }; - } - - public override void Write(Utf8JsonWriter writer, NodeInfoDiscover value, JsonSerializerOptions options) - { - throw new NotImplementedException("'NodeInfoDiscover' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(NodeInfoDiscoverConverter))] -public sealed partial class NodeInfoDiscover -{ - public IReadOnlyCollection? SeedHosts { get; init; } - public IReadOnlyCollection? SeedProviders { get; init; } - - /// - /// - /// Additional or alternative settings - /// - /// - public IReadOnlyDictionary Settings { get; init; } - public string? Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoHttp.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoHttp.g.cs deleted file mode 100644 index 69945e8eb95..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoHttp.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoHttp -{ - [JsonInclude, JsonPropertyName("bound_address")] - public IReadOnlyCollection BoundAddress { get; init; } - [JsonInclude, JsonPropertyName("max_content_length")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxContentLength { get; init; } - [JsonInclude, JsonPropertyName("max_content_length_in_bytes")] - public long MaxContentLengthInBytes { get; init; } - [JsonInclude, JsonPropertyName("publish_address")] - public string PublishAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngest.g.cs deleted file mode 100644 index 3c2871b2405..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngest.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoIngest -{ - [JsonInclude, JsonPropertyName("processors")] - public IReadOnlyCollection Processors { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestDownloader.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestDownloader.g.cs deleted file mode 100644 index 6dc0ca2bc65..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestDownloader.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoIngestDownloader -{ - [JsonInclude, JsonPropertyName("enabled")] - public string Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestInfo.g.cs deleted file mode 100644 index 32628dae7f1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestInfo.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoIngestInfo -{ - [JsonInclude, JsonPropertyName("downloader")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestDownloader Downloader { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestProcessor.g.cs deleted file mode 100644 index 79ce7c63935..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoIngestProcessor.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoIngestProcessor -{ - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoJvmMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoJvmMemory.g.cs deleted file mode 100644 index 8d3df5869cf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoJvmMemory.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoJvmMemory -{ - [JsonInclude, JsonPropertyName("direct_max")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? DirectMax { get; init; } - [JsonInclude, JsonPropertyName("direct_max_in_bytes")] - public long DirectMaxInBytes { get; init; } - [JsonInclude, JsonPropertyName("heap_init")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? HeapInit { get; init; } - [JsonInclude, JsonPropertyName("heap_init_in_bytes")] - public long HeapInitInBytes { get; init; } - [JsonInclude, JsonPropertyName("heap_max")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? HeapMax { get; init; } - [JsonInclude, JsonPropertyName("heap_max_in_bytes")] - public long HeapMaxInBytes { get; init; } - [JsonInclude, JsonPropertyName("non_heap_init")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? NonHeapInit { get; init; } - [JsonInclude, JsonPropertyName("non_heap_init_in_bytes")] - public long NonHeapInitInBytes { get; init; } - [JsonInclude, JsonPropertyName("non_heap_max")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? NonHeapMax { get; init; } - [JsonInclude, JsonPropertyName("non_heap_max_in_bytes")] - public long NonHeapMaxInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoMemory.g.cs deleted file mode 100644 index c066ad19e2f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoMemory.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoMemory -{ - [JsonInclude, JsonPropertyName("total")] - public string Total { get; init; } - [JsonInclude, JsonPropertyName("total_in_bytes")] - public long TotalInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetwork.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetwork.g.cs deleted file mode 100644 index 8d1191ba01e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetwork.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoNetwork -{ - [JsonInclude, JsonPropertyName("primary_interface")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoNetworkInterface PrimaryInterface { get; init; } - [JsonInclude, JsonPropertyName("refresh_interval")] - public int RefreshInterval { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetworkInterface.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetworkInterface.g.cs deleted file mode 100644 index 956666f7e5b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoNetworkInterface.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoNetworkInterface -{ - [JsonInclude, JsonPropertyName("address")] - public string Address { get; init; } - [JsonInclude, JsonPropertyName("mac_address")] - public string MacAddress { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoOSCPU.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoOSCPU.g.cs deleted file mode 100644 index 9058a7c8060..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoOSCPU.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoOSCPU -{ - [JsonInclude, JsonPropertyName("cache_size")] - public string CacheSize { get; init; } - [JsonInclude, JsonPropertyName("cache_size_in_bytes")] - public int CacheSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("cores_per_socket")] - public int CoresPerSocket { get; init; } - [JsonInclude, JsonPropertyName("mhz")] - public int Mhz { get; init; } - [JsonInclude, JsonPropertyName("model")] - public string Model { get; init; } - [JsonInclude, JsonPropertyName("total_cores")] - public int TotalCores { get; init; } - [JsonInclude, JsonPropertyName("total_sockets")] - public int TotalSockets { get; init; } - [JsonInclude, JsonPropertyName("vendor")] - public string Vendor { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoPath.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoPath.g.cs deleted file mode 100644 index c176bb5a08f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoPath.g.cs +++ /dev/null @@ -1,41 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoPath -{ - [JsonInclude, JsonPropertyName("data")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? Data { get; init; } - [JsonInclude, JsonPropertyName("home")] - public string? Home { get; init; } - [JsonInclude, JsonPropertyName("logs")] - public string? Logs { get; init; } - [JsonInclude, JsonPropertyName("repo")] - public IReadOnlyCollection? Repo { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositories.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositories.g.cs deleted file mode 100644 index 9718b0765a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositories.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoRepositories -{ - [JsonInclude, JsonPropertyName("url")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoRepositoriesUrl Url { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositoriesUrl.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositoriesUrl.g.cs deleted file mode 100644 index 258c9dfb4fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoRepositoriesUrl.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoRepositoriesUrl -{ - [JsonInclude, JsonPropertyName("allowed_urls")] - public string AllowedUrls { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs deleted file mode 100644 index 8ab615c1633..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoScript.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoScript -{ - [JsonInclude, JsonPropertyName("allowed_types")] - public string AllowedTypes { get; init; } - [JsonInclude, JsonPropertyName("disable_max_compilations_rate")] - public string? DisableMaxCompilationsRate { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearch.g.cs deleted file mode 100644 index e9854d0e224..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearch.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSearch -{ - [JsonInclude, JsonPropertyName("remote")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSearchRemote Remote { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearchRemote.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearchRemote.g.cs deleted file mode 100644 index 3b98fd964f6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSearchRemote.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSearchRemote -{ - [JsonInclude, JsonPropertyName("connect")] - public string Connect { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.cs deleted file mode 100644 index 2fb036e3376..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettings.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettings -{ - [JsonInclude, JsonPropertyName("action")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoAction? Action { get; init; } - [JsonInclude, JsonPropertyName("bootstrap")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoBootstrap? Bootstrap { get; init; } - [JsonInclude, JsonPropertyName("client")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoClient? Client { get; init; } - [JsonInclude, JsonPropertyName("cluster")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsCluster Cluster { get; init; } - [JsonInclude, JsonPropertyName("discovery")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoDiscover? Discovery { get; init; } - [JsonInclude, JsonPropertyName("http")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsHttp Http { get; init; } - [JsonInclude, JsonPropertyName("ingest")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsIngest? Ingest { get; init; } - [JsonInclude, JsonPropertyName("network")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsNetwork? Network { get; init; } - [JsonInclude, JsonPropertyName("node")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsNode Node { get; init; } - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoPath? Path { get; init; } - [JsonInclude, JsonPropertyName("repositories")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoRepositories? Repositories { get; init; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoScript? Script { get; init; } - [JsonInclude, JsonPropertyName("search")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSearch? Search { get; init; } - [JsonInclude, JsonPropertyName("transport")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsTransport Transport { get; init; } - [JsonInclude, JsonPropertyName("xpack")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpack? Xpack { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsCluster.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsCluster.g.cs deleted file mode 100644 index 968c8a7151b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsCluster.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsCluster -{ - [JsonInclude, JsonPropertyName("deprecation_indexing")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.DeprecationIndexing? DeprecationIndexing { get; init; } - [JsonInclude, JsonPropertyName("election")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsClusterElection Election { get; init; } - [JsonInclude, JsonPropertyName("initial_master_nodes")] - public IReadOnlyCollection? InitialMasterNodes { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? Routing { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsClusterElection.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsClusterElection.g.cs deleted file mode 100644 index 288df779762..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsClusterElection.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsClusterElection -{ - [JsonInclude, JsonPropertyName("strategy")] - public string Strategy { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttp.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttp.g.cs deleted file mode 100644 index 02888461cb1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttp.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsHttp -{ - [JsonInclude, JsonPropertyName("compression")] - public object? Compression { get; init; } - [JsonInclude, JsonPropertyName("port")] - public object? Port { get; init; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsHttpType Type { get; init; } - [JsonInclude, JsonPropertyName("type.default")] - public string? TypeDefault { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttpType.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttpType.g.cs deleted file mode 100644 index ea8d393b8c3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsHttpType.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsHttpType -{ - [JsonInclude, JsonPropertyName("default")] - public string Default { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsIngest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsIngest.g.cs deleted file mode 100644 index 151231c9ef4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsIngest.g.cs +++ /dev/null @@ -1,100 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsIngest -{ - [JsonInclude, JsonPropertyName("append")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Append { get; init; } - [JsonInclude, JsonPropertyName("attachment")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Attachment { get; init; } - [JsonInclude, JsonPropertyName("bytes")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Bytes { get; init; } - [JsonInclude, JsonPropertyName("circle")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Circle { get; init; } - [JsonInclude, JsonPropertyName("convert")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Convert { get; init; } - [JsonInclude, JsonPropertyName("csv")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Csv { get; init; } - [JsonInclude, JsonPropertyName("date")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Date { get; init; } - [JsonInclude, JsonPropertyName("date_index_name")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? DateIndexName { get; init; } - [JsonInclude, JsonPropertyName("dissect")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Dissect { get; init; } - [JsonInclude, JsonPropertyName("dot_expander")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? DotExpander { get; init; } - [JsonInclude, JsonPropertyName("drop")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Drop { get; init; } - [JsonInclude, JsonPropertyName("enrich")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Enrich { get; init; } - [JsonInclude, JsonPropertyName("fail")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Fail { get; init; } - [JsonInclude, JsonPropertyName("foreach")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Foreach { get; init; } - [JsonInclude, JsonPropertyName("geoip")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Geoip { get; init; } - [JsonInclude, JsonPropertyName("grok")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Grok { get; init; } - [JsonInclude, JsonPropertyName("gsub")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Gsub { get; init; } - [JsonInclude, JsonPropertyName("inference")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Inference { get; init; } - [JsonInclude, JsonPropertyName("join")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Join { get; init; } - [JsonInclude, JsonPropertyName("json")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Json { get; init; } - [JsonInclude, JsonPropertyName("kv")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Kv { get; init; } - [JsonInclude, JsonPropertyName("lowercase")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Lowercase { get; init; } - [JsonInclude, JsonPropertyName("pipeline")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Pipeline { get; init; } - [JsonInclude, JsonPropertyName("remove")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Remove { get; init; } - [JsonInclude, JsonPropertyName("rename")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Rename { get; init; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Script { get; init; } - [JsonInclude, JsonPropertyName("set")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Set { get; init; } - [JsonInclude, JsonPropertyName("set_security_user")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? SetSecurityUser { get; init; } - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Sort { get; init; } - [JsonInclude, JsonPropertyName("split")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Split { get; init; } - [JsonInclude, JsonPropertyName("trim")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Trim { get; init; } - [JsonInclude, JsonPropertyName("uppercase")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? Uppercase { get; init; } - [JsonInclude, JsonPropertyName("urldecode")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? UrlDecode { get; init; } - [JsonInclude, JsonPropertyName("user_agent")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoIngestInfo? UserAgent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs deleted file mode 100644 index f845950e3bb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNetwork.g.cs +++ /dev/null @@ -1,35 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsNetwork -{ - [JsonInclude, JsonPropertyName("host")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? Host { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNode.g.cs deleted file mode 100644 index 8168ac2f90f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsNode.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsNode -{ - [JsonInclude, JsonPropertyName("attr")] - public IReadOnlyDictionary Attr { get; init; } - [JsonInclude, JsonPropertyName("max_local_storage_nodes")] - public string? MaxLocalStorageNodes { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransport.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransport.g.cs deleted file mode 100644 index cc28d76d736..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransport.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsTransport -{ - [JsonInclude, JsonPropertyName("features")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsTransportFeatures? Features { get; init; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoSettingsTransportType Type { get; init; } - [JsonInclude, JsonPropertyName("type.default")] - public string? TypeDefault { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportFeatures.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportFeatures.g.cs deleted file mode 100644 index 886e689d0f4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportFeatures.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsTransportFeatures -{ - [JsonInclude, JsonPropertyName("x-pack")] - public string XPack { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportType.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportType.g.cs deleted file mode 100644 index f08f1144e14..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoSettingsTransportType.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoSettingsTransportType -{ - [JsonInclude, JsonPropertyName("default")] - public string Default { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoTransport.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoTransport.g.cs deleted file mode 100644 index 5269e6ea2b7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoTransport.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoTransport -{ - [JsonInclude, JsonPropertyName("bound_address")] - public IReadOnlyCollection BoundAddress { get; init; } - [JsonInclude, JsonPropertyName("profiles")] - public IReadOnlyDictionary Profiles { get; init; } - [JsonInclude, JsonPropertyName("publish_address")] - public string PublishAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpack.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpack.g.cs deleted file mode 100644 index 5e6d49c491c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpack.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpack -{ - [JsonInclude, JsonPropertyName("license")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackLicense? License { get; init; } - [JsonInclude, JsonPropertyName("ml")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackMl? Ml { get; init; } - [JsonInclude, JsonPropertyName("notification")] - public IReadOnlyDictionary? Notification { get; init; } - [JsonInclude, JsonPropertyName("security")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackSecurity Security { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicense.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicense.g.cs deleted file mode 100644 index afba9836083..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicense.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackLicense -{ - [JsonInclude, JsonPropertyName("self_generated")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackLicenseType SelfGenerated { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicenseType.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicenseType.g.cs deleted file mode 100644 index b49b2818b15..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackLicenseType.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackLicenseType -{ - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs deleted file mode 100644 index 0d47e32199a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackMl -{ - [JsonInclude, JsonPropertyName("use_auto_machine_memory_percent")] - public bool? UseAutoMachineMemoryPercent { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurity.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurity.g.cs deleted file mode 100644 index 52f87efcbca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurity.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackSecurity -{ - [JsonInclude, JsonPropertyName("authc")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackSecurityAuthc? Authc { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public string Enabled { get; init; } - [JsonInclude, JsonPropertyName("http")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackSecuritySsl? Http { get; init; } - [JsonInclude, JsonPropertyName("transport")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackSecuritySsl? Transport { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthc.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthc.g.cs deleted file mode 100644 index 4926312fafa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthc.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackSecurityAuthc -{ - [JsonInclude, JsonPropertyName("realms")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackSecurityAuthcRealms? Realms { get; init; } - [JsonInclude, JsonPropertyName("token")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoXpackSecurityAuthcToken? Token { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealms.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealms.g.cs deleted file mode 100644 index 77608ca0d26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealms.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackSecurityAuthcRealms -{ - [JsonInclude, JsonPropertyName("file")] - public IReadOnlyDictionary? File { get; init; } - [JsonInclude, JsonPropertyName("native")] - public IReadOnlyDictionary? Native { get; init; } - [JsonInclude, JsonPropertyName("pki")] - public IReadOnlyDictionary? Pki { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealmsStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealmsStatus.g.cs deleted file mode 100644 index bfb4d658e7a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcRealmsStatus.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackSecurityAuthcRealmsStatus -{ - [JsonInclude, JsonPropertyName("enabled")] - public string? Enabled { get; init; } - [JsonInclude, JsonPropertyName("order")] - public string Order { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcToken.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcToken.g.cs deleted file mode 100644 index c9fdc45c15a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecurityAuthcToken.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackSecurityAuthcToken -{ - [JsonInclude, JsonPropertyName("enabled")] - public string Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecuritySsl.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecuritySsl.g.cs deleted file mode 100644 index 0e8ee43122f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackSecuritySsl.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeInfoXpackSecuritySsl -{ - [JsonInclude, JsonPropertyName("ssl")] - public IReadOnlyDictionary Ssl { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeJvmInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeJvmInfo.g.cs deleted file mode 100644 index 9c93c25fd84..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeJvmInfo.g.cs +++ /dev/null @@ -1,151 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -internal sealed partial class NodeJvmInfoConverter : JsonConverter -{ - public override NodeJvmInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyCollection gcCollectors = default; - IReadOnlyCollection inputArguments = default; - Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoJvmMemory mem = default; - IReadOnlyCollection memoryPools = default; - int pid = default; - long startTimeInMillis = default; - bool usingBundledJdk = default; - object? usingCompressedOrdinaryObjectPointers = default; - string version = default; - string vmName = default; - string vmVendor = default; - string vmVersion = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "gc_collectors") - { - gcCollectors = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "input_arguments") - { - inputArguments = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "mem") - { - mem = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "memory_pools") - { - memoryPools = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "pid") - { - pid = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "start_time_in_millis") - { - startTimeInMillis = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "using_bundled_jdk" || property == "bundled_jdk") - { - usingBundledJdk = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "using_compressed_ordinary_object_pointers") - { - usingCompressedOrdinaryObjectPointers = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "version") - { - version = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "vm_name") - { - vmName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "vm_vendor") - { - vmVendor = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "vm_version") - { - vmVersion = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return new NodeJvmInfo { GcCollectors = gcCollectors, InputArguments = inputArguments, Mem = mem, MemoryPools = memoryPools, Pid = pid, StartTimeInMillis = startTimeInMillis, UsingBundledJdk = usingBundledJdk, UsingCompressedOrdinaryObjectPointers = usingCompressedOrdinaryObjectPointers, Version = version, VmName = vmName, VmVendor = vmVendor, VmVersion = vmVersion }; - } - - public override void Write(Utf8JsonWriter writer, NodeJvmInfo value, JsonSerializerOptions options) - { - throw new NotImplementedException("'NodeJvmInfo' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(NodeJvmInfoConverter))] -public sealed partial class NodeJvmInfo -{ - public IReadOnlyCollection GcCollectors { get; init; } - public IReadOnlyCollection InputArguments { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoJvmMemory Mem { get; init; } - public IReadOnlyCollection MemoryPools { get; init; } - public int Pid { get; init; } - public long StartTimeInMillis { get; init; } - public bool UsingBundledJdk { get; init; } - public object? UsingCompressedOrdinaryObjectPointers { get; init; } - public string Version { get; init; } - public string VmName { get; init; } - public string VmVendor { get; init; } - public string VmVersion { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs deleted file mode 100644 index b014ef505d9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs +++ /dev/null @@ -1,87 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeOperatingSystemInfo -{ - /// - /// - /// The number of processors actually used to calculate thread pool size. This number can be set with the node.processors setting of a node and defaults to the number of processors reported by the OS. - /// - /// - [JsonInclude, JsonPropertyName("allocated_processors")] - public int? AllocatedProcessors { get; init; } - - /// - /// - /// Name of the JVM architecture (ex: amd64, x86) - /// - /// - [JsonInclude, JsonPropertyName("arch")] - public string Arch { get; init; } - - /// - /// - /// Number of processors available to the Java virtual machine - /// - /// - [JsonInclude, JsonPropertyName("available_processors")] - public int AvailableProcessors { get; init; } - [JsonInclude, JsonPropertyName("cpu")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoOSCPU? Cpu { get; init; } - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoMemory? Mem { get; init; } - - /// - /// - /// Name of the operating system (ex: Linux, Windows, Mac OS X) - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("pretty_name")] - public string PrettyName { get; init; } - - /// - /// - /// Refresh interval for the OS statistics - /// - /// - [JsonInclude, JsonPropertyName("refresh_interval_in_millis")] - public long RefreshIntervalInMillis { get; init; } - [JsonInclude, JsonPropertyName("swap")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.NodeInfoMemory? Swap { get; init; } - - /// - /// - /// Version of the operating system - /// - /// - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeProcessInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeProcessInfo.g.cs deleted file mode 100644 index d5b613ae01a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeProcessInfo.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeProcessInfo -{ - /// - /// - /// Process identifier (PID) - /// - /// - [JsonInclude, JsonPropertyName("id")] - public long Id { get; init; } - - /// - /// - /// Indicates if the process address space has been successfully locked in memory - /// - /// - [JsonInclude, JsonPropertyName("mlockall")] - public bool Mlockall { get; init; } - - /// - /// - /// Refresh interval for the process statistics - /// - /// - [JsonInclude, JsonPropertyName("refresh_interval_in_millis")] - public long RefreshIntervalInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs deleted file mode 100644 index a84f939b43d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeThreadPoolInfo.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeThreadPoolInfo -{ - [JsonInclude, JsonPropertyName("core")] - public int? Core { get; init; } - [JsonInclude, JsonPropertyName("keep_alive")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; init; } - [JsonInclude, JsonPropertyName("max")] - public int? Max { get; init; } - [JsonInclude, JsonPropertyName("queue_size")] - public int QueueSize { get; init; } - [JsonInclude, JsonPropertyName("size")] - public int? Size { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeUsage.g.cs deleted file mode 100644 index 863d6b5e813..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeUsage.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class NodeUsage -{ - [JsonInclude, JsonPropertyName("aggregations")] - public IReadOnlyDictionary Aggregations { get; init; } - [JsonInclude, JsonPropertyName("rest_actions")] - public IReadOnlyDictionary RestActions { get; init; } - [JsonInclude, JsonPropertyName("since")] - public long Since { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public long Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/OperatingSystem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/OperatingSystem.g.cs deleted file mode 100644 index 52814ad83fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/OperatingSystem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class OperatingSystem -{ - [JsonInclude, JsonPropertyName("cgroup")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Cgroup? Cgroup { get; init; } - [JsonInclude, JsonPropertyName("cpu")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Cpu? Cpu { get; init; } - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.ExtendedMemoryStats? Mem { get; init; } - [JsonInclude, JsonPropertyName("swap")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.MemoryStats? Swap { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Pool.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Pool.g.cs deleted file mode 100644 index bca37f58d78..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Pool.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Pool -{ - /// - /// - /// Maximum amount of memory, in bytes, available for use by the heap. - /// - /// - [JsonInclude, JsonPropertyName("max_in_bytes")] - public long? MaxInBytes { get; init; } - - /// - /// - /// Largest amount of memory, in bytes, historically used by the heap. - /// - /// - [JsonInclude, JsonPropertyName("peak_max_in_bytes")] - public long? PeakMaxInBytes { get; init; } - - /// - /// - /// Largest amount of memory, in bytes, historically used by the heap. - /// - /// - [JsonInclude, JsonPropertyName("peak_used_in_bytes")] - public long? PeakUsedInBytes { get; init; } - - /// - /// - /// Memory, in bytes, used by the heap. - /// - /// - [JsonInclude, JsonPropertyName("used_in_bytes")] - public long? UsedInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PressureMemory.g.cs deleted file mode 100644 index cccfef83ab1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PressureMemory.g.cs +++ /dev/null @@ -1,137 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class PressureMemory -{ - /// - /// - /// Memory consumed by indexing requests in the coordinating, primary, or replica stage. - /// - /// - [JsonInclude, JsonPropertyName("all")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? All { get; init; } - - /// - /// - /// Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage. - /// - /// - [JsonInclude, JsonPropertyName("all_in_bytes")] - public long? AllInBytes { get; init; } - - /// - /// - /// Memory consumed by indexing requests in the coordinating or primary stage. - /// This value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally. - /// - /// - [JsonInclude, JsonPropertyName("combined_coordinating_and_primary")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? CombinedCoordinatingAndPrimary { get; init; } - - /// - /// - /// Memory consumed, in bytes, by indexing requests in the coordinating or primary stage. - /// This value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally. - /// - /// - [JsonInclude, JsonPropertyName("combined_coordinating_and_primary_in_bytes")] - public long? CombinedCoordinatingAndPrimaryInBytes { get; init; } - - /// - /// - /// Memory consumed by indexing requests in the coordinating stage. - /// - /// - [JsonInclude, JsonPropertyName("coordinating")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Coordinating { get; init; } - - /// - /// - /// Memory consumed, in bytes, by indexing requests in the coordinating stage. - /// - /// - [JsonInclude, JsonPropertyName("coordinating_in_bytes")] - public long? CoordinatingInBytes { get; init; } - - /// - /// - /// Number of indexing requests rejected in the coordinating stage. - /// - /// - [JsonInclude, JsonPropertyName("coordinating_rejections")] - public long? CoordinatingRejections { get; init; } - - /// - /// - /// Memory consumed by indexing requests in the primary stage. - /// - /// - [JsonInclude, JsonPropertyName("primary")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Primary { get; init; } - - /// - /// - /// Memory consumed, in bytes, by indexing requests in the primary stage. - /// - /// - [JsonInclude, JsonPropertyName("primary_in_bytes")] - public long? PrimaryInBytes { get; init; } - - /// - /// - /// Number of indexing requests rejected in the primary stage. - /// - /// - [JsonInclude, JsonPropertyName("primary_rejections")] - public long? PrimaryRejections { get; init; } - - /// - /// - /// Memory consumed by indexing requests in the replica stage. - /// - /// - [JsonInclude, JsonPropertyName("replica")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Replica { get; init; } - - /// - /// - /// Memory consumed, in bytes, by indexing requests in the replica stage. - /// - /// - [JsonInclude, JsonPropertyName("replica_in_bytes")] - public long? ReplicaInBytes { get; init; } - - /// - /// - /// Number of indexing requests rejected in the replica stage. - /// - /// - [JsonInclude, JsonPropertyName("replica_rejections")] - public long? ReplicaRejections { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Process.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Process.g.cs deleted file mode 100644 index bea16be24ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Process.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Process -{ - /// - /// - /// Contains CPU statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("cpu")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Cpu? Cpu { get; init; } - - /// - /// - /// Maximum number of file descriptors allowed on the system, or -1 if not supported. - /// - /// - [JsonInclude, JsonPropertyName("max_file_descriptors")] - public int? MaxFileDescriptors { get; init; } - - /// - /// - /// Contains virtual memory statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("mem")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.MemoryStats? Mem { get; init; } - - /// - /// - /// Number of opened file descriptors associated with the current or -1 if not supported. - /// - /// - [JsonInclude, JsonPropertyName("open_file_descriptors")] - public int? OpenFileDescriptors { get; init; } - - /// - /// - /// Last time the statistics were refreshed. - /// Recorded in milliseconds since the Unix Epoch. - /// - /// - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Processor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Processor.g.cs deleted file mode 100644 index 20fb3fa42cf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Processor.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Processor -{ - /// - /// - /// Number of documents transformed by the processor. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } - - /// - /// - /// Number of documents currently being transformed by the processor. - /// - /// - [JsonInclude, JsonPropertyName("current")] - public long? Current { get; init; } - - /// - /// - /// Number of failed operations for the processor. - /// - /// - [JsonInclude, JsonPropertyName("failed")] - public long? Failed { get; init; } - - /// - /// - /// Time, in milliseconds, spent by the processor transforming documents. - /// - /// - [JsonInclude, JsonPropertyName("time_in_millis")] - public long? TimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PublishedClusterStates.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PublishedClusterStates.g.cs deleted file mode 100644 index 0db9e471302..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/PublishedClusterStates.g.cs +++ /dev/null @@ -1,55 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class PublishedClusterStates -{ - /// - /// - /// Number of compatible differences between published cluster states. - /// - /// - [JsonInclude, JsonPropertyName("compatible_diffs")] - public long? CompatibleDiffs { get; init; } - - /// - /// - /// Number of published cluster states. - /// - /// - [JsonInclude, JsonPropertyName("full_states")] - public long? FullStates { get; init; } - - /// - /// - /// Number of incompatible differences between published cluster states. - /// - /// - [JsonInclude, JsonPropertyName("incompatible_diffs")] - public long? IncompatibleDiffs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Recording.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Recording.g.cs deleted file mode 100644 index f2b7043c8ed..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Recording.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Recording -{ - [JsonInclude, JsonPropertyName("cumulative_execution_count")] - public long? CumulativeExecutionCount { get; init; } - [JsonInclude, JsonPropertyName("cumulative_execution_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? CumulativeExecutionTime { get; init; } - [JsonInclude, JsonPropertyName("cumulative_execution_time_millis")] - public long? CumulativeExecutionTimeMillis { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ScriptCache.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ScriptCache.g.cs deleted file mode 100644 index b0fbd84d21b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ScriptCache.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class ScriptCache -{ - /// - /// - /// Total number of times the script cache has evicted old data. - /// - /// - [JsonInclude, JsonPropertyName("cache_evictions")] - public long? CacheEvictions { get; init; } - - /// - /// - /// Total number of times the script compilation circuit breaker has limited inline script compilations. - /// - /// - [JsonInclude, JsonPropertyName("compilation_limit_triggered")] - public long? CompilationLimitTriggered { get; init; } - - /// - /// - /// Total number of inline script compilations performed by the node. - /// - /// - [JsonInclude, JsonPropertyName("compilations")] - public long? Compilations { get; init; } - [JsonInclude, JsonPropertyName("context")] - public string? Context { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Scripting.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Scripting.g.cs deleted file mode 100644 index 46a5d2cc55e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Scripting.g.cs +++ /dev/null @@ -1,65 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Scripting -{ - /// - /// - /// Total number of times the script cache has evicted old data. - /// - /// - [JsonInclude, JsonPropertyName("cache_evictions")] - public long? CacheEvictions { get; init; } - - /// - /// - /// Total number of times the script compilation circuit breaker has limited inline script compilations. - /// - /// - [JsonInclude, JsonPropertyName("compilation_limit_triggered")] - public long? CompilationLimitTriggered { get; init; } - - /// - /// - /// Total number of inline script compilations performed by the node. - /// - /// - [JsonInclude, JsonPropertyName("compilations")] - public long? Compilations { get; init; } - - /// - /// - /// Contains this recent history of script compilations. - /// - /// - [JsonInclude, JsonPropertyName("compilations_history")] - public IReadOnlyDictionary? CompilationsHistory { get; init; } - [JsonInclude, JsonPropertyName("contexts")] - public IReadOnlyCollection? Contexts { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterState.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterState.g.cs deleted file mode 100644 index 7ccf28e95af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterState.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class SerializedClusterState -{ - [JsonInclude, JsonPropertyName("diffs")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.SerializedClusterStateDetail? Diffs { get; init; } - - /// - /// - /// Number of published cluster states. - /// - /// - [JsonInclude, JsonPropertyName("full_states")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.SerializedClusterStateDetail? FullStates { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs deleted file mode 100644 index 3fd7c5a09f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/SerializedClusterStateDetail.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class SerializedClusterStateDetail -{ - [JsonInclude, JsonPropertyName("compressed_size")] - public string? CompressedSize { get; init; } - [JsonInclude, JsonPropertyName("compressed_size_in_bytes")] - public long? CompressedSizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } - [JsonInclude, JsonPropertyName("uncompressed_size")] - public string? UncompressedSize { get; init; } - [JsonInclude, JsonPropertyName("uncompressed_size_in_bytes")] - public long? UncompressedSizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Stats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Stats.g.cs deleted file mode 100644 index 5fa4360b7c1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Stats.g.cs +++ /dev/null @@ -1,198 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Stats -{ - /// - /// - /// Statistics about adaptive replica selection. - /// - /// - [JsonInclude, JsonPropertyName("adaptive_selection")] - public IReadOnlyDictionary? AdaptiveSelection { get; init; } - - /// - /// - /// Contains a list of attributes for the node. - /// - /// - [JsonInclude, JsonPropertyName("attributes")] - [ReadOnlyFieldDictionaryConverter(typeof(string))] - public IReadOnlyDictionary? Attributes { get; init; } - - /// - /// - /// Statistics about the field data circuit breaker. - /// - /// - [JsonInclude, JsonPropertyName("breakers")] - public IReadOnlyDictionary? Breakers { get; init; } - - /// - /// - /// Contains node discovery statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("discovery")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Discovery? Discovery { get; init; } - - /// - /// - /// File system information, data path, free disk space, read/write stats. - /// - /// - [JsonInclude, JsonPropertyName("fs")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.FileSystem? Fs { get; init; } - - /// - /// - /// Network host for the node, based on the network host setting. - /// - /// - [JsonInclude, JsonPropertyName("host")] - public string? Host { get; init; } - - /// - /// - /// HTTP connection information. - /// - /// - [JsonInclude, JsonPropertyName("http")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Http? Http { get; init; } - - /// - /// - /// Contains indexing pressure statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("indexing_pressure")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.IndexingPressure? IndexingPressure { get; init; } - - /// - /// - /// Indices stats about size, document count, indexing and deletion times, search times, field cache size, merges and flushes. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardStats? Indices { get; init; } - - /// - /// - /// Statistics about ingest preprocessing. - /// - /// - [JsonInclude, JsonPropertyName("ingest")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Ingest? Ingest { get; init; } - - /// - /// - /// IP address and port for the node. - /// - /// - [JsonInclude, JsonPropertyName("ip")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? Ip { get; init; } - - /// - /// - /// JVM stats, memory pool information, garbage collection, buffer pools, number of loaded/unloaded classes. - /// - /// - [JsonInclude, JsonPropertyName("jvm")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Jvm? Jvm { get; init; } - - /// - /// - /// Human-readable identifier for the node. - /// Based on the node name setting. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } - - /// - /// - /// Operating system stats, load average, mem, swap. - /// - /// - [JsonInclude, JsonPropertyName("os")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.OperatingSystem? Os { get; init; } - - /// - /// - /// Process statistics, memory consumption, cpu usage, open file descriptors. - /// - /// - [JsonInclude, JsonPropertyName("process")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Process? Process { get; init; } - - /// - /// - /// Roles assigned to the node. - /// - /// - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - - /// - /// - /// Contains script statistics for the node. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Scripting? Script { get; init; } - [JsonInclude, JsonPropertyName("script_cache")] - public IReadOnlyDictionary>>? ScriptCache { get; init; } - - /// - /// - /// Statistics about each thread pool, including current size, queue and rejected tasks. - /// - /// - [JsonInclude, JsonPropertyName("thread_pool")] - public IReadOnlyDictionary? ThreadPool { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public long? Timestamp { get; init; } - - /// - /// - /// Transport statistics about sent and received bytes in cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("transport")] - public Elastic.Clients.Elasticsearch.Serverless.Nodes.Transport? Transport { get; init; } - - /// - /// - /// Host and port for the transport layer, used for internal communication between nodes in a cluster. - /// - /// - [JsonInclude, JsonPropertyName("transport_address")] - public string? TransportAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ThreadCount.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ThreadCount.g.cs deleted file mode 100644 index bf936d7684b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/ThreadCount.g.cs +++ /dev/null @@ -1,79 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class ThreadCount -{ - /// - /// - /// Number of active threads in the thread pool. - /// - /// - [JsonInclude, JsonPropertyName("active")] - public long? Active { get; init; } - - /// - /// - /// Number of tasks completed by the thread pool executor. - /// - /// - [JsonInclude, JsonPropertyName("completed")] - public long? Completed { get; init; } - - /// - /// - /// Highest number of active threads in the thread pool. - /// - /// - [JsonInclude, JsonPropertyName("largest")] - public long? Largest { get; init; } - - /// - /// - /// Number of tasks in queue for the thread pool. - /// - /// - [JsonInclude, JsonPropertyName("queue")] - public long? Queue { get; init; } - - /// - /// - /// Number of tasks rejected by the thread pool executor. - /// - /// - [JsonInclude, JsonPropertyName("rejected")] - public long? Rejected { get; init; } - - /// - /// - /// Number of threads in the thread pool. - /// - /// - [JsonInclude, JsonPropertyName("threads")] - public long? Threads { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Transport.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Transport.g.cs deleted file mode 100644 index ed04737e6fd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/Transport.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class Transport -{ - /// - /// - /// The distribution of the time spent handling each inbound message on a transport thread, represented as a histogram. - /// - /// - [JsonInclude, JsonPropertyName("inbound_handling_time_histogram")] - public IReadOnlyCollection? InboundHandlingTimeHistogram { get; init; } - - /// - /// - /// The distribution of the time spent sending each outbound transport message on a transport thread, represented as a histogram. - /// - /// - [JsonInclude, JsonPropertyName("outbound_handling_time_histogram")] - public IReadOnlyCollection? OutboundHandlingTimeHistogram { get; init; } - - /// - /// - /// Total number of RX (receive) packets received by the node during internal cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("rx_count")] - public long? RxCount { get; init; } - - /// - /// - /// Size of RX packets received by the node during internal cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("rx_size")] - public string? RxSize { get; init; } - - /// - /// - /// Size, in bytes, of RX packets received by the node during internal cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("rx_size_in_bytes")] - public long? RxSizeInBytes { get; init; } - - /// - /// - /// Current number of inbound TCP connections used for internal communication between nodes. - /// - /// - [JsonInclude, JsonPropertyName("server_open")] - public int? ServerOpen { get; init; } - - /// - /// - /// The cumulative number of outbound transport connections that this node has opened since it started. - /// Each transport connection may comprise multiple TCP connections but is only counted once in this statistic. - /// Transport connections are typically long-lived so this statistic should remain constant in a stable cluster. - /// - /// - [JsonInclude, JsonPropertyName("total_outbound_connections")] - public long? TotalOutboundConnections { get; init; } - - /// - /// - /// Total number of TX (transmit) packets sent by the node during internal cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("tx_count")] - public long? TxCount { get; init; } - - /// - /// - /// Size of TX packets sent by the node during internal cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("tx_size")] - public string? TxSize { get; init; } - - /// - /// - /// Size, in bytes, of TX packets sent by the node during internal cluster communication. - /// - /// - [JsonInclude, JsonPropertyName("tx_size_in_bytes")] - public long? TxSizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/TransportHistogram.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/TransportHistogram.g.cs deleted file mode 100644 index 1123336df0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/TransportHistogram.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; - -public sealed partial class TransportHistogram -{ - /// - /// - /// The number of times a transport thread took a period of time within the bounds of this bucket to handle an inbound message. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public long? Count { get; init; } - - /// - /// - /// The inclusive lower bound of the bucket in milliseconds. May be omitted on the first bucket if this bucket has no lower bound. - /// - /// - [JsonInclude, JsonPropertyName("ge_millis")] - public long? GeMillis { get; init; } - - /// - /// - /// The exclusive upper bound of the bucket in milliseconds. - /// May be omitted on the last bucket if this bucket has no upper bound. - /// - /// - [JsonInclude, JsonPropertyName("lt_millis")] - public long? LtMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/PluginStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/PluginStats.g.cs deleted file mode 100644 index 1e8fa0c0962..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/PluginStats.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class PluginStats -{ - [JsonInclude, JsonPropertyName("classname")] - public string Classname { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string Description { get; init; } - [JsonInclude, JsonPropertyName("elasticsearch_version")] - public string ElasticsearchVersion { get; init; } - [JsonInclude, JsonPropertyName("extended_plugins")] - public IReadOnlyCollection ExtendedPlugins { get; init; } - [JsonInclude, JsonPropertyName("has_native_controller")] - public bool HasNativeController { get; init; } - [JsonInclude, JsonPropertyName("java_version")] - public string JavaVersion { get; init; } - [JsonInclude, JsonPropertyName("licensed")] - public bool Licensed { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs deleted file mode 100644 index 3545bd22965..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs +++ /dev/null @@ -1,96 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class QueryCacheStats -{ - /// - /// - /// Total number of entries added to the query cache across all shards assigned to selected nodes. - /// This number includes current and evicted entries. - /// - /// - [JsonInclude, JsonPropertyName("cache_count")] - public long CacheCount { get; init; } - - /// - /// - /// Total number of entries currently in the query cache across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("cache_size")] - public long CacheSize { get; init; } - - /// - /// - /// Total number of query cache evictions across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("evictions")] - public long Evictions { get; init; } - - /// - /// - /// Total count of query cache hits across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("hit_count")] - public long HitCount { get; init; } - - /// - /// - /// Total amount of memory used for the query cache across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("memory_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MemorySize { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("memory_size_in_bytes")] - public long MemorySizeInBytes { get; init; } - - /// - /// - /// Total count of query cache misses across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("miss_count")] - public long MissCount { get; init; } - - /// - /// - /// Total count of hits and misses in the query cache across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("total_count")] - public long TotalCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs deleted file mode 100644 index febf7b6dc6a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoolQuery.g.cs +++ /dev/null @@ -1,827 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class BoolQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The clause (query) must appear in matching documents. - /// However, unlike must, the score of the query will be ignored. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// Specifies the number or percentage of should clauses returned documents must match. - /// - /// - [JsonInclude, JsonPropertyName("minimum_should_match")] - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// The clause (query) must appear in matching documents and will contribute to the score. - /// - /// - [JsonInclude, JsonPropertyName("must")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Must { get; set; } - - /// - /// - /// The clause (query) must not appear in the matching documents. - /// Because scoring is ignored, a score of 0 is returned for all documents. - /// - /// - [JsonInclude, JsonPropertyName("must_not")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? MustNot { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// The clause (query) should appear in the matching document. - /// - /// - [JsonInclude, JsonPropertyName("should")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Should { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(BoolQuery boolQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Bool(boolQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(BoolQuery boolQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Bool(boolQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(BoolQuery boolQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Bool(boolQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(BoolQuery boolQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Bool(boolQuery); -} - -public sealed partial class BoolQueryDescriptor : SerializableDescriptor> -{ - internal BoolQueryDescriptor(Action> configure) => configure.Invoke(this); - - public BoolQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private ICollection? MustValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor MustDescriptor { get; set; } - private Action> MustDescriptorAction { get; set; } - private Action>[] MustDescriptorActions { get; set; } - private ICollection? MustNotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor MustNotDescriptor { get; set; } - private Action> MustNotDescriptorAction { get; set; } - private Action>[] MustNotDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private ICollection? ShouldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor ShouldDescriptor { get; set; } - private Action> ShouldDescriptorAction { get; set; } - private Action>[] ShouldDescriptorActions { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public BoolQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The clause (query) must appear in matching documents. - /// However, unlike must, the score of the query will be ignored. - /// - /// - public BoolQueryDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public BoolQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Specifies the number or percentage of should clauses returned documents must match. - /// - /// - public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// The clause (query) must appear in matching documents and will contribute to the score. - /// - /// - public BoolQueryDescriptor Must(ICollection? must) - { - MustDescriptor = null; - MustDescriptorAction = null; - MustDescriptorActions = null; - MustValue = must; - return Self; - } - - public BoolQueryDescriptor Must(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - MustValue = null; - MustDescriptorAction = null; - MustDescriptorActions = null; - MustDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor Must(Action> configure) - { - MustValue = null; - MustDescriptor = null; - MustDescriptorActions = null; - MustDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor Must(params Action>[] configure) - { - MustValue = null; - MustDescriptor = null; - MustDescriptorAction = null; - MustDescriptorActions = configure; - return Self; - } - - /// - /// - /// The clause (query) must not appear in the matching documents. - /// Because scoring is ignored, a score of 0 is returned for all documents. - /// - /// - public BoolQueryDescriptor MustNot(ICollection? mustNot) - { - MustNotDescriptor = null; - MustNotDescriptorAction = null; - MustNotDescriptorActions = null; - MustNotValue = mustNot; - return Self; - } - - public BoolQueryDescriptor MustNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - MustNotValue = null; - MustNotDescriptorAction = null; - MustNotDescriptorActions = null; - MustNotDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor MustNot(Action> configure) - { - MustNotValue = null; - MustNotDescriptor = null; - MustNotDescriptorActions = null; - MustNotDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor MustNot(params Action>[] configure) - { - MustNotValue = null; - MustNotDescriptor = null; - MustNotDescriptorAction = null; - MustNotDescriptorActions = configure; - return Self; - } - - public BoolQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// The clause (query) should appear in the matching document. - /// - /// - public BoolQueryDescriptor Should(ICollection? should) - { - ShouldDescriptor = null; - ShouldDescriptorAction = null; - ShouldDescriptorActions = null; - ShouldValue = should; - return Self; - } - - public BoolQueryDescriptor Should(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - ShouldValue = null; - ShouldDescriptorAction = null; - ShouldDescriptorActions = null; - ShouldDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor Should(Action> configure) - { - ShouldValue = null; - ShouldDescriptor = null; - ShouldDescriptorActions = null; - ShouldDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor Should(params Action>[] configure) - { - ShouldValue = null; - ShouldDescriptor = null; - ShouldDescriptorAction = null; - ShouldDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (MustDescriptor is not null) - { - writer.WritePropertyName("must"); - JsonSerializer.Serialize(writer, MustDescriptor, options); - } - else if (MustDescriptorAction is not null) - { - writer.WritePropertyName("must"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(MustDescriptorAction), options); - } - else if (MustDescriptorActions is not null) - { - writer.WritePropertyName("must"); - if (MustDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in MustDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (MustDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (MustValue is not null) - { - writer.WritePropertyName("must"); - SingleOrManySerializationHelper.Serialize(MustValue, writer, options); - } - - if (MustNotDescriptor is not null) - { - writer.WritePropertyName("must_not"); - JsonSerializer.Serialize(writer, MustNotDescriptor, options); - } - else if (MustNotDescriptorAction is not null) - { - writer.WritePropertyName("must_not"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(MustNotDescriptorAction), options); - } - else if (MustNotDescriptorActions is not null) - { - writer.WritePropertyName("must_not"); - if (MustNotDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in MustNotDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (MustNotDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (MustNotValue is not null) - { - writer.WritePropertyName("must_not"); - SingleOrManySerializationHelper.Serialize(MustNotValue, writer, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ShouldDescriptor is not null) - { - writer.WritePropertyName("should"); - JsonSerializer.Serialize(writer, ShouldDescriptor, options); - } - else if (ShouldDescriptorAction is not null) - { - writer.WritePropertyName("should"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(ShouldDescriptorAction), options); - } - else if (ShouldDescriptorActions is not null) - { - writer.WritePropertyName("should"); - if (ShouldDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in ShouldDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (ShouldDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (ShouldValue is not null) - { - writer.WritePropertyName("should"); - SingleOrManySerializationHelper.Serialize(ShouldValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class BoolQueryDescriptor : SerializableDescriptor -{ - internal BoolQueryDescriptor(Action configure) => configure.Invoke(this); - - public BoolQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private ICollection? MustValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor MustDescriptor { get; set; } - private Action MustDescriptorAction { get; set; } - private Action[] MustDescriptorActions { get; set; } - private ICollection? MustNotValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor MustNotDescriptor { get; set; } - private Action MustNotDescriptorAction { get; set; } - private Action[] MustNotDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private ICollection? ShouldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor ShouldDescriptor { get; set; } - private Action ShouldDescriptorAction { get; set; } - private Action[] ShouldDescriptorActions { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public BoolQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The clause (query) must appear in matching documents. - /// However, unlike must, the score of the query will be ignored. - /// - /// - public BoolQueryDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public BoolQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Specifies the number or percentage of should clauses returned documents must match. - /// - /// - public BoolQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// The clause (query) must appear in matching documents and will contribute to the score. - /// - /// - public BoolQueryDescriptor Must(ICollection? must) - { - MustDescriptor = null; - MustDescriptorAction = null; - MustDescriptorActions = null; - MustValue = must; - return Self; - } - - public BoolQueryDescriptor Must(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - MustValue = null; - MustDescriptorAction = null; - MustDescriptorActions = null; - MustDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor Must(Action configure) - { - MustValue = null; - MustDescriptor = null; - MustDescriptorActions = null; - MustDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor Must(params Action[] configure) - { - MustValue = null; - MustDescriptor = null; - MustDescriptorAction = null; - MustDescriptorActions = configure; - return Self; - } - - /// - /// - /// The clause (query) must not appear in the matching documents. - /// Because scoring is ignored, a score of 0 is returned for all documents. - /// - /// - public BoolQueryDescriptor MustNot(ICollection? mustNot) - { - MustNotDescriptor = null; - MustNotDescriptorAction = null; - MustNotDescriptorActions = null; - MustNotValue = mustNot; - return Self; - } - - public BoolQueryDescriptor MustNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - MustNotValue = null; - MustNotDescriptorAction = null; - MustNotDescriptorActions = null; - MustNotDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor MustNot(Action configure) - { - MustNotValue = null; - MustNotDescriptor = null; - MustNotDescriptorActions = null; - MustNotDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor MustNot(params Action[] configure) - { - MustNotValue = null; - MustNotDescriptor = null; - MustNotDescriptorAction = null; - MustNotDescriptorActions = configure; - return Self; - } - - public BoolQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// The clause (query) should appear in the matching document. - /// - /// - public BoolQueryDescriptor Should(ICollection? should) - { - ShouldDescriptor = null; - ShouldDescriptorAction = null; - ShouldDescriptorActions = null; - ShouldValue = should; - return Self; - } - - public BoolQueryDescriptor Should(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - ShouldValue = null; - ShouldDescriptorAction = null; - ShouldDescriptorActions = null; - ShouldDescriptor = descriptor; - return Self; - } - - public BoolQueryDescriptor Should(Action configure) - { - ShouldValue = null; - ShouldDescriptor = null; - ShouldDescriptorActions = null; - ShouldDescriptorAction = configure; - return Self; - } - - public BoolQueryDescriptor Should(params Action[] configure) - { - ShouldValue = null; - ShouldDescriptor = null; - ShouldDescriptorAction = null; - ShouldDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (MustDescriptor is not null) - { - writer.WritePropertyName("must"); - JsonSerializer.Serialize(writer, MustDescriptor, options); - } - else if (MustDescriptorAction is not null) - { - writer.WritePropertyName("must"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(MustDescriptorAction), options); - } - else if (MustDescriptorActions is not null) - { - writer.WritePropertyName("must"); - if (MustDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in MustDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (MustDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (MustValue is not null) - { - writer.WritePropertyName("must"); - SingleOrManySerializationHelper.Serialize(MustValue, writer, options); - } - - if (MustNotDescriptor is not null) - { - writer.WritePropertyName("must_not"); - JsonSerializer.Serialize(writer, MustNotDescriptor, options); - } - else if (MustNotDescriptorAction is not null) - { - writer.WritePropertyName("must_not"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(MustNotDescriptorAction), options); - } - else if (MustNotDescriptorActions is not null) - { - writer.WritePropertyName("must_not"); - if (MustNotDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in MustNotDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (MustNotDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (MustNotValue is not null) - { - writer.WritePropertyName("must_not"); - SingleOrManySerializationHelper.Serialize(MustNotValue, writer, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ShouldDescriptor is not null) - { - writer.WritePropertyName("should"); - JsonSerializer.Serialize(writer, ShouldDescriptor, options); - } - else if (ShouldDescriptorAction is not null) - { - writer.WritePropertyName("should"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(ShouldDescriptorAction), options); - } - else if (ShouldDescriptorActions is not null) - { - writer.WritePropertyName("should"); - if (ShouldDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in ShouldDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (ShouldDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (ShouldValue is not null) - { - writer.WritePropertyName("should"); - SingleOrManySerializationHelper.Serialize(ShouldValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs deleted file mode 100644 index 643c25356d3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/BoostingQuery.g.cs +++ /dev/null @@ -1,390 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class BoostingQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Query used to decrease the relevance score of matching documents. - /// - /// - [JsonInclude, JsonPropertyName("negative")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Negative { get; set; } - - /// - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the negative query. - /// - /// - [JsonInclude, JsonPropertyName("negative_boost")] - public double NegativeBoost { get; set; } - - /// - /// - /// Any returned documents must match this query. - /// - /// - [JsonInclude, JsonPropertyName("positive")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Positive { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(BoostingQuery boostingQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Boosting(boostingQuery); -} - -public sealed partial class BoostingQueryDescriptor : SerializableDescriptor> -{ - internal BoostingQueryDescriptor(Action> configure) => configure.Invoke(this); - - public BoostingQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query NegativeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor NegativeDescriptor { get; set; } - private Action> NegativeDescriptorAction { get; set; } - private double NegativeBoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query PositiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PositiveDescriptor { get; set; } - private Action> PositiveDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public BoostingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Query used to decrease the relevance score of matching documents. - /// - /// - public BoostingQueryDescriptor Negative(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query negative) - { - NegativeDescriptor = null; - NegativeDescriptorAction = null; - NegativeValue = negative; - return Self; - } - - public BoostingQueryDescriptor Negative(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - NegativeValue = null; - NegativeDescriptorAction = null; - NegativeDescriptor = descriptor; - return Self; - } - - public BoostingQueryDescriptor Negative(Action> configure) - { - NegativeValue = null; - NegativeDescriptor = null; - NegativeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the negative query. - /// - /// - public BoostingQueryDescriptor NegativeBoost(double negativeBoost) - { - NegativeBoostValue = negativeBoost; - return Self; - } - - /// - /// - /// Any returned documents must match this query. - /// - /// - public BoostingQueryDescriptor Positive(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query positive) - { - PositiveDescriptor = null; - PositiveDescriptorAction = null; - PositiveValue = positive; - return Self; - } - - public BoostingQueryDescriptor Positive(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PositiveValue = null; - PositiveDescriptorAction = null; - PositiveDescriptor = descriptor; - return Self; - } - - public BoostingQueryDescriptor Positive(Action> configure) - { - PositiveValue = null; - PositiveDescriptor = null; - PositiveDescriptorAction = configure; - return Self; - } - - public BoostingQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (NegativeDescriptor is not null) - { - writer.WritePropertyName("negative"); - JsonSerializer.Serialize(writer, NegativeDescriptor, options); - } - else if (NegativeDescriptorAction is not null) - { - writer.WritePropertyName("negative"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(NegativeDescriptorAction), options); - } - else - { - writer.WritePropertyName("negative"); - JsonSerializer.Serialize(writer, NegativeValue, options); - } - - writer.WritePropertyName("negative_boost"); - writer.WriteNumberValue(NegativeBoostValue); - if (PositiveDescriptor is not null) - { - writer.WritePropertyName("positive"); - JsonSerializer.Serialize(writer, PositiveDescriptor, options); - } - else if (PositiveDescriptorAction is not null) - { - writer.WritePropertyName("positive"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PositiveDescriptorAction), options); - } - else - { - writer.WritePropertyName("positive"); - JsonSerializer.Serialize(writer, PositiveValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class BoostingQueryDescriptor : SerializableDescriptor -{ - internal BoostingQueryDescriptor(Action configure) => configure.Invoke(this); - - public BoostingQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query NegativeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor NegativeDescriptor { get; set; } - private Action NegativeDescriptorAction { get; set; } - private double NegativeBoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query PositiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor PositiveDescriptor { get; set; } - private Action PositiveDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public BoostingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Query used to decrease the relevance score of matching documents. - /// - /// - public BoostingQueryDescriptor Negative(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query negative) - { - NegativeDescriptor = null; - NegativeDescriptorAction = null; - NegativeValue = negative; - return Self; - } - - public BoostingQueryDescriptor Negative(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - NegativeValue = null; - NegativeDescriptorAction = null; - NegativeDescriptor = descriptor; - return Self; - } - - public BoostingQueryDescriptor Negative(Action configure) - { - NegativeValue = null; - NegativeDescriptor = null; - NegativeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the negative query. - /// - /// - public BoostingQueryDescriptor NegativeBoost(double negativeBoost) - { - NegativeBoostValue = negativeBoost; - return Self; - } - - /// - /// - /// Any returned documents must match this query. - /// - /// - public BoostingQueryDescriptor Positive(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query positive) - { - PositiveDescriptor = null; - PositiveDescriptorAction = null; - PositiveValue = positive; - return Self; - } - - public BoostingQueryDescriptor Positive(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - PositiveValue = null; - PositiveDescriptorAction = null; - PositiveDescriptor = descriptor; - return Self; - } - - public BoostingQueryDescriptor Positive(Action configure) - { - PositiveValue = null; - PositiveDescriptor = null; - PositiveDescriptorAction = configure; - return Self; - } - - public BoostingQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (NegativeDescriptor is not null) - { - writer.WritePropertyName("negative"); - JsonSerializer.Serialize(writer, NegativeDescriptor, options); - } - else if (NegativeDescriptorAction is not null) - { - writer.WritePropertyName("negative"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(NegativeDescriptorAction), options); - } - else - { - writer.WritePropertyName("negative"); - JsonSerializer.Serialize(writer, NegativeValue, options); - } - - writer.WritePropertyName("negative_boost"); - writer.WriteNumberValue(NegativeBoostValue); - if (PositiveDescriptor is not null) - { - writer.WritePropertyName("positive"); - JsonSerializer.Serialize(writer, PositiveDescriptor, options); - } - else if (PositiveDescriptorAction is not null) - { - writer.WritePropertyName("positive"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(PositiveDescriptorAction), options); - } - else - { - writer.WritePropertyName("positive"); - JsonSerializer.Serialize(writer, PositiveValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs deleted file mode 100644 index 5dd65d165b2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs +++ /dev/null @@ -1,398 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class CombinedFieldsQuery -{ - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - [JsonInclude, JsonPropertyName("auto_generate_synonyms_phrase_query")] - public bool? AutoGenerateSynonymsPhraseQuery { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// List of fields to search. Field wildcard patterns are allowed. Only text fields are supported, and they must all have the same search analyzer. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields Fields { get; set; } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - [JsonInclude, JsonPropertyName("minimum_should_match")] - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - [JsonInclude, JsonPropertyName("operator")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? Operator { get; set; } - - /// - /// - /// Text to search for in the provided fields. - /// The combined_fields query analyzes the provided text before performing a search. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - [JsonInclude, JsonPropertyName("zero_terms_query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQuery { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(CombinedFieldsQuery combinedFieldsQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.CombinedFields(combinedFieldsQuery); -} - -public sealed partial class CombinedFieldsQueryDescriptor : SerializableDescriptor> -{ - internal CombinedFieldsQueryDescriptor(Action> configure) => configure.Invoke(this); - - public CombinedFieldsQueryDescriptor() : base() - { - } - - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? OperatorValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQueryValue { get; set; } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public CombinedFieldsQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public CombinedFieldsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// List of fields to search. Field wildcard patterns are allowed. Only text fields are supported, and they must all have the same search analyzer. - /// - /// - public CombinedFieldsQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public CombinedFieldsQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public CombinedFieldsQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Text to search for in the provided fields. - /// The combined_fields query analyzes the provided text before performing a search. - /// - /// - public CombinedFieldsQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public CombinedFieldsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public CombinedFieldsQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class CombinedFieldsQueryDescriptor : SerializableDescriptor -{ - internal CombinedFieldsQueryDescriptor(Action configure) => configure.Invoke(this); - - public CombinedFieldsQueryDescriptor() : base() - { - } - - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? OperatorValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? ZeroTermsQueryValue { get; set; } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public CombinedFieldsQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public CombinedFieldsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// List of fields to search. Field wildcard patterns are allowed. Only text fields are supported, and they must all have the same search analyzer. - /// - /// - public CombinedFieldsQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public CombinedFieldsQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public CombinedFieldsQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsOperator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Text to search for in the provided fields. - /// The combined_fields query analyzes the provided text before performing a search. - /// - /// - public CombinedFieldsQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public CombinedFieldsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public CombinedFieldsQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsZeroTerms? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs deleted file mode 100644 index 9bc03ff0079..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ConstantScoreQuery.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ConstantScoreQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Filter query you wish to run. Any returned documents must match this query. - /// Filter queries do not calculate relevance scores. - /// To speed up performance, Elasticsearch automatically caches frequently used filter queries. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Filter { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(ConstantScoreQuery constantScoreQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.ConstantScore(constantScoreQuery); -} - -public sealed partial class ConstantScoreQueryDescriptor : SerializableDescriptor> -{ - internal ConstantScoreQueryDescriptor(Action> configure) => configure.Invoke(this); - - public ConstantScoreQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ConstantScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Filter query you wish to run. Any returned documents must match this query. - /// Filter queries do not calculate relevance scores. - /// To speed up performance, Elasticsearch automatically caches frequently used filter queries. - /// - /// - public ConstantScoreQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public ConstantScoreQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public ConstantScoreQueryDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public ConstantScoreQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ConstantScoreQueryDescriptor : SerializableDescriptor -{ - internal ConstantScoreQueryDescriptor(Action configure) => configure.Invoke(this); - - public ConstantScoreQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ConstantScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Filter query you wish to run. Any returned documents must match this query. - /// Filter queries do not calculate relevance scores. - /// To speed up performance, Elasticsearch automatically caches frequently used filter queries. - /// - /// - public ConstantScoreQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public ConstantScoreQueryDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public ConstantScoreQueryDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - public ConstantScoreQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDecayFunction.g.cs deleted file mode 100644 index b19c4540e0f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDecayFunction.g.cs +++ /dev/null @@ -1,228 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class DateDecayFunctionConverter : JsonConverter -{ - public override DateDecayFunction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new DateDecayFunction(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "multi_value_mode") - { - variant.MultiValueMode = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Placement = JsonSerializer.Deserialize>(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, DateDecayFunction value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Placement is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Placement, options); - } - - if (value.MultiValueMode is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, value.MultiValueMode, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(DateDecayFunctionConverter))] -public sealed partial class DateDecayFunction -{ - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueMode { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement Placement { get; set; } -} - -public sealed partial class DateDecayFunctionDescriptor : SerializableDescriptor> -{ - internal DateDecayFunctionDescriptor(Action> configure) => configure.Invoke(this); - - public DateDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public DateDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public DateDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public DateDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public DateDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public DateDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DateDecayFunctionDescriptor : SerializableDescriptor -{ - internal DateDecayFunctionDescriptor(Action configure) => configure.Invoke(this); - - public DateDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public DateDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public DateDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public DateDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public DateDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public DateDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs deleted file mode 100644 index 4acc19e3a1f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs +++ /dev/null @@ -1,329 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class DateDistanceFeatureQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - [JsonInclude, JsonPropertyName("origin")] - public Elastic.Clients.Elasticsearch.Serverless.DateMath Origin { get; set; } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public Elastic.Clients.Elasticsearch.Serverless.Duration Pivot { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } -} - -public sealed partial class DateDistanceFeatureQueryDescriptor : SerializableDescriptor> -{ - internal DateDistanceFeatureQueryDescriptor(Action> configure) => configure.Invoke(this); - - public DateDistanceFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath OriginValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration PivotValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public DateDistanceFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public DateDistanceFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public DateDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public DateDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - public DateDistanceFeatureQueryDescriptor Origin(Elastic.Clients.Elasticsearch.Serverless.DateMath origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - public DateDistanceFeatureQueryDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.Duration pivot) - { - PivotValue = pivot; - return Self; - } - - public DateDistanceFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DateDistanceFeatureQueryDescriptor : SerializableDescriptor -{ - internal DateDistanceFeatureQueryDescriptor(Action configure) => configure.Invoke(this); - - public DateDistanceFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath OriginValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration PivotValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public DateDistanceFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public DateDistanceFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public DateDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public DateDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - public DateDistanceFeatureQueryDescriptor Origin(Elastic.Clients.Elasticsearch.Serverless.DateMath origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - public DateDistanceFeatureQueryDescriptor Pivot(Elastic.Clients.Elasticsearch.Serverless.Duration pivot) - { - PivotValue = pivot; - return Self; - } - - public DateDistanceFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs deleted file mode 100644 index 685edc8185f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DateRangeQuery.g.cs +++ /dev/null @@ -1,643 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class DateRangeQueryConverter : JsonConverter -{ - public override DateRangeQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new DateRangeQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "format") - { - variant.Format = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gt") - { - variant.Gt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gte") - { - variant.Gte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lt") - { - variant.Lt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lte") - { - variant.Lte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "relation") - { - variant.Relation = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "time_zone") - { - variant.TimeZone = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, DateRangeQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize DateRangeQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (!string.IsNullOrEmpty(value.Format)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(value.Format); - } - - if (value.Gt is not null) - { - writer.WritePropertyName("gt"); - JsonSerializer.Serialize(writer, value.Gt, options); - } - - if (value.Gte is not null) - { - writer.WritePropertyName("gte"); - JsonSerializer.Serialize(writer, value.Gte, options); - } - - if (value.Lt is not null) - { - writer.WritePropertyName("lt"); - JsonSerializer.Serialize(writer, value.Lt, options); - } - - if (value.Lte is not null) - { - writer.WritePropertyName("lte"); - JsonSerializer.Serialize(writer, value.Lte, options); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Relation is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, value.Relation, options); - } - - if (!string.IsNullOrEmpty(value.TimeZone)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(value.TimeZone); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(DateRangeQueryConverter))] -public sealed partial class DateRangeQuery -{ - public DateRangeQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Date format used to convert date values in the query. - /// - /// - public string? Format { get; set; } - - /// - /// - /// Greater than. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.DateMath? Gt { get; set; } - - /// - /// - /// Greater than or equal to. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.DateMath? Gte { get; set; } - - /// - /// - /// Less than. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.DateMath? Lt { get; set; } - - /// - /// - /// Less than or equal to. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.DateMath? Lte { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? Relation { get; set; } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. - /// - /// - public string? TimeZone { get; set; } -} - -public sealed partial class DateRangeQueryDescriptor : SerializableDescriptor> -{ - internal DateRangeQueryDescriptor(Action> configure) => configure.Invoke(this); - - public DateRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? GtValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? GteValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? LtValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public DateRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public DateRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public DateRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public DateRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date format used to convert date values in the query. - /// - /// - public DateRangeQueryDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public DateRangeQueryDescriptor Gt(Elastic.Clients.Elasticsearch.Serverless.DateMath? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public DateRangeQueryDescriptor Gte(Elastic.Clients.Elasticsearch.Serverless.DateMath? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public DateRangeQueryDescriptor Lt(Elastic.Clients.Elasticsearch.Serverless.DateMath? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public DateRangeQueryDescriptor Lte(Elastic.Clients.Elasticsearch.Serverless.DateMath? lte) - { - LteValue = lte; - return Self; - } - - public DateRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public DateRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. - /// - /// - public DateRangeQueryDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GtValue is not null) - { - writer.WritePropertyName("gt"); - JsonSerializer.Serialize(writer, GtValue, options); - } - - if (GteValue is not null) - { - writer.WritePropertyName("gte"); - JsonSerializer.Serialize(writer, GteValue, options); - } - - if (LtValue is not null) - { - writer.WritePropertyName("lt"); - JsonSerializer.Serialize(writer, LtValue, options); - } - - if (LteValue is not null) - { - writer.WritePropertyName("lte"); - JsonSerializer.Serialize(writer, LteValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class DateRangeQueryDescriptor : SerializableDescriptor -{ - internal DateRangeQueryDescriptor(Action configure) => configure.Invoke(this); - - public DateRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? GtValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? GteValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? LtValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.DateMath? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public DateRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public DateRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public DateRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public DateRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date format used to convert date values in the query. - /// - /// - public DateRangeQueryDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public DateRangeQueryDescriptor Gt(Elastic.Clients.Elasticsearch.Serverless.DateMath? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public DateRangeQueryDescriptor Gte(Elastic.Clients.Elasticsearch.Serverless.DateMath? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public DateRangeQueryDescriptor Lt(Elastic.Clients.Elasticsearch.Serverless.DateMath? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public DateRangeQueryDescriptor Lte(Elastic.Clients.Elasticsearch.Serverless.DateMath? lte) - { - LteValue = lte; - return Self; - } - - public DateRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public DateRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. - /// - /// - public DateRangeQueryDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GtValue is not null) - { - writer.WritePropertyName("gt"); - JsonSerializer.Serialize(writer, GtValue, options); - } - - if (GteValue is not null) - { - writer.WritePropertyName("gte"); - JsonSerializer.Serialize(writer, GteValue, options); - } - - if (LtValue is not null) - { - writer.WritePropertyName("lt"); - JsonSerializer.Serialize(writer, LtValue, options); - } - - if (LteValue is not null) - { - writer.WritePropertyName("lte"); - JsonSerializer.Serialize(writer, LteValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DecayPlacement.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DecayPlacement.g.cs deleted file mode 100644 index 52c7faaa5d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DecayPlacement.g.cs +++ /dev/null @@ -1,66 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class DecayPlacement -{ - /// - /// - /// Defines how documents are scored at the distance given at scale. - /// - /// - [JsonInclude, JsonPropertyName("decay")] - public double? Decay { get; set; } - - /// - /// - /// If defined, the decay function will only compute the decay function for documents with a distance greater than the defined offset. - /// - /// - [JsonInclude, JsonPropertyName("offset")] - [SourceConverter] - public TScale? Offset { get; set; } - - /// - /// - /// The point of origin used for calculating distance. Must be given as a number for numeric field, date for date fields and geo point for geo fields. - /// - /// - [JsonInclude, JsonPropertyName("origin")] - [SourceConverter] - public TOrigin? Origin { get; set; } - - /// - /// - /// Defines the distance from origin + offset at which the computed score will equal decay parameter. - /// - /// - [JsonInclude, JsonPropertyName("scale")] - [SourceConverter] - public TScale? Scale { get; set; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs deleted file mode 100644 index 915e9e2b250..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/DisMaxQuery.g.cs +++ /dev/null @@ -1,356 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class DisMaxQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// One or more query clauses. - /// Returned documents must match one or more of these queries. - /// If a document matches multiple queries, Elasticsearch uses the highest relevance score. - /// - /// - [JsonInclude, JsonPropertyName("queries")] - public ICollection Queries { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. - /// - /// - [JsonInclude, JsonPropertyName("tie_breaker")] - public double? TieBreaker { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(DisMaxQuery disMaxQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.DisMax(disMaxQuery); -} - -public sealed partial class DisMaxQueryDescriptor : SerializableDescriptor> -{ - internal DisMaxQueryDescriptor(Action> configure) => configure.Invoke(this); - - public DisMaxQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection QueriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueriesDescriptor { get; set; } - private Action> QueriesDescriptorAction { get; set; } - private Action>[] QueriesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private double? TieBreakerValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public DisMaxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// One or more query clauses. - /// Returned documents must match one or more of these queries. - /// If a document matches multiple queries, Elasticsearch uses the highest relevance score. - /// - /// - public DisMaxQueryDescriptor Queries(ICollection queries) - { - QueriesDescriptor = null; - QueriesDescriptorAction = null; - QueriesDescriptorActions = null; - QueriesValue = queries; - return Self; - } - - public DisMaxQueryDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueriesValue = null; - QueriesDescriptorAction = null; - QueriesDescriptorActions = null; - QueriesDescriptor = descriptor; - return Self; - } - - public DisMaxQueryDescriptor Queries(Action> configure) - { - QueriesValue = null; - QueriesDescriptor = null; - QueriesDescriptorActions = null; - QueriesDescriptorAction = configure; - return Self; - } - - public DisMaxQueryDescriptor Queries(params Action>[] configure) - { - QueriesValue = null; - QueriesDescriptor = null; - QueriesDescriptorAction = null; - QueriesDescriptorActions = configure; - return Self; - } - - public DisMaxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. - /// - /// - public DisMaxQueryDescriptor TieBreaker(double? tieBreaker) - { - TieBreakerValue = tieBreaker; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (QueriesDescriptor is not null) - { - writer.WritePropertyName("queries"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, QueriesDescriptor, options); - writer.WriteEndArray(); - } - else if (QueriesDescriptorAction is not null) - { - writer.WritePropertyName("queries"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueriesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (QueriesDescriptorActions is not null) - { - writer.WritePropertyName("queries"); - writer.WriteStartArray(); - foreach (var action in QueriesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, QueriesValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (TieBreakerValue.HasValue) - { - writer.WritePropertyName("tie_breaker"); - writer.WriteNumberValue(TieBreakerValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class DisMaxQueryDescriptor : SerializableDescriptor -{ - internal DisMaxQueryDescriptor(Action configure) => configure.Invoke(this); - - public DisMaxQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection QueriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueriesDescriptor { get; set; } - private Action QueriesDescriptorAction { get; set; } - private Action[] QueriesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - private double? TieBreakerValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public DisMaxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// One or more query clauses. - /// Returned documents must match one or more of these queries. - /// If a document matches multiple queries, Elasticsearch uses the highest relevance score. - /// - /// - public DisMaxQueryDescriptor Queries(ICollection queries) - { - QueriesDescriptor = null; - QueriesDescriptorAction = null; - QueriesDescriptorActions = null; - QueriesValue = queries; - return Self; - } - - public DisMaxQueryDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueriesValue = null; - QueriesDescriptorAction = null; - QueriesDescriptorActions = null; - QueriesDescriptor = descriptor; - return Self; - } - - public DisMaxQueryDescriptor Queries(Action configure) - { - QueriesValue = null; - QueriesDescriptor = null; - QueriesDescriptorActions = null; - QueriesDescriptorAction = configure; - return Self; - } - - public DisMaxQueryDescriptor Queries(params Action[] configure) - { - QueriesValue = null; - QueriesDescriptor = null; - QueriesDescriptorAction = null; - QueriesDescriptorActions = configure; - return Self; - } - - public DisMaxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses. - /// - /// - public DisMaxQueryDescriptor TieBreaker(double? tieBreaker) - { - TieBreakerValue = tieBreaker; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (QueriesDescriptor is not null) - { - writer.WritePropertyName("queries"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, QueriesDescriptor, options); - writer.WriteEndArray(); - } - else if (QueriesDescriptorAction is not null) - { - writer.WritePropertyName("queries"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueriesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (QueriesDescriptorActions is not null) - { - writer.WritePropertyName("queries"); - writer.WriteStartArray(); - foreach (var action in QueriesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("queries"); - JsonSerializer.Serialize(writer, QueriesValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (TieBreakerValue.HasValue) - { - writer.WritePropertyName("tie_breaker"); - writer.WriteNumberValue(TieBreakerValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs deleted file mode 100644 index 4f2b09aec21..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ExistsQuery.g.cs +++ /dev/null @@ -1,229 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ExistsQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Name of the field you wish to search. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(ExistsQuery existsQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Exists(existsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(ExistsQuery existsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Exists(existsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(ExistsQuery existsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Exists(existsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(ExistsQuery existsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Exists(existsQuery); -} - -public sealed partial class ExistsQueryDescriptor : SerializableDescriptor> -{ - internal ExistsQueryDescriptor(Action> configure) => configure.Invoke(this); - - public ExistsQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ExistsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field you wish to search. - /// - /// - public ExistsQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field you wish to search. - /// - /// - public ExistsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field you wish to search. - /// - /// - public ExistsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ExistsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ExistsQueryDescriptor : SerializableDescriptor -{ - internal ExistsQueryDescriptor(Action configure) => configure.Invoke(this); - - public ExistsQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ExistsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field you wish to search. - /// - /// - public ExistsQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field you wish to search. - /// - /// - public ExistsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field you wish to search. - /// - /// - public ExistsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ExistsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldAndFormat.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldAndFormat.g.cs deleted file mode 100644 index 65dd5cedf73..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldAndFormat.g.cs +++ /dev/null @@ -1,230 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -/// -/// -/// A reference to a field with formatting instructions on how to return the value -/// -/// -public sealed partial class FieldAndFormat -{ - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Format in which the values are returned. - /// - /// - [JsonInclude, JsonPropertyName("format")] - public string? Format { get; set; } - [JsonInclude, JsonPropertyName("include_unmapped")] - public bool? IncludeUnmapped { get; set; } -} - -/// -/// -/// A reference to a field with formatting instructions on how to return the value -/// -/// -public sealed partial class FieldAndFormatDescriptor : SerializableDescriptor> -{ - internal FieldAndFormatDescriptor(Action> configure) => configure.Invoke(this); - - public FieldAndFormatDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - private bool? IncludeUnmappedValue { get; set; } - - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - public FieldAndFormatDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - public FieldAndFormatDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - public FieldAndFormatDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Format in which the values are returned. - /// - /// - public FieldAndFormatDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public FieldAndFormatDescriptor IncludeUnmapped(bool? includeUnmapped = true) - { - IncludeUnmappedValue = includeUnmapped; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IncludeUnmappedValue.HasValue) - { - writer.WritePropertyName("include_unmapped"); - writer.WriteBooleanValue(IncludeUnmappedValue.Value); - } - - writer.WriteEndObject(); - } -} - -/// -/// -/// A reference to a field with formatting instructions on how to return the value -/// -/// -public sealed partial class FieldAndFormatDescriptor : SerializableDescriptor -{ - internal FieldAndFormatDescriptor(Action configure) => configure.Invoke(this); - - public FieldAndFormatDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - private bool? IncludeUnmappedValue { get; set; } - - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - public FieldAndFormatDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - public FieldAndFormatDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Wildcard pattern. The request returns values for field names matching this pattern. - /// - /// - public FieldAndFormatDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Format in which the values are returned. - /// - /// - public FieldAndFormatDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - public FieldAndFormatDescriptor IncludeUnmapped(bool? includeUnmapped = true) - { - IncludeUnmappedValue = includeUnmapped; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (IncludeUnmappedValue.HasValue) - { - writer.WritePropertyName("include_unmapped"); - writer.WriteBooleanValue(IncludeUnmappedValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldLookup.g.cs deleted file mode 100644 index 6a56a71ad59..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldLookup.g.cs +++ /dev/null @@ -1,275 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class FieldLookup -{ - /// - /// - /// id of the document. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - - /// - /// - /// Index from which to retrieve the document. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// Name of the field. - /// - /// - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Path { get; set; } - - /// - /// - /// Custom routing value. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } -} - -public sealed partial class FieldLookupDescriptor : SerializableDescriptor> -{ - internal FieldLookupDescriptor(Action> configure) => configure.Invoke(this); - - public FieldLookupDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - - /// - /// - /// id of the document. - /// - /// - public FieldLookupDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Index from which to retrieve the document. - /// - /// - public FieldLookupDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Name of the field. - /// - /// - public FieldLookupDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Name of the field. - /// - /// - public FieldLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Name of the field. - /// - /// - public FieldLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Custom routing value. - /// - /// - public FieldLookupDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldLookupDescriptor : SerializableDescriptor -{ - internal FieldLookupDescriptor(Action configure) => configure.Invoke(this); - - public FieldLookupDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - - /// - /// - /// id of the document. - /// - /// - public FieldLookupDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Index from which to retrieve the document. - /// - /// - public FieldLookupDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Name of the field. - /// - /// - public FieldLookupDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field? path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Name of the field. - /// - /// - public FieldLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Name of the field. - /// - /// - public FieldLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Custom routing value. - /// - /// - public FieldLookupDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (PathValue is not null) - { - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs deleted file mode 100644 index edffcb2d5b2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs +++ /dev/null @@ -1,280 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class FieldValueFactorScoreFunction -{ - /// - /// - /// Optional factor to multiply the field value with. - /// - /// - [JsonInclude, JsonPropertyName("factor")] - public double? Factor { get; set; } - - /// - /// - /// Field to be extracted from the document. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Value used if the document doesn’t have that field. - /// The modifier and factor are still applied to it as though it were read from the document. - /// - /// - [JsonInclude, JsonPropertyName("missing")] - public double? Missing { get; set; } - - /// - /// - /// Modifier to apply to the field value. - /// - /// - [JsonInclude, JsonPropertyName("modifier")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorModifier? Modifier { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScore(FieldValueFactorScoreFunction fieldValueFactorScoreFunction) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScore.FieldValueFactor(fieldValueFactorScoreFunction); -} - -public sealed partial class FieldValueFactorScoreFunctionDescriptor : SerializableDescriptor> -{ - internal FieldValueFactorScoreFunctionDescriptor(Action> configure) => configure.Invoke(this); - - public FieldValueFactorScoreFunctionDescriptor() : base() - { - } - - private double? FactorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private double? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorModifier? ModifierValue { get; set; } - - /// - /// - /// Optional factor to multiply the field value with. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Factor(double? factor) - { - FactorValue = factor; - return Self; - } - - /// - /// - /// Field to be extracted from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field to be extracted from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field to be extracted from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Value used if the document doesn’t have that field. - /// The modifier and factor are still applied to it as though it were read from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Missing(double? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Modifier to apply to the field value. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Modifier(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorModifier? modifier) - { - ModifierValue = modifier; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FactorValue.HasValue) - { - writer.WritePropertyName("factor"); - writer.WriteNumberValue(FactorValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (ModifierValue is not null) - { - writer.WritePropertyName("modifier"); - JsonSerializer.Serialize(writer, ModifierValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldValueFactorScoreFunctionDescriptor : SerializableDescriptor -{ - internal FieldValueFactorScoreFunctionDescriptor(Action configure) => configure.Invoke(this); - - public FieldValueFactorScoreFunctionDescriptor() : base() - { - } - - private double? FactorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private double? MissingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorModifier? ModifierValue { get; set; } - - /// - /// - /// Optional factor to multiply the field value with. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Factor(double? factor) - { - FactorValue = factor; - return Self; - } - - /// - /// - /// Field to be extracted from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field to be extracted from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field to be extracted from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Value used if the document doesn’t have that field. - /// The modifier and factor are still applied to it as though it were read from the document. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Missing(double? missing) - { - MissingValue = missing; - return Self; - } - - /// - /// - /// Modifier to apply to the field value. - /// - /// - public FieldValueFactorScoreFunctionDescriptor Modifier(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorModifier? modifier) - { - ModifierValue = modifier; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FactorValue.HasValue) - { - writer.WritePropertyName("factor"); - writer.WriteNumberValue(FactorValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (MissingValue.HasValue) - { - writer.WritePropertyName("missing"); - writer.WriteNumberValue(MissingValue.Value); - } - - if (ModifierValue is not null) - { - writer.WritePropertyName("modifier"); - JsonSerializer.Serialize(writer, ModifierValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScore.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScore.g.cs deleted file mode 100644 index 08762e35737..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScore.g.cs +++ /dev/null @@ -1,410 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(FunctionScoreConverter))] -public sealed partial class FunctionScore -{ - internal FunctionScore(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 FunctionScore Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => new FunctionScore("exp", decayFunction); - public static FunctionScore Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => new FunctionScore("exp", decayFunction); - public static FunctionScore Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => new FunctionScore("exp", decayFunction); - public static FunctionScore Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => new FunctionScore("exp", decayFunction); - public static FunctionScore FieldValueFactor(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorScoreFunction fieldValueFactorScoreFunction) => new FunctionScore("field_value_factor", fieldValueFactorScoreFunction); - public static FunctionScore Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => new FunctionScore("gauss", decayFunction); - public static FunctionScore Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => new FunctionScore("gauss", decayFunction); - public static FunctionScore Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => new FunctionScore("gauss", decayFunction); - public static FunctionScore Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => new FunctionScore("gauss", decayFunction); - public static FunctionScore Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => new FunctionScore("linear", decayFunction); - public static FunctionScore Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => new FunctionScore("linear", decayFunction); - public static FunctionScore Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => new FunctionScore("linear", decayFunction); - public static FunctionScore Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => new FunctionScore("linear", decayFunction); - public static FunctionScore RandomScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RandomScoreFunction randomScoreFunction) => new FunctionScore("random_score", randomScoreFunction); - public static FunctionScore ScriptScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreFunction scriptScoreFunction) => new FunctionScore("script_score", scriptScoreFunction); - - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Filter { get; set; } - [JsonInclude, JsonPropertyName("weight")] - public double? Weight { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class FunctionScoreConverter : JsonConverter -{ - public override FunctionScore 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; - Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filterValue = default; - double? weightValue = 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 == "filter") - { - filterValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "weight") - { - weightValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "exp") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "field_value_factor") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "gauss") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "linear") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "random_score") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "script_score") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'FunctionScore' from the response."); - } - - var result = new FunctionScore(variantNameValue, variantValue); - result.Filter = filterValue; - result.Weight = weightValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, FunctionScore value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Filter is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, value.Filter, options); - } - - if (value.Weight.HasValue) - { - writer.WritePropertyName("weight"); - writer.WriteNumberValue(value.Weight.Value); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "exp": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "field_value_factor": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorScoreFunction)value.Variant, options); - break; - case "gauss": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "linear": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "random_score": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RandomScoreFunction)value.Variant, options); - break; - case "script_score": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreFunction)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FunctionScoreDescriptor : SerializableDescriptor> -{ - internal FunctionScoreDescriptor(Action> configure) => configure.Invoke(this); - - public FunctionScoreDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private FunctionScoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private FunctionScoreDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private double? WeightValue { get; set; } - - public FunctionScoreDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterValue = filter; - return Self; - } - - public FunctionScoreDescriptor Weight(double? weight) - { - WeightValue = weight; - return Self; - } - - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor FieldValueFactor(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorScoreFunction fieldValueFactorScoreFunction) => Set(fieldValueFactorScoreFunction, "field_value_factor"); - public FunctionScoreDescriptor FieldValueFactor(Action> configure) => Set(configure, "field_value_factor"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor RandomScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RandomScoreFunction randomScoreFunction) => Set(randomScoreFunction, "random_score"); - public FunctionScoreDescriptor RandomScore(Action> configure) => Set(configure, "random_score"); - public FunctionScoreDescriptor ScriptScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreFunction scriptScoreFunction) => Set(scriptScoreFunction, "script_score"); - public FunctionScoreDescriptor ScriptScore(Action configure) => Set(configure, "script_score"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (WeightValue.HasValue) - { - writer.WritePropertyName("weight"); - writer.WriteNumberValue(WeightValue.Value); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FunctionScoreDescriptor : SerializableDescriptor -{ - internal FunctionScoreDescriptor(Action configure) => configure.Invoke(this); - - public FunctionScoreDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private FunctionScoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private FunctionScoreDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? FilterValue { get; set; } - private double? WeightValue { get; set; } - - public FunctionScoreDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? filter) - { - FilterValue = filter; - return Self; - } - - public FunctionScoreDescriptor Weight(double? weight) - { - WeightValue = weight; - return Self; - } - - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor Exp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => Set(decayFunction, "exp"); - public FunctionScoreDescriptor FieldValueFactor(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldValueFactorScoreFunction fieldValueFactorScoreFunction) => Set(fieldValueFactorScoreFunction, "field_value_factor"); - public FunctionScoreDescriptor FieldValueFactor(Action configure) => Set(configure, "field_value_factor"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Gauss(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => Set(decayFunction, "gauss"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumericDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDecayFunction decayFunction) => Set(decayFunction, "linear"); - public FunctionScoreDescriptor RandomScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RandomScoreFunction randomScoreFunction) => Set(randomScoreFunction, "random_score"); - public FunctionScoreDescriptor RandomScore(Action configure) => Set(configure, "random_score"); - public FunctionScoreDescriptor ScriptScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreFunction scriptScoreFunction) => Set(scriptScoreFunction, "script_score"); - public FunctionScoreDescriptor ScriptScore(Action configure) => Set(configure, "script_score"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (WeightValue.HasValue) - { - writer.WritePropertyName("weight"); - writer.WriteNumberValue(WeightValue.Value); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs deleted file mode 100644 index d77b5de10da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs +++ /dev/null @@ -1,586 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class FunctionScoreQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Defines how he newly computed score is combined with the score of the query - /// - /// - [JsonInclude, JsonPropertyName("boost_mode")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostMode { get; set; } - - /// - /// - /// One or more functions that compute a new score for each document returned by the query. - /// - /// - [JsonInclude, JsonPropertyName("functions")] - public ICollection? Functions { get; set; } - - /// - /// - /// Restricts the new score to not exceed the provided limit. - /// - /// - [JsonInclude, JsonPropertyName("max_boost")] - public double? MaxBoost { get; set; } - - /// - /// - /// Excludes documents that do not meet the provided score threshold. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public double? MinScore { get; set; } - - /// - /// - /// A query that determines the documents for which a new score is computed. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Specifies how the computed scores are combined - /// - /// - [JsonInclude, JsonPropertyName("score_mode")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? ScoreMode { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(FunctionScoreQuery functionScoreQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.FunctionScore(functionScoreQuery); -} - -public sealed partial class FunctionScoreQueryDescriptor : SerializableDescriptor> -{ - internal FunctionScoreQueryDescriptor(Action> configure) => configure.Invoke(this); - - public FunctionScoreQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } - private ICollection? FunctionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor FunctionsDescriptor { get; set; } - private Action> FunctionsDescriptorAction { get; set; } - private Action>[] FunctionsDescriptorActions { get; set; } - private double? MaxBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? ScoreModeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public FunctionScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Defines how he newly computed score is combined with the score of the query - /// - /// - public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? boostMode) - { - BoostModeValue = boostMode; - return Self; - } - - /// - /// - /// One or more functions that compute a new score for each document returned by the query. - /// - /// - public FunctionScoreQueryDescriptor Functions(ICollection? functions) - { - FunctionsDescriptor = null; - FunctionsDescriptorAction = null; - FunctionsDescriptorActions = null; - FunctionsValue = functions; - return Self; - } - - public FunctionScoreQueryDescriptor Functions(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor descriptor) - { - FunctionsValue = null; - FunctionsDescriptorAction = null; - FunctionsDescriptorActions = null; - FunctionsDescriptor = descriptor; - return Self; - } - - public FunctionScoreQueryDescriptor Functions(Action> configure) - { - FunctionsValue = null; - FunctionsDescriptor = null; - FunctionsDescriptorActions = null; - FunctionsDescriptorAction = configure; - return Self; - } - - public FunctionScoreQueryDescriptor Functions(params Action>[] configure) - { - FunctionsValue = null; - FunctionsDescriptor = null; - FunctionsDescriptorAction = null; - FunctionsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Restricts the new score to not exceed the provided limit. - /// - /// - public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) - { - MaxBoostValue = maxBoost; - return Self; - } - - /// - /// - /// Excludes documents that do not meet the provided score threshold. - /// - /// - public FunctionScoreQueryDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// A query that determines the documents for which a new score is computed. - /// - /// - public FunctionScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public FunctionScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public FunctionScoreQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public FunctionScoreQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Specifies how the computed scores are combined - /// - /// - public FunctionScoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostModeValue is not null) - { - writer.WritePropertyName("boost_mode"); - JsonSerializer.Serialize(writer, BoostModeValue, options); - } - - if (FunctionsDescriptor is not null) - { - writer.WritePropertyName("functions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FunctionsDescriptor, options); - writer.WriteEndArray(); - } - else if (FunctionsDescriptorAction is not null) - { - writer.WritePropertyName("functions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor(FunctionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FunctionsDescriptorActions is not null) - { - writer.WritePropertyName("functions"); - writer.WriteStartArray(); - foreach (var action in FunctionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FunctionsValue is not null) - { - writer.WritePropertyName("functions"); - JsonSerializer.Serialize(writer, FunctionsValue, options); - } - - if (MaxBoostValue.HasValue) - { - writer.WritePropertyName("max_boost"); - writer.WriteNumberValue(MaxBoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FunctionScoreQueryDescriptor : SerializableDescriptor -{ - internal FunctionScoreQueryDescriptor(Action configure) => configure.Invoke(this); - - public FunctionScoreQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? BoostModeValue { get; set; } - private ICollection? FunctionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor FunctionsDescriptor { get; set; } - private Action FunctionsDescriptorAction { get; set; } - private Action[] FunctionsDescriptorActions { get; set; } - private double? MaxBoostValue { get; set; } - private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? ScoreModeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public FunctionScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Defines how he newly computed score is combined with the score of the query - /// - /// - public FunctionScoreQueryDescriptor BoostMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionBoostMode? boostMode) - { - BoostModeValue = boostMode; - return Self; - } - - /// - /// - /// One or more functions that compute a new score for each document returned by the query. - /// - /// - public FunctionScoreQueryDescriptor Functions(ICollection? functions) - { - FunctionsDescriptor = null; - FunctionsDescriptorAction = null; - FunctionsDescriptorActions = null; - FunctionsValue = functions; - return Self; - } - - public FunctionScoreQueryDescriptor Functions(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor descriptor) - { - FunctionsValue = null; - FunctionsDescriptorAction = null; - FunctionsDescriptorActions = null; - FunctionsDescriptor = descriptor; - return Self; - } - - public FunctionScoreQueryDescriptor Functions(Action configure) - { - FunctionsValue = null; - FunctionsDescriptor = null; - FunctionsDescriptorActions = null; - FunctionsDescriptorAction = configure; - return Self; - } - - public FunctionScoreQueryDescriptor Functions(params Action[] configure) - { - FunctionsValue = null; - FunctionsDescriptor = null; - FunctionsDescriptorAction = null; - FunctionsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Restricts the new score to not exceed the provided limit. - /// - /// - public FunctionScoreQueryDescriptor MaxBoost(double? maxBoost) - { - MaxBoostValue = maxBoost; - return Self; - } - - /// - /// - /// Excludes documents that do not meet the provided score threshold. - /// - /// - public FunctionScoreQueryDescriptor MinScore(double? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// A query that determines the documents for which a new score is computed. - /// - /// - public FunctionScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public FunctionScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public FunctionScoreQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public FunctionScoreQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Specifies how the computed scores are combined - /// - /// - public FunctionScoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostModeValue is not null) - { - writer.WritePropertyName("boost_mode"); - JsonSerializer.Serialize(writer, BoostModeValue, options); - } - - if (FunctionsDescriptor is not null) - { - writer.WritePropertyName("functions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, FunctionsDescriptor, options); - writer.WriteEndArray(); - } - else if (FunctionsDescriptorAction is not null) - { - writer.WritePropertyName("functions"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor(FunctionsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (FunctionsDescriptorActions is not null) - { - writer.WritePropertyName("functions"); - writer.WriteStartArray(); - foreach (var action in FunctionsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (FunctionsValue is not null) - { - writer.WritePropertyName("functions"); - JsonSerializer.Serialize(writer, FunctionsValue, options); - } - - if (MaxBoostValue.HasValue) - { - writer.WritePropertyName("max_boost"); - writer.WriteNumberValue(MaxBoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs deleted file mode 100644 index 634c9f48cf2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/FuzzyQuery.g.cs +++ /dev/null @@ -1,578 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class FuzzyQueryConverter : JsonConverter -{ - public override FuzzyQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new FuzzyQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzziness") - { - variant.Fuzziness = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_expansions") - { - variant.MaxExpansions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "prefix_length") - { - variant.PrefixLength = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rewrite") - { - variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "transpositions") - { - variant.Transpositions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "value") - { - variant.Value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, FuzzyQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize FuzzyQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.Fuzziness is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, value.Fuzziness, options); - } - - if (value.MaxExpansions.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(value.MaxExpansions.Value); - } - - if (value.PrefixLength.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(value.PrefixLength.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (!string.IsNullOrEmpty(value.Rewrite)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(value.Rewrite); - } - - if (value.Transpositions.HasValue) - { - writer.WritePropertyName("transpositions"); - writer.WriteBooleanValue(value.Transpositions.Value); - } - - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, value.Value, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(FuzzyQueryConverter))] -public sealed partial class FuzzyQuery -{ - public FuzzyQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Maximum number of variations created. - /// - /// - public int? MaxExpansions { get; set; } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public int? PrefixLength { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public string? Rewrite { get; set; } - - /// - /// - /// Indicates whether edits include transpositions of two adjacent characters (for example ab to ba). - /// - /// - public bool? Transpositions { get; set; } - - /// - /// - /// Term you wish to find in the provided field. - /// - /// - public object Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(FuzzyQuery fuzzyQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Fuzzy(fuzzyQuery); -} - -public sealed partial class FuzzyQueryDescriptor : SerializableDescriptor> -{ - internal FuzzyQueryDescriptor(Action> configure) => configure.Invoke(this); - - public FuzzyQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private bool? TranspositionsValue { get; set; } - private object ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public FuzzyQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public FuzzyQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public FuzzyQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public FuzzyQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public FuzzyQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Maximum number of variations created. - /// - /// - public FuzzyQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public FuzzyQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - public FuzzyQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public FuzzyQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Indicates whether edits include transpositions of two adjacent characters (for example ab to ba). - /// - /// - public FuzzyQueryDescriptor Transpositions(bool? transpositions = true) - { - TranspositionsValue = transpositions; - return Self; - } - - /// - /// - /// Term you wish to find in the provided field. - /// - /// - public FuzzyQueryDescriptor Value(object value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - if (TranspositionsValue.HasValue) - { - writer.WritePropertyName("transpositions"); - writer.WriteBooleanValue(TranspositionsValue.Value); - } - - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class FuzzyQueryDescriptor : SerializableDescriptor -{ - internal FuzzyQueryDescriptor(Action configure) => configure.Invoke(this); - - public FuzzyQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private bool? TranspositionsValue { get; set; } - private object ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public FuzzyQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public FuzzyQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public FuzzyQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public FuzzyQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public FuzzyQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Maximum number of variations created. - /// - /// - public FuzzyQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public FuzzyQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - public FuzzyQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public FuzzyQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Indicates whether edits include transpositions of two adjacent characters (for example ab to ba). - /// - /// - public FuzzyQueryDescriptor Transpositions(bool? transpositions = true) - { - TranspositionsValue = transpositions; - return Self; - } - - /// - /// - /// Term you wish to find in the provided field. - /// - /// - public FuzzyQueryDescriptor Value(object value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - if (TranspositionsValue.HasValue) - { - writer.WritePropertyName("transpositions"); - writer.WriteBooleanValue(TranspositionsValue.Value); - } - - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs deleted file mode 100644 index 3195a8c1898..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs +++ /dev/null @@ -1,393 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class GeoBoundingBoxQueryConverter : JsonConverter -{ - public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new GeoBoundingBoxQuery(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ignore_unmapped") - { - variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "validation_method") - { - variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.BoundingBox = JsonSerializer.Deserialize(ref reader, options); - } - } - - return variant; - } - - 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)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.BoundingBox, options); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.IgnoreUnmapped.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(value.IgnoreUnmapped.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.ValidationMethod is not null) - { - writer.WritePropertyName("validation_method"); - JsonSerializer.Serialize(writer, value.ValidationMethod, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(GeoBoundingBoxQueryConverter))] -public sealed partial class GeoBoundingBoxQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.GeoBounds BoundingBox { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public bool? IgnoreUnmapped { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. - /// Set to COERCE to also try to infer correct latitude or longitude. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethod { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(GeoBoundingBoxQuery geoBoundingBoxQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.GeoBoundingBox(geoBoundingBoxQuery); -} - -public sealed partial class GeoBoundingBoxQueryDescriptor : SerializableDescriptor> -{ - internal GeoBoundingBoxQueryDescriptor(Action> configure) => configure.Invoke(this); - - public GeoBoundingBoxQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds BoundingBoxValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoBoundingBoxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public GeoBoundingBoxQueryDescriptor BoundingBox(Elastic.Clients.Elasticsearch.Serverless.GeoBounds boundingBox) - { - BoundingBoxValue = boundingBox; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public GeoBoundingBoxQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. - /// Set to COERCE to also try to infer correct latitude or longitude. - /// - /// - public GeoBoundingBoxQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? validationMethod) - { - ValidationMethodValue = validationMethod; - 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 (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ValidationMethodValue is not null) - { - writer.WritePropertyName("validation_method"); - JsonSerializer.Serialize(writer, ValidationMethodValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoBoundingBoxQueryDescriptor : SerializableDescriptor -{ - internal GeoBoundingBoxQueryDescriptor(Action configure) => configure.Invoke(this); - - public GeoBoundingBoxQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoBounds BoundingBoxValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoBoundingBoxQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public GeoBoundingBoxQueryDescriptor BoundingBox(Elastic.Clients.Elasticsearch.Serverless.GeoBounds boundingBox) - { - BoundingBoxValue = boundingBox; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public GeoBoundingBoxQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. - /// Set to COERCE to also try to infer correct latitude or longitude. - /// - /// - public GeoBoundingBoxQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? validationMethod) - { - ValidationMethodValue = validationMethod; - 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 (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ValidationMethodValue is not null) - { - writer.WritePropertyName("validation_method"); - JsonSerializer.Serialize(writer, ValidationMethodValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs deleted file mode 100644 index 6691e33a2f3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs +++ /dev/null @@ -1,228 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class GeoDecayFunctionConverter : JsonConverter -{ - public override GeoDecayFunction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new GeoDecayFunction(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "multi_value_mode") - { - variant.MultiValueMode = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Placement = JsonSerializer.Deserialize>(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, GeoDecayFunction value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Placement is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Placement, options); - } - - if (value.MultiValueMode is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, value.MultiValueMode, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(GeoDecayFunctionConverter))] -public sealed partial class GeoDecayFunction -{ - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueMode { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement Placement { get; set; } -} - -public sealed partial class GeoDecayFunctionDescriptor : SerializableDescriptor> -{ - internal GeoDecayFunctionDescriptor(Action> configure) => configure.Invoke(this); - - public GeoDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public GeoDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public GeoDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public GeoDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoDecayFunctionDescriptor : SerializableDescriptor -{ - internal GeoDecayFunctionDescriptor(Action configure) => configure.Invoke(this); - - public GeoDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public GeoDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public GeoDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public GeoDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs deleted file mode 100644 index 553ecc6bce7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs +++ /dev/null @@ -1,329 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class GeoDistanceFeatureQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - [JsonInclude, JsonPropertyName("origin")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation Origin { get; set; } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public string Pivot { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } -} - -public sealed partial class GeoDistanceFeatureQueryDescriptor : SerializableDescriptor> -{ - internal GeoDistanceFeatureQueryDescriptor(Action> configure) => configure.Invoke(this); - - public GeoDistanceFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation OriginValue { get; set; } - private string PivotValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoDistanceFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public GeoDistanceFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public GeoDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public GeoDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - public GeoDistanceFeatureQueryDescriptor Origin(Elastic.Clients.Elasticsearch.Serverless.GeoLocation origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - public GeoDistanceFeatureQueryDescriptor Pivot(string pivot) - { - PivotValue = pivot; - return Self; - } - - public GeoDistanceFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - writer.WritePropertyName("pivot"); - writer.WriteStringValue(PivotValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoDistanceFeatureQueryDescriptor : SerializableDescriptor -{ - internal GeoDistanceFeatureQueryDescriptor(Action configure) => configure.Invoke(this); - - public GeoDistanceFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation OriginValue { get; set; } - private string PivotValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoDistanceFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public GeoDistanceFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public GeoDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public GeoDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - public GeoDistanceFeatureQueryDescriptor Origin(Elastic.Clients.Elasticsearch.Serverless.GeoLocation origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - public GeoDistanceFeatureQueryDescriptor Pivot(string pivot) - { - PivotValue = pivot; - return Self; - } - - public GeoDistanceFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - writer.WritePropertyName("pivot"); - writer.WriteStringValue(PivotValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs deleted file mode 100644 index 2b3714fabf1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs +++ /dev/null @@ -1,497 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class GeoDistanceQueryConverter : JsonConverter -{ - public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new GeoDistanceQuery(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "distance") - { - variant.Distance = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "distance_type") - { - variant.DistanceType = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ignore_unmapped") - { - variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "validation_method") - { - variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Location = JsonSerializer.Deserialize(ref reader, options); - } - } - - return variant; - } - - 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)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Location, options); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - writer.WritePropertyName("distance"); - writer.WriteStringValue(value.Distance); - if (value.DistanceType is not null) - { - writer.WritePropertyName("distance_type"); - JsonSerializer.Serialize(writer, value.DistanceType, options); - } - - if (value.IgnoreUnmapped.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(value.IgnoreUnmapped.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.ValidationMethod is not null) - { - writer.WritePropertyName("validation_method"); - JsonSerializer.Serialize(writer, value.ValidationMethod, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(GeoDistanceQueryConverter))] -public sealed partial class GeoDistanceQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - - /// - /// - /// The radius of the circle centred on the specified location. - /// Points which fall into this circle are considered to be matches. - /// - /// - public string Distance { get; set; } - - /// - /// - /// How to compute the distance. - /// Set to plane for a faster calculation that's inaccurate on long distances and close to the poles. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceType { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public bool? IgnoreUnmapped { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation Location { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. - /// Set to COERCE to also try to infer correct latitude or longitude. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethod { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(GeoDistanceQuery geoDistanceQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.GeoDistance(geoDistanceQuery); -} - -public sealed partial class GeoDistanceQueryDescriptor : SerializableDescriptor> -{ - internal GeoDistanceQueryDescriptor(Action> configure) => configure.Invoke(this); - - public GeoDistanceQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string DistanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation LocationValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoDistanceQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The radius of the circle centred on the specified location. - /// Points which fall into this circle are considered to be matches. - /// - /// - public GeoDistanceQueryDescriptor Distance(string distance) - { - DistanceValue = distance; - return Self; - } - - /// - /// - /// How to compute the distance. - /// Set to plane for a faster calculation that's inaccurate on long distances and close to the poles. - /// - /// - public GeoDistanceQueryDescriptor DistanceType(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? distanceType) - { - DistanceTypeValue = distanceType; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public GeoDistanceQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoDistanceQueryDescriptor Location(Elastic.Clients.Elasticsearch.Serverless.GeoLocation location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. - /// Set to COERCE to also try to infer correct latitude or longitude. - /// - /// - public GeoDistanceQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? validationMethod) - { - ValidationMethodValue = validationMethod; - 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 (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("distance"); - writer.WriteStringValue(DistanceValue); - if (DistanceTypeValue is not null) - { - writer.WritePropertyName("distance_type"); - JsonSerializer.Serialize(writer, DistanceTypeValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ValidationMethodValue is not null) - { - writer.WritePropertyName("validation_method"); - JsonSerializer.Serialize(writer, ValidationMethodValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoDistanceQueryDescriptor : SerializableDescriptor -{ - internal GeoDistanceQueryDescriptor(Action configure) => configure.Invoke(this); - - public GeoDistanceQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string DistanceValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation LocationValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? ValidationMethodValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoDistanceQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The radius of the circle centred on the specified location. - /// Points which fall into this circle are considered to be matches. - /// - /// - public GeoDistanceQueryDescriptor Distance(string distance) - { - DistanceValue = distance; - return Self; - } - - /// - /// - /// How to compute the distance. - /// Set to plane for a faster calculation that's inaccurate on long distances and close to the poles. - /// - /// - public GeoDistanceQueryDescriptor DistanceType(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? distanceType) - { - DistanceTypeValue = distanceType; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public GeoDistanceQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoDistanceQueryDescriptor Location(Elastic.Clients.Elasticsearch.Serverless.GeoLocation location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. - /// Set to COERCE to also try to infer correct latitude or longitude. - /// - /// - public GeoDistanceQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoValidationMethod? validationMethod) - { - ValidationMethodValue = validationMethod; - 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 (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("distance"); - writer.WriteStringValue(DistanceValue); - if (DistanceTypeValue is not null) - { - writer.WritePropertyName("distance_type"); - JsonSerializer.Serialize(writer, DistanceTypeValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ValidationMethodValue is not null) - { - writer.WritePropertyName("validation_method"); - JsonSerializer.Serialize(writer, ValidationMethodValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs deleted file mode 100644 index ae6f6b188a3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs +++ /dev/null @@ -1,239 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class GeoShapeFieldQuery -{ - /// - /// - /// Query using an indexed shape retrieved from the the specified document and path. - /// - /// - [JsonInclude, JsonPropertyName("indexed_shape")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? IndexedShape { get; set; } - - /// - /// - /// Spatial relation operator used to search a geo field. - /// - /// - [JsonInclude, JsonPropertyName("relation")] - public Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? Relation { get; set; } - [JsonInclude, JsonPropertyName("shape")] - public object? Shape { get; set; } -} - -public sealed partial class GeoShapeFieldQueryDescriptor : SerializableDescriptor> -{ - internal GeoShapeFieldQueryDescriptor(Action> configure) => configure.Invoke(this); - - public GeoShapeFieldQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? IndexedShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor IndexedShapeDescriptor { get; set; } - private Action> IndexedShapeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? RelationValue { get; set; } - private object? ShapeValue { get; set; } - - /// - /// - /// Query using an indexed shape retrieved from the the specified document and path. - /// - /// - public GeoShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? indexedShape) - { - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = null; - IndexedShapeValue = indexedShape; - return Self; - } - - public GeoShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor descriptor) - { - IndexedShapeValue = null; - IndexedShapeDescriptorAction = null; - IndexedShapeDescriptor = descriptor; - return Self; - } - - public GeoShapeFieldQueryDescriptor IndexedShape(Action> configure) - { - IndexedShapeValue = null; - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Spatial relation operator used to search a geo field. - /// - /// - public GeoShapeFieldQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? relation) - { - RelationValue = relation; - return Self; - } - - public GeoShapeFieldQueryDescriptor Shape(object? shape) - { - ShapeValue = shape; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexedShapeDescriptor is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeDescriptor, options); - } - else if (IndexedShapeDescriptorAction is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor(IndexedShapeDescriptorAction), options); - } - else if (IndexedShapeValue is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeValue, options); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (ShapeValue is not null) - { - writer.WritePropertyName("shape"); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoShapeFieldQueryDescriptor : SerializableDescriptor -{ - internal GeoShapeFieldQueryDescriptor(Action configure) => configure.Invoke(this); - - public GeoShapeFieldQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? IndexedShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor IndexedShapeDescriptor { get; set; } - private Action IndexedShapeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? RelationValue { get; set; } - private object? ShapeValue { get; set; } - - /// - /// - /// Query using an indexed shape retrieved from the the specified document and path. - /// - /// - public GeoShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? indexedShape) - { - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = null; - IndexedShapeValue = indexedShape; - return Self; - } - - public GeoShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor descriptor) - { - IndexedShapeValue = null; - IndexedShapeDescriptorAction = null; - IndexedShapeDescriptor = descriptor; - return Self; - } - - public GeoShapeFieldQueryDescriptor IndexedShape(Action configure) - { - IndexedShapeValue = null; - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Spatial relation operator used to search a geo field. - /// - /// - public GeoShapeFieldQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? relation) - { - RelationValue = relation; - return Self; - } - - public GeoShapeFieldQueryDescriptor Shape(object? shape) - { - ShapeValue = shape; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexedShapeDescriptor is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeDescriptor, options); - } - else if (IndexedShapeDescriptorAction is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor(IndexedShapeDescriptorAction), options); - } - else if (IndexedShapeValue is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeValue, options); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (ShapeValue is not null) - { - writer.WritePropertyName("shape"); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs deleted file mode 100644 index 7bd66d932fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs +++ /dev/null @@ -1,375 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class GeoShapeQueryConverter : JsonConverter -{ - public override GeoShapeQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new GeoShapeQuery(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ignore_unmapped") - { - variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Shape = JsonSerializer.Deserialize(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, GeoShapeQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Shape is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Shape, options); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.IgnoreUnmapped.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(value.IgnoreUnmapped.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(GeoShapeQueryConverter))] -public sealed partial class GeoShapeQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public bool? IgnoreUnmapped { get; set; } - public string? QueryName { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQuery Shape { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(GeoShapeQuery geoShapeQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.GeoShape(geoShapeQuery); -} - -public sealed partial class GeoShapeQueryDescriptor : SerializableDescriptor> -{ - internal GeoShapeQueryDescriptor(Action> configure) => configure.Invoke(this); - - public GeoShapeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQuery ShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQueryDescriptor ShapeDescriptor { get; set; } - private Action> ShapeDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoShapeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public GeoShapeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public GeoShapeQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoShapeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public GeoShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQuery shape) - { - ShapeDescriptor = null; - ShapeDescriptorAction = null; - ShapeValue = shape; - return Self; - } - - public GeoShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQueryDescriptor descriptor) - { - ShapeValue = null; - ShapeDescriptorAction = null; - ShapeDescriptor = descriptor; - return Self; - } - - public GeoShapeQueryDescriptor Shape(Action> configure) - { - ShapeValue = null; - ShapeDescriptor = null; - ShapeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && ShapeValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GeoShapeQueryDescriptor : SerializableDescriptor -{ - internal GeoShapeQueryDescriptor(Action configure) => configure.Invoke(this); - - public GeoShapeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQuery ShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQueryDescriptor ShapeDescriptor { get; set; } - private Action ShapeDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public GeoShapeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public GeoShapeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public GeoShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Set to true to ignore an unmapped field and not match any documents for this query. - /// Set to false to throw an exception if the field is not mapped. - /// - /// - public GeoShapeQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public GeoShapeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public GeoShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQuery shape) - { - ShapeDescriptor = null; - ShapeDescriptorAction = null; - ShapeValue = shape; - return Self; - } - - public GeoShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeFieldQueryDescriptor descriptor) - { - ShapeValue = null; - ShapeDescriptorAction = null; - ShapeDescriptor = descriptor; - return Self; - } - - public GeoShapeQueryDescriptor Shape(Action configure) - { - ShapeValue = null; - ShapeDescriptor = null; - ShapeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && ShapeValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs deleted file mode 100644 index 70bfb6461fb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasChildQuery.g.cs +++ /dev/null @@ -1,575 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class HasChildQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Indicates whether to ignore an unmapped type and not return any documents instead of an error. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unmapped")] - public bool? IgnoreUnmapped { get; set; } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - [JsonInclude, JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHits { get; set; } - - /// - /// - /// Maximum number of child documents that match the query allowed for a returned parent document. - /// If the parent document exceeds this limit, it is excluded from the search results. - /// - /// - [JsonInclude, JsonPropertyName("max_children")] - public int? MaxChildren { get; set; } - - /// - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document. - /// If the parent document does not meet this limit, it is excluded from the search results. - /// - /// - [JsonInclude, JsonPropertyName("min_children")] - public int? MinChildren { get; set; } - - /// - /// - /// Query you wish to run on child documents of the type field. - /// If a child document matches the search, the query returns the parent document. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Indicates how scores for matching child documents affect the root parent document’s relevance score. - /// - /// - [JsonInclude, JsonPropertyName("score_mode")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreMode { get; set; } - - /// - /// - /// Name of the child relationship mapped for the join field. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(HasChildQuery hasChildQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.HasChild(hasChildQuery); -} - -public sealed partial class HasChildQueryDescriptor : SerializableDescriptor> -{ - internal HasChildQueryDescriptor(Action> configure) => configure.Invoke(this); - - public HasChildQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } - private int? MinChildrenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } - private string TypeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public HasChildQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped type and not return any documents instead of an error. - /// - /// - public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public HasChildQueryDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of child documents that match the query allowed for a returned parent document. - /// If the parent document exceeds this limit, it is excluded from the search results. - /// - /// - public HasChildQueryDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - /// - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document. - /// If the parent document does not meet this limit, it is excluded from the search results. - /// - /// - public HasChildQueryDescriptor MinChildren(int? minChildren) - { - MinChildrenValue = minChildren; - return Self; - } - - /// - /// - /// Query you wish to run on child documents of the type field. - /// If a child document matches the search, the query returns the parent document. - /// - /// - public HasChildQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public HasChildQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public HasChildQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public HasChildQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how scores for matching child documents affect the root parent document’s relevance score. - /// - /// - public HasChildQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - /// - /// - /// Name of the child relationship mapped for the join field. - /// - /// - public HasChildQueryDescriptor Type(string type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (MinChildrenValue.HasValue) - { - writer.WritePropertyName("min_children"); - writer.WriteNumberValue(MinChildrenValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - writer.WriteEndObject(); - } -} - -public sealed partial class HasChildQueryDescriptor : SerializableDescriptor -{ - internal HasChildQueryDescriptor(Action configure) => configure.Invoke(this); - - public HasChildQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private int? MaxChildrenValue { get; set; } - private int? MinChildrenValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } - private string TypeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public HasChildQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped type and not return any documents instead of an error. - /// - /// - public HasChildQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public HasChildQueryDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of child documents that match the query allowed for a returned parent document. - /// If the parent document exceeds this limit, it is excluded from the search results. - /// - /// - public HasChildQueryDescriptor MaxChildren(int? maxChildren) - { - MaxChildrenValue = maxChildren; - return Self; - } - - /// - /// - /// Minimum number of child documents that match the query required to match the query for a returned parent document. - /// If the parent document does not meet this limit, it is excluded from the search results. - /// - /// - public HasChildQueryDescriptor MinChildren(int? minChildren) - { - MinChildrenValue = minChildren; - return Self; - } - - /// - /// - /// Query you wish to run on child documents of the type field. - /// If a child document matches the search, the query returns the parent document. - /// - /// - public HasChildQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public HasChildQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public HasChildQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public HasChildQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how scores for matching child documents affect the root parent document’s relevance score. - /// - /// - public HasChildQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - /// - /// - /// Name of the child relationship mapped for the join field. - /// - /// - public HasChildQueryDescriptor Type(string type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - if (MaxChildrenValue.HasValue) - { - writer.WritePropertyName("max_children"); - writer.WriteNumberValue(MaxChildrenValue.Value); - } - - if (MinChildrenValue.HasValue) - { - writer.WritePropertyName("min_children"); - writer.WriteNumberValue(MinChildrenValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs deleted file mode 100644 index 5776345b119..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/HasParentQuery.g.cs +++ /dev/null @@ -1,484 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class HasParentQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Indicates whether to ignore an unmapped parent_type and not return any documents instead of an error. - /// You can use this parameter to query multiple indices that may not contain the parent_type. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unmapped")] - public bool? IgnoreUnmapped { get; set; } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - [JsonInclude, JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHits { get; set; } - - /// - /// - /// Name of the parent relationship mapped for the join field. - /// - /// - [JsonInclude, JsonPropertyName("parent_type")] - public string ParentType { get; set; } - - /// - /// - /// Query you wish to run on parent documents of the parent_type field. - /// If a parent document matches the search, the query returns its child documents. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. - /// - /// - [JsonInclude, JsonPropertyName("score")] - public bool? Score { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(HasParentQuery hasParentQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.HasParent(hasParentQuery); -} - -public sealed partial class HasParentQueryDescriptor : SerializableDescriptor> -{ - internal HasParentQueryDescriptor(Action> configure) => configure.Invoke(this); - - public HasParentQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private string ParentTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private bool? ScoreValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public HasParentQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped parent_type and not return any documents instead of an error. - /// You can use this parameter to query multiple indices that may not contain the parent_type. - /// - /// - public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public HasParentQueryDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Name of the parent relationship mapped for the join field. - /// - /// - public HasParentQueryDescriptor ParentType(string parentType) - { - ParentTypeValue = parentType; - return Self; - } - - /// - /// - /// Query you wish to run on parent documents of the parent_type field. - /// If a parent document matches the search, the query returns its child documents. - /// - /// - public HasParentQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public HasParentQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public HasParentQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public HasParentQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. - /// - /// - public HasParentQueryDescriptor Score(bool? score = true) - { - ScoreValue = score; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - writer.WritePropertyName("parent_type"); - writer.WriteStringValue(ParentTypeValue); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreValue.HasValue) - { - writer.WritePropertyName("score"); - writer.WriteBooleanValue(ScoreValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class HasParentQueryDescriptor : SerializableDescriptor -{ - internal HasParentQueryDescriptor(Action configure) => configure.Invoke(this); - - public HasParentQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private string ParentTypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private bool? ScoreValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public HasParentQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped parent_type and not return any documents instead of an error. - /// You can use this parameter to query multiple indices that may not contain the parent_type. - /// - /// - public HasParentQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public HasParentQueryDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Name of the parent relationship mapped for the join field. - /// - /// - public HasParentQueryDescriptor ParentType(string parentType) - { - ParentTypeValue = parentType; - return Self; - } - - /// - /// - /// Query you wish to run on parent documents of the parent_type field. - /// If a parent document matches the search, the query returns its child documents. - /// - /// - public HasParentQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public HasParentQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public HasParentQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public HasParentQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates whether the relevance score of a matching parent document is aggregated into its child documents. - /// - /// - public HasParentQueryDescriptor Score(bool? score = true) - { - ScoreValue = score; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - writer.WritePropertyName("parent_type"); - writer.WriteStringValue(ParentTypeValue); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreValue.HasValue) - { - writer.WritePropertyName("score"); - writer.WriteBooleanValue(ScoreValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs deleted file mode 100644 index 48ca46766af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IdsQuery.g.cs +++ /dev/null @@ -1,125 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IdsQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// An array of document IDs. - /// - /// - [JsonInclude, JsonPropertyName("values")] - public Elastic.Clients.Elasticsearch.Serverless.Ids? Values { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(IdsQuery idsQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Ids(idsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(IdsQuery idsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Ids(idsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(IdsQuery idsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Ids(idsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(IdsQuery idsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Ids(idsQuery); -} - -public sealed partial class IdsQueryDescriptor : SerializableDescriptor -{ - internal IdsQueryDescriptor(Action configure) => configure.Invoke(this); - - public IdsQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Ids? ValuesValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public IdsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public IdsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// An array of document IDs. - /// - /// - public IdsQueryDescriptor Values(Elastic.Clients.Elasticsearch.Serverless.Ids? values) - { - ValuesValue = values; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ValuesValue is not null) - { - writer.WritePropertyName("values"); - JsonSerializer.Serialize(writer, ValuesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Intervals.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Intervals.g.cs deleted file mode 100644 index 2fba17d43c9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Intervals.g.cs +++ /dev/null @@ -1,302 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(IntervalsConverter))] -public sealed partial class Intervals -{ - internal Intervals(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 Intervals AllOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf intervalsAllOf) => new Intervals("all_of", intervalsAllOf); - public static Intervals AnyOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf intervalsAnyOf) => new Intervals("any_of", intervalsAnyOf); - public static Intervals Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy intervalsFuzzy) => new Intervals("fuzzy", intervalsFuzzy); - public static Intervals Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch intervalsMatch) => new Intervals("match", intervalsMatch); - public static Intervals Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix intervalsPrefix) => new Intervals("prefix", intervalsPrefix); - public static Intervals Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard intervalsWildcard) => new Intervals("wildcard", intervalsWildcard); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class IntervalsConverter : JsonConverter -{ - public override Intervals 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; - 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 == "all_of") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "any_of") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fuzzy") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wildcard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Intervals' from the response."); - } - - var result = new Intervals(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Intervals value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "all_of": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf)value.Variant, options); - break; - case "any_of": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf)value.Variant, options); - break; - case "fuzzy": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy)value.Variant, options); - break; - case "match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch)value.Variant, options); - break; - case "prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix)value.Variant, options); - break; - case "wildcard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsDescriptor : SerializableDescriptor> -{ - internal IntervalsDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IntervalsDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IntervalsDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IntervalsDescriptor AllOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf intervalsAllOf) => Set(intervalsAllOf, "all_of"); - public IntervalsDescriptor AllOf(Action> configure) => Set(configure, "all_of"); - public IntervalsDescriptor AnyOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf intervalsAnyOf) => Set(intervalsAnyOf, "any_of"); - public IntervalsDescriptor AnyOf(Action> configure) => Set(configure, "any_of"); - public IntervalsDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy intervalsFuzzy) => Set(intervalsFuzzy, "fuzzy"); - public IntervalsDescriptor Fuzzy(Action> configure) => Set(configure, "fuzzy"); - public IntervalsDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch intervalsMatch) => Set(intervalsMatch, "match"); - public IntervalsDescriptor Match(Action> configure) => Set(configure, "match"); - public IntervalsDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix intervalsPrefix) => Set(intervalsPrefix, "prefix"); - public IntervalsDescriptor Prefix(Action> configure) => Set(configure, "prefix"); - public IntervalsDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard intervalsWildcard) => Set(intervalsWildcard, "wildcard"); - public IntervalsDescriptor Wildcard(Action> configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsDescriptor : SerializableDescriptor -{ - internal IntervalsDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IntervalsDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IntervalsDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IntervalsDescriptor AllOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf intervalsAllOf) => Set(intervalsAllOf, "all_of"); - public IntervalsDescriptor AllOf(Action configure) => Set(configure, "all_of"); - public IntervalsDescriptor AnyOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf intervalsAnyOf) => Set(intervalsAnyOf, "any_of"); - public IntervalsDescriptor AnyOf(Action configure) => Set(configure, "any_of"); - public IntervalsDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy intervalsFuzzy) => Set(intervalsFuzzy, "fuzzy"); - public IntervalsDescriptor Fuzzy(Action configure) => Set(configure, "fuzzy"); - public IntervalsDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch intervalsMatch) => Set(intervalsMatch, "match"); - public IntervalsDescriptor Match(Action configure) => Set(configure, "match"); - public IntervalsDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix intervalsPrefix) => Set(intervalsPrefix, "prefix"); - public IntervalsDescriptor Prefix(Action configure) => Set(configure, "prefix"); - public IntervalsDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard intervalsWildcard) => Set(intervalsWildcard, "wildcard"); - public IntervalsDescriptor Wildcard(Action configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs deleted file mode 100644 index 1142c8d067f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs +++ /dev/null @@ -1,421 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IntervalsAllOf -{ - /// - /// - /// Rule used to filter returned intervals. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? Filter { get; set; } - - /// - /// - /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. - /// - /// - [JsonInclude, JsonPropertyName("intervals")] - public ICollection Intervals { get; set; } - - /// - /// - /// Maximum number of positions between the matching terms. - /// Intervals produced by the rules further apart than this are not considered matches. - /// - /// - [JsonInclude, JsonPropertyName("max_gaps")] - public int? MaxGaps { get; set; } - - /// - /// - /// If true, intervals produced by the rules should appear in the order in which they are specified. - /// - /// - [JsonInclude, JsonPropertyName("ordered")] - public bool? Ordered { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals(IntervalsAllOf intervalsAllOf) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals.AllOf(intervalsAllOf); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery(IntervalsAllOf intervalsAllOf) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery.AllOf(intervalsAllOf); -} - -public sealed partial class IntervalsAllOfDescriptor : SerializableDescriptor> -{ - internal IntervalsAllOfDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsAllOfDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private ICollection IntervalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor IntervalsDescriptor { get; set; } - private Action> IntervalsDescriptorAction { get; set; } - private Action>[] IntervalsDescriptorActions { get; set; } - private int? MaxGapsValue { get; set; } - private bool? OrderedValue { get; set; } - - /// - /// - /// Rule used to filter returned intervals. - /// - /// - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. - /// - /// - public IntervalsAllOfDescriptor Intervals(ICollection intervals) - { - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsValue = intervals; - return Self; - } - - public IntervalsAllOfDescriptor Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor descriptor) - { - IntervalsValue = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Intervals(Action> configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorActions = null; - IntervalsDescriptorAction = configure; - return Self; - } - - public IntervalsAllOfDescriptor Intervals(params Action>[] configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Maximum number of positions between the matching terms. - /// Intervals produced by the rules further apart than this are not considered matches. - /// - /// - public IntervalsAllOfDescriptor MaxGaps(int? maxGaps) - { - MaxGapsValue = maxGaps; - return Self; - } - - /// - /// - /// If true, intervals produced by the rules should appear in the order in which they are specified. - /// - /// - public IntervalsAllOfDescriptor Ordered(bool? ordered = true) - { - OrderedValue = ordered; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IntervalsDescriptor is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IntervalsDescriptor, options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorAction is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(IntervalsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorActions is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - foreach (var action in IntervalsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("intervals"); - JsonSerializer.Serialize(writer, IntervalsValue, options); - } - - if (MaxGapsValue.HasValue) - { - writer.WritePropertyName("max_gaps"); - writer.WriteNumberValue(MaxGapsValue.Value); - } - - if (OrderedValue.HasValue) - { - writer.WritePropertyName("ordered"); - writer.WriteBooleanValue(OrderedValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsAllOfDescriptor : SerializableDescriptor -{ - internal IntervalsAllOfDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsAllOfDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private ICollection IntervalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor IntervalsDescriptor { get; set; } - private Action IntervalsDescriptorAction { get; set; } - private Action[] IntervalsDescriptorActions { get; set; } - private int? MaxGapsValue { get; set; } - private bool? OrderedValue { get; set; } - - /// - /// - /// Rule used to filter returned intervals. - /// - /// - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of rules to combine. All rules must produce a match in a document for the overall source to match. - /// - /// - public IntervalsAllOfDescriptor Intervals(ICollection intervals) - { - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsValue = intervals; - return Self; - } - - public IntervalsAllOfDescriptor Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor descriptor) - { - IntervalsValue = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsDescriptor = descriptor; - return Self; - } - - public IntervalsAllOfDescriptor Intervals(Action configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorActions = null; - IntervalsDescriptorAction = configure; - return Self; - } - - public IntervalsAllOfDescriptor Intervals(params Action[] configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = configure; - return Self; - } - - /// - /// - /// Maximum number of positions between the matching terms. - /// Intervals produced by the rules further apart than this are not considered matches. - /// - /// - public IntervalsAllOfDescriptor MaxGaps(int? maxGaps) - { - MaxGapsValue = maxGaps; - return Self; - } - - /// - /// - /// If true, intervals produced by the rules should appear in the order in which they are specified. - /// - /// - public IntervalsAllOfDescriptor Ordered(bool? ordered = true) - { - OrderedValue = ordered; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IntervalsDescriptor is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IntervalsDescriptor, options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorAction is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(IntervalsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorActions is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - foreach (var action in IntervalsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("intervals"); - JsonSerializer.Serialize(writer, IntervalsValue, options); - } - - if (MaxGapsValue.HasValue) - { - writer.WritePropertyName("max_gaps"); - writer.WriteNumberValue(MaxGapsValue.Value); - } - - if (OrderedValue.HasValue) - { - writer.WritePropertyName("ordered"); - writer.WriteBooleanValue(OrderedValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs deleted file mode 100644 index 4be35cc9c03..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsAnyOf.g.cs +++ /dev/null @@ -1,330 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IntervalsAnyOf -{ - /// - /// - /// Rule used to filter returned intervals. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? Filter { get; set; } - - /// - /// - /// An array of rules to match. - /// - /// - [JsonInclude, JsonPropertyName("intervals")] - public ICollection Intervals { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals(IntervalsAnyOf intervalsAnyOf) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals.AnyOf(intervalsAnyOf); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery(IntervalsAnyOf intervalsAnyOf) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery.AnyOf(intervalsAnyOf); -} - -public sealed partial class IntervalsAnyOfDescriptor : SerializableDescriptor> -{ - internal IntervalsAnyOfDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsAnyOfDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private ICollection IntervalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor IntervalsDescriptor { get; set; } - private Action> IntervalsDescriptorAction { get; set; } - private Action>[] IntervalsDescriptorActions { get; set; } - - /// - /// - /// Rule used to filter returned intervals. - /// - /// - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of rules to match. - /// - /// - public IntervalsAnyOfDescriptor Intervals(ICollection intervals) - { - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsValue = intervals; - return Self; - } - - public IntervalsAnyOfDescriptor Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor descriptor) - { - IntervalsValue = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Intervals(Action> configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorActions = null; - IntervalsDescriptorAction = configure; - return Self; - } - - public IntervalsAnyOfDescriptor Intervals(params Action>[] configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IntervalsDescriptor is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IntervalsDescriptor, options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorAction is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(IntervalsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorActions is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - foreach (var action in IntervalsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("intervals"); - JsonSerializer.Serialize(writer, IntervalsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsAnyOfDescriptor : SerializableDescriptor -{ - internal IntervalsAnyOfDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsAnyOfDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private ICollection IntervalsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor IntervalsDescriptor { get; set; } - private Action IntervalsDescriptorAction { get; set; } - private Action[] IntervalsDescriptorActions { get; set; } - - /// - /// - /// Rule used to filter returned intervals. - /// - /// - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// An array of rules to match. - /// - /// - public IntervalsAnyOfDescriptor Intervals(ICollection intervals) - { - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsValue = intervals; - return Self; - } - - public IntervalsAnyOfDescriptor Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor descriptor) - { - IntervalsValue = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = null; - IntervalsDescriptor = descriptor; - return Self; - } - - public IntervalsAnyOfDescriptor Intervals(Action configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorActions = null; - IntervalsDescriptorAction = configure; - return Self; - } - - public IntervalsAnyOfDescriptor Intervals(params Action[] configure) - { - IntervalsValue = null; - IntervalsDescriptor = null; - IntervalsDescriptorAction = null; - IntervalsDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (IntervalsDescriptor is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IntervalsDescriptor, options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorAction is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(IntervalsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IntervalsDescriptorActions is not null) - { - writer.WritePropertyName("intervals"); - writer.WriteStartArray(); - foreach (var action in IntervalsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("intervals"); - JsonSerializer.Serialize(writer, IntervalsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFilter.g.cs deleted file mode 100644 index 787ad340e5d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFilter.g.cs +++ /dev/null @@ -1,347 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(IntervalsFilterConverter))] -public sealed partial class IntervalsFilter -{ - internal IntervalsFilter(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 IntervalsFilter After(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("after", intervalsContainer); - public static IntervalsFilter Before(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("before", intervalsContainer); - public static IntervalsFilter ContainedBy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("contained_by", intervalsContainer); - public static IntervalsFilter Containing(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("containing", intervalsContainer); - public static IntervalsFilter NotContainedBy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("not_contained_by", intervalsContainer); - public static IntervalsFilter NotContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("not_containing", intervalsContainer); - public static IntervalsFilter NotOverlapping(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("not_overlapping", intervalsContainer); - public static IntervalsFilter Overlapping(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => new IntervalsFilter("overlapping", intervalsContainer); - public static IntervalsFilter Script(Elastic.Clients.Elasticsearch.Serverless.Script script) => new IntervalsFilter("script", script); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class IntervalsFilterConverter : JsonConverter -{ - public override IntervalsFilter 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; - 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 == "after") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "before") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "contained_by") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "containing") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "not_contained_by") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "not_containing") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "not_overlapping") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "overlapping") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "script") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'IntervalsFilter' from the response."); - } - - var result = new IntervalsFilter(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, IntervalsFilter value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "after": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "before": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "contained_by": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "containing": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "not_contained_by": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "not_containing": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "not_overlapping": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "overlapping": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals)value.Variant, options); - break; - case "script": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Script)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsFilterDescriptor : SerializableDescriptor> -{ - internal IntervalsFilterDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsFilterDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IntervalsFilterDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IntervalsFilterDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IntervalsFilterDescriptor After(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "after"); - public IntervalsFilterDescriptor After(Action> configure) => Set(configure, "after"); - public IntervalsFilterDescriptor Before(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "before"); - public IntervalsFilterDescriptor Before(Action> configure) => Set(configure, "before"); - public IntervalsFilterDescriptor ContainedBy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "contained_by"); - public IntervalsFilterDescriptor ContainedBy(Action> configure) => Set(configure, "contained_by"); - public IntervalsFilterDescriptor Containing(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "containing"); - public IntervalsFilterDescriptor Containing(Action> configure) => Set(configure, "containing"); - public IntervalsFilterDescriptor NotContainedBy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "not_contained_by"); - public IntervalsFilterDescriptor NotContainedBy(Action> configure) => Set(configure, "not_contained_by"); - public IntervalsFilterDescriptor NotContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "not_containing"); - public IntervalsFilterDescriptor NotContaining(Action> configure) => Set(configure, "not_containing"); - public IntervalsFilterDescriptor NotOverlapping(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "not_overlapping"); - public IntervalsFilterDescriptor NotOverlapping(Action> configure) => Set(configure, "not_overlapping"); - public IntervalsFilterDescriptor Overlapping(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "overlapping"); - public IntervalsFilterDescriptor Overlapping(Action> configure) => Set(configure, "overlapping"); - public IntervalsFilterDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) => Set(script, "script"); - public IntervalsFilterDescriptor Script(Action configure) => Set(configure, "script"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsFilterDescriptor : SerializableDescriptor -{ - internal IntervalsFilterDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsFilterDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IntervalsFilterDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IntervalsFilterDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public IntervalsFilterDescriptor After(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "after"); - public IntervalsFilterDescriptor After(Action configure) => Set(configure, "after"); - public IntervalsFilterDescriptor Before(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "before"); - public IntervalsFilterDescriptor Before(Action configure) => Set(configure, "before"); - public IntervalsFilterDescriptor ContainedBy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "contained_by"); - public IntervalsFilterDescriptor ContainedBy(Action configure) => Set(configure, "contained_by"); - public IntervalsFilterDescriptor Containing(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "containing"); - public IntervalsFilterDescriptor Containing(Action configure) => Set(configure, "containing"); - public IntervalsFilterDescriptor NotContainedBy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "not_contained_by"); - public IntervalsFilterDescriptor NotContainedBy(Action configure) => Set(configure, "not_contained_by"); - public IntervalsFilterDescriptor NotContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "not_containing"); - public IntervalsFilterDescriptor NotContaining(Action configure) => Set(configure, "not_containing"); - public IntervalsFilterDescriptor NotOverlapping(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "not_overlapping"); - public IntervalsFilterDescriptor NotOverlapping(Action configure) => Set(configure, "not_overlapping"); - public IntervalsFilterDescriptor Overlapping(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals intervalsContainer) => Set(intervalsContainer, "overlapping"); - public IntervalsFilterDescriptor Overlapping(Action configure) => Set(configure, "overlapping"); - public IntervalsFilterDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) => Set(script, "script"); - public IntervalsFilterDescriptor Script(Action configure) => Set(configure, "script"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs deleted file mode 100644 index 4186a5b33dc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs +++ /dev/null @@ -1,373 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IntervalsFuzzy -{ - /// - /// - /// Analyzer used to normalize the term. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzziness")] - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - [JsonInclude, JsonPropertyName("prefix_length")] - public int? PrefixLength { get; set; } - - /// - /// - /// The term to match. - /// - /// - [JsonInclude, JsonPropertyName("term")] - public string Term { get; set; } - - /// - /// - /// Indicates whether edits include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - [JsonInclude, JsonPropertyName("transpositions")] - public bool? Transpositions { get; set; } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - [JsonInclude, JsonPropertyName("use_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? UseField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals(IntervalsFuzzy intervalsFuzzy) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals.Fuzzy(intervalsFuzzy); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery(IntervalsFuzzy intervalsFuzzy) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery.Fuzzy(intervalsFuzzy); -} - -public sealed partial class IntervalsFuzzyDescriptor : SerializableDescriptor> -{ - internal IntervalsFuzzyDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsFuzzyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string TermValue { get; set; } - private bool? TranspositionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to normalize the term. - /// - /// - public IntervalsFuzzyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public IntervalsFuzzyDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public IntervalsFuzzyDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// The term to match. - /// - /// - public IntervalsFuzzyDescriptor Term(string term) - { - TermValue = term; - return Self; - } - - /// - /// - /// Indicates whether edits include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public IntervalsFuzzyDescriptor Transpositions(bool? transpositions = true) - { - TranspositionsValue = transpositions; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsFuzzyDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsFuzzyDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsFuzzyDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("term"); - writer.WriteStringValue(TermValue); - if (TranspositionsValue.HasValue) - { - writer.WritePropertyName("transpositions"); - writer.WriteBooleanValue(TranspositionsValue.Value); - } - - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsFuzzyDescriptor : SerializableDescriptor -{ - internal IntervalsFuzzyDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsFuzzyDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string TermValue { get; set; } - private bool? TranspositionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to normalize the term. - /// - /// - public IntervalsFuzzyDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public IntervalsFuzzyDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged when creating expansions. - /// - /// - public IntervalsFuzzyDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// The term to match. - /// - /// - public IntervalsFuzzyDescriptor Term(string term) - { - TermValue = term; - return Self; - } - - /// - /// - /// Indicates whether edits include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public IntervalsFuzzyDescriptor Transpositions(bool? transpositions = true) - { - TranspositionsValue = transpositions; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsFuzzyDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsFuzzyDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsFuzzyDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("term"); - writer.WriteStringValue(TermValue); - if (TranspositionsValue.HasValue) - { - writer.WritePropertyName("transpositions"); - writer.WriteBooleanValue(TranspositionsValue.Value); - } - - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsMatch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsMatch.g.cs deleted file mode 100644 index 149827281a3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsMatch.g.cs +++ /dev/null @@ -1,436 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IntervalsMatch -{ - /// - /// - /// Analyzer used to analyze terms in the query. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// An optional interval filter. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? Filter { get; set; } - - /// - /// - /// Maximum number of positions between the matching terms. - /// Terms further apart than this are not considered matches. - /// - /// - [JsonInclude, JsonPropertyName("max_gaps")] - public int? MaxGaps { get; set; } - - /// - /// - /// If true, matching terms must appear in their specified order. - /// - /// - [JsonInclude, JsonPropertyName("ordered")] - public bool? Ordered { get; set; } - - /// - /// - /// Text you wish to find in the provided field. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - [JsonInclude, JsonPropertyName("use_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? UseField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals(IntervalsMatch intervalsMatch) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals.Match(intervalsMatch); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery(IntervalsMatch intervalsMatch) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery.Match(intervalsMatch); -} - -public sealed partial class IntervalsMatchDescriptor : SerializableDescriptor> -{ - internal IntervalsMatchDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsMatchDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private int? MaxGapsValue { get; set; } - private bool? OrderedValue { get; set; } - private string QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to analyze terms in the query. - /// - /// - public IntervalsMatchDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// An optional interval filter. - /// - /// - public IntervalsMatchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsMatchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsMatchDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of positions between the matching terms. - /// Terms further apart than this are not considered matches. - /// - /// - public IntervalsMatchDescriptor MaxGaps(int? maxGaps) - { - MaxGapsValue = maxGaps; - return Self; - } - - /// - /// - /// If true, matching terms must appear in their specified order. - /// - /// - public IntervalsMatchDescriptor Ordered(bool? ordered = true) - { - OrderedValue = ordered; - return Self; - } - - /// - /// - /// Text you wish to find in the provided field. - /// - /// - public IntervalsMatchDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsMatchDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsMatchDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsMatchDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (MaxGapsValue.HasValue) - { - writer.WritePropertyName("max_gaps"); - writer.WriteNumberValue(MaxGapsValue.Value); - } - - if (OrderedValue.HasValue) - { - writer.WritePropertyName("ordered"); - writer.WriteBooleanValue(OrderedValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsMatchDescriptor : SerializableDescriptor -{ - internal IntervalsMatchDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsMatchDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private int? MaxGapsValue { get; set; } - private bool? OrderedValue { get; set; } - private string QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to analyze terms in the query. - /// - /// - public IntervalsMatchDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// An optional interval filter. - /// - /// - public IntervalsMatchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterValue = filter; - return Self; - } - - public IntervalsMatchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptor = descriptor; - return Self; - } - - public IntervalsMatchDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = configure; - return Self; - } - - /// - /// - /// Maximum number of positions between the matching terms. - /// Terms further apart than this are not considered matches. - /// - /// - public IntervalsMatchDescriptor MaxGaps(int? maxGaps) - { - MaxGapsValue = maxGaps; - return Self; - } - - /// - /// - /// If true, matching terms must appear in their specified order. - /// - /// - public IntervalsMatchDescriptor Ordered(bool? ordered = true) - { - OrderedValue = ordered; - return Self; - } - - /// - /// - /// Text you wish to find in the provided field. - /// - /// - public IntervalsMatchDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsMatchDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsMatchDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The term is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsMatchDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilterDescriptor(FilterDescriptorAction), options); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterValue, options); - } - - if (MaxGapsValue.HasValue) - { - writer.WritePropertyName("max_gaps"); - writer.WriteNumberValue(MaxGapsValue.Value); - } - - if (OrderedValue.HasValue) - { - writer.WritePropertyName("ordered"); - writer.WriteBooleanValue(OrderedValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsPrefix.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsPrefix.g.cs deleted file mode 100644 index d28ebb0cdbe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsPrefix.g.cs +++ /dev/null @@ -1,241 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IntervalsPrefix -{ - /// - /// - /// Analyzer used to analyze the prefix. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// Beginning characters of terms you wish to find in the top-level field. - /// - /// - [JsonInclude, JsonPropertyName("prefix")] - public string Prefix { get; set; } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - [JsonInclude, JsonPropertyName("use_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? UseField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals(IntervalsPrefix intervalsPrefix) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals.Prefix(intervalsPrefix); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery(IntervalsPrefix intervalsPrefix) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery.Prefix(intervalsPrefix); -} - -public sealed partial class IntervalsPrefixDescriptor : SerializableDescriptor> -{ - internal IntervalsPrefixDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsPrefixDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private string PrefixValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to analyze the prefix. - /// - /// - public IntervalsPrefixDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Beginning characters of terms you wish to find in the top-level field. - /// - /// - public IntervalsPrefixDescriptor Prefix(string prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsPrefixDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsPrefixDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsPrefixDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsPrefixDescriptor : SerializableDescriptor -{ - internal IntervalsPrefixDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsPrefixDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private string PrefixValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to analyze the prefix. - /// - /// - public IntervalsPrefixDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Beginning characters of terms you wish to find in the top-level field. - /// - /// - public IntervalsPrefixDescriptor Prefix(string prefix) - { - PrefixValue = prefix; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsPrefixDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsPrefixDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsPrefixDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - writer.WritePropertyName("prefix"); - writer.WriteStringValue(PrefixValue); - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs deleted file mode 100644 index 58eac78e84c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsQuery.g.cs +++ /dev/null @@ -1,475 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(IntervalsQueryConverter))] -public sealed partial class IntervalsQuery -{ - internal IntervalsQuery(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 IntervalsQuery AllOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf intervalsAllOf) => new IntervalsQuery("all_of", intervalsAllOf); - public static IntervalsQuery AnyOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf intervalsAnyOf) => new IntervalsQuery("any_of", intervalsAnyOf); - public static IntervalsQuery Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy intervalsFuzzy) => new IntervalsQuery("fuzzy", intervalsFuzzy); - public static IntervalsQuery Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch intervalsMatch) => new IntervalsQuery("match", intervalsMatch); - public static IntervalsQuery Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix intervalsPrefix) => new IntervalsQuery("prefix", intervalsPrefix); - public static IntervalsQuery Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard intervalsWildcard) => new IntervalsQuery("wildcard", intervalsWildcard); - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class IntervalsQueryConverter : JsonConverter -{ - public override IntervalsQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - { - throw new JsonException("Expected start token."); - } - - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - object? variantValue = default; - string? variantNameValue = default; - float? boostValue = default; - string? queryNameValue = 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 == "boost") - { - boostValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "_name") - { - queryNameValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "all_of") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "any_of") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fuzzy") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wildcard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'IntervalsQuery' from the response."); - } - - reader.Read(); - var result = new IntervalsQuery(variantNameValue, variantValue); - result.Boost = boostValue; - result.Field = fieldName; - result.QueryName = queryNameValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, IntervalsQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize IntervalsQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "all_of": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf)value.Variant, options); - break; - case "any_of": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf)value.Variant, options); - break; - case "fuzzy": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy)value.Variant, options); - break; - case "match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch)value.Variant, options); - break; - case "prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix)value.Variant, options); - break; - case "wildcard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsQueryDescriptor : SerializableDescriptor> -{ - internal IntervalsQueryDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IntervalsQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IntervalsQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public IntervalsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public IntervalsQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public IntervalsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public IntervalsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public IntervalsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public IntervalsQueryDescriptor AllOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf intervalsAllOf) => Set(intervalsAllOf, "all_of"); - public IntervalsQueryDescriptor AllOf(Action> configure) => Set(configure, "all_of"); - public IntervalsQueryDescriptor AnyOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf intervalsAnyOf) => Set(intervalsAnyOf, "any_of"); - public IntervalsQueryDescriptor AnyOf(Action> configure) => Set(configure, "any_of"); - public IntervalsQueryDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy intervalsFuzzy) => Set(intervalsFuzzy, "fuzzy"); - public IntervalsQueryDescriptor Fuzzy(Action> configure) => Set(configure, "fuzzy"); - public IntervalsQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch intervalsMatch) => Set(intervalsMatch, "match"); - public IntervalsQueryDescriptor Match(Action> configure) => Set(configure, "match"); - public IntervalsQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix intervalsPrefix) => Set(intervalsPrefix, "prefix"); - public IntervalsQueryDescriptor Prefix(Action> configure) => Set(configure, "prefix"); - public IntervalsQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard intervalsWildcard) => Set(intervalsWildcard, "wildcard"); - public IntervalsQueryDescriptor Wildcard(Action> configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsQueryDescriptor : SerializableDescriptor -{ - internal IntervalsQueryDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private IntervalsQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private IntervalsQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public IntervalsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public IntervalsQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public IntervalsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public IntervalsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public IntervalsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public IntervalsQueryDescriptor AllOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAllOf intervalsAllOf) => Set(intervalsAllOf, "all_of"); - public IntervalsQueryDescriptor AllOf(Action configure) => Set(configure, "all_of"); - public IntervalsQueryDescriptor AnyOf(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsAnyOf intervalsAnyOf) => Set(intervalsAnyOf, "any_of"); - public IntervalsQueryDescriptor AnyOf(Action configure) => Set(configure, "any_of"); - public IntervalsQueryDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFuzzy intervalsFuzzy) => Set(intervalsFuzzy, "fuzzy"); - public IntervalsQueryDescriptor Fuzzy(Action configure) => Set(configure, "fuzzy"); - public IntervalsQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsMatch intervalsMatch) => Set(intervalsMatch, "match"); - public IntervalsQueryDescriptor Match(Action configure) => Set(configure, "match"); - public IntervalsQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsPrefix intervalsPrefix) => Set(intervalsPrefix, "prefix"); - public IntervalsQueryDescriptor Prefix(Action configure) => Set(configure, "prefix"); - public IntervalsQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsWildcard intervalsWildcard) => Set(intervalsWildcard, "wildcard"); - public IntervalsQueryDescriptor Wildcard(Action configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsWildcard.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsWildcard.g.cs deleted file mode 100644 index cc611d1b7e3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/IntervalsWildcard.g.cs +++ /dev/null @@ -1,244 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class IntervalsWildcard -{ - /// - /// - /// Analyzer used to analyze the pattern. - /// Defaults to the top-level field's analyzer. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// Wildcard pattern used to find matching terms. - /// - /// - [JsonInclude, JsonPropertyName("pattern")] - public string Pattern { get; set; } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - [JsonInclude, JsonPropertyName("use_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? UseField { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals(IntervalsWildcard intervalsWildcard) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Intervals.Wildcard(intervalsWildcard); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery(IntervalsWildcard intervalsWildcard) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery.Wildcard(intervalsWildcard); -} - -public sealed partial class IntervalsWildcardDescriptor : SerializableDescriptor> -{ - internal IntervalsWildcardDescriptor(Action> configure) => configure.Invoke(this); - - public IntervalsWildcardDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private string PatternValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to analyze the pattern. - /// Defaults to the top-level field's analyzer. - /// - /// - public IntervalsWildcardDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Wildcard pattern used to find matching terms. - /// - /// - public IntervalsWildcardDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsWildcardDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsWildcardDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsWildcardDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IntervalsWildcardDescriptor : SerializableDescriptor -{ - internal IntervalsWildcardDescriptor(Action configure) => configure.Invoke(this); - - public IntervalsWildcardDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private string PatternValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? UseFieldValue { get; set; } - - /// - /// - /// Analyzer used to analyze the pattern. - /// Defaults to the top-level field's analyzer. - /// - /// - public IntervalsWildcardDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Wildcard pattern used to find matching terms. - /// - /// - public IntervalsWildcardDescriptor Pattern(string pattern) - { - PatternValue = pattern; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsWildcardDescriptor UseField(Elastic.Clients.Elasticsearch.Serverless.Field? useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsWildcardDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - /// - /// - /// If specified, match intervals from this field rather than the top-level field. - /// The pattern is normalized using the search analyzer from this field, unless analyzer is specified separately. - /// - /// - public IntervalsWildcardDescriptor UseField(Expression> useField) - { - UseFieldValue = useField; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - writer.WritePropertyName("pattern"); - writer.WriteStringValue(PatternValue); - if (UseFieldValue is not null) - { - writer.WritePropertyName("use_field"); - JsonSerializer.Serialize(writer, UseFieldValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Like.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Like.g.cs deleted file mode 100644 index 589de265849..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Like.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -/// -/// -/// Text that we want similar documents for or a lookup to a document's field for the text. -/// -/// Learn more about this API in the Elasticsearch documentation. -/// -public sealed partial class Like : Union -{ - public Like(string Text) : base(Text) - { - } - - public Like(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.LikeDocument Document) : base(Document) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs deleted file mode 100644 index 366d3423770..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ /dev/null @@ -1,352 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class LikeDocument -{ - /// - /// - /// A document not present in the index. - /// - /// - [JsonInclude, JsonPropertyName("doc")] - public object? Doc { get; set; } - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// ID of a document. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Index of a document. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// Overrides the default analyzer. - /// - /// - [JsonInclude, JsonPropertyName("per_field_analyzer")] - public IDictionary? PerFieldAnalyzer { get; set; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } - [JsonInclude, JsonPropertyName("version_type")] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get; set; } -} - -public sealed partial class LikeDocumentDescriptor : SerializableDescriptor> -{ - internal LikeDocumentDescriptor(Action> configure) => configure.Invoke(this); - - public LikeDocumentDescriptor() : base() - { - } - - private object? DocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// A document not present in the index. - /// - /// - public LikeDocumentDescriptor Doc(object? doc) - { - DocValue = doc; - return Self; - } - - public LikeDocumentDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// ID of a document. - /// - /// - public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Index of a document. - /// - /// - public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Overrides the default analyzer. - /// - /// - public LikeDocumentDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public LikeDocumentDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - public LikeDocumentDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - public LikeDocumentDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocValue is not null) - { - writer.WritePropertyName("doc"); - JsonSerializer.Serialize(writer, DocValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class LikeDocumentDescriptor : SerializableDescriptor -{ - internal LikeDocumentDescriptor(Action configure) => configure.Invoke(this); - - public LikeDocumentDescriptor() : base() - { - } - - private object? DocValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// A document not present in the index. - /// - /// - public LikeDocumentDescriptor Doc(object? doc) - { - DocValue = doc; - return Self; - } - - public LikeDocumentDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// ID of a document. - /// - /// - public LikeDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Index of a document. - /// - /// - public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// Overrides the default analyzer. - /// - /// - public LikeDocumentDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public LikeDocumentDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - public LikeDocumentDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - public LikeDocumentDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocValue is not null) - { - writer.WritePropertyName("doc"); - JsonSerializer.Serialize(writer, DocValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IdValue is not null) - { - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.g.cs deleted file mode 100644 index bf7576bc03e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchAllQuery.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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class MatchAllQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MatchAllQuery matchAllQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MatchAll(matchAllQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(MatchAllQuery matchAllQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.MatchAll(matchAllQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(MatchAllQuery matchAllQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.MatchAll(matchAllQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(MatchAllQuery matchAllQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.MatchAll(matchAllQuery); -} - -public sealed partial class MatchAllQueryDescriptor : SerializableDescriptor -{ - internal MatchAllQueryDescriptor(Action configure) => configure.Invoke(this); - - public MatchAllQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchAllQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchAllQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs deleted file mode 100644 index d9abed4ea45..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs +++ /dev/null @@ -1,767 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class MatchBoolPrefixQueryConverter : JsonConverter -{ - public override MatchBoolPrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new MatchBoolPrefixQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "analyzer") - { - variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzziness") - { - variant.Fuzziness = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzzy_rewrite") - { - variant.FuzzyRewrite = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzzy_transpositions") - { - variant.FuzzyTranspositions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_expansions") - { - variant.MaxExpansions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "minimum_should_match") - { - variant.MinimumShouldMatch = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "operator") - { - variant.Operator = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "prefix_length") - { - variant.PrefixLength = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, MatchBoolPrefixQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize MatchBoolPrefixQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Analyzer)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(value.Analyzer); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.Fuzziness is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, value.Fuzziness, options); - } - - if (!string.IsNullOrEmpty(value.FuzzyRewrite)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(value.FuzzyRewrite); - } - - if (value.FuzzyTranspositions.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(value.FuzzyTranspositions.Value); - } - - if (value.MaxExpansions.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(value.MaxExpansions.Value); - } - - if (value.MinimumShouldMatch is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, value.MinimumShouldMatch, options); - } - - if (value.Operator is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, value.Operator, options); - } - - if (value.PrefixLength.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(value.PrefixLength.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(value.Query); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(MatchBoolPrefixQueryConverter))] -public sealed partial class MatchBoolPrefixQuery -{ - public MatchBoolPrefixQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public string? Analyzer { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Maximum edit distance allowed for matching. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public string? FuzzyRewrite { get; set; } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public bool? FuzzyTranspositions { get; set; } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public int? MaxExpansions { get; set; } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// Applied to the constructed bool query. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// Applied to the constructed bool query. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? Operator { get; set; } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public int? PrefixLength { get; set; } - - /// - /// - /// Terms you wish to find in the provided field. - /// The last term is used in a prefix query. - /// - /// - public string Query { get; set; } - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MatchBoolPrefixQuery matchBoolPrefixQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MatchBoolPrefix(matchBoolPrefixQuery); -} - -public sealed partial class MatchBoolPrefixQueryDescriptor : SerializableDescriptor> -{ - internal MatchBoolPrefixQueryDescriptor(Action> configure) => configure.Invoke(this); - - public MatchBoolPrefixQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MatchBoolPrefixQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchBoolPrefixQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchBoolPrefixQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchBoolPrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchBoolPrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// Applied to the constructed bool query. - /// - /// - public MatchBoolPrefixQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// Applied to the constructed bool query. - /// - /// - public MatchBoolPrefixQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Terms you wish to find in the provided field. - /// The last term is used in a prefix query. - /// - /// - public MatchBoolPrefixQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class MatchBoolPrefixQueryDescriptor : SerializableDescriptor -{ - internal MatchBoolPrefixQueryDescriptor(Action configure) => configure.Invoke(this); - - public MatchBoolPrefixQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MatchBoolPrefixQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchBoolPrefixQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchBoolPrefixQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchBoolPrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchBoolPrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// Applied to the constructed bool query. - /// - /// - public MatchBoolPrefixQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// Applied to the constructed bool query. - /// - /// - public MatchBoolPrefixQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MatchBoolPrefixQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Terms you wish to find in the provided field. - /// The last term is used in a prefix query. - /// - /// - public MatchBoolPrefixQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MatchBoolPrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs deleted file mode 100644 index 0d58a802da4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs +++ /dev/null @@ -1,96 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class MatchNoneQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MatchNoneQuery matchNoneQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MatchNone(matchNoneQuery); -} - -public sealed partial class MatchNoneQueryDescriptor : SerializableDescriptor -{ - internal MatchNoneQueryDescriptor(Action configure) => configure.Invoke(this); - - public MatchNoneQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchNoneQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchNoneQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs deleted file mode 100644 index 037b01ac21b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs +++ /dev/null @@ -1,523 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class MatchPhrasePrefixQueryConverter : JsonConverter -{ - public override MatchPhrasePrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new MatchPhrasePrefixQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "analyzer") - { - variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_expansions") - { - variant.MaxExpansions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "slop") - { - variant.Slop = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "zero_terms_query") - { - variant.ZeroTermsQuery = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, MatchPhrasePrefixQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize MatchPhrasePrefixQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Analyzer)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(value.Analyzer); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.MaxExpansions.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(value.MaxExpansions.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(value.Query); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Slop.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(value.Slop.Value); - } - - if (value.ZeroTermsQuery is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, value.ZeroTermsQuery, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(MatchPhrasePrefixQueryConverter))] -public sealed partial class MatchPhrasePrefixQuery -{ - public MatchPhrasePrefixQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Analyzer used to convert text in the query value into tokens. - /// - /// - public string? Analyzer { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Maximum number of terms to which the last provided term of the query value will expand. - /// - /// - public int? MaxExpansions { get; set; } - - /// - /// - /// Text you wish to find in the provided field. - /// - /// - public string Query { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public int? Slop { get; set; } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQuery { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MatchPhrasePrefixQuery matchPhrasePrefixQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MatchPhrasePrefix(matchPhrasePrefixQuery); -} - -public sealed partial class MatchPhrasePrefixQueryDescriptor : SerializableDescriptor> -{ - internal MatchPhrasePrefixQueryDescriptor(Action> configure) => configure.Invoke(this); - - public MatchPhrasePrefixQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert text in the query value into tokens. - /// - /// - public MatchPhrasePrefixQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchPhrasePrefixQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum number of terms to which the last provided term of the query value will expand. - /// - /// - public MatchPhrasePrefixQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Text you wish to find in the provided field. - /// - /// - public MatchPhrasePrefixQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public MatchPhrasePrefixQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MatchPhrasePrefixQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class MatchPhrasePrefixQueryDescriptor : SerializableDescriptor -{ - internal MatchPhrasePrefixQueryDescriptor(Action configure) => configure.Invoke(this); - - public MatchPhrasePrefixQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert text in the query value into tokens. - /// - /// - public MatchPhrasePrefixQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchPhrasePrefixQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum number of terms to which the last provided term of the query value will expand. - /// - /// - public MatchPhrasePrefixQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Text you wish to find in the provided field. - /// - /// - public MatchPhrasePrefixQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MatchPhrasePrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public MatchPhrasePrefixQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MatchPhrasePrefixQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs deleted file mode 100644 index e19091ee3da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs +++ /dev/null @@ -1,468 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class MatchPhraseQueryConverter : JsonConverter -{ - public override MatchPhraseQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new MatchPhraseQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "analyzer") - { - variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "slop") - { - variant.Slop = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "zero_terms_query") - { - variant.ZeroTermsQuery = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, MatchPhraseQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize MatchPhraseQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Analyzer)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(value.Analyzer); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(value.Query); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Slop.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(value.Slop.Value); - } - - if (value.ZeroTermsQuery is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, value.ZeroTermsQuery, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(MatchPhraseQueryConverter))] -public sealed partial class MatchPhraseQuery -{ - public MatchPhraseQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public string? Analyzer { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Query terms that are analyzed and turned into a phrase query. - /// - /// - public string Query { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public int? Slop { get; set; } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQuery { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MatchPhraseQuery matchPhraseQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MatchPhrase(matchPhraseQuery); -} - -public sealed partial class MatchPhraseQueryDescriptor : SerializableDescriptor> -{ - internal MatchPhraseQueryDescriptor(Action> configure) => configure.Invoke(this); - - public MatchPhraseQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MatchPhraseQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchPhraseQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchPhraseQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchPhraseQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchPhraseQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Query terms that are analyzed and turned into a phrase query. - /// - /// - public MatchPhraseQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MatchPhraseQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public MatchPhraseQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MatchPhraseQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class MatchPhraseQueryDescriptor : SerializableDescriptor -{ - internal MatchPhraseQueryDescriptor(Action configure) => configure.Invoke(this); - - public MatchPhraseQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MatchPhraseQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchPhraseQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchPhraseQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchPhraseQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchPhraseQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Query terms that are analyzed and turned into a phrase query. - /// - /// - public MatchPhraseQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MatchPhraseQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public MatchPhraseQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MatchPhraseQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs deleted file mode 100644 index 5907d2f7093..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MatchQuery.g.cs +++ /dev/null @@ -1,911 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class MatchQueryConverter : JsonConverter -{ - public override MatchQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new MatchQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "analyzer") - { - variant.Analyzer = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "auto_generate_synonyms_phrase_query") - { - variant.AutoGenerateSynonymsPhraseQuery = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzziness") - { - variant.Fuzziness = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzzy_rewrite") - { - variant.FuzzyRewrite = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "fuzzy_transpositions") - { - variant.FuzzyTranspositions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lenient") - { - variant.Lenient = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_expansions") - { - variant.MaxExpansions = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "minimum_should_match") - { - variant.MinimumShouldMatch = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "operator") - { - variant.Operator = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "prefix_length") - { - variant.PrefixLength = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "query") - { - variant.Query = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "zero_terms_query") - { - variant.ZeroTermsQuery = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, MatchQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize MatchQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.Analyzer)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(value.Analyzer); - } - - if (value.AutoGenerateSynonymsPhraseQuery.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(value.AutoGenerateSynonymsPhraseQuery.Value); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.Fuzziness is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, value.Fuzziness, options); - } - - if (!string.IsNullOrEmpty(value.FuzzyRewrite)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(value.FuzzyRewrite); - } - - if (value.FuzzyTranspositions.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(value.FuzzyTranspositions.Value); - } - - if (value.Lenient.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(value.Lenient.Value); - } - - if (value.MaxExpansions.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(value.MaxExpansions.Value); - } - - if (value.MinimumShouldMatch is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, value.MinimumShouldMatch, options); - } - - if (value.Operator is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, value.Operator, options); - } - - if (value.PrefixLength.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(value.PrefixLength.Value); - } - - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, value.Query, options); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.ZeroTermsQuery is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, value.ZeroTermsQuery, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(MatchQueryConverter))] -public sealed partial class MatchQuery -{ - public MatchQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public string? Analyzer { get; set; } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public bool? AutoGenerateSynonymsPhraseQuery { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public string? FuzzyRewrite { get; set; } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public bool? FuzzyTranspositions { get; set; } - - /// - /// - /// If true, format-based errors, such as providing a text query value for a numeric field, are ignored. - /// - /// - public bool? Lenient { get; set; } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// - /// - public int? MaxExpansions { get; set; } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? Operator { get; set; } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public int? PrefixLength { get; set; } - - /// - /// - /// Text, number, boolean value or date you wish to find in the provided field. - /// - /// - public object Query { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQuery { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MatchQuery matchQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Match(matchQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(MatchQuery matchQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Match(matchQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(MatchQuery matchQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Match(matchQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(MatchQuery matchQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Match(matchQuery); -} - -public sealed partial class MatchQueryDescriptor : SerializableDescriptor> -{ - internal MatchQueryDescriptor(Action> configure) => configure.Invoke(this); - - public MatchQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } - private int? PrefixLengthValue { get; set; } - private object QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MatchQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public MatchQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public MatchQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public MatchQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public MatchQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text query value for a numeric field, are ignored. - /// - /// - public MatchQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// - /// - public MatchQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public MatchQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public MatchQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public MatchQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Text, number, boolean value or date you wish to find in the provided field. - /// - /// - public MatchQueryDescriptor Query(object query) - { - QueryValue = query; - return Self; - } - - public MatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class MatchQueryDescriptor : SerializableDescriptor -{ - internal MatchQueryDescriptor(Action configure) => configure.Invoke(this); - - public MatchQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } - private int? PrefixLengthValue { get; set; } - private object QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MatchQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public MatchQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MatchQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public MatchQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public MatchQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public MatchQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public MatchQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public MatchQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public MatchQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text query value for a numeric field, are ignored. - /// - /// - public MatchQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// - /// - public MatchQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public MatchQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public MatchQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public MatchQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Text, number, boolean value or date you wish to find in the provided field. - /// - /// - public MatchQueryDescriptor Query(object query) - { - QueryValue = query; - return Self; - } - - public MatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs deleted file mode 100644 index 96910cced47..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ /dev/null @@ -1,904 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class MoreLikeThisQuery -{ - /// - /// - /// The analyzer that is used to analyze the free form text. - /// Defaults to the analyzer associated with the first field in fields. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Each term in the formed query could be further boosted by their tf-idf score. - /// This sets the boost factor to use when using this feature. - /// Defaults to deactivated (0). - /// - /// - [JsonInclude, JsonPropertyName("boost_terms")] - public double? BoostTerms { get; set; } - - /// - /// - /// Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (text or keyword). - /// - /// - [JsonInclude, JsonPropertyName("fail_on_unsupported_field")] - public bool? FailOnUnsupportedField { get; set; } - - /// - /// - /// A list of fields to fetch and analyze the text from. - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// Specifies whether the input documents should also be included in the search results returned. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public bool? Include { get; set; } - - /// - /// - /// Specifies free form text and/or a single or multiple documents for which you want to find similar documents. - /// - /// - [JsonInclude, JsonPropertyName("like")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Like))] - public ICollection Like { get; set; } - - /// - /// - /// The maximum document frequency above which the terms are ignored from the input document. - /// - /// - [JsonInclude, JsonPropertyName("max_doc_freq")] - public int? MaxDocFreq { get; set; } - - /// - /// - /// The maximum number of query terms that can be selected. - /// - /// - [JsonInclude, JsonPropertyName("max_query_terms")] - public int? MaxQueryTerms { get; set; } - - /// - /// - /// The maximum word length above which the terms are ignored. - /// Defaults to unbounded (0). - /// - /// - [JsonInclude, JsonPropertyName("max_word_length")] - public int? MaxWordLength { get; set; } - - /// - /// - /// The minimum document frequency below which the terms are ignored from the input document. - /// - /// - [JsonInclude, JsonPropertyName("min_doc_freq")] - public int? MinDocFreq { get; set; } - - /// - /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. - /// - /// - [JsonInclude, JsonPropertyName("minimum_should_match")] - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// The minimum term frequency below which the terms are ignored from the input document. - /// - /// - [JsonInclude, JsonPropertyName("min_term_freq")] - public int? MinTermFreq { get; set; } - - /// - /// - /// The minimum word length below which the terms are ignored. - /// - /// - [JsonInclude, JsonPropertyName("min_word_length")] - public int? MinWordLength { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// An array of stop words. - /// Any word in this set is ignored. - /// - /// - [JsonInclude, JsonPropertyName("stop_words")] - [SingleOrManyCollectionConverter(typeof(string))] - public ICollection? StopWords { get; set; } - - /// - /// - /// Used in combination with like to exclude documents that match a set of terms. - /// - /// - [JsonInclude, JsonPropertyName("unlike")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Like))] - public ICollection? Unlike { get; set; } - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } - [JsonInclude, JsonPropertyName("version_type")] - public Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionType { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MoreLikeThisQuery moreLikeThisQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MoreLikeThis(moreLikeThisQuery); -} - -public sealed partial class MoreLikeThisQueryDescriptor : SerializableDescriptor> -{ - internal MoreLikeThisQueryDescriptor(Action> configure) => configure.Invoke(this); - - public MoreLikeThisQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private double? BoostTermsValue { get; set; } - private bool? FailOnUnsupportedFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private bool? IncludeValue { get; set; } - private ICollection LikeValue { get; set; } - private int? MaxDocFreqValue { get; set; } - private int? MaxQueryTermsValue { get; set; } - private int? MaxWordLengthValue { get; set; } - private int? MinDocFreqValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private int? MinTermFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private ICollection? StopWordsValue { get; set; } - private ICollection? UnlikeValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// The analyzer that is used to analyze the free form text. - /// Defaults to the analyzer associated with the first field in fields. - /// - /// - public MoreLikeThisQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MoreLikeThisQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Each term in the formed query could be further boosted by their tf-idf score. - /// This sets the boost factor to use when using this feature. - /// Defaults to deactivated (0). - /// - /// - public MoreLikeThisQueryDescriptor BoostTerms(double? boostTerms) - { - BoostTermsValue = boostTerms; - return Self; - } - - /// - /// - /// Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (text or keyword). - /// - /// - public MoreLikeThisQueryDescriptor FailOnUnsupportedField(bool? failOnUnsupportedField = true) - { - FailOnUnsupportedFieldValue = failOnUnsupportedField; - return Self; - } - - /// - /// - /// A list of fields to fetch and analyze the text from. - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public MoreLikeThisQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Specifies whether the input documents should also be included in the search results returned. - /// - /// - public MoreLikeThisQueryDescriptor Include(bool? include = true) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Specifies free form text and/or a single or multiple documents for which you want to find similar documents. - /// - /// - public MoreLikeThisQueryDescriptor Like(ICollection like) - { - LikeValue = like; - return Self; - } - - /// - /// - /// The maximum document frequency above which the terms are ignored from the input document. - /// - /// - public MoreLikeThisQueryDescriptor MaxDocFreq(int? maxDocFreq) - { - MaxDocFreqValue = maxDocFreq; - return Self; - } - - /// - /// - /// The maximum number of query terms that can be selected. - /// - /// - public MoreLikeThisQueryDescriptor MaxQueryTerms(int? maxQueryTerms) - { - MaxQueryTermsValue = maxQueryTerms; - return Self; - } - - /// - /// - /// The maximum word length above which the terms are ignored. - /// Defaults to unbounded (0). - /// - /// - public MoreLikeThisQueryDescriptor MaxWordLength(int? maxWordLength) - { - MaxWordLengthValue = maxWordLength; - return Self; - } - - /// - /// - /// The minimum document frequency below which the terms are ignored from the input document. - /// - /// - public MoreLikeThisQueryDescriptor MinDocFreq(int? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. - /// - /// - public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// The minimum term frequency below which the terms are ignored from the input document. - /// - /// - public MoreLikeThisQueryDescriptor MinTermFreq(int? minTermFreq) - { - MinTermFreqValue = minTermFreq; - return Self; - } - - /// - /// - /// The minimum word length below which the terms are ignored. - /// - /// - public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - public MoreLikeThisQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public MoreLikeThisQueryDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// An array of stop words. - /// Any word in this set is ignored. - /// - /// - public MoreLikeThisQueryDescriptor StopWords(ICollection? stopWords) - { - StopWordsValue = stopWords; - return Self; - } - - /// - /// - /// Used in combination with like to exclude documents that match a set of terms. - /// - /// - public MoreLikeThisQueryDescriptor Unlike(ICollection? unlike) - { - UnlikeValue = unlike; - return Self; - } - - public MoreLikeThisQueryDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - public MoreLikeThisQueryDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostTermsValue.HasValue) - { - writer.WritePropertyName("boost_terms"); - writer.WriteNumberValue(BoostTermsValue.Value); - } - - if (FailOnUnsupportedFieldValue.HasValue) - { - writer.WritePropertyName("fail_on_unsupported_field"); - writer.WriteBooleanValue(FailOnUnsupportedFieldValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IncludeValue.HasValue) - { - writer.WritePropertyName("include"); - writer.WriteBooleanValue(IncludeValue.Value); - } - - writer.WritePropertyName("like"); - SingleOrManySerializationHelper.Serialize(LikeValue, writer, options); - if (MaxDocFreqValue.HasValue) - { - writer.WritePropertyName("max_doc_freq"); - writer.WriteNumberValue(MaxDocFreqValue.Value); - } - - if (MaxQueryTermsValue.HasValue) - { - writer.WritePropertyName("max_query_terms"); - writer.WriteNumberValue(MaxQueryTermsValue.Value); - } - - if (MaxWordLengthValue.HasValue) - { - writer.WritePropertyName("max_word_length"); - writer.WriteNumberValue(MaxWordLengthValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (MinTermFreqValue.HasValue) - { - writer.WritePropertyName("min_term_freq"); - writer.WriteNumberValue(MinTermFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (StopWordsValue is not null) - { - writer.WritePropertyName("stop_words"); - SingleOrManySerializationHelper.Serialize(StopWordsValue, writer, options); - } - - if (UnlikeValue is not null) - { - writer.WritePropertyName("unlike"); - SingleOrManySerializationHelper.Serialize(UnlikeValue, writer, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MoreLikeThisQueryDescriptor : SerializableDescriptor -{ - internal MoreLikeThisQueryDescriptor(Action configure) => configure.Invoke(this); - - public MoreLikeThisQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private float? BoostValue { get; set; } - private double? BoostTermsValue { get; set; } - private bool? FailOnUnsupportedFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private bool? IncludeValue { get; set; } - private ICollection LikeValue { get; set; } - private int? MaxDocFreqValue { get; set; } - private int? MaxQueryTermsValue { get; set; } - private int? MaxWordLengthValue { get; set; } - private int? MinDocFreqValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private int? MinTermFreqValue { get; set; } - private int? MinWordLengthValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private ICollection? StopWordsValue { get; set; } - private ICollection? UnlikeValue { get; set; } - private long? VersionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.VersionType? VersionTypeValue { get; set; } - - /// - /// - /// The analyzer that is used to analyze the free form text. - /// Defaults to the analyzer associated with the first field in fields. - /// - /// - public MoreLikeThisQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MoreLikeThisQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Each term in the formed query could be further boosted by their tf-idf score. - /// This sets the boost factor to use when using this feature. - /// Defaults to deactivated (0). - /// - /// - public MoreLikeThisQueryDescriptor BoostTerms(double? boostTerms) - { - BoostTermsValue = boostTerms; - return Self; - } - - /// - /// - /// Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (text or keyword). - /// - /// - public MoreLikeThisQueryDescriptor FailOnUnsupportedField(bool? failOnUnsupportedField = true) - { - FailOnUnsupportedFieldValue = failOnUnsupportedField; - return Self; - } - - /// - /// - /// A list of fields to fetch and analyze the text from. - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public MoreLikeThisQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Specifies whether the input documents should also be included in the search results returned. - /// - /// - public MoreLikeThisQueryDescriptor Include(bool? include = true) - { - IncludeValue = include; - return Self; - } - - /// - /// - /// Specifies free form text and/or a single or multiple documents for which you want to find similar documents. - /// - /// - public MoreLikeThisQueryDescriptor Like(ICollection like) - { - LikeValue = like; - return Self; - } - - /// - /// - /// The maximum document frequency above which the terms are ignored from the input document. - /// - /// - public MoreLikeThisQueryDescriptor MaxDocFreq(int? maxDocFreq) - { - MaxDocFreqValue = maxDocFreq; - return Self; - } - - /// - /// - /// The maximum number of query terms that can be selected. - /// - /// - public MoreLikeThisQueryDescriptor MaxQueryTerms(int? maxQueryTerms) - { - MaxQueryTermsValue = maxQueryTerms; - return Self; - } - - /// - /// - /// The maximum word length above which the terms are ignored. - /// Defaults to unbounded (0). - /// - /// - public MoreLikeThisQueryDescriptor MaxWordLength(int? maxWordLength) - { - MaxWordLengthValue = maxWordLength; - return Self; - } - - /// - /// - /// The minimum document frequency below which the terms are ignored from the input document. - /// - /// - public MoreLikeThisQueryDescriptor MinDocFreq(int? minDocFreq) - { - MinDocFreqValue = minDocFreq; - return Self; - } - - /// - /// - /// After the disjunctive query has been formed, this parameter controls the number of terms that must match. - /// - /// - public MoreLikeThisQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// The minimum term frequency below which the terms are ignored from the input document. - /// - /// - public MoreLikeThisQueryDescriptor MinTermFreq(int? minTermFreq) - { - MinTermFreqValue = minTermFreq; - return Self; - } - - /// - /// - /// The minimum word length below which the terms are ignored. - /// - /// - public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) - { - MinWordLengthValue = minWordLength; - return Self; - } - - public MoreLikeThisQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public MoreLikeThisQueryDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// An array of stop words. - /// Any word in this set is ignored. - /// - /// - public MoreLikeThisQueryDescriptor StopWords(ICollection? stopWords) - { - StopWordsValue = stopWords; - return Self; - } - - /// - /// - /// Used in combination with like to exclude documents that match a set of terms. - /// - /// - public MoreLikeThisQueryDescriptor Unlike(ICollection? unlike) - { - UnlikeValue = unlike; - return Self; - } - - public MoreLikeThisQueryDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - public MoreLikeThisQueryDescriptor VersionType(Elastic.Clients.Elasticsearch.Serverless.VersionType? versionType) - { - VersionTypeValue = versionType; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (BoostTermsValue.HasValue) - { - writer.WritePropertyName("boost_terms"); - writer.WriteNumberValue(BoostTermsValue.Value); - } - - if (FailOnUnsupportedFieldValue.HasValue) - { - writer.WritePropertyName("fail_on_unsupported_field"); - writer.WriteBooleanValue(FailOnUnsupportedFieldValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IncludeValue.HasValue) - { - writer.WritePropertyName("include"); - writer.WriteBooleanValue(IncludeValue.Value); - } - - writer.WritePropertyName("like"); - SingleOrManySerializationHelper.Serialize(LikeValue, writer, options); - if (MaxDocFreqValue.HasValue) - { - writer.WritePropertyName("max_doc_freq"); - writer.WriteNumberValue(MaxDocFreqValue.Value); - } - - if (MaxQueryTermsValue.HasValue) - { - writer.WritePropertyName("max_query_terms"); - writer.WriteNumberValue(MaxQueryTermsValue.Value); - } - - if (MaxWordLengthValue.HasValue) - { - writer.WritePropertyName("max_word_length"); - writer.WriteNumberValue(MaxWordLengthValue.Value); - } - - if (MinDocFreqValue.HasValue) - { - writer.WritePropertyName("min_doc_freq"); - writer.WriteNumberValue(MinDocFreqValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (MinTermFreqValue.HasValue) - { - writer.WritePropertyName("min_term_freq"); - writer.WriteNumberValue(MinTermFreqValue.Value); - } - - if (MinWordLengthValue.HasValue) - { - writer.WritePropertyName("min_word_length"); - writer.WriteNumberValue(MinWordLengthValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (StopWordsValue is not null) - { - writer.WritePropertyName("stop_words"); - SingleOrManySerializationHelper.Serialize(StopWordsValue, writer, options); - } - - if (UnlikeValue is not null) - { - writer.WritePropertyName("unlike"); - SingleOrManySerializationHelper.Serialize(UnlikeValue, writer, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - if (VersionTypeValue is not null) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, VersionTypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs deleted file mode 100644 index 46c3e3aab35..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs +++ /dev/null @@ -1,849 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class MultiMatchQuery -{ - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - [JsonInclude, JsonPropertyName("auto_generate_synonyms_phrase_query")] - public bool? AutoGenerateSynonymsPhraseQuery { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The fields to be queried. - /// Defaults to the index.query.default_field index settings, which in turn defaults to *. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzziness")] - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_rewrite")] - public string? FuzzyRewrite { get; set; } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_transpositions")] - public bool? FuzzyTranspositions { get; set; } - - /// - /// - /// If true, format-based errors, such as providing a text query value for a numeric field, are ignored. - /// - /// - [JsonInclude, JsonPropertyName("lenient")] - public bool? Lenient { get; set; } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// - /// - [JsonInclude, JsonPropertyName("max_expansions")] - public int? MaxExpansions { get; set; } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - [JsonInclude, JsonPropertyName("minimum_should_match")] - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - [JsonInclude, JsonPropertyName("operator")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? Operator { get; set; } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - [JsonInclude, JsonPropertyName("prefix_length")] - public int? PrefixLength { get; set; } - - /// - /// - /// Text, number, boolean value or date you wish to find in the provided field. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - [JsonInclude, JsonPropertyName("slop")] - public int? Slop { get; set; } - - /// - /// - /// Determines how scores for each per-term blended query and scores across groups are combined. - /// - /// - [JsonInclude, JsonPropertyName("tie_breaker")] - public double? TieBreaker { get; set; } - - /// - /// - /// How the multi_match query is executed internally. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? Type { get; set; } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - [JsonInclude, JsonPropertyName("zero_terms_query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQuery { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(MultiMatchQuery multiMatchQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.MultiMatch(multiMatchQuery); -} - -public sealed partial class MultiMatchQueryDescriptor : SerializableDescriptor> -{ - internal MultiMatchQueryDescriptor(Action> configure) => configure.Invoke(this); - - public MultiMatchQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - private double? TieBreakerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MultiMatchQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public MultiMatchQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MultiMatchQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The fields to be queried. - /// Defaults to the index.query.default_field index settings, which in turn defaults to *. - /// - /// - public MultiMatchQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public MultiMatchQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public MultiMatchQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MultiMatchQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text query value for a numeric field, are ignored. - /// - /// - public MultiMatchQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// - /// - public MultiMatchQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public MultiMatchQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public MultiMatchQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public MultiMatchQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Text, number, boolean value or date you wish to find in the provided field. - /// - /// - public MultiMatchQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MultiMatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public MultiMatchQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - /// - /// - /// Determines how scores for each per-term blended query and scores across groups are combined. - /// - /// - public MultiMatchQueryDescriptor TieBreaker(double? tieBreaker) - { - TieBreakerValue = tieBreaker; - return Self; - } - - /// - /// - /// How the multi_match query is executed internally. - /// - /// - public MultiMatchQueryDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? type) - { - TypeValue = type; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MultiMatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - if (TieBreakerValue.HasValue) - { - writer.WritePropertyName("tie_breaker"); - writer.WriteNumberValue(TieBreakerValue.Value); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class MultiMatchQueryDescriptor : SerializableDescriptor -{ - internal MultiMatchQueryDescriptor(Action configure) => configure.Invoke(this); - - public MultiMatchQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private int? MaxExpansionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? OperatorValue { get; set; } - private int? PrefixLengthValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - private double? TieBreakerValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? ZeroTermsQueryValue { get; set; } - - /// - /// - /// Analyzer used to convert the text in the query value into tokens. - /// - /// - public MultiMatchQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public MultiMatchQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public MultiMatchQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The fields to be queried. - /// Defaults to the index.query.default_field index settings, which in turn defaults to *. - /// - /// - public MultiMatchQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for matching. - /// - /// - public MultiMatchQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public MultiMatchQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// Can be applied to the term subqueries constructed for all terms but the final term. - /// - /// - public MultiMatchQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text query value for a numeric field, are ignored. - /// - /// - public MultiMatchQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query will expand. - /// - /// - public MultiMatchQueryDescriptor MaxExpansions(int? maxExpansions) - { - MaxExpansionsValue = maxExpansions; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public MultiMatchQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Boolean logic used to interpret text in the query value. - /// - /// - public MultiMatchQueryDescriptor Operator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? value) - { - OperatorValue = value; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public MultiMatchQueryDescriptor PrefixLength(int? prefixLength) - { - PrefixLengthValue = prefixLength; - return Self; - } - - /// - /// - /// Text, number, boolean value or date you wish to find in the provided field. - /// - /// - public MultiMatchQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public MultiMatchQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens. - /// - /// - public MultiMatchQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - /// - /// - /// Determines how scores for each per-term blended query and scores across groups are combined. - /// - /// - public MultiMatchQueryDescriptor TieBreaker(double? tieBreaker) - { - TieBreakerValue = tieBreaker; - return Self; - } - - /// - /// - /// How the multi_match query is executed internally. - /// - /// - public MultiMatchQueryDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? type) - { - TypeValue = type; - return Self; - } - - /// - /// - /// Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter. - /// - /// - public MultiMatchQueryDescriptor ZeroTermsQuery(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ZeroTermsQuery? zeroTermsQuery) - { - ZeroTermsQueryValue = zeroTermsQuery; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MaxExpansionsValue.HasValue) - { - writer.WritePropertyName("max_expansions"); - writer.WriteNumberValue(MaxExpansionsValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (OperatorValue is not null) - { - writer.WritePropertyName("operator"); - JsonSerializer.Serialize(writer, OperatorValue, options); - } - - if (PrefixLengthValue.HasValue) - { - writer.WritePropertyName("prefix_length"); - writer.WriteNumberValue(PrefixLengthValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - if (TieBreakerValue.HasValue) - { - writer.WritePropertyName("tie_breaker"); - writer.WriteNumberValue(TieBreakerValue.Value); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - if (ZeroTermsQueryValue is not null) - { - writer.WritePropertyName("zero_terms_query"); - JsonSerializer.Serialize(writer, ZeroTermsQueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs deleted file mode 100644 index 48e9726c723..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NestedQuery.g.cs +++ /dev/null @@ -1,522 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class NestedQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unmapped")] - public bool? IgnoreUnmapped { get; set; } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - [JsonInclude, JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHits { get; set; } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field Path { get; set; } - - /// - /// - /// Query you wish to run on nested objects in the path. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// How scores for matching child objects affect the root parent document’s relevance score. - /// - /// - [JsonInclude, JsonPropertyName("score_mode")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreMode { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(NestedQuery nestedQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Nested(nestedQuery); -} - -public sealed partial class NestedQueryDescriptor : SerializableDescriptor> -{ - internal NestedQueryDescriptor(Action> configure) => configure.Invoke(this); - - public NestedQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public NestedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - /// - public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public NestedQueryDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Query you wish to run on nested objects in the path. - /// - /// - public NestedQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public NestedQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public NestedQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public NestedQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// How scores for matching child objects affect the root parent document’s relevance score. - /// - /// - public NestedQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class NestedQueryDescriptor : SerializableDescriptor -{ - internal NestedQueryDescriptor(Action configure) => configure.Invoke(this); - - public NestedQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public NestedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped path and not return any documents instead of an error. - /// - /// - public NestedQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - /// - /// - /// If defined, each search hit will contain inner hits. - /// - /// - public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public NestedQueryDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - public NestedQueryDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Path to the nested object you wish to search. - /// - /// - public NestedQueryDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - /// - /// - /// Query you wish to run on nested objects in the path. - /// - /// - public NestedQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public NestedQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public NestedQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public NestedQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// How scores for matching child objects affect the root parent document’s relevance score. - /// - /// - public NestedQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ChildScoreMode? scoreMode) - { - ScoreModeValue = scoreMode; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (InnerHitsDescriptor is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); - } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); - } - - writer.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScoreModeValue is not null) - { - writer.WritePropertyName("score_mode"); - JsonSerializer.Serialize(writer, ScoreModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs deleted file mode 100644 index 66640e3d2f5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs +++ /dev/null @@ -1,533 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class NumberRangeQueryConverter : JsonConverter -{ - public override NumberRangeQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new NumberRangeQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gt") - { - variant.Gt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gte") - { - variant.Gte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lt") - { - variant.Lt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lte") - { - variant.Lte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "relation") - { - variant.Relation = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, NumberRangeQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize NumberRangeQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.Gt.HasValue) - { - writer.WritePropertyName("gt"); - writer.WriteNumberValue(value.Gt.Value); - } - - if (value.Gte.HasValue) - { - writer.WritePropertyName("gte"); - writer.WriteNumberValue(value.Gte.Value); - } - - if (value.Lt.HasValue) - { - writer.WritePropertyName("lt"); - writer.WriteNumberValue(value.Lt.Value); - } - - if (value.Lte.HasValue) - { - writer.WritePropertyName("lte"); - writer.WriteNumberValue(value.Lte.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Relation is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, value.Relation, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(NumberRangeQueryConverter))] -public sealed partial class NumberRangeQuery -{ - public NumberRangeQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Greater than. - /// - /// - public double? Gt { get; set; } - - /// - /// - /// Greater than or equal to. - /// - /// - public double? Gte { get; set; } - - /// - /// - /// Less than. - /// - /// - public double? Lt { get; set; } - - /// - /// - /// Less than or equal to. - /// - /// - public double? Lte { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? Relation { get; set; } -} - -public sealed partial class NumberRangeQueryDescriptor : SerializableDescriptor> -{ - internal NumberRangeQueryDescriptor(Action> configure) => configure.Invoke(this); - - public NumberRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private double? GtValue { get; set; } - private double? GteValue { get; set; } - private double? LtValue { get; set; } - private double? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public NumberRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public NumberRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public NumberRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public NumberRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public NumberRangeQueryDescriptor Gt(double? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public NumberRangeQueryDescriptor Gte(double? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public NumberRangeQueryDescriptor Lt(double? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public NumberRangeQueryDescriptor Lte(double? lte) - { - LteValue = lte; - return Self; - } - - public NumberRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public NumberRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (GtValue.HasValue) - { - writer.WritePropertyName("gt"); - writer.WriteNumberValue(GtValue.Value); - } - - if (GteValue.HasValue) - { - writer.WritePropertyName("gte"); - writer.WriteNumberValue(GteValue.Value); - } - - if (LtValue.HasValue) - { - writer.WritePropertyName("lt"); - writer.WriteNumberValue(LtValue.Value); - } - - if (LteValue.HasValue) - { - writer.WritePropertyName("lte"); - writer.WriteNumberValue(LteValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class NumberRangeQueryDescriptor : SerializableDescriptor -{ - internal NumberRangeQueryDescriptor(Action configure) => configure.Invoke(this); - - public NumberRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private double? GtValue { get; set; } - private double? GteValue { get; set; } - private double? LtValue { get; set; } - private double? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public NumberRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public NumberRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public NumberRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public NumberRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public NumberRangeQueryDescriptor Gt(double? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public NumberRangeQueryDescriptor Gte(double? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public NumberRangeQueryDescriptor Lt(double? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public NumberRangeQueryDescriptor Lte(double? lte) - { - LteValue = lte; - return Self; - } - - public NumberRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public NumberRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (GtValue.HasValue) - { - writer.WritePropertyName("gt"); - writer.WriteNumberValue(GtValue.Value); - } - - if (GteValue.HasValue) - { - writer.WritePropertyName("gte"); - writer.WriteNumberValue(GteValue.Value); - } - - if (LtValue.HasValue) - { - writer.WritePropertyName("lt"); - writer.WriteNumberValue(LtValue.Value); - } - - if (LteValue.HasValue) - { - writer.WritePropertyName("lte"); - writer.WriteNumberValue(LteValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs deleted file mode 100644 index c8fb77dbb14..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs +++ /dev/null @@ -1,228 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class NumericDecayFunctionConverter : JsonConverter -{ - public override NumericDecayFunction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new NumericDecayFunction(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "multi_value_mode") - { - variant.MultiValueMode = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Placement = JsonSerializer.Deserialize>(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, NumericDecayFunction value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Placement is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Placement, options); - } - - if (value.MultiValueMode is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, value.MultiValueMode, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(NumericDecayFunctionConverter))] -public sealed partial class NumericDecayFunction -{ - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueMode { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement Placement { get; set; } -} - -public sealed partial class NumericDecayFunctionDescriptor : SerializableDescriptor> -{ - internal NumericDecayFunctionDescriptor(Action> configure) => configure.Invoke(this); - - public NumericDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public NumericDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public NumericDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public NumericDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public NumericDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public NumericDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class NumericDecayFunctionDescriptor : SerializableDescriptor -{ - internal NumericDecayFunctionDescriptor(Action configure) => configure.Invoke(this); - - public NumericDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public NumericDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public NumericDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public NumericDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public NumericDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public NumericDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs deleted file mode 100644 index 23f1dd60129..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ParentIdQuery.g.cs +++ /dev/null @@ -1,174 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ParentIdQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// ID of the parent document. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Indicates whether to ignore an unmapped type and not return any documents instead of an error. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unmapped")] - public bool? IgnoreUnmapped { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Name of the child relationship mapped for the join field. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public string? Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(ParentIdQuery parentIdQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.ParentId(parentIdQuery); -} - -public sealed partial class ParentIdQueryDescriptor : SerializableDescriptor -{ - internal ParentIdQueryDescriptor(Action configure) => configure.Invoke(this); - - public ParentIdQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private string? TypeValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ParentIdQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// ID of the parent document. - /// - /// - public ParentIdQueryDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Indicates whether to ignore an unmapped type and not return any documents instead of an error. - /// - /// - public ParentIdQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public ParentIdQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Name of the child relationship mapped for the join field. - /// - /// - public ParentIdQueryDescriptor Type(string? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(TypeValue)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(TypeValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs deleted file mode 100644 index 67ad113daa1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PercolateQuery.g.cs +++ /dev/null @@ -1,578 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class PercolateQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The source of the document being percolated. - /// - /// - [JsonInclude, JsonPropertyName("document")] - public object? Document { get; set; } - - /// - /// - /// An array of sources of the documents being percolated. - /// - /// - [JsonInclude, JsonPropertyName("documents")] - public ICollection? Documents { get; set; } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The ID of a stored document to percolate. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// The index of a stored document to percolate. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// The suffix used for the _percolator_document_slot field when multiple percolate queries are specified. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// Preference used to fetch document to percolate. - /// - /// - [JsonInclude, JsonPropertyName("preference")] - public string? Preference { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Routing used to fetch document to percolate. - /// - /// - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } - - /// - /// - /// The expected version of a stored document to percolate. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(PercolateQuery percolateQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Percolate(percolateQuery); -} - -public sealed partial class PercolateQueryDescriptor : SerializableDescriptor> -{ - internal PercolateQueryDescriptor(Action> configure) => configure.Invoke(this); - - public PercolateQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private object? DocumentValue { get; set; } - private ICollection? DocumentsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private string? NameValue { get; set; } - private string? PreferenceValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public PercolateQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The source of the document being percolated. - /// - /// - public PercolateQueryDescriptor Document(object? document) - { - DocumentValue = document; - return Self; - } - - /// - /// - /// An array of sources of the documents being percolated. - /// - /// - public PercolateQueryDescriptor Documents(ICollection? documents) - { - DocumentsValue = documents; - return Self; - } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - public PercolateQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - public PercolateQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - public PercolateQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The ID of a stored document to percolate. - /// - /// - public PercolateQueryDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index of a stored document to percolate. - /// - /// - public PercolateQueryDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// The suffix used for the _percolator_document_slot field when multiple percolate queries are specified. - /// - /// - public PercolateQueryDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Preference used to fetch document to percolate. - /// - /// - public PercolateQueryDescriptor Preference(string? preference) - { - PreferenceValue = preference; - return Self; - } - - public PercolateQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Routing used to fetch document to percolate. - /// - /// - public PercolateQueryDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// The expected version of a stored document to percolate. - /// - /// - public PercolateQueryDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DocumentValue is not null) - { - writer.WritePropertyName("document"); - JsonSerializer.Serialize(writer, DocumentValue, options); - } - - if (DocumentsValue is not null) - { - writer.WritePropertyName("documents"); - JsonSerializer.Serialize(writer, DocumentsValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - - if (!string.IsNullOrEmpty(PreferenceValue)) - { - writer.WritePropertyName("preference"); - writer.WriteStringValue(PreferenceValue); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PercolateQueryDescriptor : SerializableDescriptor -{ - internal PercolateQueryDescriptor(Action configure) => configure.Invoke(this); - - public PercolateQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private object? DocumentValue { get; set; } - private ICollection? DocumentsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private string? NameValue { get; set; } - private string? PreferenceValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - private long? VersionValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public PercolateQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The source of the document being percolated. - /// - /// - public PercolateQueryDescriptor Document(object? document) - { - DocumentValue = document; - return Self; - } - - /// - /// - /// An array of sources of the documents being percolated. - /// - /// - public PercolateQueryDescriptor Documents(ICollection? documents) - { - DocumentsValue = documents; - return Self; - } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - public PercolateQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - public PercolateQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Field that holds the indexed queries. The field must use the percolator mapping type. - /// - /// - public PercolateQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The ID of a stored document to percolate. - /// - /// - public PercolateQueryDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index of a stored document to percolate. - /// - /// - public PercolateQueryDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// The suffix used for the _percolator_document_slot field when multiple percolate queries are specified. - /// - /// - public PercolateQueryDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - - /// - /// - /// Preference used to fetch document to percolate. - /// - /// - public PercolateQueryDescriptor Preference(string? preference) - { - PreferenceValue = preference; - return Self; - } - - public PercolateQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Routing used to fetch document to percolate. - /// - /// - public PercolateQueryDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - return Self; - } - - /// - /// - /// The expected version of a stored document to percolate. - /// - /// - public PercolateQueryDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DocumentValue is not null) - { - writer.WritePropertyName("document"); - JsonSerializer.Serialize(writer, DocumentValue, options); - } - - if (DocumentsValue is not null) - { - writer.WritePropertyName("documents"); - JsonSerializer.Serialize(writer, DocumentsValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - - if (!string.IsNullOrEmpty(PreferenceValue)) - { - writer.WritePropertyName("preference"); - writer.WriteStringValue(PreferenceValue); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedDoc.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedDoc.g.cs deleted file mode 100644 index 3dfb68e3765..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedDoc.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class PinnedDoc -{ - /// - /// - /// The unique document ID. - /// - /// - [JsonInclude, JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - - /// - /// - /// The index that contains the document. - /// - /// - [JsonInclude, JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } -} - -public sealed partial class PinnedDocDescriptor : SerializableDescriptor -{ - internal PinnedDocDescriptor(Action configure) => configure.Invoke(this); - - public PinnedDocDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - - /// - /// - /// The unique document ID. - /// - /// - public PinnedDocDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - /// - /// - /// The index that contains the document. - /// - /// - public PinnedDocDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.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.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs deleted file mode 100644 index 3cee9827032..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PinnedQuery.g.cs +++ /dev/null @@ -1,409 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(PinnedQueryConverter))] -public sealed partial class PinnedQuery -{ - 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(IReadOnlyCollection pinnedDoc) => new PinnedQuery("docs", pinnedDoc); - public static PinnedQuery Ids(IReadOnlyCollection id) => new PinnedQuery("ids", id); - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. - /// - /// - [JsonInclude, JsonPropertyName("organic")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Organic { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial 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; - float? boostValue = default; - Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organicValue = default; - string? queryNameValue = 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 == "boost") - { - boostValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "organic") - { - organicValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "_name") - { - queryNameValue = 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."); - } - - var result = new PinnedQuery(variantNameValue, variantValue); - result.Boost = boostValue; - result.Organic = organicValue; - result.QueryName = queryNameValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, PinnedQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.Organic is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, value.Organic, options); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "docs": - JsonSerializer.Serialize>(writer, (IReadOnlyCollection)value.Variant, options); - break; - case "ids": - JsonSerializer.Serialize>(writer, (IReadOnlyCollection)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PinnedQueryDescriptor : SerializableDescriptor> -{ - 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 PinnedQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private PinnedQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. - /// - /// - public PinnedQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organic) - { - OrganicValue = organic; - return Self; - } - - public PinnedQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public PinnedQueryDescriptor Docs(IReadOnlyCollection pinnedDoc) => Set(pinnedDoc, "docs"); - public PinnedQueryDescriptor Docs(Action configure) => Set(configure, "docs"); - public PinnedQueryDescriptor Ids(IReadOnlyCollection id) => Set(id, "ids"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (OrganicValue is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PinnedQueryDescriptor : SerializableDescriptor -{ - 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 PinnedQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private PinnedQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Any choice of query used to rank documents which will be ranked below the "pinned" documents. - /// - /// - public PinnedQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organic) - { - OrganicValue = organic; - return Self; - } - - public PinnedQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public PinnedQueryDescriptor Docs(IReadOnlyCollection pinnedDoc) => Set(pinnedDoc, "docs"); - public PinnedQueryDescriptor Docs(Action configure) => Set(configure, "docs"); - public PinnedQueryDescriptor Ids(IReadOnlyCollection id) => Set(id, "ids"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (OrganicValue is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs deleted file mode 100644 index f808632a013..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/PrefixQuery.g.cs +++ /dev/null @@ -1,419 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class PrefixQueryConverter : JsonConverter -{ - public override PrefixQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new PrefixQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "case_insensitive") - { - variant.CaseInsensitive = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rewrite") - { - variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "value") - { - variant.Value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, PrefixQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize PrefixQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.CaseInsensitive.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(value.CaseInsensitive.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (!string.IsNullOrEmpty(value.Rewrite)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(value.Rewrite); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(value.Value); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(PrefixQueryConverter))] -public sealed partial class PrefixQuery -{ - public PrefixQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - - /// - /// - /// Allows ASCII case insensitive matching of the value with the indexed field values when set to true. - /// Default is false which means the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public bool? CaseInsensitive { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public string? Rewrite { get; set; } - - /// - /// - /// Beginning characters of terms you wish to find in the provided field. - /// - /// - public string Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(PrefixQuery prefixQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Prefix(prefixQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(PrefixQuery prefixQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Prefix(prefixQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(PrefixQuery prefixQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Prefix(prefixQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(PrefixQuery prefixQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Prefix(prefixQuery); -} - -public sealed partial class PrefixQueryDescriptor : SerializableDescriptor> -{ - internal PrefixQueryDescriptor(Action> configure) => configure.Invoke(this); - - public PrefixQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private string ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public PrefixQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows ASCII case insensitive matching of the value with the indexed field values when set to true. - /// Default is false which means the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public PrefixQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public PrefixQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public PrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public PrefixQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Beginning characters of terms you wish to find in the provided field. - /// - /// - public PrefixQueryDescriptor Value(string value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class PrefixQueryDescriptor : SerializableDescriptor -{ - internal PrefixQueryDescriptor(Action configure) => configure.Invoke(this); - - public PrefixQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private string ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public PrefixQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows ASCII case insensitive matching of the value with the indexed field values when set to true. - /// Default is false which means the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public PrefixQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public PrefixQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public PrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PrefixQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public PrefixQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public PrefixQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Beginning characters of terms you wish to find in the provided field. - /// - /// - public PrefixQueryDescriptor Value(string value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Query.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Query.g.cs deleted file mode 100644 index a4fda513598..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/Query.g.cs +++ /dev/null @@ -1,1061 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(QueryConverter))] -public sealed partial class Query -{ - internal Query(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 Query Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => new Query("bool", boolQuery); - public static Query Boosting(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoostingQuery boostingQuery) => new Query("boosting", boostingQuery); - public static Query CombinedFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsQuery combinedFieldsQuery) => new Query("combined_fields", combinedFieldsQuery); - public static Query ConstantScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ConstantScoreQuery constantScoreQuery) => new Query("constant_score", constantScoreQuery); - public static Query DisMax(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DisMaxQuery disMaxQuery) => new Query("dis_max", disMaxQuery); - public static Query DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDistanceFeatureQuery distanceFeatureQuery) => new Query("distance_feature", distanceFeatureQuery); - public static Query DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceFeatureQuery distanceFeatureQuery) => new Query("distance_feature", distanceFeatureQuery); - public static Query DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDistanceFeatureQuery distanceFeatureQuery) => new Query("distance_feature", distanceFeatureQuery); - public static Query Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => new Query("exists", existsQuery); - public static Query FunctionScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreQuery functionScoreQuery) => new Query("function_score", functionScoreQuery); - public static Query Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FuzzyQuery fuzzyQuery) => new Query("fuzzy", fuzzyQuery); - public static Query GeoBoundingBox(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoBoundingBoxQuery geoBoundingBoxQuery) => new Query("geo_bounding_box", geoBoundingBoxQuery); - public static Query GeoDistance(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceQuery geoDistanceQuery) => new Query("geo_distance", geoDistanceQuery); - public static Query GeoShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeQuery geoShapeQuery) => new Query("geo_shape", geoShapeQuery); - public static Query HasChild(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasChildQuery hasChildQuery) => new Query("has_child", hasChildQuery); - public static Query HasParent(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasParentQuery hasParentQuery) => new Query("has_parent", hasParentQuery); - public static Query Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => new Query("ids", idsQuery); - public static Query Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery intervalsQuery) => new Query("intervals", intervalsQuery); - public static Query Knn(Elastic.Clients.Elasticsearch.Serverless.KnnQuery knnQuery) => new Query("knn", knnQuery); - public static Query Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => new Query("match", matchQuery); - public static Query MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => new Query("match_all", matchAllQuery); - public static Query MatchBoolPrefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchBoolPrefixQuery matchBoolPrefixQuery) => new Query("match_bool_prefix", matchBoolPrefixQuery); - public static Query MatchNone(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchNoneQuery matchNoneQuery) => new Query("match_none", matchNoneQuery); - public static Query MatchPhrase(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhraseQuery matchPhraseQuery) => new Query("match_phrase", matchPhraseQuery); - public static Query MatchPhrasePrefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhrasePrefixQuery matchPhrasePrefixQuery) => new Query("match_phrase_prefix", matchPhrasePrefixQuery); - public static Query MoreLikeThis(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MoreLikeThisQuery moreLikeThisQuery) => new Query("more_like_this", moreLikeThisQuery); - public static Query MultiMatch(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiMatchQuery multiMatchQuery) => new Query("multi_match", multiMatchQuery); - public static Query Nested(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NestedQuery nestedQuery) => new Query("nested", nestedQuery); - public static Query ParentId(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ParentIdQuery parentIdQuery) => new Query("parent_id", parentIdQuery); - public static Query Percolate(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PercolateQuery percolateQuery) => new Query("percolate", percolateQuery); - public static Query Pinned(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedQuery pinnedQuery) => new Query("pinned", pinnedQuery); - public static Query Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => new Query("prefix", prefixQuery); - public static Query QueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryStringQuery queryStringQuery) => new Query("query_string", queryStringQuery); - public static Query Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => new Query("range", rangeQuery); - public static Query Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => new Query("range", rangeQuery); - public static Query Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => new Query("range", rangeQuery); - public static Query Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => new Query("range", rangeQuery); - public static Query RankFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureQuery rankFeatureQuery) => new Query("rank_feature", rankFeatureQuery); - public static Query RawJson(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RawJsonQuery rawJsonQuery) => new Query("raw_json", rawJsonQuery); - public static Query Regexp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RegexpQuery regexpQuery) => new Query("regexp", regexpQuery); - public static Query Rule(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RuleQuery ruleQuery) => new Query("rule", ruleQuery); - public static Query Script(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptQuery scriptQuery) => new Query("script", scriptQuery); - public static Query ScriptScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreQuery scriptScoreQuery) => new Query("script_score", scriptScoreQuery); - public static Query Semantic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SemanticQuery semanticQuery) => new Query("semantic", semanticQuery); - public static Query Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeQuery shapeQuery) => new Query("shape", shapeQuery); - public static Query SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => new Query("simple_query_string", simpleQueryStringQuery); - public static Query SpanContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery spanContainingQuery) => new Query("span_containing", spanContainingQuery); - public static Query SpanFieldMasking(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery spanFieldMaskingQuery) => new Query("span_field_masking", spanFieldMaskingQuery); - public static Query SpanFirst(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery spanFirstQuery) => new Query("span_first", spanFirstQuery); - public static Query SpanMulti(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery spanMultiTermQuery) => new Query("span_multi", spanMultiTermQuery); - public static Query SpanNear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery spanNearQuery) => new Query("span_near", spanNearQuery); - public static Query SpanNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery spanNotQuery) => new Query("span_not", spanNotQuery); - public static Query SpanOr(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery spanOrQuery) => new Query("span_or", spanOrQuery); - public static Query SpanTerm(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery spanTermQuery) => new Query("span_term", spanTermQuery); - public static Query SpanWithin(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery spanWithinQuery) => new Query("span_within", spanWithinQuery); - public static Query SparseVector(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SparseVectorQuery sparseVectorQuery) => new Query("sparse_vector", sparseVectorQuery); - public static Query Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => new Query("term", termQuery); - public static Query Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => new Query("terms", termsQuery); - public static Query TermsSet(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsSetQuery termsSetQuery) => new Query("terms_set", termsSetQuery); - public static Query Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => new Query("wildcard", wildcardQuery); - public static Query Wrapper(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WrapperQuery wrapperQuery) => new Query("wrapper", wrapperQuery); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class QueryConverter : JsonConverter -{ - public override Query 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; - 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 == "bool") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "boosting") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "combined_fields") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "constant_score") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "dis_max") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "distance_feature") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "exists") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "function_score") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "fuzzy") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_bounding_box") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_distance") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geo_shape") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "has_child") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "has_parent") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ids") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "intervals") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "knn") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_all") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_bool_prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_none") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_phrase") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_phrase_prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "more_like_this") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "multi_match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "nested") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "parent_id") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "percolate") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "pinned") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "query_string") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rank_feature") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "raw_json") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "regexp") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rule") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "script") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "script_score") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "semantic") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "shape") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "simple_query_string") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_containing") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_field_masking") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_first") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_multi") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_near") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_not") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_or") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_within") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "sparse_vector") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms_set") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wildcard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wrapper") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Query' from the response."); - } - - var result = new Query(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Query value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "bool": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery)value.Variant, options); - break; - case "boosting": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoostingQuery)value.Variant, options); - break; - case "combined_fields": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsQuery)value.Variant, options); - break; - case "constant_score": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ConstantScoreQuery)value.Variant, options); - break; - case "dis_max": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DisMaxQuery)value.Variant, options); - break; - case "distance_feature": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "exists": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery)value.Variant, options); - break; - case "function_score": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreQuery)value.Variant, options); - break; - case "fuzzy": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FuzzyQuery)value.Variant, options); - break; - case "geo_bounding_box": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoBoundingBoxQuery)value.Variant, options); - break; - case "geo_distance": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceQuery)value.Variant, options); - break; - case "geo_shape": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeQuery)value.Variant, options); - break; - case "has_child": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasChildQuery)value.Variant, options); - break; - case "has_parent": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasParentQuery)value.Variant, options); - break; - case "ids": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery)value.Variant, options); - break; - case "intervals": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery)value.Variant, options); - break; - case "knn": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.KnnQuery)value.Variant, options); - break; - case "match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery)value.Variant, options); - break; - case "match_all": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery)value.Variant, options); - break; - case "match_bool_prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchBoolPrefixQuery)value.Variant, options); - break; - case "match_none": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchNoneQuery)value.Variant, options); - break; - case "match_phrase": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhraseQuery)value.Variant, options); - break; - case "match_phrase_prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhrasePrefixQuery)value.Variant, options); - break; - case "more_like_this": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MoreLikeThisQuery)value.Variant, options); - break; - case "multi_match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiMatchQuery)value.Variant, options); - break; - case "nested": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NestedQuery)value.Variant, options); - break; - case "parent_id": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ParentIdQuery)value.Variant, options); - break; - case "percolate": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PercolateQuery)value.Variant, options); - break; - case "pinned": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedQuery)value.Variant, options); - break; - case "prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery)value.Variant, options); - break; - case "query_string": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryStringQuery)value.Variant, options); - break; - case "range": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "rank_feature": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureQuery)value.Variant, options); - break; - case "raw_json": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RawJsonQuery)value.Variant, options); - break; - case "regexp": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RegexpQuery)value.Variant, options); - break; - case "rule": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RuleQuery)value.Variant, options); - break; - case "script": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptQuery)value.Variant, options); - break; - case "script_score": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreQuery)value.Variant, options); - break; - case "semantic": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SemanticQuery)value.Variant, options); - break; - case "shape": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeQuery)value.Variant, options); - break; - case "simple_query_string": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery)value.Variant, options); - break; - case "span_containing": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery)value.Variant, options); - break; - case "span_field_masking": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery)value.Variant, options); - break; - case "span_first": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery)value.Variant, options); - break; - case "span_multi": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery)value.Variant, options); - break; - case "span_near": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery)value.Variant, options); - break; - case "span_not": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery)value.Variant, options); - break; - case "span_or": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery)value.Variant, options); - break; - case "span_term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery)value.Variant, options); - break; - case "span_within": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery)value.Variant, options); - break; - case "sparse_vector": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SparseVectorQuery)value.Variant, options); - break; - case "term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery)value.Variant, options); - break; - case "terms_set": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsSetQuery)value.Variant, options); - break; - case "wildcard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery)value.Variant, options); - break; - case "wrapper": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WrapperQuery)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class QueryDescriptor : SerializableDescriptor> -{ - internal QueryDescriptor(Action> configure) => configure.Invoke(this); - - public QueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private QueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private QueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public QueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public QueryDescriptor Bool(Action> configure) => Set(configure, "bool"); - public QueryDescriptor Boosting(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoostingQuery boostingQuery) => Set(boostingQuery, "boosting"); - public QueryDescriptor Boosting(Action> configure) => Set(configure, "boosting"); - public QueryDescriptor CombinedFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsQuery combinedFieldsQuery) => Set(combinedFieldsQuery, "combined_fields"); - public QueryDescriptor CombinedFields(Action> configure) => Set(configure, "combined_fields"); - public QueryDescriptor ConstantScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ConstantScoreQuery constantScoreQuery) => Set(constantScoreQuery, "constant_score"); - public QueryDescriptor ConstantScore(Action> configure) => Set(configure, "constant_score"); - public QueryDescriptor DisMax(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DisMaxQuery disMaxQuery) => Set(disMaxQuery, "dis_max"); - public QueryDescriptor DisMax(Action> configure) => Set(configure, "dis_max"); - public QueryDescriptor DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDistanceFeatureQuery distanceFeatureQuery) => Set(distanceFeatureQuery, "distance_feature"); - public QueryDescriptor DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceFeatureQuery distanceFeatureQuery) => Set(distanceFeatureQuery, "distance_feature"); - public QueryDescriptor DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDistanceFeatureQuery distanceFeatureQuery) => Set(distanceFeatureQuery, "distance_feature"); - public QueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public QueryDescriptor Exists(Action> configure) => Set(configure, "exists"); - public QueryDescriptor FunctionScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreQuery functionScoreQuery) => Set(functionScoreQuery, "function_score"); - public QueryDescriptor FunctionScore(Action> configure) => Set(configure, "function_score"); - public QueryDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FuzzyQuery fuzzyQuery) => Set(fuzzyQuery, "fuzzy"); - public QueryDescriptor Fuzzy(Action> configure) => Set(configure, "fuzzy"); - public QueryDescriptor GeoBoundingBox(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoBoundingBoxQuery geoBoundingBoxQuery) => Set(geoBoundingBoxQuery, "geo_bounding_box"); - public QueryDescriptor GeoBoundingBox(Action> configure) => Set(configure, "geo_bounding_box"); - public QueryDescriptor GeoDistance(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceQuery geoDistanceQuery) => Set(geoDistanceQuery, "geo_distance"); - public QueryDescriptor GeoDistance(Action> configure) => Set(configure, "geo_distance"); - public QueryDescriptor GeoShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeQuery geoShapeQuery) => Set(geoShapeQuery, "geo_shape"); - public QueryDescriptor GeoShape(Action> configure) => Set(configure, "geo_shape"); - public QueryDescriptor HasChild(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasChildQuery hasChildQuery) => Set(hasChildQuery, "has_child"); - public QueryDescriptor HasChild(Action> configure) => Set(configure, "has_child"); - public QueryDescriptor HasParent(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasParentQuery hasParentQuery) => Set(hasParentQuery, "has_parent"); - public QueryDescriptor HasParent(Action> configure) => Set(configure, "has_parent"); - public QueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public QueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public QueryDescriptor Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery intervalsQuery) => Set(intervalsQuery, "intervals"); - public QueryDescriptor Intervals(Action> configure) => Set(configure, "intervals"); - public QueryDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnQuery knnQuery) => Set(knnQuery, "knn"); - public QueryDescriptor Knn(Action> configure) => Set(configure, "knn"); - public QueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public QueryDescriptor Match(Action> configure) => Set(configure, "match"); - public QueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public QueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public QueryDescriptor MatchBoolPrefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchBoolPrefixQuery matchBoolPrefixQuery) => Set(matchBoolPrefixQuery, "match_bool_prefix"); - public QueryDescriptor MatchBoolPrefix(Action> configure) => Set(configure, "match_bool_prefix"); - public QueryDescriptor MatchNone(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchNoneQuery matchNoneQuery) => Set(matchNoneQuery, "match_none"); - public QueryDescriptor MatchNone(Action configure) => Set(configure, "match_none"); - public QueryDescriptor MatchPhrase(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhraseQuery matchPhraseQuery) => Set(matchPhraseQuery, "match_phrase"); - public QueryDescriptor MatchPhrase(Action> configure) => Set(configure, "match_phrase"); - public QueryDescriptor MatchPhrasePrefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhrasePrefixQuery matchPhrasePrefixQuery) => Set(matchPhrasePrefixQuery, "match_phrase_prefix"); - public QueryDescriptor MatchPhrasePrefix(Action> configure) => Set(configure, "match_phrase_prefix"); - public QueryDescriptor MoreLikeThis(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MoreLikeThisQuery moreLikeThisQuery) => Set(moreLikeThisQuery, "more_like_this"); - public QueryDescriptor MoreLikeThis(Action> configure) => Set(configure, "more_like_this"); - public QueryDescriptor MultiMatch(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiMatchQuery multiMatchQuery) => Set(multiMatchQuery, "multi_match"); - public QueryDescriptor MultiMatch(Action> configure) => Set(configure, "multi_match"); - public QueryDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NestedQuery nestedQuery) => Set(nestedQuery, "nested"); - public QueryDescriptor Nested(Action> configure) => Set(configure, "nested"); - public QueryDescriptor ParentId(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ParentIdQuery parentIdQuery) => Set(parentIdQuery, "parent_id"); - public QueryDescriptor ParentId(Action configure) => Set(configure, "parent_id"); - public QueryDescriptor Percolate(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PercolateQuery percolateQuery) => Set(percolateQuery, "percolate"); - public QueryDescriptor Percolate(Action> configure) => Set(configure, "percolate"); - public QueryDescriptor Pinned(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedQuery pinnedQuery) => Set(pinnedQuery, "pinned"); - public QueryDescriptor Pinned(Action> configure) => Set(configure, "pinned"); - public QueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public QueryDescriptor Prefix(Action> configure) => Set(configure, "prefix"); - public QueryDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryStringQuery queryStringQuery) => Set(queryStringQuery, "query_string"); - public QueryDescriptor QueryString(Action> configure) => Set(configure, "query_string"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor RankFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureQuery rankFeatureQuery) => Set(rankFeatureQuery, "rank_feature"); - public QueryDescriptor RankFeature(Action> configure) => Set(configure, "rank_feature"); - public QueryDescriptor RawJson(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RawJsonQuery rawJsonQuery) => Set(rawJsonQuery, "raw_json"); - public QueryDescriptor Regexp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RegexpQuery regexpQuery) => Set(regexpQuery, "regexp"); - public QueryDescriptor Regexp(Action> configure) => Set(configure, "regexp"); - public QueryDescriptor Rule(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RuleQuery ruleQuery) => Set(ruleQuery, "rule"); - public QueryDescriptor Rule(Action> configure) => Set(configure, "rule"); - public QueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptQuery scriptQuery) => Set(scriptQuery, "script"); - public QueryDescriptor Script(Action configure) => Set(configure, "script"); - public QueryDescriptor ScriptScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreQuery scriptScoreQuery) => Set(scriptScoreQuery, "script_score"); - public QueryDescriptor ScriptScore(Action> configure) => Set(configure, "script_score"); - public QueryDescriptor Semantic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SemanticQuery semanticQuery) => Set(semanticQuery, "semantic"); - public QueryDescriptor Semantic(Action configure) => Set(configure, "semantic"); - public QueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeQuery shapeQuery) => Set(shapeQuery, "shape"); - public QueryDescriptor Shape(Action> configure) => Set(configure, "shape"); - public QueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public QueryDescriptor SimpleQueryString(Action> configure) => Set(configure, "simple_query_string"); - public QueryDescriptor SpanContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery spanContainingQuery) => Set(spanContainingQuery, "span_containing"); - public QueryDescriptor SpanContaining(Action> configure) => Set(configure, "span_containing"); - public QueryDescriptor SpanFieldMasking(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery spanFieldMaskingQuery) => Set(spanFieldMaskingQuery, "span_field_masking"); - public QueryDescriptor SpanFieldMasking(Action> configure) => Set(configure, "span_field_masking"); - public QueryDescriptor SpanFirst(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery spanFirstQuery) => Set(spanFirstQuery, "span_first"); - public QueryDescriptor SpanFirst(Action> configure) => Set(configure, "span_first"); - public QueryDescriptor SpanMulti(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery spanMultiTermQuery) => Set(spanMultiTermQuery, "span_multi"); - public QueryDescriptor SpanMulti(Action> configure) => Set(configure, "span_multi"); - public QueryDescriptor SpanNear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery spanNearQuery) => Set(spanNearQuery, "span_near"); - public QueryDescriptor SpanNear(Action> configure) => Set(configure, "span_near"); - public QueryDescriptor SpanNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery spanNotQuery) => Set(spanNotQuery, "span_not"); - public QueryDescriptor SpanNot(Action> configure) => Set(configure, "span_not"); - public QueryDescriptor SpanOr(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery spanOrQuery) => Set(spanOrQuery, "span_or"); - public QueryDescriptor SpanOr(Action> configure) => Set(configure, "span_or"); - public QueryDescriptor SpanTerm(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery spanTermQuery) => Set(spanTermQuery, "span_term"); - public QueryDescriptor SpanTerm(Action> configure) => Set(configure, "span_term"); - public QueryDescriptor SpanWithin(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery spanWithinQuery) => Set(spanWithinQuery, "span_within"); - public QueryDescriptor SpanWithin(Action> configure) => Set(configure, "span_within"); - public QueryDescriptor SparseVector(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SparseVectorQuery sparseVectorQuery) => Set(sparseVectorQuery, "sparse_vector"); - public QueryDescriptor SparseVector(Action> configure) => Set(configure, "sparse_vector"); - public QueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public QueryDescriptor Term(Action> configure) => Set(configure, "term"); - public QueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public QueryDescriptor Terms(Action> configure) => Set(configure, "terms"); - public QueryDescriptor TermsSet(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsSetQuery termsSetQuery) => Set(termsSetQuery, "terms_set"); - public QueryDescriptor TermsSet(Action> configure) => Set(configure, "terms_set"); - public QueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public QueryDescriptor Wildcard(Action> configure) => Set(configure, "wildcard"); - public QueryDescriptor Wrapper(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WrapperQuery wrapperQuery) => Set(wrapperQuery, "wrapper"); - public QueryDescriptor Wrapper(Action configure) => Set(configure, "wrapper"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class QueryDescriptor : SerializableDescriptor -{ - internal QueryDescriptor(Action configure) => configure.Invoke(this); - - public QueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private QueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private QueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public QueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public QueryDescriptor Bool(Action configure) => Set(configure, "bool"); - public QueryDescriptor Boosting(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoostingQuery boostingQuery) => Set(boostingQuery, "boosting"); - public QueryDescriptor Boosting(Action configure) => Set(configure, "boosting"); - public QueryDescriptor CombinedFields(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.CombinedFieldsQuery combinedFieldsQuery) => Set(combinedFieldsQuery, "combined_fields"); - public QueryDescriptor CombinedFields(Action configure) => Set(configure, "combined_fields"); - public QueryDescriptor ConstantScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ConstantScoreQuery constantScoreQuery) => Set(constantScoreQuery, "constant_score"); - public QueryDescriptor ConstantScore(Action configure) => Set(configure, "constant_score"); - public QueryDescriptor DisMax(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DisMaxQuery disMaxQuery) => Set(disMaxQuery, "dis_max"); - public QueryDescriptor DisMax(Action configure) => Set(configure, "dis_max"); - public QueryDescriptor DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedDistanceFeatureQuery distanceFeatureQuery) => Set(distanceFeatureQuery, "distance_feature"); - public QueryDescriptor DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceFeatureQuery distanceFeatureQuery) => Set(distanceFeatureQuery, "distance_feature"); - public QueryDescriptor DistanceFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateDistanceFeatureQuery distanceFeatureQuery) => Set(distanceFeatureQuery, "distance_feature"); - public QueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public QueryDescriptor Exists(Action configure) => Set(configure, "exists"); - public QueryDescriptor FunctionScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScoreQuery functionScoreQuery) => Set(functionScoreQuery, "function_score"); - public QueryDescriptor FunctionScore(Action configure) => Set(configure, "function_score"); - public QueryDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FuzzyQuery fuzzyQuery) => Set(fuzzyQuery, "fuzzy"); - public QueryDescriptor Fuzzy(Action configure) => Set(configure, "fuzzy"); - public QueryDescriptor GeoBoundingBox(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoBoundingBoxQuery geoBoundingBoxQuery) => Set(geoBoundingBoxQuery, "geo_bounding_box"); - public QueryDescriptor GeoBoundingBox(Action configure) => Set(configure, "geo_bounding_box"); - public QueryDescriptor GeoDistance(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoDistanceQuery geoDistanceQuery) => Set(geoDistanceQuery, "geo_distance"); - public QueryDescriptor GeoDistance(Action configure) => Set(configure, "geo_distance"); - public QueryDescriptor GeoShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.GeoShapeQuery geoShapeQuery) => Set(geoShapeQuery, "geo_shape"); - public QueryDescriptor GeoShape(Action configure) => Set(configure, "geo_shape"); - public QueryDescriptor HasChild(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasChildQuery hasChildQuery) => Set(hasChildQuery, "has_child"); - public QueryDescriptor HasChild(Action configure) => Set(configure, "has_child"); - public QueryDescriptor HasParent(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.HasParentQuery hasParentQuery) => Set(hasParentQuery, "has_parent"); - public QueryDescriptor HasParent(Action configure) => Set(configure, "has_parent"); - public QueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public QueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public QueryDescriptor Intervals(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsQuery intervalsQuery) => Set(intervalsQuery, "intervals"); - public QueryDescriptor Intervals(Action configure) => Set(configure, "intervals"); - public QueryDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnQuery knnQuery) => Set(knnQuery, "knn"); - public QueryDescriptor Knn(Action configure) => Set(configure, "knn"); - public QueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public QueryDescriptor Match(Action configure) => Set(configure, "match"); - public QueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public QueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public QueryDescriptor MatchBoolPrefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchBoolPrefixQuery matchBoolPrefixQuery) => Set(matchBoolPrefixQuery, "match_bool_prefix"); - public QueryDescriptor MatchBoolPrefix(Action configure) => Set(configure, "match_bool_prefix"); - public QueryDescriptor MatchNone(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchNoneQuery matchNoneQuery) => Set(matchNoneQuery, "match_none"); - public QueryDescriptor MatchNone(Action configure) => Set(configure, "match_none"); - public QueryDescriptor MatchPhrase(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhraseQuery matchPhraseQuery) => Set(matchPhraseQuery, "match_phrase"); - public QueryDescriptor MatchPhrase(Action configure) => Set(configure, "match_phrase"); - public QueryDescriptor MatchPhrasePrefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchPhrasePrefixQuery matchPhrasePrefixQuery) => Set(matchPhrasePrefixQuery, "match_phrase_prefix"); - public QueryDescriptor MatchPhrasePrefix(Action configure) => Set(configure, "match_phrase_prefix"); - public QueryDescriptor MoreLikeThis(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MoreLikeThisQuery moreLikeThisQuery) => Set(moreLikeThisQuery, "more_like_this"); - public QueryDescriptor MoreLikeThis(Action configure) => Set(configure, "more_like_this"); - public QueryDescriptor MultiMatch(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiMatchQuery multiMatchQuery) => Set(multiMatchQuery, "multi_match"); - public QueryDescriptor MultiMatch(Action configure) => Set(configure, "multi_match"); - public QueryDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NestedQuery nestedQuery) => Set(nestedQuery, "nested"); - public QueryDescriptor Nested(Action configure) => Set(configure, "nested"); - public QueryDescriptor ParentId(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ParentIdQuery parentIdQuery) => Set(parentIdQuery, "parent_id"); - public QueryDescriptor ParentId(Action configure) => Set(configure, "parent_id"); - public QueryDescriptor Percolate(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PercolateQuery percolateQuery) => Set(percolateQuery, "percolate"); - public QueryDescriptor Percolate(Action configure) => Set(configure, "percolate"); - public QueryDescriptor Pinned(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedQuery pinnedQuery) => Set(pinnedQuery, "pinned"); - public QueryDescriptor Pinned(Action configure) => Set(configure, "pinned"); - public QueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public QueryDescriptor Prefix(Action configure) => Set(configure, "prefix"); - public QueryDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryStringQuery queryStringQuery) => Set(queryStringQuery, "query_string"); - public QueryDescriptor QueryString(Action configure) => Set(configure, "query_string"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public QueryDescriptor RankFeature(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureQuery rankFeatureQuery) => Set(rankFeatureQuery, "rank_feature"); - public QueryDescriptor RankFeature(Action configure) => Set(configure, "rank_feature"); - public QueryDescriptor RawJson(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RawJsonQuery rawJsonQuery) => Set(rawJsonQuery, "raw_json"); - public QueryDescriptor Regexp(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RegexpQuery regexpQuery) => Set(regexpQuery, "regexp"); - public QueryDescriptor Regexp(Action configure) => Set(configure, "regexp"); - public QueryDescriptor Rule(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RuleQuery ruleQuery) => Set(ruleQuery, "rule"); - public QueryDescriptor Rule(Action configure) => Set(configure, "rule"); - public QueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptQuery scriptQuery) => Set(scriptQuery, "script"); - public QueryDescriptor Script(Action configure) => Set(configure, "script"); - public QueryDescriptor ScriptScore(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ScriptScoreQuery scriptScoreQuery) => Set(scriptScoreQuery, "script_score"); - public QueryDescriptor ScriptScore(Action configure) => Set(configure, "script_score"); - public QueryDescriptor Semantic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SemanticQuery semanticQuery) => Set(semanticQuery, "semantic"); - public QueryDescriptor Semantic(Action configure) => Set(configure, "semantic"); - public QueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeQuery shapeQuery) => Set(shapeQuery, "shape"); - public QueryDescriptor Shape(Action configure) => Set(configure, "shape"); - public QueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public QueryDescriptor SimpleQueryString(Action configure) => Set(configure, "simple_query_string"); - public QueryDescriptor SpanContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery spanContainingQuery) => Set(spanContainingQuery, "span_containing"); - public QueryDescriptor SpanContaining(Action configure) => Set(configure, "span_containing"); - public QueryDescriptor SpanFieldMasking(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery spanFieldMaskingQuery) => Set(spanFieldMaskingQuery, "span_field_masking"); - public QueryDescriptor SpanFieldMasking(Action configure) => Set(configure, "span_field_masking"); - public QueryDescriptor SpanFirst(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery spanFirstQuery) => Set(spanFirstQuery, "span_first"); - public QueryDescriptor SpanFirst(Action configure) => Set(configure, "span_first"); - public QueryDescriptor SpanMulti(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery spanMultiTermQuery) => Set(spanMultiTermQuery, "span_multi"); - public QueryDescriptor SpanMulti(Action configure) => Set(configure, "span_multi"); - public QueryDescriptor SpanNear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery spanNearQuery) => Set(spanNearQuery, "span_near"); - public QueryDescriptor SpanNear(Action configure) => Set(configure, "span_near"); - public QueryDescriptor SpanNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery spanNotQuery) => Set(spanNotQuery, "span_not"); - public QueryDescriptor SpanNot(Action configure) => Set(configure, "span_not"); - public QueryDescriptor SpanOr(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery spanOrQuery) => Set(spanOrQuery, "span_or"); - public QueryDescriptor SpanOr(Action configure) => Set(configure, "span_or"); - public QueryDescriptor SpanTerm(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery spanTermQuery) => Set(spanTermQuery, "span_term"); - public QueryDescriptor SpanTerm(Action configure) => Set(configure, "span_term"); - public QueryDescriptor SpanWithin(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery spanWithinQuery) => Set(spanWithinQuery, "span_within"); - public QueryDescriptor SpanWithin(Action configure) => Set(configure, "span_within"); - public QueryDescriptor SparseVector(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SparseVectorQuery sparseVectorQuery) => Set(sparseVectorQuery, "sparse_vector"); - public QueryDescriptor SparseVector(Action configure) => Set(configure, "sparse_vector"); - public QueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public QueryDescriptor Term(Action configure) => Set(configure, "term"); - public QueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public QueryDescriptor Terms(Action configure) => Set(configure, "terms"); - public QueryDescriptor TermsSet(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsSetQuery termsSetQuery) => Set(termsSetQuery, "terms_set"); - public QueryDescriptor TermsSet(Action configure) => Set(configure, "terms_set"); - public QueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public QueryDescriptor Wildcard(Action configure) => Set(configure, "wildcard"); - public QueryDescriptor Wrapper(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WrapperQuery wrapperQuery) => Set(wrapperQuery, "wrapper"); - public QueryDescriptor Wrapper(Action configure) => Set(configure, "wrapper"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs deleted file mode 100644 index 0e3a26c5163..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/QueryStringQuery.g.cs +++ /dev/null @@ -1,1287 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class QueryStringQuery -{ - /// - /// - /// If true, the wildcard characters * and ? are allowed as the first character of the query string. - /// - /// - [JsonInclude, JsonPropertyName("allow_leading_wildcard")] - public bool? AllowLeadingWildcard { get; set; } - - /// - /// - /// Analyzer used to convert text in the query string into tokens. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// If true, the query attempts to analyze wildcard terms in the query string. - /// - /// - [JsonInclude, JsonPropertyName("analyze_wildcard")] - public bool? AnalyzeWildcard { get; set; } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - [JsonInclude, JsonPropertyName("auto_generate_synonyms_phrase_query")] - public bool? AutoGenerateSynonymsPhraseQuery { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - [JsonInclude, JsonPropertyName("default_field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? DefaultField { get; set; } - - /// - /// - /// Default boolean logic used to interpret text in the query string if no operators are specified. - /// - /// - [JsonInclude, JsonPropertyName("default_operator")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get; set; } - - /// - /// - /// If true, enable position increments in queries constructed from a query_string search. - /// - /// - [JsonInclude, JsonPropertyName("enable_position_increments")] - public bool? EnablePositionIncrements { get; set; } - [JsonInclude, JsonPropertyName("escape")] - public bool? Escape { get; set; } - - /// - /// - /// Array of fields to search. Supports wildcards (*). - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// Maximum edit distance allowed for fuzzy matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzziness")] - public Elastic.Clients.Elasticsearch.Serverless.Fuzziness? Fuzziness { get; set; } - - /// - /// - /// Maximum number of terms to which the query expands for fuzzy matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_max_expansions")] - public int? FuzzyMaxExpansions { get; set; } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_prefix_length")] - public int? FuzzyPrefixLength { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_rewrite")] - public string? FuzzyRewrite { get; set; } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_transpositions")] - public bool? FuzzyTranspositions { get; set; } - - /// - /// - /// If true, format-based errors, such as providing a text value for a numeric field, are ignored. - /// - /// - [JsonInclude, JsonPropertyName("lenient")] - public bool? Lenient { get; set; } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - [JsonInclude, JsonPropertyName("max_determinized_states")] - public int? MaxDeterminizedStates { get; set; } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - [JsonInclude, JsonPropertyName("minimum_should_match")] - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Maximum number of positions allowed between matching tokens for phrases. - /// - /// - [JsonInclude, JsonPropertyName("phrase_slop")] - public double? PhraseSlop { get; set; } - - /// - /// - /// Query string you wish to parse and use for search. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Analyzer used to convert quoted text in the query string into tokens. - /// For quoted text, this parameter overrides the analyzer specified in the analyzer parameter. - /// - /// - [JsonInclude, JsonPropertyName("quote_analyzer")] - public string? QuoteAnalyzer { get; set; } - - /// - /// - /// Suffix appended to quoted text in the query string. - /// You can use this suffix to use a different analysis method for exact matches. - /// - /// - [JsonInclude, JsonPropertyName("quote_field_suffix")] - public string? QuoteFieldSuffix { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - [JsonInclude, JsonPropertyName("rewrite")] - public string? Rewrite { get; set; } - - /// - /// - /// How to combine the queries generated from the individual search terms in the resulting dis_max query. - /// - /// - [JsonInclude, JsonPropertyName("tie_breaker")] - public double? TieBreaker { get; set; } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC. - /// - /// - [JsonInclude, JsonPropertyName("time_zone")] - public string? TimeZone { get; set; } - - /// - /// - /// Determines how the query matches and scores documents. - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(QueryStringQuery queryStringQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.QueryString(queryStringQuery); -} - -public sealed partial class QueryStringQueryDescriptor : SerializableDescriptor> -{ - internal QueryStringQueryDescriptor(Action> configure) => configure.Invoke(this); - - public QueryStringQueryDescriptor() : base() - { - } - - private bool? AllowLeadingWildcardValue { get; set; } - private string? AnalyzerValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DefaultFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperatorValue { get; set; } - private bool? EnablePositionIncrementsValue { get; set; } - private bool? EscapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? FuzzyMaxExpansionsValue { get; set; } - private int? FuzzyPrefixLengthValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private int? MaxDeterminizedStatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private double? PhraseSlopValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private string? QuoteAnalyzerValue { get; set; } - private string? QuoteFieldSuffixValue { get; set; } - private string? RewriteValue { get; set; } - private double? TieBreakerValue { get; set; } - private string? TimeZoneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } - - /// - /// - /// If true, the wildcard characters * and ? are allowed as the first character of the query string. - /// - /// - public QueryStringQueryDescriptor AllowLeadingWildcard(bool? allowLeadingWildcard = true) - { - AllowLeadingWildcardValue = allowLeadingWildcard; - return Self; - } - - /// - /// - /// Analyzer used to convert text in the query string into tokens. - /// - /// - public QueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, the query attempts to analyze wildcard terms in the query string. - /// - /// - public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) - { - AnalyzeWildcardValue = analyzeWildcard; - return Self; - } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public QueryStringQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public QueryStringQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public QueryStringQueryDescriptor DefaultField(Elastic.Clients.Elasticsearch.Serverless.Field? defaultField) - { - DefaultFieldValue = defaultField; - return Self; - } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public QueryStringQueryDescriptor DefaultField(Expression> defaultField) - { - DefaultFieldValue = defaultField; - return Self; - } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public QueryStringQueryDescriptor DefaultField(Expression> defaultField) - { - DefaultFieldValue = defaultField; - return Self; - } - - /// - /// - /// Default boolean logic used to interpret text in the query string if no operators are specified. - /// - /// - public QueryStringQueryDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) - { - DefaultOperatorValue = defaultOperator; - return Self; - } - - /// - /// - /// If true, enable position increments in queries constructed from a query_string search. - /// - /// - public QueryStringQueryDescriptor EnablePositionIncrements(bool? enablePositionIncrements = true) - { - EnablePositionIncrementsValue = enablePositionIncrements; - return Self; - } - - public QueryStringQueryDescriptor Escape(bool? escape = true) - { - EscapeValue = escape; - return Self; - } - - /// - /// - /// Array of fields to search. Supports wildcards (*). - /// - /// - public QueryStringQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for fuzzy matching. - /// - /// - public QueryStringQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query expands for fuzzy matching. - /// - /// - public QueryStringQueryDescriptor FuzzyMaxExpansions(int? fuzzyMaxExpansions) - { - FuzzyMaxExpansionsValue = fuzzyMaxExpansions; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public QueryStringQueryDescriptor FuzzyPrefixLength(int? fuzzyPrefixLength) - { - FuzzyPrefixLengthValue = fuzzyPrefixLength; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public QueryStringQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public QueryStringQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text value for a numeric field, are ignored. - /// - /// - public QueryStringQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - public QueryStringQueryDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) - { - MaxDeterminizedStatesValue = maxDeterminizedStates; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public QueryStringQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens for phrases. - /// - /// - public QueryStringQueryDescriptor PhraseSlop(double? phraseSlop) - { - PhraseSlopValue = phraseSlop; - return Self; - } - - /// - /// - /// Query string you wish to parse and use for search. - /// - /// - public QueryStringQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public QueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Analyzer used to convert quoted text in the query string into tokens. - /// For quoted text, this parameter overrides the analyzer specified in the analyzer parameter. - /// - /// - public QueryStringQueryDescriptor QuoteAnalyzer(string? quoteAnalyzer) - { - QuoteAnalyzerValue = quoteAnalyzer; - return Self; - } - - /// - /// - /// Suffix appended to quoted text in the query string. - /// You can use this suffix to use a different analysis method for exact matches. - /// - /// - public QueryStringQueryDescriptor QuoteFieldSuffix(string? quoteFieldSuffix) - { - QuoteFieldSuffixValue = quoteFieldSuffix; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public QueryStringQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// How to combine the queries generated from the individual search terms in the resulting dis_max query. - /// - /// - public QueryStringQueryDescriptor TieBreaker(double? tieBreaker) - { - TieBreakerValue = tieBreaker; - return Self; - } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC. - /// - /// - public QueryStringQueryDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - /// - /// - /// Determines how the query matches and scores documents. - /// - /// - public QueryStringQueryDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLeadingWildcardValue.HasValue) - { - writer.WritePropertyName("allow_leading_wildcard"); - writer.WriteBooleanValue(AllowLeadingWildcardValue.Value); - } - - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DefaultFieldValue is not null) - { - writer.WritePropertyName("default_field"); - JsonSerializer.Serialize(writer, DefaultFieldValue, options); - } - - if (DefaultOperatorValue is not null) - { - writer.WritePropertyName("default_operator"); - JsonSerializer.Serialize(writer, DefaultOperatorValue, options); - } - - if (EnablePositionIncrementsValue.HasValue) - { - writer.WritePropertyName("enable_position_increments"); - writer.WriteBooleanValue(EnablePositionIncrementsValue.Value); - } - - if (EscapeValue.HasValue) - { - writer.WritePropertyName("escape"); - writer.WriteBooleanValue(EscapeValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (FuzzyMaxExpansionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_max_expansions"); - writer.WriteNumberValue(FuzzyMaxExpansionsValue.Value); - } - - if (FuzzyPrefixLengthValue.HasValue) - { - writer.WritePropertyName("fuzzy_prefix_length"); - writer.WriteNumberValue(FuzzyPrefixLengthValue.Value); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MaxDeterminizedStatesValue.HasValue) - { - writer.WritePropertyName("max_determinized_states"); - writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (PhraseSlopValue.HasValue) - { - writer.WritePropertyName("phrase_slop"); - writer.WriteNumberValue(PhraseSlopValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(QuoteAnalyzerValue)) - { - writer.WritePropertyName("quote_analyzer"); - writer.WriteStringValue(QuoteAnalyzerValue); - } - - if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) - { - writer.WritePropertyName("quote_field_suffix"); - writer.WriteStringValue(QuoteFieldSuffixValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - if (TieBreakerValue.HasValue) - { - writer.WritePropertyName("tie_breaker"); - writer.WriteNumberValue(TieBreakerValue.Value); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class QueryStringQueryDescriptor : SerializableDescriptor -{ - internal QueryStringQueryDescriptor(Action configure) => configure.Invoke(this); - - public QueryStringQueryDescriptor() : base() - { - } - - private bool? AllowLeadingWildcardValue { get; set; } - private string? AnalyzerValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? DefaultFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperatorValue { get; set; } - private bool? EnablePositionIncrementsValue { get; set; } - private bool? EscapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fuzziness? FuzzinessValue { get; set; } - private int? FuzzyMaxExpansionsValue { get; set; } - private int? FuzzyPrefixLengthValue { get; set; } - private string? FuzzyRewriteValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private int? MaxDeterminizedStatesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private double? PhraseSlopValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private string? QuoteAnalyzerValue { get; set; } - private string? QuoteFieldSuffixValue { get; set; } - private string? RewriteValue { get; set; } - private double? TieBreakerValue { get; set; } - private string? TimeZoneValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? TypeValue { get; set; } - - /// - /// - /// If true, the wildcard characters * and ? are allowed as the first character of the query string. - /// - /// - public QueryStringQueryDescriptor AllowLeadingWildcard(bool? allowLeadingWildcard = true) - { - AllowLeadingWildcardValue = allowLeadingWildcard; - return Self; - } - - /// - /// - /// Analyzer used to convert text in the query string into tokens. - /// - /// - public QueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, the query attempts to analyze wildcard terms in the query string. - /// - /// - public QueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) - { - AnalyzeWildcardValue = analyzeWildcard; - return Self; - } - - /// - /// - /// If true, match phrase queries are automatically created for multi-term synonyms. - /// - /// - public QueryStringQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public QueryStringQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public QueryStringQueryDescriptor DefaultField(Elastic.Clients.Elasticsearch.Serverless.Field? defaultField) - { - DefaultFieldValue = defaultField; - return Self; - } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public QueryStringQueryDescriptor DefaultField(Expression> defaultField) - { - DefaultFieldValue = defaultField; - return Self; - } - - /// - /// - /// Default field to search if no field is provided in the query string. - /// Supports wildcards (*). - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public QueryStringQueryDescriptor DefaultField(Expression> defaultField) - { - DefaultFieldValue = defaultField; - return Self; - } - - /// - /// - /// Default boolean logic used to interpret text in the query string if no operators are specified. - /// - /// - public QueryStringQueryDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) - { - DefaultOperatorValue = defaultOperator; - return Self; - } - - /// - /// - /// If true, enable position increments in queries constructed from a query_string search. - /// - /// - public QueryStringQueryDescriptor EnablePositionIncrements(bool? enablePositionIncrements = true) - { - EnablePositionIncrementsValue = enablePositionIncrements; - return Self; - } - - public QueryStringQueryDescriptor Escape(bool? escape = true) - { - EscapeValue = escape; - return Self; - } - - /// - /// - /// Array of fields to search. Supports wildcards (*). - /// - /// - public QueryStringQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// Maximum edit distance allowed for fuzzy matching. - /// - /// - public QueryStringQueryDescriptor Fuzziness(Elastic.Clients.Elasticsearch.Serverless.Fuzziness? fuzziness) - { - FuzzinessValue = fuzziness; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query expands for fuzzy matching. - /// - /// - public QueryStringQueryDescriptor FuzzyMaxExpansions(int? fuzzyMaxExpansions) - { - FuzzyMaxExpansionsValue = fuzzyMaxExpansions; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public QueryStringQueryDescriptor FuzzyPrefixLength(int? fuzzyPrefixLength) - { - FuzzyPrefixLengthValue = fuzzyPrefixLength; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public QueryStringQueryDescriptor FuzzyRewrite(string? fuzzyRewrite) - { - FuzzyRewriteValue = fuzzyRewrite; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public QueryStringQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text value for a numeric field, are ignored. - /// - /// - public QueryStringQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - public QueryStringQueryDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) - { - MaxDeterminizedStatesValue = maxDeterminizedStates; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public QueryStringQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Maximum number of positions allowed between matching tokens for phrases. - /// - /// - public QueryStringQueryDescriptor PhraseSlop(double? phraseSlop) - { - PhraseSlopValue = phraseSlop; - return Self; - } - - /// - /// - /// Query string you wish to parse and use for search. - /// - /// - public QueryStringQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public QueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Analyzer used to convert quoted text in the query string into tokens. - /// For quoted text, this parameter overrides the analyzer specified in the analyzer parameter. - /// - /// - public QueryStringQueryDescriptor QuoteAnalyzer(string? quoteAnalyzer) - { - QuoteAnalyzerValue = quoteAnalyzer; - return Self; - } - - /// - /// - /// Suffix appended to quoted text in the query string. - /// You can use this suffix to use a different analysis method for exact matches. - /// - /// - public QueryStringQueryDescriptor QuoteFieldSuffix(string? quoteFieldSuffix) - { - QuoteFieldSuffixValue = quoteFieldSuffix; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public QueryStringQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// How to combine the queries generated from the individual search terms in the resulting dis_max query. - /// - /// - public QueryStringQueryDescriptor TieBreaker(double? tieBreaker) - { - TieBreakerValue = tieBreaker; - return Self; - } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC. - /// - /// - public QueryStringQueryDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - /// - /// - /// Determines how the query matches and scores documents. - /// - /// - public QueryStringQueryDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TextQueryType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowLeadingWildcardValue.HasValue) - { - writer.WritePropertyName("allow_leading_wildcard"); - writer.WriteBooleanValue(AllowLeadingWildcardValue.Value); - } - - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DefaultFieldValue is not null) - { - writer.WritePropertyName("default_field"); - JsonSerializer.Serialize(writer, DefaultFieldValue, options); - } - - if (DefaultOperatorValue is not null) - { - writer.WritePropertyName("default_operator"); - JsonSerializer.Serialize(writer, DefaultOperatorValue, options); - } - - if (EnablePositionIncrementsValue.HasValue) - { - writer.WritePropertyName("enable_position_increments"); - writer.WriteBooleanValue(EnablePositionIncrementsValue.Value); - } - - if (EscapeValue.HasValue) - { - writer.WritePropertyName("escape"); - writer.WriteBooleanValue(EscapeValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FuzzinessValue is not null) - { - writer.WritePropertyName("fuzziness"); - JsonSerializer.Serialize(writer, FuzzinessValue, options); - } - - if (FuzzyMaxExpansionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_max_expansions"); - writer.WriteNumberValue(FuzzyMaxExpansionsValue.Value); - } - - if (FuzzyPrefixLengthValue.HasValue) - { - writer.WritePropertyName("fuzzy_prefix_length"); - writer.WriteNumberValue(FuzzyPrefixLengthValue.Value); - } - - if (!string.IsNullOrEmpty(FuzzyRewriteValue)) - { - writer.WritePropertyName("fuzzy_rewrite"); - writer.WriteStringValue(FuzzyRewriteValue); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MaxDeterminizedStatesValue.HasValue) - { - writer.WritePropertyName("max_determinized_states"); - writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (PhraseSlopValue.HasValue) - { - writer.WritePropertyName("phrase_slop"); - writer.WriteNumberValue(PhraseSlopValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(QuoteAnalyzerValue)) - { - writer.WritePropertyName("quote_analyzer"); - writer.WriteStringValue(QuoteAnalyzerValue); - } - - if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) - { - writer.WritePropertyName("quote_field_suffix"); - writer.WriteStringValue(QuoteFieldSuffixValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - if (TieBreakerValue.HasValue) - { - writer.WritePropertyName("tie_breaker"); - writer.WriteNumberValue(TieBreakerValue.Value); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RandomScoreFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RandomScoreFunction.g.cs deleted file mode 100644 index 26d23cfaa5f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RandomScoreFunction.g.cs +++ /dev/null @@ -1,146 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RandomScoreFunction -{ - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("seed")] - public object? Seed { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScore(RandomScoreFunction randomScoreFunction) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScore.RandomScore(randomScoreFunction); -} - -public sealed partial class RandomScoreFunctionDescriptor : SerializableDescriptor> -{ - internal RandomScoreFunctionDescriptor(Action> configure) => configure.Invoke(this); - - public RandomScoreFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private object? SeedValue { get; set; } - - public RandomScoreFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - public RandomScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RandomScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RandomScoreFunctionDescriptor Seed(object? seed) - { - SeedValue = seed; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (SeedValue is not null) - { - writer.WritePropertyName("seed"); - JsonSerializer.Serialize(writer, SeedValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RandomScoreFunctionDescriptor : SerializableDescriptor -{ - internal RandomScoreFunctionDescriptor(Action configure) => configure.Invoke(this); - - public RandomScoreFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private object? SeedValue { get; set; } - - public RandomScoreFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - public RandomScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RandomScoreFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RandomScoreFunctionDescriptor Seed(object? seed) - { - SeedValue = seed; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (SeedValue is not null) - { - writer.WritePropertyName("seed"); - JsonSerializer.Serialize(writer, SeedValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLinear.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLinear.g.cs deleted file mode 100644 index 7d68b4606af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLinear.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RankFeatureFunctionLinear -{ -} - -public sealed partial class RankFeatureFunctionLinearDescriptor : SerializableDescriptor -{ - internal RankFeatureFunctionLinearDescriptor(Action configure) => configure.Invoke(this); - - public RankFeatureFunctionLinearDescriptor() : base() - { - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLogarithm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLogarithm.g.cs deleted file mode 100644 index 76810800eff..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionLogarithm.g.cs +++ /dev/null @@ -1,69 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RankFeatureFunctionLogarithm -{ - /// - /// - /// Configurable scaling factor. - /// - /// - [JsonInclude, JsonPropertyName("scaling_factor")] - public float ScalingFactor { get; set; } -} - -public sealed partial class RankFeatureFunctionLogarithmDescriptor : SerializableDescriptor -{ - internal RankFeatureFunctionLogarithmDescriptor(Action configure) => configure.Invoke(this); - - public RankFeatureFunctionLogarithmDescriptor() : base() - { - } - - private float ScalingFactorValue { get; set; } - - /// - /// - /// Configurable scaling factor. - /// - /// - public RankFeatureFunctionLogarithmDescriptor ScalingFactor(float scalingFactor) - { - ScalingFactorValue = scalingFactor; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("scaling_factor"); - writer.WriteNumberValue(ScalingFactorValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs deleted file mode 100644 index 0e0669a440d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs +++ /dev/null @@ -1,73 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RankFeatureFunctionSaturation -{ - /// - /// - /// Configurable pivot value so that the result will be less than 0.5. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public float? Pivot { get; set; } -} - -public sealed partial class RankFeatureFunctionSaturationDescriptor : SerializableDescriptor -{ - internal RankFeatureFunctionSaturationDescriptor(Action configure) => configure.Invoke(this); - - public RankFeatureFunctionSaturationDescriptor() : base() - { - } - - private float? PivotValue { get; set; } - - /// - /// - /// Configurable pivot value so that the result will be less than 0.5. - /// - /// - public RankFeatureFunctionSaturationDescriptor Pivot(float? pivot) - { - PivotValue = pivot; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (PivotValue.HasValue) - { - writer.WritePropertyName("pivot"); - writer.WriteNumberValue(PivotValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSigmoid.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSigmoid.g.cs deleted file mode 100644 index 3a7adb94c43..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureFunctionSigmoid.g.cs +++ /dev/null @@ -1,91 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RankFeatureFunctionSigmoid -{ - /// - /// - /// Configurable Exponent. - /// - /// - [JsonInclude, JsonPropertyName("exponent")] - public float Exponent { get; set; } - - /// - /// - /// Configurable pivot value so that the result will be less than 0.5. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public float Pivot { get; set; } -} - -public sealed partial class RankFeatureFunctionSigmoidDescriptor : SerializableDescriptor -{ - internal RankFeatureFunctionSigmoidDescriptor(Action configure) => configure.Invoke(this); - - public RankFeatureFunctionSigmoidDescriptor() : base() - { - } - - private float ExponentValue { get; set; } - private float PivotValue { get; set; } - - /// - /// - /// Configurable Exponent. - /// - /// - public RankFeatureFunctionSigmoidDescriptor Exponent(float exponent) - { - ExponentValue = exponent; - return Self; - } - - /// - /// - /// Configurable pivot value so that the result will be less than 0.5. - /// - /// - public RankFeatureFunctionSigmoidDescriptor Pivot(float pivot) - { - PivotValue = pivot; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("exponent"); - writer.WriteNumberValue(ExponentValue); - writer.WritePropertyName("pivot"); - writer.WriteNumberValue(PivotValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs deleted file mode 100644 index d7261a71c85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs +++ /dev/null @@ -1,642 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RankFeatureQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Linear function used to boost relevance scores based on the value of the rank feature field. - /// - /// - [JsonInclude, JsonPropertyName("linear")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinear? Linear { get; set; } - - /// - /// - /// Logarithmic function used to boost relevance scores based on the value of the rank feature field. - /// - /// - [JsonInclude, JsonPropertyName("log")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithm? Log { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Saturation function used to boost relevance scores based on the value of the rank feature field. - /// - /// - [JsonInclude, JsonPropertyName("saturation")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? Saturation { get; set; } - - /// - /// - /// Sigmoid function used to boost relevance scores based on the value of the rank feature field. - /// - /// - [JsonInclude, JsonPropertyName("sigmoid")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoid? Sigmoid { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(RankFeatureQuery rankFeatureQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.RankFeature(rankFeatureQuery); -} - -public sealed partial class RankFeatureQueryDescriptor : SerializableDescriptor> -{ - internal RankFeatureQueryDescriptor(Action> configure) => configure.Invoke(this); - - public RankFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinear? LinearValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinearDescriptor LinearDescriptor { get; set; } - private Action LinearDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithm? LogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithmDescriptor LogDescriptor { get; set; } - private Action LogDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? SaturationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturationDescriptor SaturationDescriptor { get; set; } - private Action SaturationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoid? SigmoidValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoidDescriptor SigmoidDescriptor { get; set; } - private Action SigmoidDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public RankFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - public RankFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - public RankFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - public RankFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Linear function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinear? linear) - { - LinearDescriptor = null; - LinearDescriptorAction = null; - LinearValue = linear; - return Self; - } - - public RankFeatureQueryDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinearDescriptor descriptor) - { - LinearValue = null; - LinearDescriptorAction = null; - LinearDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Linear(Action configure) - { - LinearValue = null; - LinearDescriptor = null; - LinearDescriptorAction = configure; - return Self; - } - - /// - /// - /// Logarithmic function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Log(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithm? log) - { - LogDescriptor = null; - LogDescriptorAction = null; - LogValue = log; - return Self; - } - - public RankFeatureQueryDescriptor Log(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithmDescriptor descriptor) - { - LogValue = null; - LogDescriptorAction = null; - LogDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Log(Action configure) - { - LogValue = null; - LogDescriptor = null; - LogDescriptorAction = configure; - return Self; - } - - public RankFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Saturation function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Saturation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? saturation) - { - SaturationDescriptor = null; - SaturationDescriptorAction = null; - SaturationValue = saturation; - return Self; - } - - public RankFeatureQueryDescriptor Saturation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturationDescriptor descriptor) - { - SaturationValue = null; - SaturationDescriptorAction = null; - SaturationDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Saturation(Action configure) - { - SaturationValue = null; - SaturationDescriptor = null; - SaturationDescriptorAction = configure; - return Self; - } - - /// - /// - /// Sigmoid function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Sigmoid(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoid? sigmoid) - { - SigmoidDescriptor = null; - SigmoidDescriptorAction = null; - SigmoidValue = sigmoid; - return Self; - } - - public RankFeatureQueryDescriptor Sigmoid(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoidDescriptor descriptor) - { - SigmoidValue = null; - SigmoidDescriptorAction = null; - SigmoidDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Sigmoid(Action configure) - { - SigmoidValue = null; - SigmoidDescriptor = null; - SigmoidDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (LinearDescriptor is not null) - { - writer.WritePropertyName("linear"); - JsonSerializer.Serialize(writer, LinearDescriptor, options); - } - else if (LinearDescriptorAction is not null) - { - writer.WritePropertyName("linear"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinearDescriptor(LinearDescriptorAction), options); - } - else if (LinearValue is not null) - { - writer.WritePropertyName("linear"); - JsonSerializer.Serialize(writer, LinearValue, options); - } - - if (LogDescriptor is not null) - { - writer.WritePropertyName("log"); - JsonSerializer.Serialize(writer, LogDescriptor, options); - } - else if (LogDescriptorAction is not null) - { - writer.WritePropertyName("log"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithmDescriptor(LogDescriptorAction), options); - } - else if (LogValue is not null) - { - writer.WritePropertyName("log"); - JsonSerializer.Serialize(writer, LogValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SaturationDescriptor is not null) - { - writer.WritePropertyName("saturation"); - JsonSerializer.Serialize(writer, SaturationDescriptor, options); - } - else if (SaturationDescriptorAction is not null) - { - writer.WritePropertyName("saturation"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturationDescriptor(SaturationDescriptorAction), options); - } - else if (SaturationValue is not null) - { - writer.WritePropertyName("saturation"); - JsonSerializer.Serialize(writer, SaturationValue, options); - } - - if (SigmoidDescriptor is not null) - { - writer.WritePropertyName("sigmoid"); - JsonSerializer.Serialize(writer, SigmoidDescriptor, options); - } - else if (SigmoidDescriptorAction is not null) - { - writer.WritePropertyName("sigmoid"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoidDescriptor(SigmoidDescriptorAction), options); - } - else if (SigmoidValue is not null) - { - writer.WritePropertyName("sigmoid"); - JsonSerializer.Serialize(writer, SigmoidValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RankFeatureQueryDescriptor : SerializableDescriptor -{ - internal RankFeatureQueryDescriptor(Action configure) => configure.Invoke(this); - - public RankFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinear? LinearValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinearDescriptor LinearDescriptor { get; set; } - private Action LinearDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithm? LogValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithmDescriptor LogDescriptor { get; set; } - private Action LogDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? SaturationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturationDescriptor SaturationDescriptor { get; set; } - private Action SaturationDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoid? SigmoidValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoidDescriptor SigmoidDescriptor { get; set; } - private Action SigmoidDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public RankFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - public RankFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - public RankFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// rank_feature or rank_features field used to boost relevance scores. - /// - /// - public RankFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Linear function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinear? linear) - { - LinearDescriptor = null; - LinearDescriptorAction = null; - LinearValue = linear; - return Self; - } - - public RankFeatureQueryDescriptor Linear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinearDescriptor descriptor) - { - LinearValue = null; - LinearDescriptorAction = null; - LinearDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Linear(Action configure) - { - LinearValue = null; - LinearDescriptor = null; - LinearDescriptorAction = configure; - return Self; - } - - /// - /// - /// Logarithmic function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Log(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithm? log) - { - LogDescriptor = null; - LogDescriptorAction = null; - LogValue = log; - return Self; - } - - public RankFeatureQueryDescriptor Log(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithmDescriptor descriptor) - { - LogValue = null; - LogDescriptorAction = null; - LogDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Log(Action configure) - { - LogValue = null; - LogDescriptor = null; - LogDescriptorAction = configure; - return Self; - } - - public RankFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Saturation function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Saturation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturation? saturation) - { - SaturationDescriptor = null; - SaturationDescriptorAction = null; - SaturationValue = saturation; - return Self; - } - - public RankFeatureQueryDescriptor Saturation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturationDescriptor descriptor) - { - SaturationValue = null; - SaturationDescriptorAction = null; - SaturationDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Saturation(Action configure) - { - SaturationValue = null; - SaturationDescriptor = null; - SaturationDescriptorAction = configure; - return Self; - } - - /// - /// - /// Sigmoid function used to boost relevance scores based on the value of the rank feature field. - /// - /// - public RankFeatureQueryDescriptor Sigmoid(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoid? sigmoid) - { - SigmoidDescriptor = null; - SigmoidDescriptorAction = null; - SigmoidValue = sigmoid; - return Self; - } - - public RankFeatureQueryDescriptor Sigmoid(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoidDescriptor descriptor) - { - SigmoidValue = null; - SigmoidDescriptorAction = null; - SigmoidDescriptor = descriptor; - return Self; - } - - public RankFeatureQueryDescriptor Sigmoid(Action configure) - { - SigmoidValue = null; - SigmoidDescriptor = null; - SigmoidDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (LinearDescriptor is not null) - { - writer.WritePropertyName("linear"); - JsonSerializer.Serialize(writer, LinearDescriptor, options); - } - else if (LinearDescriptorAction is not null) - { - writer.WritePropertyName("linear"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLinearDescriptor(LinearDescriptorAction), options); - } - else if (LinearValue is not null) - { - writer.WritePropertyName("linear"); - JsonSerializer.Serialize(writer, LinearValue, options); - } - - if (LogDescriptor is not null) - { - writer.WritePropertyName("log"); - JsonSerializer.Serialize(writer, LogDescriptor, options); - } - else if (LogDescriptorAction is not null) - { - writer.WritePropertyName("log"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionLogarithmDescriptor(LogDescriptorAction), options); - } - else if (LogValue is not null) - { - writer.WritePropertyName("log"); - JsonSerializer.Serialize(writer, LogValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SaturationDescriptor is not null) - { - writer.WritePropertyName("saturation"); - JsonSerializer.Serialize(writer, SaturationDescriptor, options); - } - else if (SaturationDescriptorAction is not null) - { - writer.WritePropertyName("saturation"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSaturationDescriptor(SaturationDescriptorAction), options); - } - else if (SaturationValue is not null) - { - writer.WritePropertyName("saturation"); - JsonSerializer.Serialize(writer, SaturationValue, options); - } - - if (SigmoidDescriptor is not null) - { - writer.WritePropertyName("sigmoid"); - JsonSerializer.Serialize(writer, SigmoidDescriptor, options); - } - else if (SigmoidDescriptorAction is not null) - { - writer.WritePropertyName("sigmoid"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RankFeatureFunctionSigmoidDescriptor(SigmoidDescriptorAction), options); - } - else if (SigmoidValue is not null) - { - writer.WritePropertyName("sigmoid"); - JsonSerializer.Serialize(writer, SigmoidValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RegexpQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RegexpQuery.g.cs deleted file mode 100644 index 7f6db6dfaec..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RegexpQuery.g.cs +++ /dev/null @@ -1,526 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class RegexpQueryConverter : JsonConverter -{ - public override RegexpQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new RegexpQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "case_insensitive") - { - variant.CaseInsensitive = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "flags") - { - variant.Flags = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_determinized_states") - { - variant.MaxDeterminizedStates = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rewrite") - { - variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "value") - { - variant.Value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, RegexpQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize RegexpQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.CaseInsensitive.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(value.CaseInsensitive.Value); - } - - if (!string.IsNullOrEmpty(value.Flags)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(value.Flags); - } - - if (value.MaxDeterminizedStates.HasValue) - { - writer.WritePropertyName("max_determinized_states"); - writer.WriteNumberValue(value.MaxDeterminizedStates.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (!string.IsNullOrEmpty(value.Rewrite)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(value.Rewrite); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(value.Value); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(RegexpQueryConverter))] -public sealed partial class RegexpQuery -{ - public RegexpQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - - /// - /// - /// Allows case insensitive matching of the regular expression value with the indexed field values when set to true. - /// When false, case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public bool? CaseInsensitive { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Enables optional operators for the regular expression. - /// - /// - public string? Flags { get; set; } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - public int? MaxDeterminizedStates { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public string? Rewrite { get; set; } - - /// - /// - /// Regular expression for terms you wish to find in the provided field. - /// - /// - public string Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(RegexpQuery regexpQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Regexp(regexpQuery); -} - -public sealed partial class RegexpQueryDescriptor : SerializableDescriptor> -{ - internal RegexpQueryDescriptor(Action> configure) => configure.Invoke(this); - - public RegexpQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FlagsValue { get; set; } - private int? MaxDeterminizedStatesValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private string ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public RegexpQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows case insensitive matching of the regular expression value with the indexed field values when set to true. - /// When false, case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public RegexpQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public RegexpQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public RegexpQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RegexpQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Enables optional operators for the regular expression. - /// - /// - public RegexpQueryDescriptor Flags(string? flags) - { - FlagsValue = flags; - return Self; - } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - public RegexpQueryDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) - { - MaxDeterminizedStatesValue = maxDeterminizedStates; - return Self; - } - - public RegexpQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public RegexpQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Regular expression for terms you wish to find in the provided field. - /// - /// - public RegexpQueryDescriptor Value(string value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(FlagsValue)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(FlagsValue); - } - - if (MaxDeterminizedStatesValue.HasValue) - { - writer.WritePropertyName("max_determinized_states"); - writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class RegexpQueryDescriptor : SerializableDescriptor -{ - internal RegexpQueryDescriptor(Action configure) => configure.Invoke(this); - - public RegexpQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FlagsValue { get; set; } - private int? MaxDeterminizedStatesValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private string ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public RegexpQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows case insensitive matching of the regular expression value with the indexed field values when set to true. - /// When false, case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public RegexpQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public RegexpQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public RegexpQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public RegexpQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Enables optional operators for the regular expression. - /// - /// - public RegexpQueryDescriptor Flags(string? flags) - { - FlagsValue = flags; - return Self; - } - - /// - /// - /// Maximum number of automaton states required for the query. - /// - /// - public RegexpQueryDescriptor MaxDeterminizedStates(int? maxDeterminizedStates) - { - MaxDeterminizedStatesValue = maxDeterminizedStates; - return Self; - } - - public RegexpQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public RegexpQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Regular expression for terms you wish to find in the provided field. - /// - /// - public RegexpQueryDescriptor Value(string value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(FlagsValue)) - { - writer.WritePropertyName("flags"); - writer.WriteStringValue(FlagsValue); - } - - if (MaxDeterminizedStatesValue.HasValue) - { - writer.WritePropertyName("max_determinized_states"); - writer.WriteNumberValue(MaxDeterminizedStatesValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs deleted file mode 100644 index 95406611384..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/RuleQuery.g.cs +++ /dev/null @@ -1,274 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class RuleQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("match_criteria")] - public object MatchCriteria { get; set; } - [JsonInclude, JsonPropertyName("organic")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Organic { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - [JsonInclude, JsonPropertyName("ruleset_ids")] - public ICollection RulesetIds { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(RuleQuery ruleQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Rule(ruleQuery); -} - -public sealed partial class RuleQueryDescriptor : SerializableDescriptor> -{ - internal RuleQueryDescriptor(Action> configure) => configure.Invoke(this); - - public RuleQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private object MatchCriteriaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor OrganicDescriptor { get; set; } - private Action> OrganicDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private ICollection RulesetIdsValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public RuleQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public RuleQueryDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - - public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organic) - { - OrganicDescriptor = null; - OrganicDescriptorAction = null; - OrganicValue = organic; - return Self; - } - - public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - OrganicValue = null; - OrganicDescriptorAction = null; - OrganicDescriptor = descriptor; - return Self; - } - - public RuleQueryDescriptor Organic(Action> configure) - { - OrganicValue = null; - OrganicDescriptor = null; - OrganicDescriptorAction = configure; - return Self; - } - - public RuleQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public RuleQueryDescriptor RulesetIds(ICollection rulesetIds) - { - RulesetIdsValue = rulesetIds; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); - 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 Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(OrganicDescriptorAction), options); - } - else - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("ruleset_ids"); - JsonSerializer.Serialize(writer, RulesetIdsValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class RuleQueryDescriptor : SerializableDescriptor -{ - internal RuleQueryDescriptor(Action configure) => configure.Invoke(this); - - public RuleQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private object MatchCriteriaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query OrganicValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor OrganicDescriptor { get; set; } - private Action OrganicDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private ICollection RulesetIdsValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public RuleQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public RuleQueryDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - - public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query organic) - { - OrganicDescriptor = null; - OrganicDescriptorAction = null; - OrganicValue = organic; - return Self; - } - - public RuleQueryDescriptor Organic(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - OrganicValue = null; - OrganicDescriptorAction = null; - OrganicDescriptor = descriptor; - return Self; - } - - public RuleQueryDescriptor Organic(Action configure) - { - OrganicValue = null; - OrganicDescriptor = null; - OrganicDescriptorAction = configure; - return Self; - } - - public RuleQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public RuleQueryDescriptor RulesetIds(ICollection rulesetIds) - { - RulesetIdsValue = rulesetIds; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); - 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 Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(OrganicDescriptorAction), options); - } - else - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("ruleset_ids"); - JsonSerializer.Serialize(writer, RulesetIdsValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs deleted file mode 100644 index 6651d241d68..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptQuery.g.cs +++ /dev/null @@ -1,154 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ScriptQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Contains a script to run as a query. - /// This script must return a boolean value, true or false. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(ScriptQuery scriptQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Script(scriptQuery); -} - -public sealed partial class ScriptQueryDescriptor : SerializableDescriptor -{ - internal ScriptQueryDescriptor(Action configure) => configure.Invoke(this); - - public ScriptQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ScriptQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public ScriptQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Contains a script to run as a query. - /// This script must return a boolean value, true or false. - /// - /// - public ScriptQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptQueryDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreFunction.g.cs deleted file mode 100644 index 40d2f1244ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreFunction.g.cs +++ /dev/null @@ -1,105 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ScriptScoreFunction -{ - /// - /// - /// A script that computes a score. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScore(ScriptScoreFunction scriptScoreFunction) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FunctionScore.ScriptScore(scriptScoreFunction); -} - -public sealed partial class ScriptScoreFunctionDescriptor : SerializableDescriptor -{ - internal ScriptScoreFunctionDescriptor(Action configure) => configure.Invoke(this); - - public ScriptScoreFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// A script that computes a score. - /// - /// - public ScriptScoreFunctionDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptScoreFunctionDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptScoreFunctionDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs deleted file mode 100644 index 3b0647afb0a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs +++ /dev/null @@ -1,401 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ScriptScoreQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public float? MinScore { get; set; } - - /// - /// - /// Query used to return documents. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Script used to compute the score of documents returned by the query. - /// Important: final relevance scores from the script_score query cannot be negative. - /// - /// - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(ScriptScoreQuery scriptScoreQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.ScriptScore(scriptScoreQuery); -} - -public sealed partial class ScriptScoreQueryDescriptor : SerializableDescriptor> -{ - internal ScriptScoreQueryDescriptor(Action> configure) => configure.Invoke(this); - - public ScriptScoreQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private float? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ScriptScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - /// - public ScriptScoreQueryDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Query used to return documents. - /// - /// - public ScriptScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ScriptScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ScriptScoreQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public ScriptScoreQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Script used to compute the score of documents returned by the query. - /// Important: final relevance scores from the script_score query cannot be negative. - /// - /// - public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptScoreQueryDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ScriptScoreQueryDescriptor : SerializableDescriptor -{ - internal ScriptScoreQueryDescriptor(Action configure) => configure.Invoke(this); - - public ScriptScoreQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private float? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ScriptScoreQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Documents with a score lower than this floating point number are excluded from the search results. - /// - /// - public ScriptScoreQueryDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Query used to return documents. - /// - /// - public ScriptScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public ScriptScoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public ScriptScoreQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public ScriptScoreQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Script used to compute the score of documents returned by the query. - /// Important: final relevance scores from the script_score query cannot be negative. - /// - /// - public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptScoreQueryDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptScoreQueryDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SemanticQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SemanticQuery.g.cs deleted file mode 100644 index 7c0c761d25f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SemanticQuery.g.cs +++ /dev/null @@ -1,140 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SemanticQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The field to query, which must be a semantic_text field type - /// - /// - [JsonInclude, JsonPropertyName("field")] - public string Field { get; set; } - - /// - /// - /// The query text - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SemanticQuery semanticQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Semantic(semanticQuery); -} - -public sealed partial class SemanticQueryDescriptor : SerializableDescriptor -{ - internal SemanticQueryDescriptor(Action configure) => configure.Invoke(this); - - public SemanticQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string FieldValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SemanticQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The field to query, which must be a semantic_text field type - /// - /// - public SemanticQueryDescriptor Field(string field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The query text - /// - /// - public SemanticQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public SemanticQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs deleted file mode 100644 index ece4254d153..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs +++ /dev/null @@ -1,255 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class ShapeFieldQuery -{ - /// - /// - /// Queries using a pre-indexed shape. - /// - /// - [JsonInclude, JsonPropertyName("indexed_shape")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? IndexedShape { get; set; } - - /// - /// - /// Spatial relation between the query shape and the document shape. - /// - /// - [JsonInclude, JsonPropertyName("relation")] - public Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? Relation { get; set; } - - /// - /// - /// Queries using an inline shape definition in GeoJSON or Well Known Text (WKT) format. - /// - /// - [JsonInclude, JsonPropertyName("shape")] - public object? Shape { get; set; } -} - -public sealed partial class ShapeFieldQueryDescriptor : SerializableDescriptor> -{ - internal ShapeFieldQueryDescriptor(Action> configure) => configure.Invoke(this); - - public ShapeFieldQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? IndexedShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor IndexedShapeDescriptor { get; set; } - private Action> IndexedShapeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? RelationValue { get; set; } - private object? ShapeValue { get; set; } - - /// - /// - /// Queries using a pre-indexed shape. - /// - /// - public ShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? indexedShape) - { - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = null; - IndexedShapeValue = indexedShape; - return Self; - } - - public ShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor descriptor) - { - IndexedShapeValue = null; - IndexedShapeDescriptorAction = null; - IndexedShapeDescriptor = descriptor; - return Self; - } - - public ShapeFieldQueryDescriptor IndexedShape(Action> configure) - { - IndexedShapeValue = null; - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Spatial relation between the query shape and the document shape. - /// - /// - public ShapeFieldQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? relation) - { - RelationValue = relation; - return Self; - } - - /// - /// - /// Queries using an inline shape definition in GeoJSON or Well Known Text (WKT) format. - /// - /// - public ShapeFieldQueryDescriptor Shape(object? shape) - { - ShapeValue = shape; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexedShapeDescriptor is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeDescriptor, options); - } - else if (IndexedShapeDescriptorAction is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor(IndexedShapeDescriptorAction), options); - } - else if (IndexedShapeValue is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeValue, options); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (ShapeValue is not null) - { - writer.WritePropertyName("shape"); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ShapeFieldQueryDescriptor : SerializableDescriptor -{ - internal ShapeFieldQueryDescriptor(Action configure) => configure.Invoke(this); - - public ShapeFieldQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? IndexedShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor IndexedShapeDescriptor { get; set; } - private Action IndexedShapeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? RelationValue { get; set; } - private object? ShapeValue { get; set; } - - /// - /// - /// Queries using a pre-indexed shape. - /// - /// - public ShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookup? indexedShape) - { - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = null; - IndexedShapeValue = indexedShape; - return Self; - } - - public ShapeFieldQueryDescriptor IndexedShape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor descriptor) - { - IndexedShapeValue = null; - IndexedShapeDescriptorAction = null; - IndexedShapeDescriptor = descriptor; - return Self; - } - - public ShapeFieldQueryDescriptor IndexedShape(Action configure) - { - IndexedShapeValue = null; - IndexedShapeDescriptor = null; - IndexedShapeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Spatial relation between the query shape and the document shape. - /// - /// - public ShapeFieldQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.GeoShapeRelation? relation) - { - RelationValue = relation; - return Self; - } - - /// - /// - /// Queries using an inline shape definition in GeoJSON or Well Known Text (WKT) format. - /// - /// - public ShapeFieldQueryDescriptor Shape(object? shape) - { - ShapeValue = shape; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexedShapeDescriptor is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeDescriptor, options); - } - else if (IndexedShapeDescriptorAction is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldLookupDescriptor(IndexedShapeDescriptorAction), options); - } - else if (IndexedShapeValue is not null) - { - writer.WritePropertyName("indexed_shape"); - JsonSerializer.Serialize(writer, IndexedShapeValue, options); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (ShapeValue is not null) - { - writer.WritePropertyName("shape"); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeQuery.g.cs deleted file mode 100644 index 4d2e827716e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/ShapeQuery.g.cs +++ /dev/null @@ -1,372 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class ShapeQueryConverter : JsonConverter -{ - public override ShapeQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new ShapeQuery(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "ignore_unmapped") - { - variant.IgnoreUnmapped = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Shape = JsonSerializer.Deserialize(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, ShapeQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Shape is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Shape, options); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.IgnoreUnmapped.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(value.IgnoreUnmapped.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(ShapeQueryConverter))] -public sealed partial class ShapeQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// When set to true the query ignores an unmapped field and will not match any documents. - /// - /// - public bool? IgnoreUnmapped { get; set; } - public string? QueryName { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQuery Shape { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(ShapeQuery shapeQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Shape(shapeQuery); -} - -public sealed partial class ShapeQueryDescriptor : SerializableDescriptor> -{ - internal ShapeQueryDescriptor(Action> configure) => configure.Invoke(this); - - public ShapeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQuery ShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQueryDescriptor ShapeDescriptor { get; set; } - private Action> ShapeDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ShapeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public ShapeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public ShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// When set to true the query ignores an unmapped field and will not match any documents. - /// - /// - public ShapeQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public ShapeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public ShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQuery shape) - { - ShapeDescriptor = null; - ShapeDescriptorAction = null; - ShapeValue = shape; - return Self; - } - - public ShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQueryDescriptor descriptor) - { - ShapeValue = null; - ShapeDescriptorAction = null; - ShapeDescriptor = descriptor; - return Self; - } - - public ShapeQueryDescriptor Shape(Action> configure) - { - ShapeValue = null; - ShapeDescriptor = null; - ShapeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && ShapeValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ShapeQueryDescriptor : SerializableDescriptor -{ - internal ShapeQueryDescriptor(Action configure) => configure.Invoke(this); - - public ShapeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private bool? IgnoreUnmappedValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQuery ShapeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQueryDescriptor ShapeDescriptor { get; set; } - private Action ShapeDescriptorAction { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public ShapeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public ShapeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public ShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public ShapeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// When set to true the query ignores an unmapped field and will not match any documents. - /// - /// - public ShapeQueryDescriptor IgnoreUnmapped(bool? ignoreUnmapped = true) - { - IgnoreUnmappedValue = ignoreUnmapped; - return Self; - } - - public ShapeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public ShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQuery shape) - { - ShapeDescriptor = null; - ShapeDescriptorAction = null; - ShapeValue = shape; - return Self; - } - - public ShapeQueryDescriptor Shape(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ShapeFieldQueryDescriptor descriptor) - { - ShapeValue = null; - ShapeDescriptorAction = null; - ShapeDescriptor = descriptor; - return Self; - } - - public ShapeQueryDescriptor Shape(Action configure) - { - ShapeValue = null; - ShapeDescriptor = null; - ShapeDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && ShapeValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, ShapeValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (IgnoreUnmappedValue.HasValue) - { - writer.WritePropertyName("ignore_unmapped"); - writer.WriteBooleanValue(IgnoreUnmappedValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs deleted file mode 100644 index a8928659067..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs +++ /dev/null @@ -1,723 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SimpleQueryStringQuery -{ - /// - /// - /// Analyzer used to convert text in the query string into tokens. - /// - /// - [JsonInclude, JsonPropertyName("analyzer")] - public string? Analyzer { get; set; } - - /// - /// - /// If true, the query attempts to analyze wildcard terms in the query string. - /// - /// - [JsonInclude, JsonPropertyName("analyze_wildcard")] - public bool? AnalyzeWildcard { get; set; } - - /// - /// - /// If true, the parser creates a match_phrase query for each multi-position token. - /// - /// - [JsonInclude, JsonPropertyName("auto_generate_synonyms_phrase_query")] - public bool? AutoGenerateSynonymsPhraseQuery { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Default boolean logic used to interpret text in the query string if no operators are specified. - /// - /// - [JsonInclude, JsonPropertyName("default_operator")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperator { get; set; } - - /// - /// - /// Array of fields you wish to search. - /// Accepts wildcard expressions. - /// You also can boost relevance scores for matches to particular fields using a caret (^) notation. - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - [JsonInclude, JsonPropertyName("fields")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - - /// - /// - /// List of enabled operators for the simple query string syntax. - /// - /// - [JsonInclude, JsonPropertyName("flags")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringFlag? Flags { get; set; } - - /// - /// - /// Maximum number of terms to which the query expands for fuzzy matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_max_expansions")] - public int? FuzzyMaxExpansions { get; set; } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_prefix_length")] - public int? FuzzyPrefixLength { get; set; } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - [JsonInclude, JsonPropertyName("fuzzy_transpositions")] - public bool? FuzzyTranspositions { get; set; } - - /// - /// - /// If true, format-based errors, such as providing a text value for a numeric field, are ignored. - /// - /// - [JsonInclude, JsonPropertyName("lenient")] - public bool? Lenient { get; set; } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - [JsonInclude, JsonPropertyName("minimum_should_match")] - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Query string in the simple query string syntax you wish to parse and use for search. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Suffix appended to quoted text in the query string. - /// - /// - [JsonInclude, JsonPropertyName("quote_field_suffix")] - public string? QuoteFieldSuffix { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SimpleQueryStringQuery simpleQueryStringQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SimpleQueryString(simpleQueryStringQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(SimpleQueryStringQuery simpleQueryStringQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.SimpleQueryString(simpleQueryStringQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(SimpleQueryStringQuery simpleQueryStringQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.SimpleQueryString(simpleQueryStringQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(SimpleQueryStringQuery simpleQueryStringQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.SimpleQueryString(simpleQueryStringQuery); -} - -public sealed partial class SimpleQueryStringQueryDescriptor : SerializableDescriptor> -{ - internal SimpleQueryStringQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SimpleQueryStringQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperatorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringFlag? FlagsValue { get; set; } - private int? FuzzyMaxExpansionsValue { get; set; } - private int? FuzzyPrefixLengthValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private string? QuoteFieldSuffixValue { get; set; } - - /// - /// - /// Analyzer used to convert text in the query string into tokens. - /// - /// - public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, the query attempts to analyze wildcard terms in the query string. - /// - /// - public SimpleQueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) - { - AnalyzeWildcardValue = analyzeWildcard; - return Self; - } - - /// - /// - /// If true, the parser creates a match_phrase query for each multi-position token. - /// - /// - public SimpleQueryStringQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SimpleQueryStringQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Default boolean logic used to interpret text in the query string if no operators are specified. - /// - /// - public SimpleQueryStringQueryDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) - { - DefaultOperatorValue = defaultOperator; - return Self; - } - - /// - /// - /// Array of fields you wish to search. - /// Accepts wildcard expressions. - /// You also can boost relevance scores for matches to particular fields using a caret (^) notation. - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public SimpleQueryStringQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// List of enabled operators for the simple query string syntax. - /// - /// - public SimpleQueryStringQueryDescriptor Flags(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringFlag? flags) - { - FlagsValue = flags; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query expands for fuzzy matching. - /// - /// - public SimpleQueryStringQueryDescriptor FuzzyMaxExpansions(int? fuzzyMaxExpansions) - { - FuzzyMaxExpansionsValue = fuzzyMaxExpansions; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public SimpleQueryStringQueryDescriptor FuzzyPrefixLength(int? fuzzyPrefixLength) - { - FuzzyPrefixLengthValue = fuzzyPrefixLength; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public SimpleQueryStringQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text value for a numeric field, are ignored. - /// - /// - public SimpleQueryStringQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public SimpleQueryStringQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Query string in the simple query string syntax you wish to parse and use for search. - /// - /// - public SimpleQueryStringQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public SimpleQueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Suffix appended to quoted text in the query string. - /// - /// - public SimpleQueryStringQueryDescriptor QuoteFieldSuffix(string? quoteFieldSuffix) - { - QuoteFieldSuffixValue = quoteFieldSuffix; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DefaultOperatorValue is not null) - { - writer.WritePropertyName("default_operator"); - JsonSerializer.Serialize(writer, DefaultOperatorValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FlagsValue is not null) - { - writer.WritePropertyName("flags"); - JsonSerializer.Serialize(writer, FlagsValue, options); - } - - if (FuzzyMaxExpansionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_max_expansions"); - writer.WriteNumberValue(FuzzyMaxExpansionsValue.Value); - } - - if (FuzzyPrefixLengthValue.HasValue) - { - writer.WritePropertyName("fuzzy_prefix_length"); - writer.WriteNumberValue(FuzzyPrefixLengthValue.Value); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) - { - writer.WritePropertyName("quote_field_suffix"); - writer.WriteStringValue(QuoteFieldSuffixValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SimpleQueryStringQueryDescriptor : SerializableDescriptor -{ - internal SimpleQueryStringQueryDescriptor(Action configure) => configure.Invoke(this); - - public SimpleQueryStringQueryDescriptor() : base() - { - } - - private string? AnalyzerValue { get; set; } - private bool? AnalyzeWildcardValue { get; set; } - private bool? AutoGenerateSynonymsPhraseQueryValue { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? DefaultOperatorValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringFlag? FlagsValue { get; set; } - private int? FuzzyMaxExpansionsValue { get; set; } - private int? FuzzyPrefixLengthValue { get; set; } - private bool? FuzzyTranspositionsValue { get; set; } - private bool? LenientValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - private string? QuoteFieldSuffixValue { get; set; } - - /// - /// - /// Analyzer used to convert text in the query string into tokens. - /// - /// - public SimpleQueryStringQueryDescriptor Analyzer(string? analyzer) - { - AnalyzerValue = analyzer; - return Self; - } - - /// - /// - /// If true, the query attempts to analyze wildcard terms in the query string. - /// - /// - public SimpleQueryStringQueryDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) - { - AnalyzeWildcardValue = analyzeWildcard; - return Self; - } - - /// - /// - /// If true, the parser creates a match_phrase query for each multi-position token. - /// - /// - public SimpleQueryStringQueryDescriptor AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true) - { - AutoGenerateSynonymsPhraseQueryValue = autoGenerateSynonymsPhraseQuery; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SimpleQueryStringQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Default boolean logic used to interpret text in the query string if no operators are specified. - /// - /// - public SimpleQueryStringQueryDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) - { - DefaultOperatorValue = defaultOperator; - return Self; - } - - /// - /// - /// Array of fields you wish to search. - /// Accepts wildcard expressions. - /// You also can boost relevance scores for matches to particular fields using a caret (^) notation. - /// Defaults to the index.query.default_field index setting, which has a default value of *. - /// - /// - public SimpleQueryStringQueryDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields? fields) - { - FieldsValue = fields; - return Self; - } - - /// - /// - /// List of enabled operators for the simple query string syntax. - /// - /// - public SimpleQueryStringQueryDescriptor Flags(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringFlag? flags) - { - FlagsValue = flags; - return Self; - } - - /// - /// - /// Maximum number of terms to which the query expands for fuzzy matching. - /// - /// - public SimpleQueryStringQueryDescriptor FuzzyMaxExpansions(int? fuzzyMaxExpansions) - { - FuzzyMaxExpansionsValue = fuzzyMaxExpansions; - return Self; - } - - /// - /// - /// Number of beginning characters left unchanged for fuzzy matching. - /// - /// - public SimpleQueryStringQueryDescriptor FuzzyPrefixLength(int? fuzzyPrefixLength) - { - FuzzyPrefixLengthValue = fuzzyPrefixLength; - return Self; - } - - /// - /// - /// If true, edits for fuzzy matching include transpositions of two adjacent characters (for example, ab to ba). - /// - /// - public SimpleQueryStringQueryDescriptor FuzzyTranspositions(bool? fuzzyTranspositions = true) - { - FuzzyTranspositionsValue = fuzzyTranspositions; - return Self; - } - - /// - /// - /// If true, format-based errors, such as providing a text value for a numeric field, are ignored. - /// - /// - public SimpleQueryStringQueryDescriptor Lenient(bool? lenient = true) - { - LenientValue = lenient; - return Self; - } - - /// - /// - /// Minimum number of clauses that must match for a document to be returned. - /// - /// - public SimpleQueryStringQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Query string in the simple query string syntax you wish to parse and use for search. - /// - /// - public SimpleQueryStringQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public SimpleQueryStringQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Suffix appended to quoted text in the query string. - /// - /// - public SimpleQueryStringQueryDescriptor QuoteFieldSuffix(string? quoteFieldSuffix) - { - QuoteFieldSuffixValue = quoteFieldSuffix; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(AnalyzerValue)) - { - writer.WritePropertyName("analyzer"); - writer.WriteStringValue(AnalyzerValue); - } - - if (AnalyzeWildcardValue.HasValue) - { - writer.WritePropertyName("analyze_wildcard"); - writer.WriteBooleanValue(AnalyzeWildcardValue.Value); - } - - if (AutoGenerateSynonymsPhraseQueryValue.HasValue) - { - writer.WritePropertyName("auto_generate_synonyms_phrase_query"); - writer.WriteBooleanValue(AutoGenerateSynonymsPhraseQueryValue.Value); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DefaultOperatorValue is not null) - { - writer.WritePropertyName("default_operator"); - JsonSerializer.Serialize(writer, DefaultOperatorValue, options); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (FlagsValue is not null) - { - writer.WritePropertyName("flags"); - JsonSerializer.Serialize(writer, FlagsValue, options); - } - - if (FuzzyMaxExpansionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_max_expansions"); - writer.WriteNumberValue(FuzzyMaxExpansionsValue.Value); - } - - if (FuzzyPrefixLengthValue.HasValue) - { - writer.WritePropertyName("fuzzy_prefix_length"); - writer.WriteNumberValue(FuzzyPrefixLengthValue.Value); - } - - if (FuzzyTranspositionsValue.HasValue) - { - writer.WritePropertyName("fuzzy_transpositions"); - writer.WriteBooleanValue(FuzzyTranspositionsValue.Value); - } - - if (LenientValue.HasValue) - { - writer.WritePropertyName("lenient"); - writer.WriteBooleanValue(LenientValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(QuoteFieldSuffixValue)) - { - writer.WritePropertyName("quote_field_suffix"); - writer.WriteStringValue(QuoteFieldSuffixValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs deleted file mode 100644 index 0f87c6badd4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs +++ /dev/null @@ -1,361 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanContainingQuery -{ - /// - /// - /// Can be any span query. - /// Matching spans from big that contain matches from little are returned. - /// - /// - [JsonInclude, JsonPropertyName("big")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Big { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Can be any span query. - /// Matching spans from big that contain matches from little are returned. - /// - /// - [JsonInclude, JsonPropertyName("little")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Little { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanContainingQuery spanContainingQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanContaining(spanContainingQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanContainingQuery spanContainingQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanContaining(spanContainingQuery); -} - -public sealed partial class SpanContainingQueryDescriptor : SerializableDescriptor> -{ - internal SpanContainingQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanContainingQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor BigDescriptor { get; set; } - private Action> BigDescriptorAction { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor LittleDescriptor { get; set; } - private Action> LittleDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Can be any span query. - /// Matching spans from big that contain matches from little are returned. - /// - /// - public SpanContainingQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery big) - { - BigDescriptor = null; - BigDescriptorAction = null; - BigValue = big; - return Self; - } - - public SpanContainingQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - BigValue = null; - BigDescriptorAction = null; - BigDescriptor = descriptor; - return Self; - } - - public SpanContainingQueryDescriptor Big(Action> configure) - { - BigValue = null; - BigDescriptor = null; - BigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanContainingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Can be any span query. - /// Matching spans from big that contain matches from little are returned. - /// - /// - public SpanContainingQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery little) - { - LittleDescriptor = null; - LittleDescriptorAction = null; - LittleValue = little; - return Self; - } - - public SpanContainingQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - LittleValue = null; - LittleDescriptorAction = null; - LittleDescriptor = descriptor; - return Self; - } - - public SpanContainingQueryDescriptor Little(Action> configure) - { - LittleValue = null; - LittleDescriptor = null; - LittleDescriptorAction = configure; - return Self; - } - - public SpanContainingQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BigDescriptor is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigDescriptor, options); - } - else if (BigDescriptorAction is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(BigDescriptorAction), options); - } - else - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (LittleDescriptor is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleDescriptor, options); - } - else if (LittleDescriptorAction is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(LittleDescriptorAction), options); - } - else - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanContainingQueryDescriptor : SerializableDescriptor -{ - internal SpanContainingQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanContainingQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor BigDescriptor { get; set; } - private Action BigDescriptorAction { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor LittleDescriptor { get; set; } - private Action LittleDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Can be any span query. - /// Matching spans from big that contain matches from little are returned. - /// - /// - public SpanContainingQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery big) - { - BigDescriptor = null; - BigDescriptorAction = null; - BigValue = big; - return Self; - } - - public SpanContainingQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - BigValue = null; - BigDescriptorAction = null; - BigDescriptor = descriptor; - return Self; - } - - public SpanContainingQueryDescriptor Big(Action configure) - { - BigValue = null; - BigDescriptor = null; - BigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanContainingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Can be any span query. - /// Matching spans from big that contain matches from little are returned. - /// - /// - public SpanContainingQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery little) - { - LittleDescriptor = null; - LittleDescriptorAction = null; - LittleValue = little; - return Self; - } - - public SpanContainingQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - LittleValue = null; - LittleDescriptorAction = null; - LittleDescriptor = descriptor; - return Self; - } - - public SpanContainingQueryDescriptor Little(Action configure) - { - LittleValue = null; - LittleDescriptor = null; - LittleDescriptorAction = configure; - return Self; - } - - public SpanContainingQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BigDescriptor is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigDescriptor, options); - } - else if (BigDescriptorAction is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(BigDescriptorAction), options); - } - else - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (LittleDescriptor is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleDescriptor, options); - } - else if (LittleDescriptorAction is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(LittleDescriptorAction), options); - } - else - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs deleted file mode 100644 index 88681550921..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs +++ /dev/null @@ -1,279 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanFieldMaskingQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanFieldMaskingQuery spanFieldMaskingQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanFieldMasking(spanFieldMaskingQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanFieldMaskingQuery spanFieldMaskingQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanFieldMasking(spanFieldMaskingQuery); -} - -public sealed partial class SpanFieldMaskingQueryDescriptor : SerializableDescriptor> -{ - internal SpanFieldMaskingQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanFieldMaskingQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanFieldMaskingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanFieldMaskingQueryDescriptor : SerializableDescriptor -{ - internal SpanFieldMaskingQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanFieldMaskingQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanFieldMaskingQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SpanFieldMaskingQueryDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - public SpanFieldMaskingQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs deleted file mode 100644 index 312e93bd1ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs +++ /dev/null @@ -1,287 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanFirstQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Controls the maximum end position permitted in a match. - /// - /// - [JsonInclude, JsonPropertyName("end")] - public int End { get; set; } - - /// - /// - /// Can be any other span type query. - /// - /// - [JsonInclude, JsonPropertyName("match")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Match { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanFirstQuery spanFirstQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanFirst(spanFirstQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanFirstQuery spanFirstQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanFirst(spanFirstQuery); -} - -public sealed partial class SpanFirstQueryDescriptor : SerializableDescriptor> -{ - internal SpanFirstQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanFirstQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private int EndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery MatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor MatchDescriptor { get; set; } - private Action> MatchDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanFirstQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Controls the maximum end position permitted in a match. - /// - /// - public SpanFirstQueryDescriptor End(int end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Can be any other span type query. - /// - /// - public SpanFirstQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery match) - { - MatchDescriptor = null; - MatchDescriptorAction = null; - MatchValue = match; - return Self; - } - - public SpanFirstQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - MatchValue = null; - MatchDescriptorAction = null; - MatchDescriptor = descriptor; - return Self; - } - - public SpanFirstQueryDescriptor Match(Action> configure) - { - MatchValue = null; - MatchDescriptor = null; - MatchDescriptorAction = configure; - return Self; - } - - public SpanFirstQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("end"); - writer.WriteNumberValue(EndValue); - if (MatchDescriptor is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchDescriptor, options); - } - else if (MatchDescriptorAction is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(MatchDescriptorAction), options); - } - else - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanFirstQueryDescriptor : SerializableDescriptor -{ - internal SpanFirstQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanFirstQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private int EndValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery MatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor MatchDescriptor { get; set; } - private Action MatchDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanFirstQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Controls the maximum end position permitted in a match. - /// - /// - public SpanFirstQueryDescriptor End(int end) - { - EndValue = end; - return Self; - } - - /// - /// - /// Can be any other span type query. - /// - /// - public SpanFirstQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery match) - { - MatchDescriptor = null; - MatchDescriptorAction = null; - MatchValue = match; - return Self; - } - - public SpanFirstQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - MatchValue = null; - MatchDescriptorAction = null; - MatchDescriptor = descriptor; - return Self; - } - - public SpanFirstQueryDescriptor Match(Action configure) - { - MatchValue = null; - MatchDescriptor = null; - MatchDescriptorAction = configure; - return Self; - } - - public SpanFirstQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("end"); - writer.WriteNumberValue(EndValue); - if (MatchDescriptor is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchDescriptor, options); - } - else if (MatchDescriptorAction is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(MatchDescriptorAction), options); - } - else - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs deleted file mode 100644 index e4b75dafbc7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs +++ /dev/null @@ -1,251 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanMultiTermQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Should be a multi term query (one of wildcard, fuzzy, prefix, range, or regexp query). - /// - /// - [JsonInclude, JsonPropertyName("match")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query Match { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanMultiTermQuery spanMultiTermQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanMulti(spanMultiTermQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanMultiTermQuery spanMultiTermQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanMulti(spanMultiTermQuery); -} - -public sealed partial class SpanMultiTermQueryDescriptor : SerializableDescriptor> -{ - internal SpanMultiTermQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanMultiTermQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query MatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor MatchDescriptor { get; set; } - private Action> MatchDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanMultiTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Should be a multi term query (one of wildcard, fuzzy, prefix, range, or regexp query). - /// - /// - public SpanMultiTermQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query match) - { - MatchDescriptor = null; - MatchDescriptorAction = null; - MatchValue = match; - return Self; - } - - public SpanMultiTermQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - MatchValue = null; - MatchDescriptorAction = null; - MatchDescriptor = descriptor; - return Self; - } - - public SpanMultiTermQueryDescriptor Match(Action> configure) - { - MatchValue = null; - MatchDescriptor = null; - MatchDescriptorAction = configure; - return Self; - } - - public SpanMultiTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MatchDescriptor is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchDescriptor, options); - } - else if (MatchDescriptorAction is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(MatchDescriptorAction), options); - } - else - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanMultiTermQueryDescriptor : SerializableDescriptor -{ - internal SpanMultiTermQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanMultiTermQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query MatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor MatchDescriptor { get; set; } - private Action MatchDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanMultiTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Should be a multi term query (one of wildcard, fuzzy, prefix, range, or regexp query). - /// - /// - public SpanMultiTermQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query match) - { - MatchDescriptor = null; - MatchDescriptorAction = null; - MatchValue = match; - return Self; - } - - public SpanMultiTermQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - MatchValue = null; - MatchDescriptorAction = null; - MatchDescriptor = descriptor; - return Self; - } - - public SpanMultiTermQueryDescriptor Match(Action configure) - { - MatchValue = null; - MatchDescriptor = null; - MatchDescriptorAction = configure; - return Self; - } - - public SpanMultiTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MatchDescriptor is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchDescriptor, options); - } - else if (MatchDescriptorAction is not null) - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(MatchDescriptorAction), options); - } - else - { - writer.WritePropertyName("match"); - JsonSerializer.Serialize(writer, MatchValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs deleted file mode 100644 index 46e595b09c6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNearQuery.g.cs +++ /dev/null @@ -1,395 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanNearQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Array of one or more other span type queries. - /// - /// - [JsonInclude, JsonPropertyName("clauses")] - public ICollection Clauses { get; set; } - - /// - /// - /// Controls whether matches are required to be in-order. - /// - /// - [JsonInclude, JsonPropertyName("in_order")] - public bool? InOrder { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - /// - /// - /// Controls the maximum number of intervening unmatched positions permitted. - /// - /// - [JsonInclude, JsonPropertyName("slop")] - public int? Slop { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanNearQuery spanNearQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanNear(spanNearQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanNearQuery spanNearQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanNear(spanNearQuery); -} - -public sealed partial class SpanNearQueryDescriptor : SerializableDescriptor> -{ - internal SpanNearQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanNearQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection ClausesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor ClausesDescriptor { get; set; } - private Action> ClausesDescriptorAction { get; set; } - private Action>[] ClausesDescriptorActions { get; set; } - private bool? InOrderValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanNearQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Array of one or more other span type queries. - /// - /// - public SpanNearQueryDescriptor Clauses(ICollection clauses) - { - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesValue = clauses; - return Self; - } - - public SpanNearQueryDescriptor Clauses(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - ClausesValue = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesDescriptor = descriptor; - return Self; - } - - public SpanNearQueryDescriptor Clauses(Action> configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorActions = null; - ClausesDescriptorAction = configure; - return Self; - } - - public SpanNearQueryDescriptor Clauses(params Action>[] configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls whether matches are required to be in-order. - /// - /// - public SpanNearQueryDescriptor InOrder(bool? inOrder = true) - { - InOrderValue = inOrder; - return Self; - } - - public SpanNearQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Controls the maximum number of intervening unmatched positions permitted. - /// - /// - public SpanNearQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (ClausesDescriptor is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ClausesDescriptor, options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorAction is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(ClausesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorActions is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - foreach (var action in ClausesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("clauses"); - JsonSerializer.Serialize(writer, ClausesValue, options); - } - - if (InOrderValue.HasValue) - { - writer.WritePropertyName("in_order"); - writer.WriteBooleanValue(InOrderValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanNearQueryDescriptor : SerializableDescriptor -{ - internal SpanNearQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanNearQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection ClausesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor ClausesDescriptor { get; set; } - private Action ClausesDescriptorAction { get; set; } - private Action[] ClausesDescriptorActions { get; set; } - private bool? InOrderValue { get; set; } - private string? QueryNameValue { get; set; } - private int? SlopValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanNearQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Array of one or more other span type queries. - /// - /// - public SpanNearQueryDescriptor Clauses(ICollection clauses) - { - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesValue = clauses; - return Self; - } - - public SpanNearQueryDescriptor Clauses(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - ClausesValue = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesDescriptor = descriptor; - return Self; - } - - public SpanNearQueryDescriptor Clauses(Action configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorActions = null; - ClausesDescriptorAction = configure; - return Self; - } - - public SpanNearQueryDescriptor Clauses(params Action[] configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Controls whether matches are required to be in-order. - /// - /// - public SpanNearQueryDescriptor InOrder(bool? inOrder = true) - { - InOrderValue = inOrder; - return Self; - } - - public SpanNearQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Controls the maximum number of intervening unmatched positions permitted. - /// - /// - public SpanNearQueryDescriptor Slop(int? slop) - { - SlopValue = slop; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (ClausesDescriptor is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ClausesDescriptor, options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorAction is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(ClausesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorActions is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - foreach (var action in ClausesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("clauses"); - JsonSerializer.Serialize(writer, ClausesValue, options); - } - - if (InOrderValue.HasValue) - { - writer.WritePropertyName("in_order"); - writer.WriteBooleanValue(InOrderValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (SlopValue.HasValue) - { - writer.WritePropertyName("slop"); - writer.WriteNumberValue(SlopValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs deleted file mode 100644 index 32d6a0d7255..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanNotQuery.g.cs +++ /dev/null @@ -1,490 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanNotQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span. - /// Equivalent to setting both pre and post. - /// - /// - [JsonInclude, JsonPropertyName("dist")] - public int? Dist { get; set; } - - /// - /// - /// Span query whose matches must not overlap those returned. - /// - /// - [JsonInclude, JsonPropertyName("exclude")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Exclude { get; set; } - - /// - /// - /// Span query whose matches are filtered. - /// - /// - [JsonInclude, JsonPropertyName("include")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Include { get; set; } - - /// - /// - /// The number of tokens after the include span that can’t have overlap with the exclude span. - /// - /// - [JsonInclude, JsonPropertyName("post")] - public int? Post { get; set; } - - /// - /// - /// The number of tokens before the include span that can’t have overlap with the exclude span. - /// - /// - [JsonInclude, JsonPropertyName("pre")] - public int? Pre { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanNotQuery spanNotQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanNot(spanNotQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanNotQuery spanNotQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanNot(spanNotQuery); -} - -public sealed partial class SpanNotQueryDescriptor : SerializableDescriptor> -{ - internal SpanNotQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanNotQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private int? DistValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor ExcludeDescriptor { get; set; } - private Action> ExcludeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor IncludeDescriptor { get; set; } - private Action> IncludeDescriptorAction { get; set; } - private int? PostValue { get; set; } - private int? PreValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanNotQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span. - /// Equivalent to setting both pre and post. - /// - /// - public SpanNotQueryDescriptor Dist(int? dist) - { - DistValue = dist; - return Self; - } - - /// - /// - /// Span query whose matches must not overlap those returned. - /// - /// - public SpanNotQueryDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery exclude) - { - ExcludeDescriptor = null; - ExcludeDescriptorAction = null; - ExcludeValue = exclude; - return Self; - } - - public SpanNotQueryDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - ExcludeValue = null; - ExcludeDescriptorAction = null; - ExcludeDescriptor = descriptor; - return Self; - } - - public SpanNotQueryDescriptor Exclude(Action> configure) - { - ExcludeValue = null; - ExcludeDescriptor = null; - ExcludeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Span query whose matches are filtered. - /// - /// - public SpanNotQueryDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery include) - { - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeValue = include; - return Self; - } - - public SpanNotQueryDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - IncludeValue = null; - IncludeDescriptorAction = null; - IncludeDescriptor = descriptor; - return Self; - } - - public SpanNotQueryDescriptor Include(Action> configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of tokens after the include span that can’t have overlap with the exclude span. - /// - /// - public SpanNotQueryDescriptor Post(int? post) - { - PostValue = post; - return Self; - } - - /// - /// - /// The number of tokens before the include span that can’t have overlap with the exclude span. - /// - /// - public SpanNotQueryDescriptor Pre(int? pre) - { - PreValue = pre; - return Self; - } - - public SpanNotQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DistValue.HasValue) - { - writer.WritePropertyName("dist"); - writer.WriteNumberValue(DistValue.Value); - } - - if (ExcludeDescriptor is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeDescriptor, options); - } - else if (ExcludeDescriptorAction is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(ExcludeDescriptorAction), options); - } - else - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (IncludeDescriptor is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeDescriptor, options); - } - else if (IncludeDescriptorAction is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(IncludeDescriptorAction), options); - } - else - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (PostValue.HasValue) - { - writer.WritePropertyName("post"); - writer.WriteNumberValue(PostValue.Value); - } - - if (PreValue.HasValue) - { - writer.WritePropertyName("pre"); - writer.WriteNumberValue(PreValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanNotQueryDescriptor : SerializableDescriptor -{ - internal SpanNotQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanNotQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private int? DistValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery ExcludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor ExcludeDescriptor { get; set; } - private Action ExcludeDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery IncludeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor IncludeDescriptor { get; set; } - private Action IncludeDescriptorAction { get; set; } - private int? PostValue { get; set; } - private int? PreValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanNotQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The number of tokens from within the include span that can’t have overlap with the exclude span. - /// Equivalent to setting both pre and post. - /// - /// - public SpanNotQueryDescriptor Dist(int? dist) - { - DistValue = dist; - return Self; - } - - /// - /// - /// Span query whose matches must not overlap those returned. - /// - /// - public SpanNotQueryDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery exclude) - { - ExcludeDescriptor = null; - ExcludeDescriptorAction = null; - ExcludeValue = exclude; - return Self; - } - - public SpanNotQueryDescriptor Exclude(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - ExcludeValue = null; - ExcludeDescriptorAction = null; - ExcludeDescriptor = descriptor; - return Self; - } - - public SpanNotQueryDescriptor Exclude(Action configure) - { - ExcludeValue = null; - ExcludeDescriptor = null; - ExcludeDescriptorAction = configure; - return Self; - } - - /// - /// - /// Span query whose matches are filtered. - /// - /// - public SpanNotQueryDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery include) - { - IncludeDescriptor = null; - IncludeDescriptorAction = null; - IncludeValue = include; - return Self; - } - - public SpanNotQueryDescriptor Include(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - IncludeValue = null; - IncludeDescriptorAction = null; - IncludeDescriptor = descriptor; - return Self; - } - - public SpanNotQueryDescriptor Include(Action configure) - { - IncludeValue = null; - IncludeDescriptor = null; - IncludeDescriptorAction = configure; - return Self; - } - - /// - /// - /// The number of tokens after the include span that can’t have overlap with the exclude span. - /// - /// - public SpanNotQueryDescriptor Post(int? post) - { - PostValue = post; - return Self; - } - - /// - /// - /// The number of tokens before the include span that can’t have overlap with the exclude span. - /// - /// - public SpanNotQueryDescriptor Pre(int? pre) - { - PreValue = pre; - return Self; - } - - public SpanNotQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (DistValue.HasValue) - { - writer.WritePropertyName("dist"); - writer.WriteNumberValue(DistValue.Value); - } - - if (ExcludeDescriptor is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeDescriptor, options); - } - else if (ExcludeDescriptorAction is not null) - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(ExcludeDescriptorAction), options); - } - else - { - writer.WritePropertyName("exclude"); - JsonSerializer.Serialize(writer, ExcludeValue, options); - } - - if (IncludeDescriptor is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeDescriptor, options); - } - else if (IncludeDescriptorAction is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(IncludeDescriptorAction), options); - } - else - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - - if (PostValue.HasValue) - { - writer.WritePropertyName("post"); - writer.WriteNumberValue(PostValue.Value); - } - - if (PreValue.HasValue) - { - writer.WritePropertyName("pre"); - writer.WriteNumberValue(PreValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs deleted file mode 100644 index 83c31d674f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanOrQuery.g.cs +++ /dev/null @@ -1,307 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanOrQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Array of one or more other span type queries. - /// - /// - [JsonInclude, JsonPropertyName("clauses")] - public ICollection Clauses { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanOrQuery spanOrQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanOr(spanOrQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanOrQuery spanOrQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanOr(spanOrQuery); -} - -public sealed partial class SpanOrQueryDescriptor : SerializableDescriptor> -{ - internal SpanOrQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanOrQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection ClausesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor ClausesDescriptor { get; set; } - private Action> ClausesDescriptorAction { get; set; } - private Action>[] ClausesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanOrQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Array of one or more other span type queries. - /// - /// - public SpanOrQueryDescriptor Clauses(ICollection clauses) - { - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesValue = clauses; - return Self; - } - - public SpanOrQueryDescriptor Clauses(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - ClausesValue = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesDescriptor = descriptor; - return Self; - } - - public SpanOrQueryDescriptor Clauses(Action> configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorActions = null; - ClausesDescriptorAction = configure; - return Self; - } - - public SpanOrQueryDescriptor Clauses(params Action>[] configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = configure; - return Self; - } - - public SpanOrQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (ClausesDescriptor is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ClausesDescriptor, options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorAction is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(ClausesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorActions is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - foreach (var action in ClausesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("clauses"); - JsonSerializer.Serialize(writer, ClausesValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanOrQueryDescriptor : SerializableDescriptor -{ - internal SpanOrQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanOrQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private ICollection ClausesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor ClausesDescriptor { get; set; } - private Action ClausesDescriptorAction { get; set; } - private Action[] ClausesDescriptorActions { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanOrQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Array of one or more other span type queries. - /// - /// - public SpanOrQueryDescriptor Clauses(ICollection clauses) - { - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesValue = clauses; - return Self; - } - - public SpanOrQueryDescriptor Clauses(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - ClausesValue = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = null; - ClausesDescriptor = descriptor; - return Self; - } - - public SpanOrQueryDescriptor Clauses(Action configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorActions = null; - ClausesDescriptorAction = configure; - return Self; - } - - public SpanOrQueryDescriptor Clauses(params Action[] configure) - { - ClausesValue = null; - ClausesDescriptor = null; - ClausesDescriptorAction = null; - ClausesDescriptorActions = configure; - return Self; - } - - public SpanOrQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (ClausesDescriptor is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ClausesDescriptor, options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorAction is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(ClausesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ClausesDescriptorActions is not null) - { - writer.WritePropertyName("clauses"); - writer.WriteStartArray(); - foreach (var action in ClausesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("clauses"); - JsonSerializer.Serialize(writer, ClausesValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanQuery.g.cs deleted file mode 100644 index b12510520db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanQuery.g.cs +++ /dev/null @@ -1,360 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(SpanQueryConverter))] -public sealed partial class SpanQuery -{ - internal SpanQuery(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 SpanQuery SpanContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery spanContainingQuery) => new SpanQuery("span_containing", spanContainingQuery); - public static SpanQuery SpanFieldMasking(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery spanFieldMaskingQuery) => new SpanQuery("span_field_masking", spanFieldMaskingQuery); - public static SpanQuery SpanFirst(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery spanFirstQuery) => new SpanQuery("span_first", spanFirstQuery); - public static SpanQuery SpanGap(KeyValuePair integer) => new SpanQuery("span_gap", integer); - public static SpanQuery SpanMulti(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery spanMultiTermQuery) => new SpanQuery("span_multi", spanMultiTermQuery); - public static SpanQuery SpanNear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery spanNearQuery) => new SpanQuery("span_near", spanNearQuery); - public static SpanQuery SpanNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery spanNotQuery) => new SpanQuery("span_not", spanNotQuery); - public static SpanQuery SpanOr(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery spanOrQuery) => new SpanQuery("span_or", spanOrQuery); - public static SpanQuery SpanTerm(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery spanTermQuery) => new SpanQuery("span_term", spanTermQuery); - public static SpanQuery SpanWithin(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery spanWithinQuery) => new SpanQuery("span_within", spanWithinQuery); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class SpanQueryConverter : JsonConverter -{ - public override SpanQuery 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; - 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 == "span_containing") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_field_masking") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_first") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_gap") - { - variantValue = JsonSerializer.Deserialize?>(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_multi") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_near") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_not") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_or") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "span_within") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'SpanQuery' from the response."); - } - - var result = new SpanQuery(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, SpanQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "span_containing": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery)value.Variant, options); - break; - case "span_field_masking": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery)value.Variant, options); - break; - case "span_first": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery)value.Variant, options); - break; - case "span_gap": - JsonSerializer.Serialize>(writer, (KeyValuePair)value.Variant, options); - break; - case "span_multi": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery)value.Variant, options); - break; - case "span_near": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery)value.Variant, options); - break; - case "span_not": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery)value.Variant, options); - break; - case "span_or": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery)value.Variant, options); - break; - case "span_term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery)value.Variant, options); - break; - case "span_within": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanQueryDescriptor : SerializableDescriptor> -{ - internal SpanQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SpanQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SpanQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public SpanQueryDescriptor SpanContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery spanContainingQuery) => Set(spanContainingQuery, "span_containing"); - public SpanQueryDescriptor SpanContaining(Action> configure) => Set(configure, "span_containing"); - public SpanQueryDescriptor SpanFieldMasking(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery spanFieldMaskingQuery) => Set(spanFieldMaskingQuery, "span_field_masking"); - public SpanQueryDescriptor SpanFieldMasking(Action> configure) => Set(configure, "span_field_masking"); - public SpanQueryDescriptor SpanFirst(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery spanFirstQuery) => Set(spanFirstQuery, "span_first"); - public SpanQueryDescriptor SpanFirst(Action> configure) => Set(configure, "span_first"); - public SpanQueryDescriptor SpanGap(KeyValuePair integer) => Set(integer, "span_gap"); - public SpanQueryDescriptor SpanMulti(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery spanMultiTermQuery) => Set(spanMultiTermQuery, "span_multi"); - public SpanQueryDescriptor SpanMulti(Action> configure) => Set(configure, "span_multi"); - public SpanQueryDescriptor SpanNear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery spanNearQuery) => Set(spanNearQuery, "span_near"); - public SpanQueryDescriptor SpanNear(Action> configure) => Set(configure, "span_near"); - public SpanQueryDescriptor SpanNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery spanNotQuery) => Set(spanNotQuery, "span_not"); - public SpanQueryDescriptor SpanNot(Action> configure) => Set(configure, "span_not"); - public SpanQueryDescriptor SpanOr(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery spanOrQuery) => Set(spanOrQuery, "span_or"); - public SpanQueryDescriptor SpanOr(Action> configure) => Set(configure, "span_or"); - public SpanQueryDescriptor SpanTerm(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery spanTermQuery) => Set(spanTermQuery, "span_term"); - public SpanQueryDescriptor SpanTerm(Action> configure) => Set(configure, "span_term"); - public SpanQueryDescriptor SpanWithin(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery spanWithinQuery) => Set(spanWithinQuery, "span_within"); - public SpanQueryDescriptor SpanWithin(Action> configure) => Set(configure, "span_within"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanQueryDescriptor : SerializableDescriptor -{ - internal SpanQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SpanQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SpanQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public SpanQueryDescriptor SpanContaining(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanContainingQuery spanContainingQuery) => Set(spanContainingQuery, "span_containing"); - public SpanQueryDescriptor SpanContaining(Action configure) => Set(configure, "span_containing"); - public SpanQueryDescriptor SpanFieldMasking(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFieldMaskingQuery spanFieldMaskingQuery) => Set(spanFieldMaskingQuery, "span_field_masking"); - public SpanQueryDescriptor SpanFieldMasking(Action configure) => Set(configure, "span_field_masking"); - public SpanQueryDescriptor SpanFirst(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanFirstQuery spanFirstQuery) => Set(spanFirstQuery, "span_first"); - public SpanQueryDescriptor SpanFirst(Action configure) => Set(configure, "span_first"); - public SpanQueryDescriptor SpanGap(KeyValuePair integer) => Set(integer, "span_gap"); - public SpanQueryDescriptor SpanMulti(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanMultiTermQuery spanMultiTermQuery) => Set(spanMultiTermQuery, "span_multi"); - public SpanQueryDescriptor SpanMulti(Action configure) => Set(configure, "span_multi"); - public SpanQueryDescriptor SpanNear(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNearQuery spanNearQuery) => Set(spanNearQuery, "span_near"); - public SpanQueryDescriptor SpanNear(Action configure) => Set(configure, "span_near"); - public SpanQueryDescriptor SpanNot(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanNotQuery spanNotQuery) => Set(spanNotQuery, "span_not"); - public SpanQueryDescriptor SpanNot(Action configure) => Set(configure, "span_not"); - public SpanQueryDescriptor SpanOr(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanOrQuery spanOrQuery) => Set(spanOrQuery, "span_or"); - public SpanQueryDescriptor SpanOr(Action configure) => Set(configure, "span_or"); - public SpanQueryDescriptor SpanTerm(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanTermQuery spanTermQuery) => Set(spanTermQuery, "span_term"); - public SpanQueryDescriptor SpanTerm(Action configure) => Set(configure, "span_term"); - public SpanQueryDescriptor SpanWithin(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanWithinQuery spanWithinQuery) => Set(spanWithinQuery, "span_within"); - public SpanQueryDescriptor SpanWithin(Action configure) => Set(configure, "span_within"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs deleted file mode 100644 index 3567a984d2f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanTermQuery.g.cs +++ /dev/null @@ -1,288 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class SpanTermQueryConverter : JsonConverter -{ - public override SpanTermQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new SpanTermQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "value") - { - variant.Value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, SpanTermQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize SpanTermQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(value.Value); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(SpanTermQueryConverter))] -public sealed partial class SpanTermQuery -{ - public SpanTermQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - public string? QueryName { get; set; } - public string Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanTermQuery spanTermQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanTerm(spanTermQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanTermQuery spanTermQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanTerm(spanTermQuery); -} - -public sealed partial class SpanTermQueryDescriptor : SerializableDescriptor> -{ - internal SpanTermQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanTermQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private string ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public SpanTermQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SpanTermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanTermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanTermQueryDescriptor Value(string value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class SpanTermQueryDescriptor : SerializableDescriptor -{ - internal SpanTermQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanTermQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private string ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanTermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public SpanTermQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public SpanTermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanTermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SpanTermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SpanTermQueryDescriptor Value(string value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs deleted file mode 100644 index 13f49ac0cf3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs +++ /dev/null @@ -1,361 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class SpanWithinQuery -{ - /// - /// - /// Can be any span query. - /// Matching spans from little that are enclosed within big are returned. - /// - /// - [JsonInclude, JsonPropertyName("big")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Big { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Can be any span query. - /// Matching spans from little that are enclosed within big are returned. - /// - /// - [JsonInclude, JsonPropertyName("little")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery Little { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(SpanWithinQuery spanWithinQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.SpanWithin(spanWithinQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery(SpanWithinQuery spanWithinQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery.SpanWithin(spanWithinQuery); -} - -public sealed partial class SpanWithinQueryDescriptor : SerializableDescriptor> -{ - internal SpanWithinQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SpanWithinQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor BigDescriptor { get; set; } - private Action> BigDescriptorAction { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor LittleDescriptor { get; set; } - private Action> LittleDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Can be any span query. - /// Matching spans from little that are enclosed within big are returned. - /// - /// - public SpanWithinQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery big) - { - BigDescriptor = null; - BigDescriptorAction = null; - BigValue = big; - return Self; - } - - public SpanWithinQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - BigValue = null; - BigDescriptorAction = null; - BigDescriptor = descriptor; - return Self; - } - - public SpanWithinQueryDescriptor Big(Action> configure) - { - BigValue = null; - BigDescriptor = null; - BigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanWithinQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Can be any span query. - /// Matching spans from little that are enclosed within big are returned. - /// - /// - public SpanWithinQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery little) - { - LittleDescriptor = null; - LittleDescriptorAction = null; - LittleValue = little; - return Self; - } - - public SpanWithinQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - LittleValue = null; - LittleDescriptorAction = null; - LittleDescriptor = descriptor; - return Self; - } - - public SpanWithinQueryDescriptor Little(Action> configure) - { - LittleValue = null; - LittleDescriptor = null; - LittleDescriptorAction = configure; - return Self; - } - - public SpanWithinQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BigDescriptor is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigDescriptor, options); - } - else if (BigDescriptorAction is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(BigDescriptorAction), options); - } - else - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (LittleDescriptor is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleDescriptor, options); - } - else if (LittleDescriptorAction is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(LittleDescriptorAction), options); - } - else - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SpanWithinQueryDescriptor : SerializableDescriptor -{ - internal SpanWithinQueryDescriptor(Action configure) => configure.Invoke(this); - - public SpanWithinQueryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery BigValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor BigDescriptor { get; set; } - private Action BigDescriptorAction { get; set; } - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery LittleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor LittleDescriptor { get; set; } - private Action LittleDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Can be any span query. - /// Matching spans from little that are enclosed within big are returned. - /// - /// - public SpanWithinQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery big) - { - BigDescriptor = null; - BigDescriptorAction = null; - BigValue = big; - return Self; - } - - public SpanWithinQueryDescriptor Big(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - BigValue = null; - BigDescriptorAction = null; - BigDescriptor = descriptor; - return Self; - } - - public SpanWithinQueryDescriptor Big(Action configure) - { - BigValue = null; - BigDescriptor = null; - BigDescriptorAction = configure; - return Self; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SpanWithinQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Can be any span query. - /// Matching spans from little that are enclosed within big are returned. - /// - /// - public SpanWithinQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQuery little) - { - LittleDescriptor = null; - LittleDescriptorAction = null; - LittleValue = little; - return Self; - } - - public SpanWithinQueryDescriptor Little(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor descriptor) - { - LittleValue = null; - LittleDescriptorAction = null; - LittleDescriptor = descriptor; - return Self; - } - - public SpanWithinQueryDescriptor Little(Action configure) - { - LittleValue = null; - LittleDescriptor = null; - LittleDescriptorAction = configure; - return Self; - } - - public SpanWithinQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BigDescriptor is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigDescriptor, options); - } - else if (BigDescriptorAction is not null) - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(BigDescriptorAction), options); - } - else - { - writer.WritePropertyName("big"); - JsonSerializer.Serialize(writer, BigValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (LittleDescriptor is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleDescriptor, options); - } - else if (LittleDescriptorAction is not null) - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SpanQueryDescriptor(LittleDescriptorAction), options); - } - else - { - writer.WritePropertyName("little"); - JsonSerializer.Serialize(writer, LittleValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs deleted file mode 100644 index d0034b94dbb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs +++ /dev/null @@ -1,506 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -[JsonConverter(typeof(SparseVectorQueryConverter))] -public sealed partial class SparseVectorQuery -{ - internal SparseVectorQuery(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 SparseVectorQuery InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id id) => new SparseVectorQuery("inference_id", id); - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// The query text you want to use for search. - /// If inference_id is specified, query must also be specified. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string? Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class SparseVectorQueryConverter : JsonConverter -{ - public override SparseVectorQuery 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; - float? boostValue = default; - Elastic.Clients.Elasticsearch.Serverless.Field fieldValue = default; - string? queryValue = default; - string? queryNameValue = 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 == "boost") - { - boostValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "field") - { - fieldValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "query") - { - queryValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "_name") - { - queryNameValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "inference_id") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'SparseVectorQuery' from the response."); - } - - var result = new SparseVectorQuery(variantNameValue, variantValue); - result.Boost = boostValue; - result.Field = fieldValue; - result.Query = queryValue; - result.QueryName = queryNameValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, SparseVectorQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.Field is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, value.Field, options); - } - - if (!string.IsNullOrEmpty(value.Query)) - { - writer.WritePropertyName("query"); - writer.WriteStringValue(value.Query); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "inference_id": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Id)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SparseVectorQueryDescriptor : SerializableDescriptor> -{ - internal SparseVectorQueryDescriptor(Action> configure) => configure.Invoke(this); - - public SparseVectorQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SparseVectorQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SparseVectorQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SparseVectorQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - public SparseVectorQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - public SparseVectorQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - public SparseVectorQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The query text you want to use for search. - /// If inference_id is specified, query must also be specified. - /// - /// - public SparseVectorQueryDescriptor Query(string? query) - { - QueryValue = query; - return Self; - } - - public SparseVectorQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SparseVectorQueryDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id id) => Set(id, "inference_id"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(QueryValue)) - { - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SparseVectorQueryDescriptor : SerializableDescriptor -{ - internal SparseVectorQueryDescriptor(Action configure) => configure.Invoke(this); - - public SparseVectorQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SparseVectorQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SparseVectorQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public SparseVectorQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - public SparseVectorQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - public SparseVectorQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The name of the field that contains the token-weight pairs to be searched against. - /// This field must be a mapped sparse_vector field. - /// - /// - public SparseVectorQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The query text you want to use for search. - /// If inference_id is specified, query must also be specified. - /// - /// - public SparseVectorQueryDescriptor Query(string? query) - { - QueryValue = query; - return Self; - } - - public SparseVectorQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public SparseVectorQueryDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id id) => Set(id, "inference_id"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - if (!string.IsNullOrEmpty(QueryValue)) - { - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs deleted file mode 100644 index b5e2dfd6e85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermQuery.g.cs +++ /dev/null @@ -1,364 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class TermQueryConverter : JsonConverter -{ - public override TermQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new TermQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "case_insensitive") - { - variant.CaseInsensitive = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "value") - { - variant.Value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, TermQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize TermQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.CaseInsensitive.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(value.CaseInsensitive.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, value.Value, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(TermQueryConverter))] -public sealed partial class TermQuery -{ - public TermQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - - /// - /// - /// Allows ASCII case insensitive matching of the value with the indexed field values when set to true. - /// When false, the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public bool? CaseInsensitive { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Term you wish to find in the provided field. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.FieldValue Value { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(TermQuery termQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Term(termQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(TermQuery termQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Term(termQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(TermQuery termQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Term(termQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(TermQuery termQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Term(termQuery); -} - -public sealed partial class TermQueryDescriptor : SerializableDescriptor> -{ - internal TermQueryDescriptor(Action> configure) => configure.Invoke(this); - - public TermQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows ASCII case insensitive matching of the value with the indexed field values when set to true. - /// When false, the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public TermQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public TermQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Term you wish to find in the provided field. - /// - /// - public TermQueryDescriptor Value(Elastic.Clients.Elasticsearch.Serverless.FieldValue value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class TermQueryDescriptor : SerializableDescriptor -{ - internal TermQueryDescriptor(Action configure) => configure.Invoke(this); - - public TermQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldValue ValueValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows ASCII case insensitive matching of the value with the indexed field values when set to true. - /// When false, the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public TermQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public TermQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Term you wish to find in the provided field. - /// - /// - public TermQueryDescriptor Value(Elastic.Clients.Elasticsearch.Serverless.FieldValue value) - { - ValueValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("value"); - JsonSerializer.Serialize(writer, ValueValue, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermRangeQuery.g.cs deleted file mode 100644 index 538911f2a18..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermRangeQuery.g.cs +++ /dev/null @@ -1,533 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class TermRangeQueryConverter : JsonConverter -{ - public override TermRangeQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new TermRangeQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gt") - { - variant.Gt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gte") - { - variant.Gte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lt") - { - variant.Lt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lte") - { - variant.Lte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "relation") - { - variant.Relation = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, TermRangeQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize TermRangeQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (!string.IsNullOrEmpty(value.Gt)) - { - writer.WritePropertyName("gt"); - writer.WriteStringValue(value.Gt); - } - - if (!string.IsNullOrEmpty(value.Gte)) - { - writer.WritePropertyName("gte"); - writer.WriteStringValue(value.Gte); - } - - if (!string.IsNullOrEmpty(value.Lt)) - { - writer.WritePropertyName("lt"); - writer.WriteStringValue(value.Lt); - } - - if (!string.IsNullOrEmpty(value.Lte)) - { - writer.WritePropertyName("lte"); - writer.WriteStringValue(value.Lte); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Relation is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, value.Relation, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(TermRangeQueryConverter))] -public sealed partial class TermRangeQuery -{ - public TermRangeQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Greater than. - /// - /// - public string? Gt { get; set; } - - /// - /// - /// Greater than or equal to. - /// - /// - public string? Gte { get; set; } - - /// - /// - /// Less than. - /// - /// - public string? Lt { get; set; } - - /// - /// - /// Less than or equal to. - /// - /// - public string? Lte { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? Relation { get; set; } -} - -public sealed partial class TermRangeQueryDescriptor : SerializableDescriptor> -{ - internal TermRangeQueryDescriptor(Action> configure) => configure.Invoke(this); - - public TermRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? GtValue { get; set; } - private string? GteValue { get; set; } - private string? LtValue { get; set; } - private string? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public TermRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public TermRangeQueryDescriptor Gt(string? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public TermRangeQueryDescriptor Gte(string? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public TermRangeQueryDescriptor Lt(string? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public TermRangeQueryDescriptor Lte(string? lte) - { - LteValue = lte; - return Self; - } - - public TermRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public TermRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(GtValue)) - { - writer.WritePropertyName("gt"); - writer.WriteStringValue(GtValue); - } - - if (!string.IsNullOrEmpty(GteValue)) - { - writer.WritePropertyName("gte"); - writer.WriteStringValue(GteValue); - } - - if (!string.IsNullOrEmpty(LtValue)) - { - writer.WritePropertyName("lt"); - writer.WriteStringValue(LtValue); - } - - if (!string.IsNullOrEmpty(LteValue)) - { - writer.WritePropertyName("lte"); - writer.WriteStringValue(LteValue); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class TermRangeQueryDescriptor : SerializableDescriptor -{ - internal TermRangeQueryDescriptor(Action configure) => configure.Invoke(this); - - public TermRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? GtValue { get; set; } - private string? GteValue { get; set; } - private string? LtValue { get; set; } - private string? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public TermRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public TermRangeQueryDescriptor Gt(string? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public TermRangeQueryDescriptor Gte(string? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public TermRangeQueryDescriptor Lt(string? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public TermRangeQueryDescriptor Lte(string? lte) - { - LteValue = lte; - return Self; - } - - public TermRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public TermRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(GtValue)) - { - writer.WritePropertyName("gt"); - writer.WriteStringValue(GtValue); - } - - if (!string.IsNullOrEmpty(GteValue)) - { - writer.WritePropertyName("gte"); - writer.WriteStringValue(GteValue); - } - - if (!string.IsNullOrEmpty(LtValue)) - { - writer.WritePropertyName("lt"); - writer.WriteStringValue(LtValue); - } - - if (!string.IsNullOrEmpty(LteValue)) - { - writer.WritePropertyName("lte"); - writer.WriteStringValue(LteValue); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsLookup.g.cs deleted file mode 100644 index 4af488b296e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsLookup.g.cs +++ /dev/null @@ -1,176 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class TermsLookup -{ - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName Index { get; set; } - [JsonInclude, JsonPropertyName("path")] - public Elastic.Clients.Elasticsearch.Serverless.Field Path { get; set; } - [JsonInclude, JsonPropertyName("routing")] - public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get; set; } -} - -public sealed partial class TermsLookupDescriptor : SerializableDescriptor> -{ - internal TermsLookupDescriptor(Action> configure) => configure.Invoke(this); - - public TermsLookupDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - - public TermsLookupDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - public TermsLookupDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - public TermsLookupDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - public TermsLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public TermsLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public TermsLookupDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - 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.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TermsLookupDescriptor : SerializableDescriptor -{ - internal TermsLookupDescriptor(Action configure) => configure.Invoke(this); - - public TermsLookupDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexName IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field PathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } - - public TermsLookupDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - public TermsLookupDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName index) - { - IndexValue = index; - return Self; - } - - public TermsLookupDescriptor Path(Elastic.Clients.Elasticsearch.Serverless.Field path) - { - PathValue = path; - return Self; - } - - public TermsLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public TermsLookupDescriptor Path(Expression> path) - { - PathValue = path; - return Self; - } - - public TermsLookupDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) - { - RoutingValue = routing; - 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.WritePropertyName("path"); - JsonSerializer.Serialize(writer, PathValue, options); - if (RoutingValue is not null) - { - writer.WritePropertyName("routing"); - JsonSerializer.Serialize(writer, RoutingValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs deleted file mode 100644 index ed80e1a50a8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQuery.g.cs +++ /dev/null @@ -1,280 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class TermsQueryConverter : JsonConverter -{ - public override TermsQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new TermsQuery(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Terms = JsonSerializer.Deserialize(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, TermsQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Terms is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Terms, options); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(TermsQueryConverter))] -public sealed partial class TermsQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - public string? QueryName { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField Terms { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(TermsQuery termsQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Terms(termsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(TermsQuery termsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Terms(termsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(TermsQuery termsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Terms(termsQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(TermsQuery termsQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Terms(termsQuery); -} - -public sealed partial class TermsQueryDescriptor : SerializableDescriptor> -{ - internal TermsQueryDescriptor(Action> configure) => configure.Invoke(this); - - public TermsQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField TermsValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public TermsQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public TermsQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField terms) - { - TermsValue = terms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && TermsValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TermsQueryDescriptor : SerializableDescriptor -{ - internal TermsQueryDescriptor(Action configure) => configure.Invoke(this); - - public TermsQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField TermsValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermsQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public TermsQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public TermsQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQueryField terms) - { - TermsValue = terms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && TermsValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, TermsValue, options); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQueryField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQueryField.g.cs deleted file mode 100644 index 2acdddd8b8b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsQueryField.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class TermsQueryField : Union, Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsLookup> -{ - public TermsQueryField(IReadOnlyCollection Value) : base(Value) - { - } - - public TermsQueryField(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsLookup Lookup) : base(Lookup) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs deleted file mode 100644 index 8da1d26d0e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ /dev/null @@ -1,572 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class TermsSetQueryConverter : JsonConverter -{ - public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new TermsSetQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "minimum_should_match") - { - variant.MinimumShouldMatch = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "minimum_should_match_field") - { - variant.MinimumShouldMatchField = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "minimum_should_match_script") - { - variant.MinimumShouldMatchScript = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "terms") - { - variant.Terms = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, TermsSetQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize TermsSetQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.MinimumShouldMatch is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, value.MinimumShouldMatch, options); - } - - if (value.MinimumShouldMatchField is not null) - { - writer.WritePropertyName("minimum_should_match_field"); - JsonSerializer.Serialize(writer, value.MinimumShouldMatchField, options); - } - - if (value.MinimumShouldMatchScript is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, value.MinimumShouldMatchScript, options); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, value.Terms, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(TermsSetQueryConverter))] -public sealed partial class TermsSetQuery -{ - public TermsSetQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Specification describing number of matching terms required to return a document. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatch { get; set; } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchField { get; set; } - - /// - /// - /// Custom script containing the number of matching terms required to return a document. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScript { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Array of terms you wish to find in the provided field. - /// - /// - public ICollection Terms { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(TermsSetQuery termsSetQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.TermsSet(termsSetQuery); -} - -public sealed partial class TermsSetQueryDescriptor : SerializableDescriptor> -{ - internal TermsSetQueryDescriptor(Action> configure) => configure.Invoke(this); - - public TermsSetQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } - private Action MinimumShouldMatchScriptDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermsSetQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public TermsSetQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermsSetQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsSetQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specification describing number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchField(Elastic.Clients.Elasticsearch.Serverless.Field? minimumShouldMatchField) - { - MinimumShouldMatchFieldValue = minimumShouldMatchField; - return Self; - } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchField(Expression> minimumShouldMatchField) - { - MinimumShouldMatchFieldValue = minimumShouldMatchField; - return Self; - } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchField(Expression> minimumShouldMatchField) - { - MinimumShouldMatchFieldValue = minimumShouldMatchField; - return Self; - } - - /// - /// - /// Custom script containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clients.Elasticsearch.Serverless.Script? minimumShouldMatchScript) - { - MinimumShouldMatchScriptDescriptor = null; - MinimumShouldMatchScriptDescriptorAction = null; - MinimumShouldMatchScriptValue = minimumShouldMatchScript; - return Self; - } - - public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - MinimumShouldMatchScriptValue = null; - MinimumShouldMatchScriptDescriptorAction = null; - MinimumShouldMatchScriptDescriptor = descriptor; - return Self; - } - - public TermsSetQueryDescriptor MinimumShouldMatchScript(Action configure) - { - MinimumShouldMatchScriptValue = null; - MinimumShouldMatchScriptDescriptor = null; - MinimumShouldMatchScriptDescriptorAction = configure; - return Self; - } - - public TermsSetQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Array of terms you wish to find in the provided field. - /// - /// - public TermsSetQueryDescriptor Terms(ICollection terms) - { - TermsValue = terms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (MinimumShouldMatchFieldValue is not null) - { - writer.WritePropertyName("minimum_should_match_field"); - JsonSerializer.Serialize(writer, MinimumShouldMatchFieldValue, options); - } - - if (MinimumShouldMatchScriptDescriptor is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, MinimumShouldMatchScriptDescriptor, options); - } - else if (MinimumShouldMatchScriptDescriptorAction is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(MinimumShouldMatchScriptDescriptorAction), options); - } - else if (MinimumShouldMatchScriptValue is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, MinimumShouldMatchScriptValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class TermsSetQueryDescriptor : SerializableDescriptor -{ - internal TermsSetQueryDescriptor(Action configure) => configure.Invoke(this); - - public TermsSetQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field? MinimumShouldMatchFieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script? MinimumShouldMatchScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } - private Action MinimumShouldMatchScriptDescriptorAction { get; set; } - private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public TermsSetQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public TermsSetQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public TermsSetQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public TermsSetQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specification describing number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatch(Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? minimumShouldMatch) - { - MinimumShouldMatchValue = minimumShouldMatch; - return Self; - } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchField(Elastic.Clients.Elasticsearch.Serverless.Field? minimumShouldMatchField) - { - MinimumShouldMatchFieldValue = minimumShouldMatchField; - return Self; - } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchField(Expression> minimumShouldMatchField) - { - MinimumShouldMatchFieldValue = minimumShouldMatchField; - return Self; - } - - /// - /// - /// Numeric field containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchField(Expression> minimumShouldMatchField) - { - MinimumShouldMatchFieldValue = minimumShouldMatchField; - return Self; - } - - /// - /// - /// Custom script containing the number of matching terms required to return a document. - /// - /// - public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clients.Elasticsearch.Serverless.Script? minimumShouldMatchScript) - { - MinimumShouldMatchScriptDescriptor = null; - MinimumShouldMatchScriptDescriptorAction = null; - MinimumShouldMatchScriptValue = minimumShouldMatchScript; - return Self; - } - - public TermsSetQueryDescriptor MinimumShouldMatchScript(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - MinimumShouldMatchScriptValue = null; - MinimumShouldMatchScriptDescriptorAction = null; - MinimumShouldMatchScriptDescriptor = descriptor; - return Self; - } - - public TermsSetQueryDescriptor MinimumShouldMatchScript(Action configure) - { - MinimumShouldMatchScriptValue = null; - MinimumShouldMatchScriptDescriptor = null; - MinimumShouldMatchScriptDescriptorAction = configure; - return Self; - } - - public TermsSetQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Array of terms you wish to find in the provided field. - /// - /// - public TermsSetQueryDescriptor Terms(ICollection terms) - { - TermsValue = terms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (MinimumShouldMatchValue is not null) - { - writer.WritePropertyName("minimum_should_match"); - JsonSerializer.Serialize(writer, MinimumShouldMatchValue, options); - } - - if (MinimumShouldMatchFieldValue is not null) - { - writer.WritePropertyName("minimum_should_match_field"); - JsonSerializer.Serialize(writer, MinimumShouldMatchFieldValue, options); - } - - if (MinimumShouldMatchScriptDescriptor is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, MinimumShouldMatchScriptDescriptor, options); - } - else if (MinimumShouldMatchScriptDescriptorAction is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(MinimumShouldMatchScriptDescriptorAction), options); - } - else if (MinimumShouldMatchScriptValue is not null) - { - writer.WritePropertyName("minimum_should_match_script"); - JsonSerializer.Serialize(writer, MinimumShouldMatchScriptValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WritePropertyName("terms"); - JsonSerializer.Serialize(writer, TermsValue, options); - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs deleted file mode 100644 index 443a3d82046..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs +++ /dev/null @@ -1,228 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class UntypedDecayFunctionConverter : JsonConverter -{ - public override UntypedDecayFunction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new UntypedDecayFunction(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "multi_value_mode") - { - variant.MultiValueMode = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - variant.Field = property; - reader.Read(); - variant.Placement = JsonSerializer.Deserialize>(ref reader, options); - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, UntypedDecayFunction value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Field is not null && value.Placement is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - ThrowHelper.ThrowJsonExceptionForMissingSettings(); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Placement, options); - } - - if (value.MultiValueMode is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, value.MultiValueMode, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(UntypedDecayFunctionConverter))] -public sealed partial class UntypedDecayFunction -{ - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueMode { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement Placement { get; set; } -} - -public sealed partial class UntypedDecayFunctionDescriptor : SerializableDescriptor> -{ - internal UntypedDecayFunctionDescriptor(Action> configure) => configure.Invoke(this); - - public UntypedDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public UntypedDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public UntypedDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public UntypedDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public UntypedDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public UntypedDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UntypedDecayFunctionDescriptor : SerializableDescriptor -{ - internal UntypedDecayFunctionDescriptor(Action configure) => configure.Invoke(this); - - public UntypedDecayFunctionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? MultiValueModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement PlacementValue { get; set; } - - public UntypedDecayFunctionDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public UntypedDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public UntypedDecayFunctionDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Determines how the distance is calculated when a field used for computing the decay contains multiple values. - /// - /// - public UntypedDecayFunctionDescriptor MultiValueMode(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MultiValueMode? multiValueMode) - { - MultiValueModeValue = multiValueMode; - return Self; - } - - public UntypedDecayFunctionDescriptor Placement(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DecayPlacement placement) - { - PlacementValue = placement; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null && PlacementValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, PlacementValue, options); - } - - if (MultiValueModeValue is not null) - { - writer.WritePropertyName("multi_value_mode"); - JsonSerializer.Serialize(writer, MultiValueModeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs deleted file mode 100644 index 3fd405c221e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs +++ /dev/null @@ -1,329 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class UntypedDistanceFeatureQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - [JsonInclude, JsonPropertyName("origin")] - public object Origin { get; set; } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public object Pivot { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } -} - -public sealed partial class UntypedDistanceFeatureQueryDescriptor : SerializableDescriptor> -{ - internal UntypedDistanceFeatureQueryDescriptor(Action> configure) => configure.Invoke(this); - - public UntypedDistanceFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private object OriginValue { get; set; } - private object PivotValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Origin(object origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Pivot(object pivot) - { - PivotValue = pivot; - return Self; - } - - public UntypedDistanceFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UntypedDistanceFeatureQueryDescriptor : SerializableDescriptor -{ - internal UntypedDistanceFeatureQueryDescriptor(Action configure) => configure.Invoke(this); - - public UntypedDistanceFeatureQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private object OriginValue { get; set; } - private object PivotValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Name of the field used to calculate distances. This field must meet the following criteria: - /// be a date, date_nanos or geo_point field; - /// have an index mapping parameter value of true, which is the default; - /// have an doc_values mapping parameter value of true, which is the default. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date or point of origin used to calculate distances. - /// If the field value is a date or date_nanos field, the origin value must be a date. - /// Date Math, such as now-1h, is supported. - /// If the field value is a geo_point field, the origin value must be a geopoint. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Origin(object origin) - { - OriginValue = origin; - return Self; - } - - /// - /// - /// Distance from the origin at which relevance scores receive half of the boost value. - /// If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m. - /// - /// - public UntypedDistanceFeatureQueryDescriptor Pivot(object pivot) - { - PivotValue = pivot; - return Self; - } - - public UntypedDistanceFeatureQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("origin"); - JsonSerializer.Serialize(writer, OriginValue, options); - writer.WritePropertyName("pivot"); - JsonSerializer.Serialize(writer, PivotValue, options); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs deleted file mode 100644 index 4a324ee690e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs +++ /dev/null @@ -1,643 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class UntypedRangeQueryConverter : JsonConverter -{ - public override UntypedRangeQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new UntypedRangeQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "format") - { - variant.Format = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gt") - { - variant.Gt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "gte") - { - variant.Gte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lt") - { - variant.Lt = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "lte") - { - variant.Lte = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "relation") - { - variant.Relation = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "time_zone") - { - variant.TimeZone = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, UntypedRangeQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize UntypedRangeQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (!string.IsNullOrEmpty(value.Format)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(value.Format); - } - - if (value.Gt is not null) - { - writer.WritePropertyName("gt"); - JsonSerializer.Serialize(writer, value.Gt, options); - } - - if (value.Gte is not null) - { - writer.WritePropertyName("gte"); - JsonSerializer.Serialize(writer, value.Gte, options); - } - - if (value.Lt is not null) - { - writer.WritePropertyName("lt"); - JsonSerializer.Serialize(writer, value.Lt, options); - } - - if (value.Lte is not null) - { - writer.WritePropertyName("lte"); - JsonSerializer.Serialize(writer, value.Lte, options); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Relation is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, value.Relation, options); - } - - if (!string.IsNullOrEmpty(value.TimeZone)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(value.TimeZone); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(UntypedRangeQueryConverter))] -public sealed partial class UntypedRangeQuery -{ - public UntypedRangeQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Date format used to convert date values in the query. - /// - /// - public string? Format { get; set; } - - /// - /// - /// Greater than. - /// - /// - public object? Gt { get; set; } - - /// - /// - /// Greater than or equal to. - /// - /// - public object? Gte { get; set; } - - /// - /// - /// Less than. - /// - /// - public object? Lt { get; set; } - - /// - /// - /// Less than or equal to. - /// - /// - public object? Lte { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? Relation { get; set; } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. - /// - /// - public string? TimeZone { get; set; } -} - -public sealed partial class UntypedRangeQueryDescriptor : SerializableDescriptor> -{ - internal UntypedRangeQueryDescriptor(Action> configure) => configure.Invoke(this); - - public UntypedRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - private object? GtValue { get; set; } - private object? GteValue { get; set; } - private object? LtValue { get; set; } - private object? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public UntypedRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public UntypedRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public UntypedRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public UntypedRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date format used to convert date values in the query. - /// - /// - public UntypedRangeQueryDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public UntypedRangeQueryDescriptor Gt(object? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public UntypedRangeQueryDescriptor Gte(object? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public UntypedRangeQueryDescriptor Lt(object? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public UntypedRangeQueryDescriptor Lte(object? lte) - { - LteValue = lte; - return Self; - } - - public UntypedRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public UntypedRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. - /// - /// - public UntypedRangeQueryDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GtValue is not null) - { - writer.WritePropertyName("gt"); - JsonSerializer.Serialize(writer, GtValue, options); - } - - if (GteValue is not null) - { - writer.WritePropertyName("gte"); - JsonSerializer.Serialize(writer, GteValue, options); - } - - if (LtValue is not null) - { - writer.WritePropertyName("lt"); - JsonSerializer.Serialize(writer, LtValue, options); - } - - if (LteValue is not null) - { - writer.WritePropertyName("lte"); - JsonSerializer.Serialize(writer, LteValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class UntypedRangeQueryDescriptor : SerializableDescriptor -{ - internal UntypedRangeQueryDescriptor(Action configure) => configure.Invoke(this); - - public UntypedRangeQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? FormatValue { get; set; } - private object? GtValue { get; set; } - private object? GteValue { get; set; } - private object? LtValue { get; set; } - private object? LteValue { get; set; } - private string? QueryNameValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? RelationValue { get; set; } - private string? TimeZoneValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public UntypedRangeQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - public UntypedRangeQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public UntypedRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public UntypedRangeQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Date format used to convert date values in the query. - /// - /// - public UntypedRangeQueryDescriptor Format(string? format) - { - FormatValue = format; - return Self; - } - - /// - /// - /// Greater than. - /// - /// - public UntypedRangeQueryDescriptor Gt(object? gt) - { - GtValue = gt; - return Self; - } - - /// - /// - /// Greater than or equal to. - /// - /// - public UntypedRangeQueryDescriptor Gte(object? gte) - { - GteValue = gte; - return Self; - } - - /// - /// - /// Less than. - /// - /// - public UntypedRangeQueryDescriptor Lt(object? lt) - { - LtValue = lt; - return Self; - } - - /// - /// - /// Less than or equal to. - /// - /// - public UntypedRangeQueryDescriptor Lte(object? lte) - { - LteValue = lte; - return Self; - } - - public UntypedRangeQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Indicates how the range query matches values for range fields. - /// - /// - public UntypedRangeQueryDescriptor Relation(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.RangeRelation? relation) - { - RelationValue = relation; - return Self; - } - - /// - /// - /// Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. - /// - /// - public UntypedRangeQueryDescriptor TimeZone(string? timeZone) - { - TimeZoneValue = timeZone; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (!string.IsNullOrEmpty(FormatValue)) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(FormatValue); - } - - if (GtValue is not null) - { - writer.WritePropertyName("gt"); - JsonSerializer.Serialize(writer, GtValue, options); - } - - if (GteValue is not null) - { - writer.WritePropertyName("gte"); - JsonSerializer.Serialize(writer, GteValue, options); - } - - if (LtValue is not null) - { - writer.WritePropertyName("lt"); - JsonSerializer.Serialize(writer, LtValue, options); - } - - if (LteValue is not null) - { - writer.WritePropertyName("lte"); - JsonSerializer.Serialize(writer, LteValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (RelationValue is not null) - { - writer.WritePropertyName("relation"); - JsonSerializer.Serialize(writer, RelationValue, options); - } - - if (!string.IsNullOrEmpty(TimeZoneValue)) - { - writer.WritePropertyName("time_zone"); - writer.WriteStringValue(TimeZoneValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs deleted file mode 100644 index f45948b7b38..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WildcardQuery.g.cs +++ /dev/null @@ -1,483 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -internal sealed partial class WildcardQueryConverter : JsonConverter -{ - public override WildcardQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - reader.Read(); - var fieldName = reader.GetString(); - reader.Read(); - var variant = new WildcardQuery(fieldName); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "boost") - { - variant.Boost = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "case_insensitive") - { - variant.CaseInsensitive = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "_name") - { - variant.QueryName = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "rewrite") - { - variant.Rewrite = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "value") - { - variant.Value = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "wildcard") - { - variant.Wildcard = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - reader.Read(); - return variant; - } - - public override void Write(Utf8JsonWriter writer, WildcardQuery value, JsonSerializerOptions options) - { - if (value.Field is null) - throw new JsonException("Unable to serialize WildcardQuery because the `Field` property is not set. Field name queries must include a valid field name."); - if (!options.TryGetClientSettings(out var settings)) - throw new JsonException("Unable to retrieve client settings required to infer field."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(value.Field)); - writer.WriteStartObject(); - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - if (value.CaseInsensitive.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(value.CaseInsensitive.Value); - } - - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (!string.IsNullOrEmpty(value.Rewrite)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(value.Rewrite); - } - - if (!string.IsNullOrEmpty(value.Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(value.Value); - } - - if (!string.IsNullOrEmpty(value.Wildcard)) - { - writer.WritePropertyName("wildcard"); - writer.WriteStringValue(value.Wildcard); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(WildcardQueryConverter))] -public sealed partial class WildcardQuery -{ - public WildcardQuery(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - Field = field; - } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public float? Boost { get; set; } - - /// - /// - /// Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public bool? CaseInsensitive { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - public string? QueryName { get; set; } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public string? Rewrite { get; set; } - - /// - /// - /// Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set. - /// - /// - public string? Value { get; set; } - - /// - /// - /// Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set. - /// - /// - public string? Wildcard { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(WildcardQuery wildcardQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Wildcard(wildcardQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery(WildcardQuery wildcardQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery.Wildcard(wildcardQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery(WildcardQuery wildcardQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.RoleQuery.Wildcard(wildcardQuery); - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery(WildcardQuery wildcardQuery) => Elastic.Clients.Elasticsearch.Serverless.Security.UserQuery.Wildcard(wildcardQuery); -} - -public sealed partial class WildcardQueryDescriptor : SerializableDescriptor> -{ - internal WildcardQueryDescriptor(Action> configure) => configure.Invoke(this); - - public WildcardQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private string? ValueValue { get; set; } - private string? WildcardValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public WildcardQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public WildcardQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public WildcardQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public WildcardQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public WildcardQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public WildcardQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public WildcardQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set. - /// - /// - public WildcardQueryDescriptor Value(string? value) - { - ValueValue = value; - return Self; - } - - /// - /// - /// Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set. - /// - /// - public WildcardQueryDescriptor Wildcard(string? wildcard) - { - WildcardValue = wildcard; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - if (!string.IsNullOrEmpty(ValueValue)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - } - - if (!string.IsNullOrEmpty(WildcardValue)) - { - writer.WritePropertyName("wildcard"); - writer.WriteStringValue(WildcardValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} - -public sealed partial class WildcardQueryDescriptor : SerializableDescriptor -{ - internal WildcardQueryDescriptor(Action configure) => configure.Invoke(this); - - public WildcardQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private bool? CaseInsensitiveValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private string? QueryNameValue { get; set; } - private string? RewriteValue { get; set; } - private string? ValueValue { get; set; } - private string? WildcardValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public WildcardQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping. - /// - /// - public WildcardQueryDescriptor CaseInsensitive(bool? caseInsensitive = true) - { - CaseInsensitiveValue = caseInsensitive; - return Self; - } - - public WildcardQueryDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - public WildcardQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public WildcardQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public WildcardQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - /// - /// - /// Method used to rewrite the query. - /// - /// - public WildcardQueryDescriptor Rewrite(string? rewrite) - { - RewriteValue = rewrite; - return Self; - } - - /// - /// - /// Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set. - /// - /// - public WildcardQueryDescriptor Value(string? value) - { - ValueValue = value; - return Self; - } - - /// - /// - /// Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set. - /// - /// - public WildcardQueryDescriptor Wildcard(string? wildcard) - { - WildcardValue = wildcard; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (FieldValue is null) - throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); - writer.WriteStartObject(); - writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - if (CaseInsensitiveValue.HasValue) - { - writer.WritePropertyName("case_insensitive"); - writer.WriteBooleanValue(CaseInsensitiveValue.Value); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (!string.IsNullOrEmpty(RewriteValue)) - { - writer.WritePropertyName("rewrite"); - writer.WriteStringValue(RewriteValue); - } - - if (!string.IsNullOrEmpty(ValueValue)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(ValueValue); - } - - if (!string.IsNullOrEmpty(WildcardValue)) - { - writer.WritePropertyName("wildcard"); - writer.WriteStringValue(WildcardValue); - } - - writer.WriteEndObject(); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs deleted file mode 100644 index c50c064a3b9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/WrapperQuery.g.cs +++ /dev/null @@ -1,120 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; - -public sealed partial class WrapperQuery -{ - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - [JsonInclude, JsonPropertyName("boost")] - public float? Boost { get; set; } - - /// - /// - /// A base64 encoded query. - /// The binary data format can be any of JSON, YAML, CBOR or SMILE encodings - /// - /// - [JsonInclude, JsonPropertyName("query")] - public string Query { get; set; } - [JsonInclude, JsonPropertyName("_name")] - public string? QueryName { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query(WrapperQuery wrapperQuery) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query.Wrapper(wrapperQuery); -} - -public sealed partial class WrapperQueryDescriptor : SerializableDescriptor -{ - internal WrapperQueryDescriptor(Action configure) => configure.Invoke(this); - - public WrapperQueryDescriptor() : base() - { - } - - private float? BoostValue { get; set; } - private string QueryValue { get; set; } - private string? QueryNameValue { get; set; } - - /// - /// - /// Floating point number used to decrease or increase the relevance scores of the query. - /// Boost values are relative to the default value of 1.0. - /// A boost value between 0 and 1.0 decreases the relevance score. - /// A value greater than 1.0 increases the relevance score. - /// - /// - public WrapperQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - /// - /// - /// A base64 encoded query. - /// The binary data format can be any of JSON, YAML, CBOR or SMILE encodings - /// - /// - public WrapperQueryDescriptor Query(string query) - { - QueryValue = query; - return Self; - } - - public WrapperQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName("query"); - writer.WriteStringValue(QueryValue); - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRule.g.cs deleted file mode 100644 index 9101bf5a97b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRule.g.cs +++ /dev/null @@ -1,202 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class QueryRule -{ - [JsonInclude, JsonPropertyName("actions")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions Actions { get; set; } - [JsonInclude, JsonPropertyName("criteria")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteria))] - public ICollection Criteria { get; set; } - [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } - [JsonInclude, JsonPropertyName("rule_id")] - public Elastic.Clients.Elasticsearch.Serverless.Id RuleId { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType Type { get; set; } -} - -public sealed partial class QueryRuleDescriptor : SerializableDescriptor -{ - internal QueryRuleDescriptor(Action configure) => configure.Invoke(this); - - public QueryRuleDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions ActionsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActionsDescriptor ActionsDescriptor { get; set; } - private Action ActionsDescriptorAction { get; set; } - private ICollection CriteriaValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor CriteriaDescriptor { get; set; } - private Action CriteriaDescriptorAction { get; set; } - private Action[] CriteriaDescriptorActions { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id RuleIdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType TypeValue { get; set; } - - public QueryRuleDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActions actions) - { - ActionsDescriptor = null; - ActionsDescriptorAction = null; - ActionsValue = actions; - return Self; - } - - public QueryRuleDescriptor Actions(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActionsDescriptor descriptor) - { - ActionsValue = null; - ActionsDescriptorAction = null; - ActionsDescriptor = descriptor; - return Self; - } - - public QueryRuleDescriptor Actions(Action configure) - { - ActionsValue = null; - ActionsDescriptor = null; - ActionsDescriptorAction = configure; - return Self; - } - - public QueryRuleDescriptor Criteria(ICollection criteria) - { - CriteriaDescriptor = null; - CriteriaDescriptorAction = null; - CriteriaDescriptorActions = null; - CriteriaValue = criteria; - return Self; - } - - public QueryRuleDescriptor Criteria(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor descriptor) - { - CriteriaValue = null; - CriteriaDescriptorAction = null; - CriteriaDescriptorActions = null; - CriteriaDescriptor = descriptor; - return Self; - } - - public QueryRuleDescriptor Criteria(Action configure) - { - CriteriaValue = null; - CriteriaDescriptor = null; - CriteriaDescriptorActions = null; - CriteriaDescriptorAction = configure; - return Self; - } - - public QueryRuleDescriptor Criteria(params Action[] configure) - { - CriteriaValue = null; - CriteriaDescriptor = null; - CriteriaDescriptorAction = null; - CriteriaDescriptorActions = configure; - return Self; - } - - public QueryRuleDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - public QueryRuleDescriptor RuleId(Elastic.Clients.Elasticsearch.Serverless.Id ruleId) - { - RuleIdValue = ruleId; - return Self; - } - - public QueryRuleDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleType type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ActionsDescriptor is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsDescriptor, options); - } - else if (ActionsDescriptorAction is not null) - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleActionsDescriptor(ActionsDescriptorAction), options); - } - else - { - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - } - - if (CriteriaDescriptor is not null) - { - writer.WritePropertyName("criteria"); - JsonSerializer.Serialize(writer, CriteriaDescriptor, options); - } - else if (CriteriaDescriptorAction is not null) - { - writer.WritePropertyName("criteria"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor(CriteriaDescriptorAction), options); - } - else if (CriteriaDescriptorActions is not null) - { - writer.WritePropertyName("criteria"); - if (CriteriaDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in CriteriaDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaDescriptor(action), options); - } - - if (CriteriaDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("criteria"); - SingleOrManySerializationHelper.Serialize(CriteriaValue, writer, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - writer.WritePropertyName("rule_id"); - JsonSerializer.Serialize(writer, RuleIdValue, options); - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleActions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleActions.g.cs deleted file mode 100644 index 4b7f4cc77af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleActions.g.cs +++ /dev/null @@ -1,136 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class QueryRuleActions -{ - [JsonInclude, JsonPropertyName("docs")] - public ICollection? Docs { get; set; } - [JsonInclude, JsonPropertyName("ids")] - public ICollection? Ids { get; set; } -} - -public sealed partial class QueryRuleActionsDescriptor : SerializableDescriptor -{ - internal QueryRuleActionsDescriptor(Action configure) => configure.Invoke(this); - - public QueryRuleActionsDescriptor() : base() - { - } - - private ICollection? DocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedDocDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } - private ICollection? IdsValue { get; set; } - - public QueryRuleActionsDescriptor Docs(ICollection? docs) - { - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsValue = docs; - return Self; - } - - public QueryRuleActionsDescriptor Docs(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedDocDescriptor descriptor) - { - DocsValue = null; - DocsDescriptorAction = null; - DocsDescriptorActions = null; - DocsDescriptor = descriptor; - return Self; - } - - public QueryRuleActionsDescriptor Docs(Action configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorActions = null; - DocsDescriptorAction = configure; - return Self; - } - - public QueryRuleActionsDescriptor Docs(params Action[] configure) - { - DocsValue = null; - DocsDescriptor = null; - DocsDescriptorAction = null; - DocsDescriptorActions = configure; - return Self; - } - - public QueryRuleActionsDescriptor Ids(ICollection? ids) - { - IdsValue = ids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DocsDescriptor is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, DocsDescriptor, options); - writer.WriteEndArray(); - } - else if (DocsDescriptorAction is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedDocDescriptor(DocsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (DocsDescriptorActions is not null) - { - writer.WritePropertyName("docs"); - writer.WriteStartArray(); - foreach (var action in DocsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PinnedDocDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (DocsValue is not null) - { - writer.WritePropertyName("docs"); - JsonSerializer.Serialize(writer, DocsValue, options); - } - - if (IdsValue is not null) - { - writer.WritePropertyName("ids"); - JsonSerializer.Serialize(writer, IdsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs deleted file mode 100644 index 502a841f2e2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs +++ /dev/null @@ -1,89 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class QueryRuleCriteria -{ - [JsonInclude, JsonPropertyName("metadata")] - public string? Metadata { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaType Type { get; set; } - [JsonInclude, JsonPropertyName("values")] - public ICollection? Values { get; set; } -} - -public sealed partial class QueryRuleCriteriaDescriptor : SerializableDescriptor -{ - internal QueryRuleCriteriaDescriptor(Action configure) => configure.Invoke(this); - - public QueryRuleCriteriaDescriptor() : base() - { - } - - private string? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaType TypeValue { get; set; } - private ICollection? ValuesValue { get; set; } - - public QueryRuleCriteriaDescriptor Metadata(string? metadata) - { - MetadataValue = metadata; - return Self; - } - - public QueryRuleCriteriaDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.QueryRules.QueryRuleCriteriaType type) - { - TypeValue = type; - return Self; - } - - public QueryRuleCriteriaDescriptor Values(ICollection? values) - { - ValuesValue = values; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(MetadataValue)) - { - writer.WritePropertyName("metadata"); - writer.WriteStringValue(MetadataValue); - } - - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - if (ValuesValue is not null) - { - writer.WritePropertyName("values"); - JsonSerializer.Serialize(writer, ValuesValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs deleted file mode 100644 index 68c61bb2325..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetListItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class QueryRulesetListItem -{ - /// - /// - /// A map of criteria type (e.g. exact) to the number of rules of that type - /// - /// - [JsonInclude, JsonPropertyName("rule_criteria_types_counts")] - public IReadOnlyDictionary RuleCriteriaTypesCounts { get; init; } - - /// - /// - /// Ruleset unique identifier - /// - /// - [JsonInclude, JsonPropertyName("ruleset_id")] - public string RulesetId { get; init; } - - /// - /// - /// The number of rules associated with this ruleset - /// - /// - [JsonInclude, JsonPropertyName("rule_total_count")] - public int RuleTotalCount { get; init; } - - /// - /// - /// A map of rule type (e.g. pinned) to the number of rules of that type - /// - /// - [JsonInclude, JsonPropertyName("rule_type_counts")] - public IReadOnlyDictionary RuleTypeCounts { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetMatchedRule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetMatchedRule.g.cs deleted file mode 100644 index 1cd9ee2facd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryRules/QueryRulesetMatchedRule.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; - -public sealed partial class QueryRulesetMatchedRule -{ - /// - /// - /// Rule unique identifier within that ruleset - /// - /// - [JsonInclude, JsonPropertyName("rule_id")] - public string RuleId { get; init; } - - /// - /// - /// Ruleset unique identifier - /// - /// - [JsonInclude, JsonPropertyName("ruleset_id")] - public string RulesetId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryVectorBuilder.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryVectorBuilder.g.cs deleted file mode 100644 index 52036aa17c6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryVectorBuilder.g.cs +++ /dev/null @@ -1,227 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -[JsonConverter(typeof(QueryVectorBuilderConverter))] -public sealed partial class QueryVectorBuilder -{ - internal QueryVectorBuilder(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 QueryVectorBuilder TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.TextEmbedding textEmbedding) => new QueryVectorBuilder("text_embedding", textEmbedding); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class QueryVectorBuilderConverter : JsonConverter -{ - public override QueryVectorBuilder 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; - 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 == "text_embedding") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'QueryVectorBuilder' from the response."); - } - - var result = new QueryVectorBuilder(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, QueryVectorBuilder value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "text_embedding": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.TextEmbedding)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class QueryVectorBuilderDescriptor : SerializableDescriptor> -{ - internal QueryVectorBuilderDescriptor(Action> configure) => configure.Invoke(this); - - public QueryVectorBuilderDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private QueryVectorBuilderDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private QueryVectorBuilderDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public QueryVectorBuilderDescriptor TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.TextEmbedding textEmbedding) => Set(textEmbedding, "text_embedding"); - public QueryVectorBuilderDescriptor TextEmbedding(Action configure) => Set(configure, "text_embedding"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class QueryVectorBuilderDescriptor : SerializableDescriptor -{ - internal QueryVectorBuilderDescriptor(Action configure) => configure.Invoke(this); - - public QueryVectorBuilderDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private QueryVectorBuilderDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private QueryVectorBuilderDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public QueryVectorBuilderDescriptor TextEmbedding(Elastic.Clients.Elasticsearch.Serverless.TextEmbedding textEmbedding) => Set(textEmbedding, "text_embedding"); - public QueryVectorBuilderDescriptor TextEmbedding(Action configure) => Set(configure, "text_embedding"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RRFRetriever.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RRFRetriever.g.cs deleted file mode 100644 index 100f1f40cc2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RRFRetriever.g.cs +++ /dev/null @@ -1,514 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RRFRetriever -{ - /// - /// - /// Query to filter the documents that can match. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public float? MinScore { get; set; } - - /// - /// - /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. - /// - /// - [JsonInclude, JsonPropertyName("rank_constant")] - public int? RankConstant { get; set; } - - /// - /// - /// This value determines the size of the individual result sets per query. - /// - /// - [JsonInclude, JsonPropertyName("rank_window_size")] - public int? RankWindowSize { get; set; } - - /// - /// - /// A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them. - /// - /// - [JsonInclude, JsonPropertyName("retrievers")] - public ICollection Retrievers { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(RRFRetriever rRFRetriever) => Elastic.Clients.Elasticsearch.Serverless.Retriever.Rrf(rRFRetriever); -} - -public sealed partial class RRFRetrieverDescriptor : SerializableDescriptor> -{ - internal RRFRetrieverDescriptor(Action> configure) => configure.Invoke(this); - - public RRFRetrieverDescriptor() : base() - { - } - - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private float? MinScoreValue { get; set; } - private int? RankConstantValue { get; set; } - private int? RankWindowSizeValue { get; set; } - private ICollection RetrieversValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieversDescriptor { get; set; } - private Action> RetrieversDescriptorAction { get; set; } - private Action>[] RetrieversDescriptorActions { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public RRFRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public RRFRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public RRFRetrieverDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public RRFRetrieverDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public RRFRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. - /// - /// - public RRFRetrieverDescriptor RankConstant(int? rankConstant) - { - RankConstantValue = rankConstant; - return Self; - } - - /// - /// - /// This value determines the size of the individual result sets per query. - /// - /// - public RRFRetrieverDescriptor RankWindowSize(int? rankWindowSize) - { - RankWindowSizeValue = rankWindowSize; - return Self; - } - - /// - /// - /// A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them. - /// - /// - public RRFRetrieverDescriptor Retrievers(ICollection retrievers) - { - RetrieversDescriptor = null; - RetrieversDescriptorAction = null; - RetrieversDescriptorActions = null; - RetrieversValue = retrievers; - return Self; - } - - public RRFRetrieverDescriptor Retrievers(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieversValue = null; - RetrieversDescriptorAction = null; - RetrieversDescriptorActions = null; - RetrieversDescriptor = descriptor; - return Self; - } - - public RRFRetrieverDescriptor Retrievers(Action> configure) - { - RetrieversValue = null; - RetrieversDescriptor = null; - RetrieversDescriptorActions = null; - RetrieversDescriptorAction = configure; - return Self; - } - - public RRFRetrieverDescriptor Retrievers(params Action>[] configure) - { - RetrieversValue = null; - RetrieversDescriptor = null; - RetrieversDescriptorAction = null; - RetrieversDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (RankConstantValue.HasValue) - { - writer.WritePropertyName("rank_constant"); - writer.WriteNumberValue(RankConstantValue.Value); - } - - if (RankWindowSizeValue.HasValue) - { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); - } - - if (RetrieversDescriptor is not null) - { - writer.WritePropertyName("retrievers"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RetrieversDescriptor, options); - writer.WriteEndArray(); - } - else if (RetrieversDescriptorAction is not null) - { - writer.WritePropertyName("retrievers"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieversDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RetrieversDescriptorActions is not null) - { - writer.WritePropertyName("retrievers"); - writer.WriteStartArray(); - foreach (var action in RetrieversDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("retrievers"); - JsonSerializer.Serialize(writer, RetrieversValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RRFRetrieverDescriptor : SerializableDescriptor -{ - internal RRFRetrieverDescriptor(Action configure) => configure.Invoke(this); - - public RRFRetrieverDescriptor() : base() - { - } - - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private float? MinScoreValue { get; set; } - private int? RankConstantValue { get; set; } - private int? RankWindowSizeValue { get; set; } - private ICollection RetrieversValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieversDescriptor { get; set; } - private Action RetrieversDescriptorAction { get; set; } - private Action[] RetrieversDescriptorActions { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public RRFRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public RRFRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public RRFRetrieverDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public RRFRetrieverDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public RRFRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. - /// - /// - public RRFRetrieverDescriptor RankConstant(int? rankConstant) - { - RankConstantValue = rankConstant; - return Self; - } - - /// - /// - /// This value determines the size of the individual result sets per query. - /// - /// - public RRFRetrieverDescriptor RankWindowSize(int? rankWindowSize) - { - RankWindowSizeValue = rankWindowSize; - return Self; - } - - /// - /// - /// A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them. - /// - /// - public RRFRetrieverDescriptor Retrievers(ICollection retrievers) - { - RetrieversDescriptor = null; - RetrieversDescriptorAction = null; - RetrieversDescriptorActions = null; - RetrieversValue = retrievers; - return Self; - } - - public RRFRetrieverDescriptor Retrievers(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieversValue = null; - RetrieversDescriptorAction = null; - RetrieversDescriptorActions = null; - RetrieversDescriptor = descriptor; - return Self; - } - - public RRFRetrieverDescriptor Retrievers(Action configure) - { - RetrieversValue = null; - RetrieversDescriptor = null; - RetrieversDescriptorActions = null; - RetrieversDescriptorAction = configure; - return Self; - } - - public RRFRetrieverDescriptor Retrievers(params Action[] configure) - { - RetrieversValue = null; - RetrieversDescriptor = null; - RetrieversDescriptorAction = null; - RetrieversDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (RankConstantValue.HasValue) - { - writer.WritePropertyName("rank_constant"); - writer.WriteNumberValue(RankConstantValue.Value); - } - - if (RankWindowSizeValue.HasValue) - { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); - } - - if (RetrieversDescriptor is not null) - { - writer.WritePropertyName("retrievers"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, RetrieversDescriptor, options); - writer.WriteEndArray(); - } - else if (RetrieversDescriptorAction is not null) - { - writer.WritePropertyName("retrievers"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieversDescriptorAction), options); - writer.WriteEndArray(); - } - else if (RetrieversDescriptorActions is not null) - { - writer.WritePropertyName("retrievers"); - writer.WriteStartArray(); - foreach (var action in RetrieversDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else - { - writer.WritePropertyName("retrievers"); - JsonSerializer.Serialize(writer, RetrieversValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RecoveryStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RecoveryStats.g.cs deleted file mode 100644 index 55616ca2e55..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RecoveryStats.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RecoveryStats -{ - [JsonInclude, JsonPropertyName("current_as_source")] - public long CurrentAsSource { get; init; } - [JsonInclude, JsonPropertyName("current_as_target")] - public long CurrentAsTarget { get; init; } - [JsonInclude, JsonPropertyName("throttle_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ThrottleTime { get; init; } - [JsonInclude, JsonPropertyName("throttle_time_in_millis")] - public long ThrottleTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RefreshStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RefreshStats.g.cs deleted file mode 100644 index 12b376f83ee..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RefreshStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RefreshStats -{ - [JsonInclude, JsonPropertyName("external_total")] - public long ExternalTotal { get; init; } - [JsonInclude, JsonPropertyName("external_total_time_in_millis")] - public long ExternalTotalTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("listeners")] - public long Listeners { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RequestCacheStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RequestCacheStats.g.cs deleted file mode 100644 index 23dc7daa443..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RequestCacheStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RequestCacheStats -{ - [JsonInclude, JsonPropertyName("evictions")] - public long Evictions { get; init; } - [JsonInclude, JsonPropertyName("hit_count")] - public long HitCount { get; init; } - [JsonInclude, JsonPropertyName("memory_size")] - public string? MemorySize { get; init; } - [JsonInclude, JsonPropertyName("memory_size_in_bytes")] - public long MemorySizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("miss_count")] - public long MissCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retries.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retries.g.cs deleted file mode 100644 index 4cd24f50923..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retries.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class Retries -{ - [JsonInclude, JsonPropertyName("bulk")] - public long Bulk { get; init; } - [JsonInclude, JsonPropertyName("search")] - public long Search { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retriever.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retriever.g.cs deleted file mode 100644 index f6ba60c8271..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Retriever.g.cs +++ /dev/null @@ -1,287 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -[JsonConverter(typeof(RetrieverConverter))] -public sealed partial class Retriever -{ - internal Retriever(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 Retriever Knn(Elastic.Clients.Elasticsearch.Serverless.KnnRetriever knnRetriever) => new Retriever("knn", knnRetriever); - public static Retriever Rrf(Elastic.Clients.Elasticsearch.Serverless.RRFRetriever rRFRetriever) => new Retriever("rrf", rRFRetriever); - public static Retriever Rule(Elastic.Clients.Elasticsearch.Serverless.RuleRetriever ruleRetriever) => new Retriever("rule", ruleRetriever); - public static Retriever Standard(Elastic.Clients.Elasticsearch.Serverless.StandardRetriever standardRetriever) => new Retriever("standard", standardRetriever); - public static Retriever TextSimilarityReranker(Elastic.Clients.Elasticsearch.Serverless.TextSimilarityReranker textSimilarityReranker) => new Retriever("text_similarity_reranker", textSimilarityReranker); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class RetrieverConverter : JsonConverter -{ - public override Retriever 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; - 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 == "knn") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rrf") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "rule") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "standard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "text_similarity_reranker") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Retriever' from the response."); - } - - var result = new Retriever(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Retriever value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "knn": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.KnnRetriever)value.Variant, options); - break; - case "rrf": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.RRFRetriever)value.Variant, options); - break; - case "rule": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.RuleRetriever)value.Variant, options); - break; - case "standard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.StandardRetriever)value.Variant, options); - break; - case "text_similarity_reranker": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.TextSimilarityReranker)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RetrieverDescriptor : SerializableDescriptor> -{ - internal RetrieverDescriptor(Action> configure) => configure.Invoke(this); - - public RetrieverDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RetrieverDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RetrieverDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RetrieverDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnRetriever knnRetriever) => Set(knnRetriever, "knn"); - public RetrieverDescriptor Knn(Action> configure) => Set(configure, "knn"); - public RetrieverDescriptor Rrf(Elastic.Clients.Elasticsearch.Serverless.RRFRetriever rRFRetriever) => Set(rRFRetriever, "rrf"); - public RetrieverDescriptor Rrf(Action> configure) => Set(configure, "rrf"); - public RetrieverDescriptor Rule(Elastic.Clients.Elasticsearch.Serverless.RuleRetriever ruleRetriever) => Set(ruleRetriever, "rule"); - public RetrieverDescriptor Rule(Action> configure) => Set(configure, "rule"); - public RetrieverDescriptor Standard(Elastic.Clients.Elasticsearch.Serverless.StandardRetriever standardRetriever) => Set(standardRetriever, "standard"); - public RetrieverDescriptor Standard(Action> configure) => Set(configure, "standard"); - public RetrieverDescriptor TextSimilarityReranker(Elastic.Clients.Elasticsearch.Serverless.TextSimilarityReranker textSimilarityReranker) => Set(textSimilarityReranker, "text_similarity_reranker"); - public RetrieverDescriptor TextSimilarityReranker(Action> configure) => Set(configure, "text_similarity_reranker"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RetrieverDescriptor : SerializableDescriptor -{ - internal RetrieverDescriptor(Action configure) => configure.Invoke(this); - - public RetrieverDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RetrieverDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RetrieverDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RetrieverDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnRetriever knnRetriever) => Set(knnRetriever, "knn"); - public RetrieverDescriptor Knn(Action configure) => Set(configure, "knn"); - public RetrieverDescriptor Rrf(Elastic.Clients.Elasticsearch.Serverless.RRFRetriever rRFRetriever) => Set(rRFRetriever, "rrf"); - public RetrieverDescriptor Rrf(Action configure) => Set(configure, "rrf"); - public RetrieverDescriptor Rule(Elastic.Clients.Elasticsearch.Serverless.RuleRetriever ruleRetriever) => Set(ruleRetriever, "rule"); - public RetrieverDescriptor Rule(Action configure) => Set(configure, "rule"); - public RetrieverDescriptor Standard(Elastic.Clients.Elasticsearch.Serverless.StandardRetriever standardRetriever) => Set(standardRetriever, "standard"); - public RetrieverDescriptor Standard(Action configure) => Set(configure, "standard"); - public RetrieverDescriptor TextSimilarityReranker(Elastic.Clients.Elasticsearch.Serverless.TextSimilarityReranker textSimilarityReranker) => Set(textSimilarityReranker, "text_similarity_reranker"); - public RetrieverDescriptor TextSimilarityReranker(Action configure) => Set(configure, "text_similarity_reranker"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs deleted file mode 100644 index d4b7c4c0874..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs +++ /dev/null @@ -1,486 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class RuleRetriever -{ - /// - /// - /// Query to filter the documents that can match. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// The match criteria that will determine if a rule in the provided rulesets should be applied. - /// - /// - [JsonInclude, JsonPropertyName("match_criteria")] - public object MatchCriteria { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public float? MinScore { get; set; } - - /// - /// - /// This value determines the size of the individual result set. - /// - /// - [JsonInclude, JsonPropertyName("rank_window_size")] - public int? RankWindowSize { get; set; } - - /// - /// - /// The retriever whose results rules should be applied to. - /// - /// - [JsonInclude, JsonPropertyName("retriever")] - public Elastic.Clients.Elasticsearch.Serverless.Retriever Retriever { get; set; } - - /// - /// - /// The ruleset IDs containing the rules this retriever is evaluating against. - /// - /// - [JsonInclude, JsonPropertyName("ruleset_ids")] - public ICollection RulesetIds { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(RuleRetriever ruleRetriever) => Elastic.Clients.Elasticsearch.Serverless.Retriever.Rule(ruleRetriever); -} - -public sealed partial class RuleRetrieverDescriptor : SerializableDescriptor> -{ - internal RuleRetrieverDescriptor(Action> configure) => configure.Invoke(this); - - public RuleRetrieverDescriptor() : base() - { - } - - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private object MatchCriteriaValue { get; set; } - private float? MinScoreValue { get; set; } - private int? RankWindowSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } - private Action> RetrieverDescriptorAction { get; set; } - private ICollection RulesetIdsValue { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public RuleRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public RuleRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public RuleRetrieverDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public RuleRetrieverDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// The match criteria that will determine if a rule in the provided rulesets should be applied. - /// - /// - public RuleRetrieverDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public RuleRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// This value determines the size of the individual result set. - /// - /// - public RuleRetrieverDescriptor RankWindowSize(int? rankWindowSize) - { - RankWindowSizeValue = rankWindowSize; - return Self; - } - - /// - /// - /// The retriever whose results rules should be applied to. - /// - /// - public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) - { - RetrieverDescriptor = null; - RetrieverDescriptorAction = null; - RetrieverValue = retriever; - return Self; - } - - public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieverValue = null; - RetrieverDescriptorAction = null; - RetrieverDescriptor = descriptor; - return Self; - } - - public RuleRetrieverDescriptor Retriever(Action> configure) - { - RetrieverValue = null; - RetrieverDescriptor = null; - RetrieverDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ruleset IDs containing the rules this retriever is evaluating against. - /// - /// - public RuleRetrieverDescriptor RulesetIds(ICollection rulesetIds) - { - RulesetIdsValue = rulesetIds; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (RankWindowSizeValue.HasValue) - { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); - } - - if (RetrieverDescriptor is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverDescriptor, options); - } - else if (RetrieverDescriptorAction is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); - } - else - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverValue, options); - } - - writer.WritePropertyName("ruleset_ids"); - JsonSerializer.Serialize(writer, RulesetIdsValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class RuleRetrieverDescriptor : SerializableDescriptor -{ - internal RuleRetrieverDescriptor(Action configure) => configure.Invoke(this); - - public RuleRetrieverDescriptor() : base() - { - } - - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private object MatchCriteriaValue { get; set; } - private float? MinScoreValue { get; set; } - private int? RankWindowSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } - private Action RetrieverDescriptorAction { get; set; } - private ICollection RulesetIdsValue { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public RuleRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public RuleRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public RuleRetrieverDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public RuleRetrieverDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// The match criteria that will determine if a rule in the provided rulesets should be applied. - /// - /// - public RuleRetrieverDescriptor MatchCriteria(object matchCriteria) - { - MatchCriteriaValue = matchCriteria; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public RuleRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// This value determines the size of the individual result set. - /// - /// - public RuleRetrieverDescriptor RankWindowSize(int? rankWindowSize) - { - RankWindowSizeValue = rankWindowSize; - return Self; - } - - /// - /// - /// The retriever whose results rules should be applied to. - /// - /// - public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) - { - RetrieverDescriptor = null; - RetrieverDescriptorAction = null; - RetrieverValue = retriever; - return Self; - } - - public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieverValue = null; - RetrieverDescriptorAction = null; - RetrieverDescriptor = descriptor; - return Self; - } - - public RuleRetrieverDescriptor Retriever(Action configure) - { - RetrieverValue = null; - RetrieverDescriptor = null; - RetrieverDescriptorAction = configure; - return Self; - } - - /// - /// - /// The ruleset IDs containing the rules this retriever is evaluating against. - /// - /// - public RuleRetrieverDescriptor RulesetIds(ICollection rulesetIds) - { - RulesetIdsValue = rulesetIds; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - writer.WritePropertyName("match_criteria"); - JsonSerializer.Serialize(writer, MatchCriteriaValue, options); - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (RankWindowSizeValue.HasValue) - { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); - } - - if (RetrieverDescriptor is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverDescriptor, options); - } - else if (RetrieverDescriptorAction is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); - } - else - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverValue, options); - } - - writer.WritePropertyName("ruleset_ids"); - JsonSerializer.Serialize(writer, RulesetIdsValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScoreSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScoreSort.g.cs deleted file mode 100644 index 0d449ab5a07..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScoreSort.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ScoreSort -{ - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } -} - -public sealed partial class ScoreSortDescriptor : SerializableDescriptor -{ - internal ScoreSortDescriptor(Action configure) => configure.Invoke(this); - - public ScoreSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - - public ScoreSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Script.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Script.g.cs deleted file mode 100644 index a3b666f40e3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Script.g.cs +++ /dev/null @@ -1,170 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class Script -{ - /// - /// - /// The id for a stored script. - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Specifies the language the script is written in. - /// - /// - [JsonInclude, JsonPropertyName("lang")] - public Elastic.Clients.Elasticsearch.Serverless.ScriptLanguage? Lang { get; set; } - [JsonInclude, JsonPropertyName("options")] - public IDictionary? Options { get; set; } - - /// - /// - /// Specifies any named parameters that are passed into the script as variables. - /// Use parameters instead of hard-coded values to decrease compile time. - /// - /// - [JsonInclude, JsonPropertyName("params")] - public IDictionary? Params { get; set; } - - /// - /// - /// The script source. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string? Source { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter(Script script) => Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IntervalsFilter.Script(script); -} - -public sealed partial class ScriptDescriptor : SerializableDescriptor -{ - internal ScriptDescriptor(Action configure) => configure.Invoke(this); - - public ScriptDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptLanguage? LangValue { get; set; } - private IDictionary? OptionsValue { get; set; } - private IDictionary? ParamsValue { get; set; } - private string? SourceValue { get; set; } - - /// - /// - /// The id for a stored script. - /// - /// - public ScriptDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Specifies the language the script is written in. - /// - /// - public ScriptDescriptor Lang(Elastic.Clients.Elasticsearch.Serverless.ScriptLanguage? lang) - { - LangValue = lang; - return Self; - } - - public ScriptDescriptor Options(Func, FluentDictionary> selector) - { - OptionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Specifies any named parameters that are passed into the script as variables. - /// Use parameters instead of hard-coded values to decrease compile time. - /// - /// - public ScriptDescriptor Params(Func, FluentDictionary> selector) - { - ParamsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The script source. - /// - /// - public ScriptDescriptor Source(string? source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - if (LangValue is not null) - { - writer.WritePropertyName("lang"); - JsonSerializer.Serialize(writer, LangValue, options); - } - - if (OptionsValue is not null) - { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); - } - - if (ParamsValue is not null) - { - writer.WritePropertyName("params"); - JsonSerializer.Serialize(writer, ParamsValue, options); - } - - if (!string.IsNullOrEmpty(SourceValue)) - { - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptField.g.cs deleted file mode 100644 index 8f8f4f1b8c8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptField.g.cs +++ /dev/null @@ -1,108 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ScriptField -{ - [JsonInclude, JsonPropertyName("ignore_failure")] - public bool? IgnoreFailure { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } -} - -public sealed partial class ScriptFieldDescriptor : SerializableDescriptor -{ - internal ScriptFieldDescriptor(Action configure) => configure.Invoke(this); - - public ScriptFieldDescriptor() : base() - { - } - - private bool? IgnoreFailureValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - - public ScriptFieldDescriptor IgnoreFailure(bool? ignoreFailure = true) - { - IgnoreFailureValue = ignoreFailure; - return Self; - } - - public ScriptFieldDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptFieldDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptFieldDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IgnoreFailureValue.HasValue) - { - writer.WritePropertyName("ignore_failure"); - writer.WriteBooleanValue(IgnoreFailureValue.Value); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs deleted file mode 100644 index eb5d5f942cf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ScriptSort.g.cs +++ /dev/null @@ -1,326 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ScriptSort -{ - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.SortMode? Mode { get; set; } - [JsonInclude, JsonPropertyName("nested")] - public Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? Nested { get; set; } - [JsonInclude, JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.Serverless.SortOrder? Order { get; set; } - [JsonInclude, JsonPropertyName("script")] - public Elastic.Clients.Elasticsearch.Serverless.Script Script { get; set; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? Type { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.SortOptions(ScriptSort scriptSort) => Elastic.Clients.Elasticsearch.Serverless.SortOptions.Script(scriptSort); -} - -public sealed partial class ScriptSortDescriptor : SerializableDescriptor> -{ - internal ScriptSortDescriptor(Action> configure) => configure.Invoke(this); - - public ScriptSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action> NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? TypeValue { get; set; } - - public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public ScriptSortDescriptor Nested(Action> configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public ScriptSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public ScriptSortDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptSortDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptSortDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ScriptSortDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ScriptSortDescriptor : SerializableDescriptor -{ - internal ScriptSortDescriptor(Action configure) => configure.Invoke(this); - - public ScriptSortDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? NestedValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor NestedDescriptor { get; set; } - private Action NestedDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOrder? OrderValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script ScriptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor ScriptDescriptor { get; set; } - private Action ScriptDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? TypeValue { get; set; } - - public ScriptSortDescriptor Mode(Elastic.Clients.Elasticsearch.Serverless.SortMode? mode) - { - ModeValue = mode; - return Self; - } - - public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValue? nested) - { - NestedDescriptor = null; - NestedDescriptorAction = null; - NestedValue = nested; - return Self; - } - - public ScriptSortDescriptor Nested(Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor descriptor) - { - NestedValue = null; - NestedDescriptorAction = null; - NestedDescriptor = descriptor; - return Self; - } - - public ScriptSortDescriptor Nested(Action configure) - { - NestedValue = null; - NestedDescriptor = null; - NestedDescriptorAction = configure; - return Self; - } - - public ScriptSortDescriptor Order(Elastic.Clients.Elasticsearch.Serverless.SortOrder? order) - { - OrderValue = order; - return Self; - } - - public ScriptSortDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script script) - { - ScriptDescriptor = null; - ScriptDescriptorAction = null; - ScriptValue = script; - return Self; - } - - public ScriptSortDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - ScriptValue = null; - ScriptDescriptorAction = null; - ScriptDescriptor = descriptor; - return Self; - } - - public ScriptSortDescriptor Script(Action configure) - { - ScriptValue = null; - ScriptDescriptor = null; - ScriptDescriptorAction = configure; - return Self; - } - - public ScriptSortDescriptor Type(Elastic.Clients.Elasticsearch.Serverless.ScriptSortType? type) - { - TypeValue = type; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ModeValue is not null) - { - writer.WritePropertyName("mode"); - JsonSerializer.Serialize(writer, ModeValue, options); - } - - if (NestedDescriptor is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedDescriptor, options); - } - else if (NestedDescriptorAction is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.NestedSortValueDescriptor(NestedDescriptorAction), options); - } - else if (NestedValue is not null) - { - writer.WritePropertyName("nested"); - JsonSerializer.Serialize(writer, NestedValue, options); - } - - if (OrderValue is not null) - { - writer.WritePropertyName("order"); - JsonSerializer.Serialize(writer, OrderValue, options); - } - - if (ScriptDescriptor is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptDescriptor, options); - } - else if (ScriptDescriptorAction is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(ScriptDescriptorAction), options); - } - else - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, ScriptValue, options); - } - - if (TypeValue is not null) - { - writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SearchStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SearchStats.g.cs deleted file mode 100644 index 713db7ba8f7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SearchStats.g.cs +++ /dev/null @@ -1,68 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SearchStats -{ - [JsonInclude, JsonPropertyName("fetch_current")] - public long FetchCurrent { get; init; } - [JsonInclude, JsonPropertyName("fetch_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? FetchTime { get; init; } - [JsonInclude, JsonPropertyName("fetch_time_in_millis")] - public long FetchTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("fetch_total")] - public long FetchTotal { get; init; } - [JsonInclude, JsonPropertyName("groups")] - public IReadOnlyDictionary? Groups { get; init; } - [JsonInclude, JsonPropertyName("open_contexts")] - public long? OpenContexts { get; init; } - [JsonInclude, JsonPropertyName("query_current")] - public long QueryCurrent { get; init; } - [JsonInclude, JsonPropertyName("query_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? QueryTime { get; init; } - [JsonInclude, JsonPropertyName("query_time_in_millis")] - public long QueryTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("query_total")] - public long QueryTotal { get; init; } - [JsonInclude, JsonPropertyName("scroll_current")] - public long ScrollCurrent { get; init; } - [JsonInclude, JsonPropertyName("scroll_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? ScrollTime { get; init; } - [JsonInclude, JsonPropertyName("scroll_time_in_millis")] - public long ScrollTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("scroll_total")] - public long ScrollTotal { get; init; } - [JsonInclude, JsonPropertyName("suggest_current")] - public long SuggestCurrent { get; init; } - [JsonInclude, JsonPropertyName("suggest_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? SuggestTime { get; init; } - [JsonInclude, JsonPropertyName("suggest_time_in_millis")] - public long SuggestTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("suggest_total")] - public long SuggestTotal { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Access.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Access.g.cs deleted file mode 100644 index 85cb5f9fb10..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Access.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class Access -{ - /// - /// - /// A list of indices permission entries for cross-cluster replication. - /// - /// - [JsonInclude, JsonPropertyName("replication")] - public IReadOnlyCollection? Replication { get; init; } - - /// - /// - /// A list of indices permission entries for cross-cluster search. - /// - /// - [JsonInclude, JsonPropertyName("search")] - public IReadOnlyCollection? Search { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKey.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKey.g.cs deleted file mode 100644 index 78b78a2e8be..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKey.g.cs +++ /dev/null @@ -1,166 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ApiKey -{ - /// - /// - /// The access granted to cross-cluster API keys. - /// The access is composed of permissions for cross cluster search and cross cluster replication. - /// At least one of them must be specified. - /// When specified, the new access assignment fully replaces the previously assigned access. - /// - /// - [JsonInclude, JsonPropertyName("access")] - public Elastic.Clients.Elasticsearch.Serverless.Security.Access? Access { get; init; } - - /// - /// - /// Creation time for the API key in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("creation")] - public long Creation { get; init; } - - /// - /// - /// Expiration time for the API key in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("expiration")] - public long? Expiration { get; init; } - - /// - /// - /// Id for the API key - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// Invalidation status for the API key. - /// If the key has been invalidated, it has a value of true. Otherwise, it is false. - /// - /// - [JsonInclude, JsonPropertyName("invalidated")] - public bool Invalidated { get; init; } - - /// - /// - /// If the key has been invalidated, invalidation time in milliseconds. - /// - /// - [JsonInclude, JsonPropertyName("invalidation")] - public long? Invalidation { get; init; } - - /// - /// - /// The owner user’s permissions associated with the API key. - /// It is a point-in-time snapshot captured at creation and subsequent updates. - /// An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions. - /// - /// - [JsonInclude, JsonPropertyName("limited_by")] - public IReadOnlyCollection>? LimitedBy { get; init; } - - /// - /// - /// Metadata of the API key - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary Metadata { get; init; } - - /// - /// - /// Name of the API key. - /// - /// - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - - /// - /// - /// The profile uid for the API key owner principal, if requested and if it exists - /// - /// - [JsonInclude, JsonPropertyName("profile_uid")] - public string? ProfileUid { get; init; } - - /// - /// - /// Realm name of the principal for which this API key was created. - /// - /// - [JsonInclude, JsonPropertyName("realm")] - public string Realm { get; init; } - - /// - /// - /// Realm type of the principal for which this API key was created - /// - /// - [JsonInclude, JsonPropertyName("realm_type")] - public string? RealmType { get; init; } - - /// - /// - /// The role descriptors assigned to this API key when it was created or last updated. - /// An empty role descriptor means the API key inherits the owner user’s permissions. - /// - /// - [JsonInclude, JsonPropertyName("role_descriptors")] - public IReadOnlyDictionary? RoleDescriptors { get; init; } - - /// - /// - /// Sorting values when using the sort parameter with the security.query_api_keys API. - /// - /// - [JsonInclude, JsonPropertyName("_sort")] - public IReadOnlyCollection? Sort { get; init; } - - /// - /// - /// The type of the API key (e.g. rest or cross_cluster). - /// - /// - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyType Type { get; init; } - - /// - /// - /// Principal for which this API key was created - /// - /// - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyAggregation.g.cs deleted file mode 100644 index 53a0e25eabb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyAggregation.g.cs +++ /dev/null @@ -1,452 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(ApiKeyAggregationConverter))] -public sealed partial class ApiKeyAggregation -{ - internal ApiKeyAggregation(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 ApiKeyAggregation Cardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation cardinalityAggregation) => new ApiKeyAggregation("cardinality", cardinalityAggregation); - public static ApiKeyAggregation Composite(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation compositeAggregation) => new ApiKeyAggregation("composite", compositeAggregation); - public static ApiKeyAggregation DateRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation dateRangeAggregation) => new ApiKeyAggregation("date_range", dateRangeAggregation); - public static ApiKeyAggregation Filter(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery apiKeyQueryContainer) => new ApiKeyAggregation("filter", apiKeyQueryContainer); - public static ApiKeyAggregation Filters(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyFiltersAggregation apiKeyFiltersAggregation) => new ApiKeyAggregation("filters", apiKeyFiltersAggregation); - public static ApiKeyAggregation Missing(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation missingAggregation) => new ApiKeyAggregation("missing", missingAggregation); - public static ApiKeyAggregation Range(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation rangeAggregation) => new ApiKeyAggregation("range", rangeAggregation); - public static ApiKeyAggregation Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => new ApiKeyAggregation("terms", termsAggregation); - public static ApiKeyAggregation ValueCount(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation valueCountAggregation) => new ApiKeyAggregation("value_count", valueCountAggregation); - - /// - /// - /// Sub-aggregations for this aggregation. - /// Only applies to bucket aggregations. - /// - /// - [JsonInclude, JsonPropertyName("aggregations")] - public IDictionary? Aggregations { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class ApiKeyAggregationConverter : JsonConverter -{ - public override ApiKeyAggregation 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; - IDictionary? aggregationsValue = default; - IDictionary? metaValue = 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 == "aggregations") - { - aggregationsValue = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (propertyName == "meta") - { - metaValue = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (propertyName == "cardinality") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "composite") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "date_range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "filter") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "filters") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "missing") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "value_count") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'ApiKeyAggregation' from the response."); - } - - var result = new ApiKeyAggregation(variantNameValue, variantValue); - result.Aggregations = aggregationsValue; - result.Meta = metaValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, ApiKeyAggregation value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.Meta is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, value.Meta, options); - } - - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "cardinality": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation)value.Variant, options); - break; - case "composite": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation)value.Variant, options); - break; - case "date_range": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation)value.Variant, options); - break; - case "filter": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery)value.Variant, options); - break; - case "filters": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyFiltersAggregation)value.Variant, options); - break; - case "missing": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation)value.Variant, options); - break; - case "range": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation)value.Variant, options); - break; - case "value_count": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ApiKeyAggregationDescriptor : SerializableDescriptor> -{ - internal ApiKeyAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public ApiKeyAggregationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private ApiKeyAggregationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private ApiKeyAggregationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private IDictionary> AggregationsValue { get; set; } - private IDictionary? MetaValue { get; set; } - - /// - /// - /// Sub-aggregations for this aggregation. - /// Only applies to bucket aggregations. - /// - /// - public ApiKeyAggregationDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public ApiKeyAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ApiKeyAggregationDescriptor Cardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation cardinalityAggregation) => Set(cardinalityAggregation, "cardinality"); - public ApiKeyAggregationDescriptor Cardinality(Action> configure) => Set(configure, "cardinality"); - public ApiKeyAggregationDescriptor Composite(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation compositeAggregation) => Set(compositeAggregation, "composite"); - public ApiKeyAggregationDescriptor Composite(Action> configure) => Set(configure, "composite"); - public ApiKeyAggregationDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation dateRangeAggregation) => Set(dateRangeAggregation, "date_range"); - public ApiKeyAggregationDescriptor DateRange(Action> configure) => Set(configure, "date_range"); - public ApiKeyAggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery apiKeyQueryContainer) => Set(apiKeyQueryContainer, "filter"); - public ApiKeyAggregationDescriptor Filter(Action> configure) => Set(configure, "filter"); - public ApiKeyAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyFiltersAggregation apiKeyFiltersAggregation) => Set(apiKeyFiltersAggregation, "filters"); - public ApiKeyAggregationDescriptor Filters(Action> configure) => Set(configure, "filters"); - public ApiKeyAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation missingAggregation) => Set(missingAggregation, "missing"); - public ApiKeyAggregationDescriptor Missing(Action> configure) => Set(configure, "missing"); - public ApiKeyAggregationDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation rangeAggregation) => Set(rangeAggregation, "range"); - public ApiKeyAggregationDescriptor Range(Action> configure) => Set(configure, "range"); - public ApiKeyAggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); - public ApiKeyAggregationDescriptor Terms(Action> configure) => Set(configure, "terms"); - public ApiKeyAggregationDescriptor ValueCount(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation valueCountAggregation) => Set(valueCountAggregation, "value_count"); - public ApiKeyAggregationDescriptor ValueCount(Action> configure) => Set(configure, "value_count"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ApiKeyAggregationDescriptor : SerializableDescriptor -{ - internal ApiKeyAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ApiKeyAggregationDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private ApiKeyAggregationDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private ApiKeyAggregationDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private IDictionary AggregationsValue { get; set; } - private IDictionary? MetaValue { get; set; } - - /// - /// - /// Sub-aggregations for this aggregation. - /// Only applies to bucket aggregations. - /// - /// - public ApiKeyAggregationDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public ApiKeyAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ApiKeyAggregationDescriptor Cardinality(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CardinalityAggregation cardinalityAggregation) => Set(cardinalityAggregation, "cardinality"); - public ApiKeyAggregationDescriptor Cardinality(Action configure) => Set(configure, "cardinality"); - public ApiKeyAggregationDescriptor Composite(Elastic.Clients.Elasticsearch.Serverless.Aggregations.CompositeAggregation compositeAggregation) => Set(compositeAggregation, "composite"); - public ApiKeyAggregationDescriptor Composite(Action configure) => Set(configure, "composite"); - public ApiKeyAggregationDescriptor DateRange(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeAggregation dateRangeAggregation) => Set(dateRangeAggregation, "date_range"); - public ApiKeyAggregationDescriptor DateRange(Action configure) => Set(configure, "date_range"); - public ApiKeyAggregationDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyQuery apiKeyQueryContainer) => Set(apiKeyQueryContainer, "filter"); - public ApiKeyAggregationDescriptor Filter(Action configure) => Set(configure, "filter"); - public ApiKeyAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyFiltersAggregation apiKeyFiltersAggregation) => Set(apiKeyFiltersAggregation, "filters"); - public ApiKeyAggregationDescriptor Filters(Action configure) => Set(configure, "filters"); - public ApiKeyAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingAggregation missingAggregation) => Set(missingAggregation, "missing"); - public ApiKeyAggregationDescriptor Missing(Action configure) => Set(configure, "missing"); - public ApiKeyAggregationDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.Aggregations.RangeAggregation rangeAggregation) => Set(rangeAggregation, "range"); - public ApiKeyAggregationDescriptor Range(Action configure) => Set(configure, "range"); - public ApiKeyAggregationDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); - public ApiKeyAggregationDescriptor Terms(Action configure) => Set(configure, "terms"); - public ApiKeyAggregationDescriptor ValueCount(Elastic.Clients.Elasticsearch.Serverless.Aggregations.ValueCountAggregation valueCountAggregation) => Set(valueCountAggregation, "value_count"); - public ApiKeyAggregationDescriptor ValueCount(Action configure) => Set(configure, "value_count"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs deleted file mode 100644 index 2e241b37b09..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs +++ /dev/null @@ -1,244 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ApiKeyFiltersAggregation -{ - /// - /// - /// Collection of queries from which to build buckets. - /// - /// - [JsonInclude, JsonPropertyName("filters")] - public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? Filters { get; set; } - - /// - /// - /// By default, the named filters aggregation returns the buckets as an object. - /// Set to false to return the buckets as an array of objects. - /// - /// - [JsonInclude, JsonPropertyName("keyed")] - public bool? Keyed { get; set; } - - /// - /// - /// Set to true to add a bucket to the response which will contain all documents that do not match any of the given filters. - /// - /// - [JsonInclude, JsonPropertyName("other_bucket")] - public bool? OtherBucket { get; set; } - - /// - /// - /// The key with which the other bucket is returned. - /// - /// - [JsonInclude, JsonPropertyName("other_bucket_key")] - public string? OtherBucketKey { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation(ApiKeyFiltersAggregation apiKeyFiltersAggregation) => Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyAggregation.Filters(apiKeyFiltersAggregation); -} - -public sealed partial class ApiKeyFiltersAggregationDescriptor : SerializableDescriptor> -{ - internal ApiKeyFiltersAggregationDescriptor(Action> configure) => configure.Invoke(this); - - public ApiKeyFiltersAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? FiltersValue { get; set; } - private bool? KeyedValue { get; set; } - private bool? OtherBucketValue { get; set; } - private string? OtherBucketKeyValue { get; set; } - - /// - /// - /// Collection of queries from which to build buckets. - /// - /// - public ApiKeyFiltersAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? filters) - { - FiltersValue = filters; - return Self; - } - - /// - /// - /// By default, the named filters aggregation returns the buckets as an object. - /// Set to false to return the buckets as an array of objects. - /// - /// - public ApiKeyFiltersAggregationDescriptor Keyed(bool? keyed = true) - { - KeyedValue = keyed; - return Self; - } - - /// - /// - /// Set to true to add a bucket to the response which will contain all documents that do not match any of the given filters. - /// - /// - public ApiKeyFiltersAggregationDescriptor OtherBucket(bool? otherBucket = true) - { - OtherBucketValue = otherBucket; - return Self; - } - - /// - /// - /// The key with which the other bucket is returned. - /// - /// - public ApiKeyFiltersAggregationDescriptor OtherBucketKey(string? otherBucketKey) - { - OtherBucketKeyValue = otherBucketKey; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FiltersValue is not null) - { - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - } - - if (KeyedValue.HasValue) - { - writer.WritePropertyName("keyed"); - writer.WriteBooleanValue(KeyedValue.Value); - } - - if (OtherBucketValue.HasValue) - { - writer.WritePropertyName("other_bucket"); - writer.WriteBooleanValue(OtherBucketValue.Value); - } - - if (!string.IsNullOrEmpty(OtherBucketKeyValue)) - { - writer.WritePropertyName("other_bucket_key"); - writer.WriteStringValue(OtherBucketKeyValue); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ApiKeyFiltersAggregationDescriptor : SerializableDescriptor -{ - internal ApiKeyFiltersAggregationDescriptor(Action configure) => configure.Invoke(this); - - public ApiKeyFiltersAggregationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? FiltersValue { get; set; } - private bool? KeyedValue { get; set; } - private bool? OtherBucketValue { get; set; } - private string? OtherBucketKeyValue { get; set; } - - /// - /// - /// Collection of queries from which to build buckets. - /// - /// - public ApiKeyFiltersAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? filters) - { - FiltersValue = filters; - return Self; - } - - /// - /// - /// By default, the named filters aggregation returns the buckets as an object. - /// Set to false to return the buckets as an array of objects. - /// - /// - public ApiKeyFiltersAggregationDescriptor Keyed(bool? keyed = true) - { - KeyedValue = keyed; - return Self; - } - - /// - /// - /// Set to true to add a bucket to the response which will contain all documents that do not match any of the given filters. - /// - /// - public ApiKeyFiltersAggregationDescriptor OtherBucket(bool? otherBucket = true) - { - OtherBucketValue = otherBucket; - return Self; - } - - /// - /// - /// The key with which the other bucket is returned. - /// - /// - public ApiKeyFiltersAggregationDescriptor OtherBucketKey(string? otherBucketKey) - { - OtherBucketKeyValue = otherBucketKey; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FiltersValue is not null) - { - writer.WritePropertyName("filters"); - JsonSerializer.Serialize(writer, FiltersValue, options); - } - - if (KeyedValue.HasValue) - { - writer.WritePropertyName("keyed"); - writer.WriteBooleanValue(KeyedValue.Value); - } - - if (OtherBucketValue.HasValue) - { - writer.WritePropertyName("other_bucket"); - writer.WriteBooleanValue(OtherBucketValue.Value); - } - - if (!string.IsNullOrEmpty(OtherBucketKeyValue)) - { - writer.WritePropertyName("other_bucket_key"); - writer.WriteStringValue(OtherBucketKeyValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyQuery.g.cs deleted file mode 100644 index eac62337667..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApiKeyQuery.g.cs +++ /dev/null @@ -1,384 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(ApiKeyQueryConverter))] -public sealed partial class ApiKeyQuery -{ - internal ApiKeyQuery(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 ApiKeyQuery Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => new ApiKeyQuery("bool", boolQuery); - public static ApiKeyQuery Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => new ApiKeyQuery("exists", existsQuery); - public static ApiKeyQuery Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => new ApiKeyQuery("ids", idsQuery); - public static ApiKeyQuery Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => new ApiKeyQuery("match", matchQuery); - public static ApiKeyQuery MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => new ApiKeyQuery("match_all", matchAllQuery); - public static ApiKeyQuery Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => new ApiKeyQuery("prefix", prefixQuery); - public static ApiKeyQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => new ApiKeyQuery("range", rangeQuery); - public static ApiKeyQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => new ApiKeyQuery("range", rangeQuery); - public static ApiKeyQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => new ApiKeyQuery("range", rangeQuery); - public static ApiKeyQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => new ApiKeyQuery("range", rangeQuery); - public static ApiKeyQuery SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => new ApiKeyQuery("simple_query_string", simpleQueryStringQuery); - public static ApiKeyQuery Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => new ApiKeyQuery("term", termQuery); - public static ApiKeyQuery Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => new ApiKeyQuery("terms", termsQuery); - public static ApiKeyQuery Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => new ApiKeyQuery("wildcard", wildcardQuery); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class ApiKeyQueryConverter : JsonConverter -{ - public override ApiKeyQuery 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; - 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 == "bool") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "exists") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ids") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_all") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "simple_query_string") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wildcard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'ApiKeyQuery' from the response."); - } - - var result = new ApiKeyQuery(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, ApiKeyQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "bool": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery)value.Variant, options); - break; - case "exists": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery)value.Variant, options); - break; - case "ids": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery)value.Variant, options); - break; - case "match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery)value.Variant, options); - break; - case "match_all": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery)value.Variant, options); - break; - case "prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery)value.Variant, options); - break; - case "range": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "simple_query_string": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery)value.Variant, options); - break; - case "term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery)value.Variant, options); - break; - case "wildcard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ApiKeyQueryDescriptor : SerializableDescriptor> -{ - internal ApiKeyQueryDescriptor(Action> configure) => configure.Invoke(this); - - public ApiKeyQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private ApiKeyQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private ApiKeyQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public ApiKeyQueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public ApiKeyQueryDescriptor Bool(Action> configure) => Set(configure, "bool"); - public ApiKeyQueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public ApiKeyQueryDescriptor Exists(Action> configure) => Set(configure, "exists"); - public ApiKeyQueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public ApiKeyQueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public ApiKeyQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public ApiKeyQueryDescriptor Match(Action> configure) => Set(configure, "match"); - public ApiKeyQueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public ApiKeyQueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public ApiKeyQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public ApiKeyQueryDescriptor Prefix(Action> configure) => Set(configure, "prefix"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public ApiKeyQueryDescriptor SimpleQueryString(Action> configure) => Set(configure, "simple_query_string"); - public ApiKeyQueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public ApiKeyQueryDescriptor Term(Action> configure) => Set(configure, "term"); - public ApiKeyQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public ApiKeyQueryDescriptor Terms(Action> configure) => Set(configure, "terms"); - public ApiKeyQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public ApiKeyQueryDescriptor Wildcard(Action> configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class ApiKeyQueryDescriptor : SerializableDescriptor -{ - internal ApiKeyQueryDescriptor(Action configure) => configure.Invoke(this); - - public ApiKeyQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private ApiKeyQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private ApiKeyQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public ApiKeyQueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public ApiKeyQueryDescriptor Bool(Action configure) => Set(configure, "bool"); - public ApiKeyQueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public ApiKeyQueryDescriptor Exists(Action configure) => Set(configure, "exists"); - public ApiKeyQueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public ApiKeyQueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public ApiKeyQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public ApiKeyQueryDescriptor Match(Action configure) => Set(configure, "match"); - public ApiKeyQueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public ApiKeyQueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public ApiKeyQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public ApiKeyQueryDescriptor Prefix(Action configure) => Set(configure, "prefix"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public ApiKeyQueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public ApiKeyQueryDescriptor SimpleQueryString(Action configure) => Set(configure, "simple_query_string"); - public ApiKeyQueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public ApiKeyQueryDescriptor Term(Action configure) => Set(configure, "term"); - public ApiKeyQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public ApiKeyQueryDescriptor Terms(Action configure) => Set(configure, "terms"); - public ApiKeyQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public ApiKeyQueryDescriptor Wildcard(Action configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationGlobalUserPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationGlobalUserPrivileges.g.cs deleted file mode 100644 index 27c0724d7fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationGlobalUserPrivileges.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ApplicationGlobalUserPrivileges -{ - [JsonInclude, JsonPropertyName("manage")] - public Elastic.Clients.Elasticsearch.Serverless.Security.ManageUserPrivileges Manage { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivileges.g.cs deleted file mode 100644 index 5cdb4075a3a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivileges.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ApplicationPrivileges -{ - /// - /// - /// The name of the application to which this entry applies. - /// - /// - [JsonInclude, JsonPropertyName("application")] - public string Application { get; set; } - - /// - /// - /// A list of strings, where each element is the name of an application privilege or action. - /// - /// - [JsonInclude, JsonPropertyName("privileges")] - public ICollection Privileges { get; set; } - - /// - /// - /// A list resources to which the privileges are applied. - /// - /// - [JsonInclude, JsonPropertyName("resources")] - public ICollection Resources { get; set; } -} - -public sealed partial class ApplicationPrivilegesDescriptor : SerializableDescriptor -{ - internal ApplicationPrivilegesDescriptor(Action configure) => configure.Invoke(this); - - public ApplicationPrivilegesDescriptor() : base() - { - } - - private string ApplicationValue { get; set; } - private ICollection PrivilegesValue { get; set; } - private ICollection ResourcesValue { get; set; } - - /// - /// - /// The name of the application to which this entry applies. - /// - /// - public ApplicationPrivilegesDescriptor Application(string application) - { - ApplicationValue = application; - return Self; - } - - /// - /// - /// A list of strings, where each element is the name of an application privilege or action. - /// - /// - public ApplicationPrivilegesDescriptor Privileges(ICollection privileges) - { - PrivilegesValue = privileges; - return Self; - } - - /// - /// - /// A list resources to which the privileges are applied. - /// - /// - public ApplicationPrivilegesDescriptor Resources(ICollection resources) - { - ResourcesValue = resources; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("application"); - writer.WriteStringValue(ApplicationValue); - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesValue, options); - writer.WritePropertyName("resources"); - JsonSerializer.Serialize(writer, ResourcesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs deleted file mode 100644 index 1ff42648227..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ApplicationPrivilegesCheck -{ - /// - /// - /// The name of the application. - /// - /// - [JsonInclude, JsonPropertyName("application")] - public string Application { get; set; } - - /// - /// - /// A list of the privileges that you want to check for the specified resources. May be either application privilege names, or the names of actions that are granted by those privileges - /// - /// - [JsonInclude, JsonPropertyName("privileges")] - public ICollection Privileges { get; set; } - - /// - /// - /// A list of resource names against which the privileges should be checked - /// - /// - [JsonInclude, JsonPropertyName("resources")] - public ICollection Resources { get; set; } -} - -public sealed partial class ApplicationPrivilegesCheckDescriptor : SerializableDescriptor -{ - internal ApplicationPrivilegesCheckDescriptor(Action configure) => configure.Invoke(this); - - public ApplicationPrivilegesCheckDescriptor() : base() - { - } - - private string ApplicationValue { get; set; } - private ICollection PrivilegesValue { get; set; } - private ICollection ResourcesValue { get; set; } - - /// - /// - /// The name of the application. - /// - /// - public ApplicationPrivilegesCheckDescriptor Application(string application) - { - ApplicationValue = application; - return Self; - } - - /// - /// - /// A list of the privileges that you want to check for the specified resources. May be either application privilege names, or the names of actions that are granted by those privileges - /// - /// - public ApplicationPrivilegesCheckDescriptor Privileges(ICollection privileges) - { - PrivilegesValue = privileges; - return Self; - } - - /// - /// - /// A list of resource names against which the privileges should be checked - /// - /// - public ApplicationPrivilegesCheckDescriptor Resources(ICollection resources) - { - ResourcesValue = resources; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("application"); - writer.WriteStringValue(ApplicationValue); - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesValue, options); - writer.WritePropertyName("resources"); - JsonSerializer.Serialize(writer, ResourcesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateApiKey.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateApiKey.g.cs deleted file mode 100644 index 37074c34dfd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateApiKey.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class AuthenticateApiKey -{ - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateToken.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateToken.g.cs deleted file mode 100644 index e33e8bd4d3f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticateToken.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class AuthenticateToken -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string? Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticatedUser.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticatedUser.g.cs deleted file mode 100644 index 164996b3e29..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticatedUser.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class AuthenticatedUser -{ - [JsonInclude, JsonPropertyName("authentication_provider")] - public Elastic.Clients.Elasticsearch.Serverless.Security.AuthenticationProvider? AuthenticationProvider { get; init; } - [JsonInclude, JsonPropertyName("authentication_realm")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserRealm AuthenticationRealm { get; init; } - [JsonInclude, JsonPropertyName("authentication_type")] - public string AuthenticationType { get; init; } - [JsonInclude, JsonPropertyName("email")] - public string? Email { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("full_name")] - public string? FullName { get; init; } - [JsonInclude, JsonPropertyName("lookup_realm")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserRealm LookupRealm { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary Metadata { get; init; } - [JsonInclude, JsonPropertyName("profile_uid")] - public string? ProfileUid { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticationProvider.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticationProvider.g.cs deleted file mode 100644 index 83e8094757a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/AuthenticationProvider.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class AuthenticationProvider -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/BulkError.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/BulkError.g.cs deleted file mode 100644 index 41b39cc686c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/BulkError.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class BulkError -{ - /// - /// - /// The number of errors - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Details about the errors, keyed by role name - /// - /// - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyDictionary Details { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ClusterNode.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ClusterNode.g.cs deleted file mode 100644 index 35dbf38ddf7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ClusterNode.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ClusterNode -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/CreatedStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/CreatedStatus.g.cs deleted file mode 100644 index bf398809526..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/CreatedStatus.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class CreatedStatus -{ - [JsonInclude, JsonPropertyName("created")] - public bool Created { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldRule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldRule.g.cs deleted file mode 100644 index 4b17f9090f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldRule.g.cs +++ /dev/null @@ -1,251 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(FieldRuleConverter))] -public sealed partial class FieldRule -{ - internal FieldRule(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 FieldRule Dn(Elastic.Clients.Elasticsearch.Serverless.Names names) => new FieldRule("dn", names); - public static FieldRule Groups(Elastic.Clients.Elasticsearch.Serverless.Names names) => new FieldRule("groups", names); - public static FieldRule Username(Elastic.Clients.Elasticsearch.Serverless.Names names) => new FieldRule("username", names); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class FieldRuleConverter : JsonConverter -{ - public override FieldRule 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; - 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 == "dn") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "groups") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "username") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'FieldRule' from the response."); - } - - var result = new FieldRule(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, FieldRule value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "dn": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Names)value.Variant, options); - break; - case "groups": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Names)value.Variant, options); - break; - case "username": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Names)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldRuleDescriptor : SerializableDescriptor> -{ - internal FieldRuleDescriptor(Action> configure) => configure.Invoke(this); - - public FieldRuleDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private FieldRuleDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private FieldRuleDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public FieldRuleDescriptor Dn(Elastic.Clients.Elasticsearch.Serverless.Names names) => Set(names, "dn"); - public FieldRuleDescriptor Groups(Elastic.Clients.Elasticsearch.Serverless.Names names) => Set(names, "groups"); - public FieldRuleDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Names names) => Set(names, "username"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldRuleDescriptor : SerializableDescriptor -{ - internal FieldRuleDescriptor(Action configure) => configure.Invoke(this); - - public FieldRuleDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private FieldRuleDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private FieldRuleDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public FieldRuleDescriptor Dn(Elastic.Clients.Elasticsearch.Serverless.Names names) => Set(names, "dn"); - public FieldRuleDescriptor Groups(Elastic.Clients.Elasticsearch.Serverless.Names names) => Set(names, "groups"); - public FieldRuleDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Names names) => Set(names, "username"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldSecurity.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldSecurity.g.cs deleted file mode 100644 index 02fbe16cb49..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FieldSecurity.g.cs +++ /dev/null @@ -1,122 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class FieldSecurity -{ - [JsonInclude, JsonPropertyName("except")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Except { get; set; } - [JsonInclude, JsonPropertyName("grant")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields? Grant { get; set; } -} - -public sealed partial class FieldSecurityDescriptor : SerializableDescriptor> -{ - internal FieldSecurityDescriptor(Action> configure) => configure.Invoke(this); - - public FieldSecurityDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? ExceptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? GrantValue { get; set; } - - public FieldSecurityDescriptor Except(Elastic.Clients.Elasticsearch.Serverless.Fields? except) - { - ExceptValue = except; - return Self; - } - - public FieldSecurityDescriptor Grant(Elastic.Clients.Elasticsearch.Serverless.Fields? grant) - { - GrantValue = grant; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExceptValue is not null) - { - writer.WritePropertyName("except"); - JsonSerializer.Serialize(writer, ExceptValue, options); - } - - if (GrantValue is not null) - { - writer.WritePropertyName("grant"); - JsonSerializer.Serialize(writer, GrantValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class FieldSecurityDescriptor : SerializableDescriptor -{ - internal FieldSecurityDescriptor(Action configure) => configure.Invoke(this); - - public FieldSecurityDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Fields? ExceptValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields? GrantValue { get; set; } - - public FieldSecurityDescriptor Except(Elastic.Clients.Elasticsearch.Serverless.Fields? except) - { - ExceptValue = except; - return Self; - } - - public FieldSecurityDescriptor Grant(Elastic.Clients.Elasticsearch.Serverless.Fields? grant) - { - GrantValue = grant; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ExceptValue is not null) - { - writer.WritePropertyName("except"); - JsonSerializer.Serialize(writer, ExceptValue, options); - } - - if (GrantValue is not null) - { - writer.WritePropertyName("grant"); - JsonSerializer.Serialize(writer, GrantValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FoundStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FoundStatus.g.cs deleted file mode 100644 index 1a1bce313ea..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/FoundStatus.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class FoundStatus -{ - [JsonInclude, JsonPropertyName("found")] - public bool Found { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GetUserProfileErrors.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GetUserProfileErrors.g.cs deleted file mode 100644 index f4787ecbf87..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GetUserProfileErrors.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GetUserProfileErrors -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyDictionary Details { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GlobalPrivilege.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GlobalPrivilege.g.cs deleted file mode 100644 index 7bd785a07a9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GlobalPrivilege.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GlobalPrivilege -{ - [JsonInclude, JsonPropertyName("application")] - public Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationGlobalUserPrivileges Application { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GrantApiKey.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GrantApiKey.g.cs deleted file mode 100644 index 28fd18d61e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/GrantApiKey.g.cs +++ /dev/null @@ -1,231 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class GrantApiKey -{ - /// - /// - /// Expiration time for the API key. By default, API keys never expire. - /// - /// - [JsonInclude, JsonPropertyName("expiration")] - public string? Expiration { get; set; } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. - /// It supports nested data structure. - /// Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name Name { get; set; } - - /// - /// - /// The role descriptors for this API key. - /// This parameter is optional. - /// When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. - /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. - /// - /// - [JsonInclude, JsonPropertyName("role_descriptors")] - [SingleOrManyCollectionConverter(typeof(IReadOnlyDictionary))] - public ICollection>? RoleDescriptors { get; set; } -} - -public sealed partial class GrantApiKeyDescriptor : SerializableDescriptor> -{ - internal GrantApiKeyDescriptor(Action> configure) => configure.Invoke(this); - - public GrantApiKeyDescriptor() : base() - { - } - - private string? ExpirationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - private ICollection>? RoleDescriptorsValue { get; set; } - - /// - /// - /// Expiration time for the API key. By default, API keys never expire. - /// - /// - public GrantApiKeyDescriptor Expiration(string? expiration) - { - ExpirationValue = expiration; - return Self; - } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. - /// It supports nested data structure. - /// Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public GrantApiKeyDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GrantApiKeyDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - /// - /// - /// The role descriptors for this API key. - /// This parameter is optional. - /// When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. - /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. - /// - /// - public GrantApiKeyDescriptor RoleDescriptors(ICollection>? roleDescriptors) - { - RoleDescriptorsValue = roleDescriptors; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ExpirationValue)) - { - writer.WritePropertyName("expiration"); - writer.WriteStringValue(ExpirationValue); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - if (RoleDescriptorsValue is not null) - { - writer.WritePropertyName("role_descriptors"); - SingleOrManySerializationHelper.Serialize>(RoleDescriptorsValue, writer, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class GrantApiKeyDescriptor : SerializableDescriptor -{ - internal GrantApiKeyDescriptor(Action configure) => configure.Invoke(this); - - public GrantApiKeyDescriptor() : base() - { - } - - private string? ExpirationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } - private ICollection>? RoleDescriptorsValue { get; set; } - - /// - /// - /// Expiration time for the API key. By default, API keys never expire. - /// - /// - public GrantApiKeyDescriptor Expiration(string? expiration) - { - ExpirationValue = expiration; - return Self; - } - - /// - /// - /// Arbitrary metadata that you want to associate with the API key. - /// It supports nested data structure. - /// Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public GrantApiKeyDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GrantApiKeyDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - NameValue = name; - return Self; - } - - /// - /// - /// The role descriptors for this API key. - /// This parameter is optional. - /// When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. - /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. - /// - /// - public GrantApiKeyDescriptor RoleDescriptors(ICollection>? roleDescriptors) - { - RoleDescriptorsValue = roleDescriptors; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ExpirationValue)) - { - writer.WritePropertyName("expiration"); - writer.WriteStringValue(ExpirationValue); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - if (RoleDescriptorsValue is not null) - { - writer.WritePropertyName("role_descriptors"); - SingleOrManySerializationHelper.Serialize>(RoleDescriptorsValue, writer, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/HasPrivilegesUserProfileErrors.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/HasPrivilegesUserProfileErrors.g.cs deleted file mode 100644 index 761813bde1f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/HasPrivilegesUserProfileErrors.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class HasPrivilegesUserProfileErrors -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("details")] - public IReadOnlyDictionary Details { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Hint.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Hint.g.cs deleted file mode 100644 index 5d87b05c492..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Hint.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class Hint -{ - /// - /// - /// A single key-value pair to match against the labels section - /// of a profile. A profile is considered matching if it matches - /// at least one of the strings. - /// - /// - [JsonInclude, JsonPropertyName("labels")] - public IDictionary>>? Labels { get; set; } - - /// - /// - /// A list of Profile UIDs to match against. - /// - /// - [JsonInclude, JsonPropertyName("uids")] - public ICollection? Uids { get; set; } -} - -public sealed partial class HintDescriptor : SerializableDescriptor -{ - internal HintDescriptor(Action configure) => configure.Invoke(this); - - public HintDescriptor() : base() - { - } - - private IDictionary>>? LabelsValue { get; set; } - private ICollection? UidsValue { get; set; } - - /// - /// - /// A single key-value pair to match against the labels section - /// of a profile. A profile is considered matching if it matches - /// at least one of the strings. - /// - /// - public HintDescriptor Labels(Func>>, FluentDictionary>>> selector) - { - LabelsValue = selector?.Invoke(new FluentDictionary>>()); - return Self; - } - - /// - /// - /// A list of Profile UIDs to match against. - /// - /// - public HintDescriptor Uids(ICollection? uids) - { - UidsValue = uids; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (LabelsValue is not null) - { - writer.WritePropertyName("labels"); - JsonSerializer.Serialize(writer, LabelsValue, options); - } - - if (UidsValue is not null) - { - writer.WritePropertyName("uids"); - JsonSerializer.Serialize(writer, UidsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndexPrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndexPrivilegesCheck.g.cs deleted file mode 100644 index f92e09190ab..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndexPrivilegesCheck.g.cs +++ /dev/null @@ -1,121 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class IndexPrivilegesCheck -{ - /// - /// - /// This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. - /// Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false. - /// If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices. - /// - /// - [JsonInclude, JsonPropertyName("allow_restricted_indices")] - public bool? AllowRestrictedIndices { get; set; } - - /// - /// - /// A list of indices. - /// - /// - [JsonInclude, JsonPropertyName("names")] - public Elastic.Clients.Elasticsearch.Serverless.Indices Names { get; set; } - - /// - /// - /// A list of the privileges that you want to check for the specified indices. - /// - /// - [JsonInclude, JsonPropertyName("privileges")] - public ICollection Privileges { get; set; } -} - -public sealed partial class IndexPrivilegesCheckDescriptor : SerializableDescriptor -{ - internal IndexPrivilegesCheckDescriptor(Action configure) => configure.Invoke(this); - - public IndexPrivilegesCheckDescriptor() : base() - { - } - - private bool? AllowRestrictedIndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices NamesValue { get; set; } - private ICollection PrivilegesValue { get; set; } - - /// - /// - /// This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. - /// Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false. - /// If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices. - /// - /// - public IndexPrivilegesCheckDescriptor AllowRestrictedIndices(bool? allowRestrictedIndices = true) - { - AllowRestrictedIndicesValue = allowRestrictedIndices; - return Self; - } - - /// - /// - /// A list of indices. - /// - /// - public IndexPrivilegesCheckDescriptor Names(Elastic.Clients.Elasticsearch.Serverless.Indices names) - { - NamesValue = names; - return Self; - } - - /// - /// - /// A list of the privileges that you want to check for the specified indices. - /// - /// - public IndexPrivilegesCheckDescriptor Privileges(ICollection privileges) - { - PrivilegesValue = privileges; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowRestrictedIndicesValue.HasValue) - { - writer.WritePropertyName("allow_restricted_indices"); - writer.WriteBooleanValue(AllowRestrictedIndicesValue.Value); - } - - writer.WritePropertyName("names"); - JsonSerializer.Serialize(writer, NamesValue, options); - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndicesPrivileges.g.cs deleted file mode 100644 index 45feac6f03e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/IndicesPrivileges.g.cs +++ /dev/null @@ -1,284 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class IndicesPrivileges -{ - /// - /// - /// The document fields that the owners of the role have read access to. - /// - /// - [JsonInclude, JsonPropertyName("field_security")] - public Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurity? FieldSecurity { get; set; } - - /// - /// - /// A list of indices (or index name patterns) to which the permissions in this entry apply. - /// - /// - [JsonInclude, JsonPropertyName("names")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexName))] - public ICollection Names { get; set; } - - /// - /// - /// The index level privileges that owners of the role have on the specified indices. - /// - /// - [JsonInclude, JsonPropertyName("privileges")] - public ICollection Privileges { get; set; } - - /// - /// - /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public object? Query { get; set; } -} - -public sealed partial class IndicesPrivilegesDescriptor : SerializableDescriptor> -{ - internal IndicesPrivilegesDescriptor(Action> configure) => configure.Invoke(this); - - public IndicesPrivilegesDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurity? FieldSecurityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurityDescriptor FieldSecurityDescriptor { get; set; } - private Action> FieldSecurityDescriptorAction { get; set; } - private ICollection NamesValue { get; set; } - private ICollection PrivilegesValue { get; set; } - private object? QueryValue { get; set; } - - /// - /// - /// The document fields that the owners of the role have read access to. - /// - /// - public IndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurity? fieldSecurity) - { - FieldSecurityDescriptor = null; - FieldSecurityDescriptorAction = null; - FieldSecurityValue = fieldSecurity; - return Self; - } - - public IndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurityDescriptor descriptor) - { - FieldSecurityValue = null; - FieldSecurityDescriptorAction = null; - FieldSecurityDescriptor = descriptor; - return Self; - } - - public IndicesPrivilegesDescriptor FieldSecurity(Action> configure) - { - FieldSecurityValue = null; - FieldSecurityDescriptor = null; - FieldSecurityDescriptorAction = configure; - return Self; - } - - /// - /// - /// A list of indices (or index name patterns) to which the permissions in this entry apply. - /// - /// - public IndicesPrivilegesDescriptor Names(ICollection names) - { - NamesValue = names; - return Self; - } - - /// - /// - /// The index level privileges that owners of the role have on the specified indices. - /// - /// - public IndicesPrivilegesDescriptor Privileges(ICollection privileges) - { - PrivilegesValue = privileges; - return Self; - } - - /// - /// - /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. - /// - /// - public IndicesPrivilegesDescriptor Query(object? query) - { - QueryValue = query; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldSecurityDescriptor is not null) - { - writer.WritePropertyName("field_security"); - JsonSerializer.Serialize(writer, FieldSecurityDescriptor, options); - } - else if (FieldSecurityDescriptorAction is not null) - { - writer.WritePropertyName("field_security"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurityDescriptor(FieldSecurityDescriptorAction), options); - } - else if (FieldSecurityValue is not null) - { - writer.WritePropertyName("field_security"); - JsonSerializer.Serialize(writer, FieldSecurityValue, options); - } - - writer.WritePropertyName("names"); - SingleOrManySerializationHelper.Serialize(NamesValue, writer, options); - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesValue, options); - if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndicesPrivilegesDescriptor : SerializableDescriptor -{ - internal IndicesPrivilegesDescriptor(Action configure) => configure.Invoke(this); - - public IndicesPrivilegesDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurity? FieldSecurityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurityDescriptor FieldSecurityDescriptor { get; set; } - private Action FieldSecurityDescriptorAction { get; set; } - private ICollection NamesValue { get; set; } - private ICollection PrivilegesValue { get; set; } - private object? QueryValue { get; set; } - - /// - /// - /// The document fields that the owners of the role have read access to. - /// - /// - public IndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurity? fieldSecurity) - { - FieldSecurityDescriptor = null; - FieldSecurityDescriptorAction = null; - FieldSecurityValue = fieldSecurity; - return Self; - } - - public IndicesPrivilegesDescriptor FieldSecurity(Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurityDescriptor descriptor) - { - FieldSecurityValue = null; - FieldSecurityDescriptorAction = null; - FieldSecurityDescriptor = descriptor; - return Self; - } - - public IndicesPrivilegesDescriptor FieldSecurity(Action configure) - { - FieldSecurityValue = null; - FieldSecurityDescriptor = null; - FieldSecurityDescriptorAction = configure; - return Self; - } - - /// - /// - /// A list of indices (or index name patterns) to which the permissions in this entry apply. - /// - /// - public IndicesPrivilegesDescriptor Names(ICollection names) - { - NamesValue = names; - return Self; - } - - /// - /// - /// The index level privileges that owners of the role have on the specified indices. - /// - /// - public IndicesPrivilegesDescriptor Privileges(ICollection privileges) - { - PrivilegesValue = privileges; - return Self; - } - - /// - /// - /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. - /// - /// - public IndicesPrivilegesDescriptor Query(object? query) - { - QueryValue = query; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldSecurityDescriptor is not null) - { - writer.WritePropertyName("field_security"); - JsonSerializer.Serialize(writer, FieldSecurityDescriptor, options); - } - else if (FieldSecurityDescriptorAction is not null) - { - writer.WritePropertyName("field_security"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurityDescriptor(FieldSecurityDescriptorAction), options); - } - else if (FieldSecurityValue is not null) - { - writer.WritePropertyName("field_security"); - JsonSerializer.Serialize(writer, FieldSecurityValue, options); - } - - writer.WritePropertyName("names"); - SingleOrManySerializationHelper.Serialize(NamesValue, writer, options); - writer.WritePropertyName("privileges"); - JsonSerializer.Serialize(writer, PrivilegesValue, options); - if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ManageUserPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ManageUserPrivileges.g.cs deleted file mode 100644 index 950ec09e714..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ManageUserPrivileges.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ManageUserPrivileges -{ - [JsonInclude, JsonPropertyName("applications")] - public IReadOnlyCollection Applications { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentials.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentials.g.cs deleted file mode 100644 index 7fdb1e7d250..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentials.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class NodesCredentials -{ - /// - /// - /// File-backed tokens collected from all nodes - /// - /// - [JsonInclude, JsonPropertyName("file_tokens")] - public IReadOnlyDictionary FileTokens { get; init; } - - /// - /// - /// General status showing how nodes respond to the above collection request - /// - /// - [JsonInclude, JsonPropertyName("_nodes")] - public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics Nodes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentialsFileToken.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentialsFileToken.g.cs deleted file mode 100644 index 80ce4668e7d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/NodesCredentialsFileToken.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class NodesCredentialsFileToken -{ - [JsonInclude, JsonPropertyName("nodes")] - public IReadOnlyCollection Nodes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegeActions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegeActions.g.cs deleted file mode 100644 index ae01fafbb3a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegeActions.g.cs +++ /dev/null @@ -1,104 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PrivilegeActions -{ - [JsonInclude, JsonPropertyName("actions")] - public ICollection Actions { get; set; } - [JsonInclude, JsonPropertyName("application")] - public string? Application { get; set; } - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - [JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } -} - -public sealed partial class PrivilegeActionsDescriptor : SerializableDescriptor -{ - internal PrivilegeActionsDescriptor(Action configure) => configure.Invoke(this); - - public PrivilegeActionsDescriptor() : base() - { - } - - private ICollection ActionsValue { get; set; } - private string? ApplicationValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } - - public PrivilegeActionsDescriptor Actions(ICollection actions) - { - ActionsValue = actions; - return Self; - } - - public PrivilegeActionsDescriptor Application(string? application) - { - ApplicationValue = application; - return Self; - } - - public PrivilegeActionsDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PrivilegeActionsDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) - { - NameValue = name; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("actions"); - JsonSerializer.Serialize(writer, ActionsValue, options); - if (!string.IsNullOrEmpty(ApplicationValue)) - { - writer.WritePropertyName("application"); - writer.WriteStringValue(ApplicationValue); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (NameValue is not null) - { - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegesCheck.g.cs deleted file mode 100644 index c88d4b4a514..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/PrivilegesCheck.g.cs +++ /dev/null @@ -1,220 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class PrivilegesCheck -{ - [JsonInclude, JsonPropertyName("application")] - public ICollection? Application { get; set; } - - /// - /// - /// A list of the cluster privileges that you want to check. - /// - /// - [JsonInclude, JsonPropertyName("cluster")] - public ICollection? Cluster { get; set; } - [JsonInclude, JsonPropertyName("index")] - public ICollection? Index { get; set; } -} - -public sealed partial class PrivilegesCheckDescriptor : SerializableDescriptor -{ - internal PrivilegesCheckDescriptor(Action configure) => configure.Invoke(this); - - public PrivilegesCheckDescriptor() : base() - { - } - - private ICollection? ApplicationValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor ApplicationDescriptor { get; set; } - private Action ApplicationDescriptorAction { get; set; } - private Action[] ApplicationDescriptorActions { get; set; } - private ICollection? ClusterValue { get; set; } - private ICollection? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor IndexDescriptor { get; set; } - private Action IndexDescriptorAction { get; set; } - private Action[] IndexDescriptorActions { get; set; } - - public PrivilegesCheckDescriptor Application(ICollection? application) - { - ApplicationDescriptor = null; - ApplicationDescriptorAction = null; - ApplicationDescriptorActions = null; - ApplicationValue = application; - return Self; - } - - public PrivilegesCheckDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor descriptor) - { - ApplicationValue = null; - ApplicationDescriptorAction = null; - ApplicationDescriptorActions = null; - ApplicationDescriptor = descriptor; - return Self; - } - - public PrivilegesCheckDescriptor Application(Action configure) - { - ApplicationValue = null; - ApplicationDescriptor = null; - ApplicationDescriptorActions = null; - ApplicationDescriptorAction = configure; - return Self; - } - - public PrivilegesCheckDescriptor Application(params Action[] configure) - { - ApplicationValue = null; - ApplicationDescriptor = null; - ApplicationDescriptorAction = null; - ApplicationDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of the cluster privileges that you want to check. - /// - /// - public PrivilegesCheckDescriptor Cluster(ICollection? cluster) - { - ClusterValue = cluster; - return Self; - } - - public PrivilegesCheckDescriptor Index(ICollection? index) - { - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexDescriptorActions = null; - IndexValue = index; - return Self; - } - - public PrivilegesCheckDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor descriptor) - { - IndexValue = null; - IndexDescriptorAction = null; - IndexDescriptorActions = null; - IndexDescriptor = descriptor; - return Self; - } - - public PrivilegesCheckDescriptor Index(Action configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorActions = null; - IndexDescriptorAction = configure; - return Self; - } - - public PrivilegesCheckDescriptor Index(params Action[] configure) - { - IndexValue = null; - IndexDescriptor = null; - IndexDescriptorAction = null; - IndexDescriptorActions = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ApplicationDescriptor is not null) - { - writer.WritePropertyName("application"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ApplicationDescriptor, options); - writer.WriteEndArray(); - } - else if (ApplicationDescriptorAction is not null) - { - writer.WritePropertyName("application"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor(ApplicationDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ApplicationDescriptorActions is not null) - { - writer.WritePropertyName("application"); - writer.WriteStartArray(); - foreach (var action in ApplicationDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ApplicationValue is not null) - { - writer.WritePropertyName("application"); - JsonSerializer.Serialize(writer, ApplicationValue, options); - } - - if (ClusterValue is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, ClusterValue, options); - } - - if (IndexDescriptor is not null) - { - writer.WritePropertyName("index"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IndexDescriptor, options); - writer.WriteEndArray(); - } - else if (IndexDescriptorAction is not null) - { - writer.WritePropertyName("index"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor(IndexDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IndexDescriptorActions is not null) - { - writer.WritePropertyName("index"); - writer.WriteStartArray(); - foreach (var action in IndexDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryRole.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryRole.g.cs deleted file mode 100644 index 2c717cdc12d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryRole.g.cs +++ /dev/null @@ -1,182 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -internal sealed partial class QueryRoleConverter : JsonConverter -{ - public override QueryRole Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyCollection? applications = default; - IReadOnlyCollection? cluster = default; - string? description = default; - IReadOnlyCollection? indices = default; - IReadOnlyDictionary? metadata = default; - string name = default; - Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? restriction = default; - IReadOnlyCollection? runAs = default; - IReadOnlyCollection? sort = default; - IReadOnlyDictionary? transientMetadata = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "applications") - { - applications = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "cluster") - { - cluster = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "description") - { - description = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices" || property == "index") - { - indices = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "metadata") - { - metadata = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "name") - { - name = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "restriction") - { - restriction = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "run_as") - { - runAs = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "_sort") - { - sort = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "transient_metadata") - { - transientMetadata = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - } - } - - return new QueryRole { Applications = applications, Cluster = cluster, Description = description, Indices = indices, Metadata = metadata, Name = name, Restriction = restriction, RunAs = runAs, Sort = sort, TransientMetadata = transientMetadata }; - } - - public override void Write(Utf8JsonWriter writer, QueryRole value, JsonSerializerOptions options) - { - throw new NotImplementedException("'QueryRole' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(QueryRoleConverter))] -public sealed partial class QueryRole -{ - /// - /// - /// A list of application privilege entries - /// - /// - public IReadOnlyCollection? Applications { get; init; } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. - /// - /// - public IReadOnlyCollection? Cluster { get; init; } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public string? Description { get; init; } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public IReadOnlyCollection? Indices { get; init; } - - /// - /// - /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. - /// - /// - public IReadOnlyDictionary? Metadata { get; init; } - - /// - /// - /// Name of the role. - /// - /// - public string Name { get; init; } - - /// - /// - /// Restriction for when the role descriptor is allowed to be effective. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? Restriction { get; init; } - - /// - /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - public IReadOnlyCollection? RunAs { get; init; } - public IReadOnlyCollection? Sort { get; init; } - public IReadOnlyDictionary? TransientMetadata { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryUser.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryUser.g.cs deleted file mode 100644 index c26f6535993..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/QueryUser.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class QueryUser -{ - [JsonInclude, JsonPropertyName("email")] - public string? Email { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("full_name")] - public string? FullName { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary Metadata { get; init; } - [JsonInclude, JsonPropertyName("profile_uid")] - public string? ProfileUid { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("_sort")] - public IReadOnlyCollection? Sort { get; init; } - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RealmInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RealmInfo.g.cs deleted file mode 100644 index ada7a06e620..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RealmInfo.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class RealmInfo -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ReplicationAccess.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ReplicationAccess.g.cs deleted file mode 100644 index dfcd8cadd9d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ReplicationAccess.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ReplicationAccess -{ - /// - /// - /// This needs to be set to true if the patterns in the names field should cover system indices. - /// - /// - [JsonInclude, JsonPropertyName("allow_restricted_indices")] - public bool? AllowRestrictedIndices { get; init; } - - /// - /// - /// A list of indices (or index name patterns) to which the permissions in this entry apply. - /// - /// - [JsonInclude, JsonPropertyName("names")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Names { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs deleted file mode 100644 index 0058fc7d327..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class Restriction -{ - [JsonInclude, JsonPropertyName("workflows")] - public ICollection Workflows { get; set; } -} - -public sealed partial class RestrictionDescriptor : SerializableDescriptor -{ - internal RestrictionDescriptor(Action configure) => configure.Invoke(this); - - public RestrictionDescriptor() : base() - { - } - - private ICollection WorkflowsValue { get; set; } - - public RestrictionDescriptor Workflows(ICollection workflows) - { - WorkflowsValue = workflows; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("workflows"); - JsonSerializer.Serialize(writer, WorkflowsValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Role.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Role.g.cs deleted file mode 100644 index 96d69e55dd4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Role.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class Role -{ - [JsonInclude, JsonPropertyName("applications")] - public IReadOnlyCollection Applications { get; init; } - [JsonInclude, JsonPropertyName("cluster")] - public IReadOnlyCollection Cluster { get; init; } - [JsonInclude, JsonPropertyName("global")] - public IReadOnlyDictionary>>>? Global { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary Metadata { get; init; } - [JsonInclude, JsonPropertyName("role_templates")] - public IReadOnlyCollection? RoleTemplates { get; init; } - [JsonInclude, JsonPropertyName("run_as")] - public IReadOnlyCollection RunAs { get; init; } - [JsonInclude, JsonPropertyName("transient_metadata")] - public IReadOnlyDictionary? TransientMetadata { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptor.g.cs deleted file mode 100644 index d12ecb7310e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptor.g.cs +++ /dev/null @@ -1,804 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -internal sealed partial class RoleDescriptorConverter : JsonConverter -{ - public override RoleDescriptor Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new RoleDescriptor(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "applications") - { - variant.Applications = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "cluster") - { - variant.Cluster = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "description") - { - variant.Description = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices" || property == "index") - { - variant.Indices = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "metadata") - { - variant.Metadata = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "restriction") - { - variant.Restriction = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "run_as") - { - variant.RunAs = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "transient_metadata") - { - variant.TransientMetadata = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, RoleDescriptor value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Applications is not null) - { - writer.WritePropertyName("applications"); - JsonSerializer.Serialize(writer, value.Applications, options); - } - - if (value.Cluster is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, value.Cluster, options); - } - - if (!string.IsNullOrEmpty(value.Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(value.Description); - } - - if (value.Indices is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, value.Indices, options); - } - - if (value.Metadata is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, value.Metadata, options); - } - - if (value.Restriction is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, value.Restriction, options); - } - - if (value.RunAs is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, value.RunAs, options); - } - - if (value.TransientMetadata is not null) - { - writer.WritePropertyName("transient_metadata"); - JsonSerializer.Serialize(writer, value.TransientMetadata, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(RoleDescriptorConverter))] -public sealed partial class RoleDescriptor -{ - /// - /// - /// A list of application privilege entries - /// - /// - public ICollection? Applications { get; set; } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. - /// - /// - public ICollection? Cluster { get; set; } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public string? Description { get; set; } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public ICollection? Indices { get; set; } - - /// - /// - /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. - /// - /// - public IDictionary? Metadata { get; set; } - - /// - /// - /// Restriction for when the role descriptor is allowed to be effective. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? Restriction { get; set; } - - /// - /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - public ICollection? RunAs { get; set; } - public IDictionary? TransientMetadata { get; set; } -} - -public sealed partial class RoleDescriptorDescriptor : SerializableDescriptor> -{ - internal RoleDescriptorDescriptor(Action> configure) => configure.Invoke(this); - - public RoleDescriptorDescriptor() : base() - { - } - - private ICollection? ApplicationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor ApplicationsDescriptor { get; set; } - private Action ApplicationsDescriptorAction { get; set; } - private Action[] ApplicationsDescriptorActions { get; set; } - private ICollection? ClusterValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor IndicesDescriptor { get; set; } - private Action> IndicesDescriptorAction { get; set; } - private Action>[] IndicesDescriptorActions { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? RestrictionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RestrictionDescriptor RestrictionDescriptor { get; set; } - private Action RestrictionDescriptorAction { get; set; } - private ICollection? RunAsValue { get; set; } - private IDictionary? TransientMetadataValue { get; set; } - - /// - /// - /// A list of application privilege entries - /// - /// - public RoleDescriptorDescriptor Applications(ICollection? applications) - { - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsValue = applications; - return Self; - } - - public RoleDescriptorDescriptor Applications(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor descriptor) - { - ApplicationsValue = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptor = descriptor; - return Self; - } - - public RoleDescriptorDescriptor Applications(Action configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptorAction = configure; - return Self; - } - - public RoleDescriptorDescriptor Applications(params Action[] configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. - /// - /// - public RoleDescriptorDescriptor Cluster(ICollection? cluster) - { - ClusterValue = cluster; - return Self; - } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public RoleDescriptorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public RoleDescriptorDescriptor Indices(ICollection? indices) - { - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesValue = indices; - return Self; - } - - public RoleDescriptorDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor descriptor) - { - IndicesValue = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesDescriptor = descriptor; - return Self; - } - - public RoleDescriptorDescriptor Indices(Action> configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorActions = null; - IndicesDescriptorAction = configure; - return Self; - } - - public RoleDescriptorDescriptor Indices(params Action>[] configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. - /// - /// - public RoleDescriptorDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Restriction for when the role descriptor is allowed to be effective. - /// - /// - public RoleDescriptorDescriptor Restriction(Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? restriction) - { - RestrictionDescriptor = null; - RestrictionDescriptorAction = null; - RestrictionValue = restriction; - return Self; - } - - public RoleDescriptorDescriptor Restriction(Elastic.Clients.Elasticsearch.Serverless.Security.RestrictionDescriptor descriptor) - { - RestrictionValue = null; - RestrictionDescriptorAction = null; - RestrictionDescriptor = descriptor; - return Self; - } - - public RoleDescriptorDescriptor Restriction(Action configure) - { - RestrictionValue = null; - RestrictionDescriptor = null; - RestrictionDescriptorAction = configure; - return Self; - } - - /// - /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - public RoleDescriptorDescriptor RunAs(ICollection? runAs) - { - RunAsValue = runAs; - return Self; - } - - public RoleDescriptorDescriptor TransientMetadata(Func, FluentDictionary> selector) - { - TransientMetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ApplicationsDescriptor is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ApplicationsDescriptor, options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorAction is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(ApplicationsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorActions is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - foreach (var action in ApplicationsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ApplicationsValue is not null) - { - writer.WritePropertyName("applications"); - JsonSerializer.Serialize(writer, ApplicationsValue, options); - } - - if (ClusterValue is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, ClusterValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (IndicesDescriptor is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IndicesDescriptor, options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorAction is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(IndicesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorActions is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - foreach (var action in IndicesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RestrictionDescriptor is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, RestrictionDescriptor, options); - } - else if (RestrictionDescriptorAction is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RestrictionDescriptor(RestrictionDescriptorAction), options); - } - else if (RestrictionValue is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, RestrictionValue, options); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - if (TransientMetadataValue is not null) - { - writer.WritePropertyName("transient_metadata"); - JsonSerializer.Serialize(writer, TransientMetadataValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RoleDescriptorDescriptor : SerializableDescriptor -{ - internal RoleDescriptorDescriptor(Action configure) => configure.Invoke(this); - - public RoleDescriptorDescriptor() : base() - { - } - - private ICollection? ApplicationsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor ApplicationsDescriptor { get; set; } - private Action ApplicationsDescriptorAction { get; set; } - private Action[] ApplicationsDescriptorActions { get; set; } - private ICollection? ClusterValue { get; set; } - private string? DescriptionValue { get; set; } - private ICollection? IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor IndicesDescriptor { get; set; } - private Action IndicesDescriptorAction { get; set; } - private Action[] IndicesDescriptorActions { get; set; } - private IDictionary? MetadataValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? RestrictionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Security.RestrictionDescriptor RestrictionDescriptor { get; set; } - private Action RestrictionDescriptorAction { get; set; } - private ICollection? RunAsValue { get; set; } - private IDictionary? TransientMetadataValue { get; set; } - - /// - /// - /// A list of application privilege entries - /// - /// - public RoleDescriptorDescriptor Applications(ICollection? applications) - { - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsValue = applications; - return Self; - } - - public RoleDescriptorDescriptor Applications(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor descriptor) - { - ApplicationsValue = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptor = descriptor; - return Self; - } - - public RoleDescriptorDescriptor Applications(Action configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorActions = null; - ApplicationsDescriptorAction = configure; - return Self; - } - - public RoleDescriptorDescriptor Applications(params Action[] configure) - { - ApplicationsValue = null; - ApplicationsDescriptor = null; - ApplicationsDescriptorAction = null; - ApplicationsDescriptorActions = configure; - return Self; - } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. - /// - /// - public RoleDescriptorDescriptor Cluster(ICollection? cluster) - { - ClusterValue = cluster; - return Self; - } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public RoleDescriptorDescriptor Description(string? description) - { - DescriptionValue = description; - return Self; - } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public RoleDescriptorDescriptor Indices(ICollection? indices) - { - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesValue = indices; - return Self; - } - - public RoleDescriptorDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor descriptor) - { - IndicesValue = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = null; - IndicesDescriptor = descriptor; - return Self; - } - - public RoleDescriptorDescriptor Indices(Action configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorActions = null; - IndicesDescriptorAction = configure; - return Self; - } - - public RoleDescriptorDescriptor Indices(params Action[] configure) - { - IndicesValue = null; - IndicesDescriptor = null; - IndicesDescriptorAction = null; - IndicesDescriptorActions = configure; - return Self; - } - - /// - /// - /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. - /// - /// - public RoleDescriptorDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// Restriction for when the role descriptor is allowed to be effective. - /// - /// - public RoleDescriptorDescriptor Restriction(Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? restriction) - { - RestrictionDescriptor = null; - RestrictionDescriptorAction = null; - RestrictionValue = restriction; - return Self; - } - - public RoleDescriptorDescriptor Restriction(Elastic.Clients.Elasticsearch.Serverless.Security.RestrictionDescriptor descriptor) - { - RestrictionValue = null; - RestrictionDescriptorAction = null; - RestrictionDescriptor = descriptor; - return Self; - } - - public RoleDescriptorDescriptor Restriction(Action configure) - { - RestrictionValue = null; - RestrictionDescriptor = null; - RestrictionDescriptorAction = configure; - return Self; - } - - /// - /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. - /// - /// - public RoleDescriptorDescriptor RunAs(ICollection? runAs) - { - RunAsValue = runAs; - return Self; - } - - public RoleDescriptorDescriptor TransientMetadata(Func, FluentDictionary> selector) - { - TransientMetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ApplicationsDescriptor is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, ApplicationsDescriptor, options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorAction is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(ApplicationsDescriptorAction), options); - writer.WriteEndArray(); - } - else if (ApplicationsDescriptorActions is not null) - { - writer.WritePropertyName("applications"); - writer.WriteStartArray(); - foreach (var action in ApplicationsDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (ApplicationsValue is not null) - { - writer.WritePropertyName("applications"); - JsonSerializer.Serialize(writer, ApplicationsValue, options); - } - - if (ClusterValue is not null) - { - writer.WritePropertyName("cluster"); - JsonSerializer.Serialize(writer, ClusterValue, options); - } - - if (!string.IsNullOrEmpty(DescriptionValue)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(DescriptionValue); - } - - if (IndicesDescriptor is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, IndicesDescriptor, options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorAction is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(IndicesDescriptorAction), options); - writer.WriteEndArray(); - } - else if (IndicesDescriptorActions is not null) - { - writer.WritePropertyName("indices"); - writer.WriteStartArray(); - foreach (var action in IndicesDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndicesPrivilegesDescriptor(action), options); - } - - writer.WriteEndArray(); - } - else if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (RestrictionDescriptor is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, RestrictionDescriptor, options); - } - else if (RestrictionDescriptorAction is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.RestrictionDescriptor(RestrictionDescriptorAction), options); - } - else if (RestrictionValue is not null) - { - writer.WritePropertyName("restriction"); - JsonSerializer.Serialize(writer, RestrictionValue, options); - } - - if (RunAsValue is not null) - { - writer.WritePropertyName("run_as"); - JsonSerializer.Serialize(writer, RunAsValue, options); - } - - if (TransientMetadataValue is not null) - { - writer.WritePropertyName("transient_metadata"); - JsonSerializer.Serialize(writer, TransientMetadataValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorRead.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorRead.g.cs deleted file mode 100644 index 34ef826b7ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorRead.g.cs +++ /dev/null @@ -1,160 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -internal sealed partial class RoleDescriptorReadConverter : JsonConverter -{ - public override RoleDescriptorRead Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - IReadOnlyCollection? applications = default; - IReadOnlyCollection cluster = default; - string? description = default; - IReadOnlyCollection indices = default; - IReadOnlyDictionary? metadata = default; - Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? restriction = default; - IReadOnlyCollection? runAs = default; - IReadOnlyDictionary? transientMetadata = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "applications") - { - applications = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "cluster") - { - cluster = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "description") - { - description = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "indices" || property == "index") - { - indices = JsonSerializer.Deserialize>(ref reader, options); - continue; - } - - if (property == "metadata") - { - metadata = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "restriction") - { - restriction = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "run_as") - { - runAs = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "transient_metadata") - { - transientMetadata = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - } - } - - return new RoleDescriptorRead { Applications = applications, Cluster = cluster, Description = description, Indices = indices, Metadata = metadata, Restriction = restriction, RunAs = runAs, TransientMetadata = transientMetadata }; - } - - public override void Write(Utf8JsonWriter writer, RoleDescriptorRead value, JsonSerializerOptions options) - { - throw new NotImplementedException("'RoleDescriptorRead' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(RoleDescriptorReadConverter))] -public sealed partial class RoleDescriptorRead -{ - /// - /// - /// A list of application privilege entries - /// - /// - public IReadOnlyCollection? Applications { get; init; } - - /// - /// - /// A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. - /// - /// - public IReadOnlyCollection Cluster { get; init; } - - /// - /// - /// Optional description of the role descriptor - /// - /// - public string? Description { get; init; } - - /// - /// - /// A list of indices permissions entries. - /// - /// - public IReadOnlyCollection Indices { get; init; } - - /// - /// - /// Optional meta-data. Within the metadata object, keys that begin with _ are reserved for system usage. - /// - /// - public IReadOnlyDictionary? Metadata { get; init; } - - /// - /// - /// Restriction for when the role descriptor is allowed to be effective. - /// - /// - public Elastic.Clients.Elasticsearch.Serverless.Security.Restriction? Restriction { get; init; } - - /// - /// - /// A list of users that the API keys can impersonate. - /// - /// - public IReadOnlyCollection? RunAs { get; init; } - public IReadOnlyDictionary? TransientMetadata { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorWrapper.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorWrapper.g.cs deleted file mode 100644 index 55e020abad6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleDescriptorWrapper.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class RoleDescriptorWrapper -{ - [JsonInclude, JsonPropertyName("role_descriptor")] - public Elastic.Clients.Elasticsearch.Serverless.Security.RoleDescriptorRead RoleDescriptor { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMapping.g.cs deleted file mode 100644 index 791127292da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMapping.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class RoleMapping -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary Metadata { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - [JsonInclude, JsonPropertyName("role_templates")] - public IReadOnlyCollection? RoleTemplates { get; init; } - [JsonInclude, JsonPropertyName("rules")] - public Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule Rules { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMappingRule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMappingRule.g.cs deleted file mode 100644 index 3c5dc737caf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleMappingRule.g.cs +++ /dev/null @@ -1,272 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(RoleMappingRuleConverter))] -public sealed partial class RoleMappingRule -{ - internal RoleMappingRule(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 RoleMappingRule All(IReadOnlyCollection roleMappingRule) => new RoleMappingRule("all", roleMappingRule); - public static RoleMappingRule Any(IReadOnlyCollection roleMappingRule) => new RoleMappingRule("any", roleMappingRule); - public static RoleMappingRule Except(Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule roleMappingRule) => new RoleMappingRule("except", roleMappingRule); - public static RoleMappingRule Field(Elastic.Clients.Elasticsearch.Serverless.Security.FieldRule fieldRule) => new RoleMappingRule("field", fieldRule); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class RoleMappingRuleConverter : JsonConverter -{ - public override RoleMappingRule 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; - 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 == "all") - { - variantValue = JsonSerializer.Deserialize?>(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "any") - { - variantValue = JsonSerializer.Deserialize?>(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "except") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "field") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'RoleMappingRule' from the response."); - } - - var result = new RoleMappingRule(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, RoleMappingRule value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "all": - JsonSerializer.Serialize>(writer, (IReadOnlyCollection)value.Variant, options); - break; - case "any": - JsonSerializer.Serialize>(writer, (IReadOnlyCollection)value.Variant, options); - break; - case "except": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule)value.Variant, options); - break; - case "field": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Security.FieldRule)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RoleMappingRuleDescriptor : SerializableDescriptor> -{ - internal RoleMappingRuleDescriptor(Action> configure) => configure.Invoke(this); - - public RoleMappingRuleDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RoleMappingRuleDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RoleMappingRuleDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RoleMappingRuleDescriptor All(IReadOnlyCollection roleMappingRule) => Set(roleMappingRule, "all"); - public RoleMappingRuleDescriptor All(Action configure) => Set(configure, "all"); - public RoleMappingRuleDescriptor Any(IReadOnlyCollection roleMappingRule) => Set(roleMappingRule, "any"); - public RoleMappingRuleDescriptor Any(Action configure) => Set(configure, "any"); - public RoleMappingRuleDescriptor Except(Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule roleMappingRule) => Set(roleMappingRule, "except"); - public RoleMappingRuleDescriptor Except(Action configure) => Set(configure, "except"); - public RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Security.FieldRule fieldRule) => Set(fieldRule, "field"); - public RoleMappingRuleDescriptor Field(Action configure) => Set(configure, "field"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RoleMappingRuleDescriptor : SerializableDescriptor -{ - internal RoleMappingRuleDescriptor(Action configure) => configure.Invoke(this); - - public RoleMappingRuleDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RoleMappingRuleDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RoleMappingRuleDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RoleMappingRuleDescriptor All(IReadOnlyCollection roleMappingRule) => Set(roleMappingRule, "all"); - public RoleMappingRuleDescriptor All(Action configure) => Set(configure, "all"); - public RoleMappingRuleDescriptor Any(IReadOnlyCollection roleMappingRule) => Set(roleMappingRule, "any"); - public RoleMappingRuleDescriptor Any(Action configure) => Set(configure, "any"); - public RoleMappingRuleDescriptor Except(Elastic.Clients.Elasticsearch.Serverless.Security.RoleMappingRule roleMappingRule) => Set(roleMappingRule, "except"); - public RoleMappingRuleDescriptor Except(Action configure) => Set(configure, "except"); - public RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Security.FieldRule fieldRule) => Set(fieldRule, "field"); - public RoleMappingRuleDescriptor Field(Action configure) => Set(configure, "field"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleQuery.g.cs deleted file mode 100644 index 5dee2275fcf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleQuery.g.cs +++ /dev/null @@ -1,384 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(RoleQueryConverter))] -public sealed partial class RoleQuery -{ - internal RoleQuery(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 RoleQuery Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => new RoleQuery("bool", boolQuery); - public static RoleQuery Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => new RoleQuery("exists", existsQuery); - public static RoleQuery Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => new RoleQuery("ids", idsQuery); - public static RoleQuery Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => new RoleQuery("match", matchQuery); - public static RoleQuery MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => new RoleQuery("match_all", matchAllQuery); - public static RoleQuery Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => new RoleQuery("prefix", prefixQuery); - public static RoleQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => new RoleQuery("range", rangeQuery); - public static RoleQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => new RoleQuery("range", rangeQuery); - public static RoleQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => new RoleQuery("range", rangeQuery); - public static RoleQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => new RoleQuery("range", rangeQuery); - public static RoleQuery SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => new RoleQuery("simple_query_string", simpleQueryStringQuery); - public static RoleQuery Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => new RoleQuery("term", termQuery); - public static RoleQuery Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => new RoleQuery("terms", termsQuery); - public static RoleQuery Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => new RoleQuery("wildcard", wildcardQuery); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class RoleQueryConverter : JsonConverter -{ - public override RoleQuery 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; - 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 == "bool") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "exists") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ids") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_all") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "simple_query_string") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wildcard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'RoleQuery' from the response."); - } - - var result = new RoleQuery(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, RoleQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "bool": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery)value.Variant, options); - break; - case "exists": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery)value.Variant, options); - break; - case "ids": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery)value.Variant, options); - break; - case "match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery)value.Variant, options); - break; - case "match_all": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery)value.Variant, options); - break; - case "prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery)value.Variant, options); - break; - case "range": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "simple_query_string": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery)value.Variant, options); - break; - case "term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery)value.Variant, options); - break; - case "wildcard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RoleQueryDescriptor : SerializableDescriptor> -{ - internal RoleQueryDescriptor(Action> configure) => configure.Invoke(this); - - public RoleQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RoleQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RoleQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RoleQueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public RoleQueryDescriptor Bool(Action> configure) => Set(configure, "bool"); - public RoleQueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public RoleQueryDescriptor Exists(Action> configure) => Set(configure, "exists"); - public RoleQueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public RoleQueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public RoleQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public RoleQueryDescriptor Match(Action> configure) => Set(configure, "match"); - public RoleQueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public RoleQueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public RoleQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public RoleQueryDescriptor Prefix(Action> configure) => Set(configure, "prefix"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public RoleQueryDescriptor SimpleQueryString(Action> configure) => Set(configure, "simple_query_string"); - public RoleQueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public RoleQueryDescriptor Term(Action> configure) => Set(configure, "term"); - public RoleQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public RoleQueryDescriptor Terms(Action> configure) => Set(configure, "terms"); - public RoleQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public RoleQueryDescriptor Wildcard(Action> configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RoleQueryDescriptor : SerializableDescriptor -{ - internal RoleQueryDescriptor(Action configure) => configure.Invoke(this); - - public RoleQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RoleQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RoleQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RoleQueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public RoleQueryDescriptor Bool(Action configure) => Set(configure, "bool"); - public RoleQueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public RoleQueryDescriptor Exists(Action configure) => Set(configure, "exists"); - public RoleQueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public RoleQueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public RoleQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public RoleQueryDescriptor Match(Action configure) => Set(configure, "match"); - public RoleQueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public RoleQueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public RoleQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public RoleQueryDescriptor Prefix(Action configure) => Set(configure, "prefix"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public RoleQueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public RoleQueryDescriptor SimpleQueryString(Action configure) => Set(configure, "simple_query_string"); - public RoleQueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public RoleQueryDescriptor Term(Action configure) => Set(configure, "term"); - public RoleQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public RoleQueryDescriptor Terms(Action configure) => Set(configure, "terms"); - public RoleQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public RoleQueryDescriptor Wildcard(Action configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleTemplate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleTemplate.g.cs deleted file mode 100644 index 6ce4bacb6ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/RoleTemplate.g.cs +++ /dev/null @@ -1,108 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class RoleTemplate -{ - [JsonInclude, JsonPropertyName("format")] - public Elastic.Clients.Elasticsearch.Serverless.Security.TemplateFormat? Format { get; set; } - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.Script Template { get; set; } -} - -public sealed partial class RoleTemplateDescriptor : SerializableDescriptor -{ - internal RoleTemplateDescriptor(Action configure) => configure.Invoke(this); - - public RoleTemplateDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Security.TemplateFormat? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Script TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - - public RoleTemplateDescriptor Format(Elastic.Clients.Elasticsearch.Serverless.Security.TemplateFormat? format) - { - FormatValue = format; - return Self; - } - - public RoleTemplateDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.Script template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public RoleTemplateDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public RoleTemplateDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FormatValue is not null) - { - writer.WritePropertyName("format"); - JsonSerializer.Serialize(writer, FormatValue, options); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.ScriptDescriptor(TemplateDescriptorAction), options); - } - else - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/SearchAccess.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/SearchAccess.g.cs deleted file mode 100644 index ad56f8bdb5d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/SearchAccess.g.cs +++ /dev/null @@ -1,56 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class SearchAccess -{ - /// - /// - /// The document fields that the owners of the role have read access to. - /// - /// - [JsonInclude, JsonPropertyName("field_security")] - public Elastic.Clients.Elasticsearch.Serverless.Security.FieldSecurity? FieldSecurity { get; init; } - - /// - /// - /// A list of indices (or index name patterns) to which the permissions in this entry apply. - /// - /// - [JsonInclude, JsonPropertyName("names")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Names { get; init; } - - /// - /// - /// A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public object? Query { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ServiceToken.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ServiceToken.g.cs deleted file mode 100644 index d3fb27827d5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/ServiceToken.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class ServiceToken -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("value")] - public string Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/TotalUserProfiles.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/TotalUserProfiles.g.cs deleted file mode 100644 index 44b35e525e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/TotalUserProfiles.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class TotalUserProfiles -{ - [JsonInclude, JsonPropertyName("relation")] - public string Relation { get; init; } - [JsonInclude, JsonPropertyName("value")] - public long Value { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserIndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserIndicesPrivileges.g.cs deleted file mode 100644 index 3693ef101e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserIndicesPrivileges.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UserIndicesPrivileges -{ - /// - /// - /// Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices. - /// - /// - [JsonInclude, JsonPropertyName("allow_restricted_indices")] - public bool AllowRestrictedIndices { get; init; } - - /// - /// - /// The document fields that the owners of the role have read access to. - /// - /// - [JsonInclude, JsonPropertyName("field_security")] - public IReadOnlyCollection? FieldSecurity { get; init; } - - /// - /// - /// A list of indices (or index name patterns) to which the permissions in this entry apply. - /// - /// - [JsonInclude, JsonPropertyName("names")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Names { get; init; } - - /// - /// - /// The index level privileges that owners of the role have on the specified indices. - /// - /// - [JsonInclude, JsonPropertyName("privileges")] - public IReadOnlyCollection Privileges { get; init; } - - /// - /// - /// Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public object? Query { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfile.g.cs deleted file mode 100644 index 96482c37b66..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfile.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UserProfile -{ - [JsonInclude, JsonPropertyName("data")] - public IReadOnlyDictionary Data { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; init; } - [JsonInclude, JsonPropertyName("labels")] - public IReadOnlyDictionary Labels { get; init; } - [JsonInclude, JsonPropertyName("uid")] - public string Uid { get; init; } - [JsonInclude, JsonPropertyName("user")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileUser User { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileHitMetadata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileHitMetadata.g.cs deleted file mode 100644 index 739521380a7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileHitMetadata.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UserProfileHitMetadata -{ - [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } - [JsonInclude, JsonPropertyName("_seq_no")] - public long SeqNo { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileUser.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileUser.g.cs deleted file mode 100644 index 59424cab9a3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileUser.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UserProfileUser -{ - [JsonInclude, JsonPropertyName("email")] - public string? Email { get; init; } - [JsonInclude, JsonPropertyName("full_name")] - public string? FullName { get; init; } - [JsonInclude, JsonPropertyName("realm_domain")] - public string? RealmDomain { get; init; } - [JsonInclude, JsonPropertyName("realm_name")] - public string RealmName { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection Roles { get; init; } - [JsonInclude, JsonPropertyName("username")] - public string Username { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileWithMetadata.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileWithMetadata.g.cs deleted file mode 100644 index 782c2ff537a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserProfileWithMetadata.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UserProfileWithMetadata -{ - [JsonInclude, JsonPropertyName("data")] - public IReadOnlyDictionary Data { get; init; } - [JsonInclude, JsonPropertyName("_doc")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileHitMetadata Doc { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; init; } - [JsonInclude, JsonPropertyName("labels")] - public IReadOnlyDictionary Labels { get; init; } - [JsonInclude, JsonPropertyName("last_synchronized")] - public long LastSynchronized { get; init; } - [JsonInclude, JsonPropertyName("uid")] - public string Uid { get; init; } - [JsonInclude, JsonPropertyName("user")] - public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileUser User { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserQuery.g.cs deleted file mode 100644 index d030a6ecd17..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserQuery.g.cs +++ /dev/null @@ -1,384 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -[JsonConverter(typeof(UserQueryConverter))] -public sealed partial class UserQuery -{ - internal UserQuery(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 UserQuery Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => new UserQuery("bool", boolQuery); - public static UserQuery Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => new UserQuery("exists", existsQuery); - public static UserQuery Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => new UserQuery("ids", idsQuery); - public static UserQuery Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => new UserQuery("match", matchQuery); - public static UserQuery MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => new UserQuery("match_all", matchAllQuery); - public static UserQuery Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => new UserQuery("prefix", prefixQuery); - public static UserQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => new UserQuery("range", rangeQuery); - public static UserQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => new UserQuery("range", rangeQuery); - public static UserQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => new UserQuery("range", rangeQuery); - public static UserQuery Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => new UserQuery("range", rangeQuery); - public static UserQuery SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => new UserQuery("simple_query_string", simpleQueryStringQuery); - public static UserQuery Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => new UserQuery("term", termQuery); - public static UserQuery Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => new UserQuery("terms", termsQuery); - public static UserQuery Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => new UserQuery("wildcard", wildcardQuery); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class UserQueryConverter : JsonConverter -{ - public override UserQuery 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; - 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 == "bool") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "exists") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ids") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "match_all") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "prefix") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "range") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "simple_query_string") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "term") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "wildcard") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'UserQuery' from the response."); - } - - var result = new UserQuery(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, UserQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "bool": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery)value.Variant, options); - break; - case "exists": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery)value.Variant, options); - break; - case "ids": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery)value.Variant, options); - break; - case "match": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery)value.Variant, options); - break; - case "match_all": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery)value.Variant, options); - break; - case "prefix": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery)value.Variant, options); - break; - case "range": - JsonSerializer.Serialize(writer, value.Variant, value.Variant.GetType(), options); - break; - case "simple_query_string": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery)value.Variant, options); - break; - case "term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery)value.Variant, options); - break; - case "wildcard": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UserQueryDescriptor : SerializableDescriptor> -{ - internal UserQueryDescriptor(Action> configure) => configure.Invoke(this); - - public UserQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private UserQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private UserQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public UserQueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public UserQueryDescriptor Bool(Action> configure) => Set(configure, "bool"); - public UserQueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public UserQueryDescriptor Exists(Action> configure) => Set(configure, "exists"); - public UserQueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public UserQueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public UserQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public UserQueryDescriptor Match(Action> configure) => Set(configure, "match"); - public UserQueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public UserQueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public UserQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public UserQueryDescriptor Prefix(Action> configure) => Set(configure, "prefix"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public UserQueryDescriptor SimpleQueryString(Action> configure) => Set(configure, "simple_query_string"); - public UserQueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public UserQueryDescriptor Term(Action> configure) => Set(configure, "term"); - public UserQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public UserQueryDescriptor Terms(Action> configure) => Set(configure, "terms"); - public UserQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public UserQueryDescriptor Wildcard(Action> configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class UserQueryDescriptor : SerializableDescriptor -{ - internal UserQueryDescriptor(Action configure) => configure.Invoke(this); - - public UserQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private UserQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private UserQueryDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public UserQueryDescriptor Bool(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.BoolQuery boolQuery) => Set(boolQuery, "bool"); - public UserQueryDescriptor Bool(Action configure) => Set(configure, "bool"); - public UserQueryDescriptor Exists(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.ExistsQuery existsQuery) => Set(existsQuery, "exists"); - public UserQueryDescriptor Exists(Action configure) => Set(configure, "exists"); - public UserQueryDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.IdsQuery idsQuery) => Set(idsQuery, "ids"); - public UserQueryDescriptor Ids(Action configure) => Set(configure, "ids"); - public UserQueryDescriptor Match(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchQuery matchQuery) => Set(matchQuery, "match"); - public UserQueryDescriptor Match(Action configure) => Set(configure, "match"); - public UserQueryDescriptor MatchAll(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.MatchAllQuery matchAllQuery) => Set(matchAllQuery, "match_all"); - public UserQueryDescriptor MatchAll(Action configure) => Set(configure, "match_all"); - public UserQueryDescriptor Prefix(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.PrefixQuery prefixQuery) => Set(prefixQuery, "prefix"); - public UserQueryDescriptor Prefix(Action configure) => Set(configure, "prefix"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.UntypedRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.DateRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.NumberRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor Range(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermRangeQuery rangeQuery) => Set(rangeQuery, "range"); - public UserQueryDescriptor SimpleQueryString(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.SimpleQueryStringQuery simpleQueryStringQuery) => Set(simpleQueryStringQuery, "simple_query_string"); - public UserQueryDescriptor SimpleQueryString(Action configure) => Set(configure, "simple_query_string"); - public UserQueryDescriptor Term(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermQuery termQuery) => Set(termQuery, "term"); - public UserQueryDescriptor Term(Action configure) => Set(configure, "term"); - public UserQueryDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.TermsQuery termsQuery) => Set(termsQuery, "terms"); - public UserQueryDescriptor Terms(Action configure) => Set(configure, "terms"); - public UserQueryDescriptor Wildcard(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.WildcardQuery wildcardQuery) => Set(wildcardQuery, "wildcard"); - public UserQueryDescriptor Wildcard(Action configure) => Set(configure, "wildcard"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserRealm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserRealm.g.cs deleted file mode 100644 index 6a51e1b4f4e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/UserRealm.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Security; - -public sealed partial class UserRealm -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SegmentsStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SegmentsStats.g.cs deleted file mode 100644 index 0d80a084f21..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SegmentsStats.g.cs +++ /dev/null @@ -1,213 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SegmentsStats -{ - /// - /// - /// Total number of segments across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Total amount of memory used for doc values across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("doc_values_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? DocValuesMemory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("doc_values_memory_in_bytes")] - public long DocValuesMemoryInBytes { get; init; } - - /// - /// - /// This object is not populated by the cluster stats API. - /// To get information on segment files, use the node stats API. - /// - /// - [JsonInclude, JsonPropertyName("file_sizes")] - public IReadOnlyDictionary FileSizes { get; init; } - - /// - /// - /// Total amount of memory used by fixed bit sets across all shards assigned to selected nodes. - /// Fixed bit sets are used for nested object field types and type filters for join fields. - /// - /// - [JsonInclude, JsonPropertyName("fixed_bit_set")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? FixedBitSet { get; init; } - - /// - /// - /// Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("fixed_bit_set_memory_in_bytes")] - public long FixedBitSetMemoryInBytes { get; init; } - [JsonInclude, JsonPropertyName("index_writer_max_memory_in_bytes")] - public long? IndexWriterMaxMemoryInBytes { get; init; } - - /// - /// - /// Total amount of memory used by all index writers across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("index_writer_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? IndexWriterMemory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("index_writer_memory_in_bytes")] - public long IndexWriterMemoryInBytes { get; init; } - - /// - /// - /// Unix timestamp, in milliseconds, of the most recently retried indexing request. - /// - /// - [JsonInclude, JsonPropertyName("max_unsafe_auto_id_timestamp")] - public long MaxUnsafeAutoIdTimestamp { get; init; } - - /// - /// - /// Total amount of memory used for segments across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Memory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("memory_in_bytes")] - public long MemoryInBytes { get; init; } - - /// - /// - /// Total amount of memory used for normalization factors across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("norms_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? NormsMemory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("norms_memory_in_bytes")] - public long NormsMemoryInBytes { get; init; } - - /// - /// - /// Total amount of memory used for points across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("points_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? PointsMemory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for points across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("points_memory_in_bytes")] - public long PointsMemoryInBytes { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("stored_fields_memory_in_bytes")] - public long StoredFieldsMemoryInBytes { get; init; } - [JsonInclude, JsonPropertyName("stored_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? StoredMemory { get; init; } - - /// - /// - /// Total amount of memory used for terms across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("terms_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TermsMemory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("terms_memory_in_bytes")] - public long TermsMemoryInBytes { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("term_vectors_memory_in_bytes")] - public long TermVectorsMemoryInBytes { get; init; } - - /// - /// - /// Total amount of memory used for term vectors across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("term_vectory_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TermVectoryMemory { get; init; } - - /// - /// - /// Total amount of memory used by all version maps across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("version_map_memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? VersionMapMemory { get; init; } - - /// - /// - /// Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("version_map_memory_in_bytes")] - public long VersionMapMemoryInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardFailure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardFailure.g.cs deleted file mode 100644 index c97cc06dc85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardFailure.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ShardFailure -{ - [JsonInclude, JsonPropertyName("index")] - public string? Index { get; init; } - [JsonInclude, JsonPropertyName("node")] - public string? Node { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause Reason { get; init; } - [JsonInclude, JsonPropertyName("shard")] - public int Shard { get; init; } - [JsonInclude, JsonPropertyName("status")] - public string? Status { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardStatistics.g.cs deleted file mode 100644 index 0957c62fef5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/ShardStatistics.g.cs +++ /dev/null @@ -1,54 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class ShardStatistics -{ - [JsonInclude, JsonPropertyName("failed")] - public int Failed { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - [JsonInclude, JsonPropertyName("skipped")] - public int? Skipped { get; init; } - - /// - /// - /// Indicates how many shards have successfully run the search. - /// - /// - [JsonInclude, JsonPropertyName("successful")] - public int Successful { get; init; } - - /// - /// - /// Indicates how many shards the search will run on overall. - /// - /// - [JsonInclude, JsonPropertyName("total")] - public int Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SlicedScroll.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SlicedScroll.g.cs deleted file mode 100644 index 18c2dad5b5e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SlicedScroll.g.cs +++ /dev/null @@ -1,156 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class SlicedScroll -{ - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id Id { get; set; } - [JsonInclude, JsonPropertyName("max")] - public int Max { get; set; } -} - -public sealed partial class SlicedScrollDescriptor : SerializableDescriptor> -{ - internal SlicedScrollDescriptor(Action> configure) => configure.Invoke(this); - - public SlicedScrollDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private int MaxValue { get; set; } - - public SlicedScrollDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - public SlicedScrollDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SlicedScrollDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SlicedScrollDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - public SlicedScrollDescriptor Max(int max) - { - MaxValue = max; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - writer.WritePropertyName("max"); - writer.WriteNumberValue(MaxValue); - writer.WriteEndObject(); - } -} - -public sealed partial class SlicedScrollDescriptor : SerializableDescriptor -{ - internal SlicedScrollDescriptor(Action configure) => configure.Invoke(this); - - public SlicedScrollDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Id IdValue { get; set; } - private int MaxValue { get; set; } - - public SlicedScrollDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field? field) - { - FieldValue = field; - return Self; - } - - public SlicedScrollDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SlicedScrollDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public SlicedScrollDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id id) - { - IdValue = id; - return Self; - } - - public SlicedScrollDescriptor Max(int max) - { - MaxValue = max; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FieldValue is not null) - { - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - } - - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - writer.WritePropertyName("max"); - writer.WriteNumberValue(MaxValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Slices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Slices.g.cs deleted file mode 100644 index 8742faa50ce..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Slices.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -/// -/// -/// Slices configuration used to parallelize a process. -/// -/// -public sealed partial class Slices : Union -{ - public Slices(int Value) : base(Value) - { - } - - public Slices(Elastic.Clients.Elasticsearch.Serverless.SlicesCalculation Computed) : base(Computed) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepository.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepository.g.cs deleted file mode 100644 index 4fa4a5d53c3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepository.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class AzureRepository : IRepository -{ - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettings Settings { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "azure"; - - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; set; } -} - -public sealed partial class AzureRepositoryDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal AzureRepositoryDescriptor(Action configure) => configure.Invoke(this); - - public AzureRepositoryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private string? UuidValue { get; set; } - - public AzureRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public AzureRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public AzureRepositoryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public AzureRepositoryDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettingsDescriptor(SettingsDescriptorAction), options); - } - else - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("azure"); - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettings BuildSettings() - { - if (SettingsValue is not null) - { - return SettingsValue; - } - - if ((object)SettingsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (SettingsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepositorySettingsDescriptor(SettingsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - AzureRepository IBuildableDescriptor.Build() => new() - { - Settings = BuildSettings(), - Uuid = UuidValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs deleted file mode 100644 index 1810933fb85..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs +++ /dev/null @@ -1,183 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class AzureRepositorySettings -{ - [JsonInclude, JsonPropertyName("base_path")] - public string? BasePath { get; set; } - [JsonInclude, JsonPropertyName("chunk_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSize { get; set; } - [JsonInclude, JsonPropertyName("client")] - public string? Client { get; set; } - [JsonInclude, JsonPropertyName("compress")] - public bool? Compress { get; set; } - [JsonInclude, JsonPropertyName("container")] - public string? Container { get; set; } - [JsonInclude, JsonPropertyName("location_mode")] - public string? LocationMode { get; set; } - [JsonInclude, JsonPropertyName("max_restore_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("max_snapshot_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("readonly")] - public bool? Readonly { get; set; } -} - -public sealed partial class AzureRepositorySettingsDescriptor : SerializableDescriptor -{ - internal AzureRepositorySettingsDescriptor(Action configure) => configure.Invoke(this); - - public AzureRepositorySettingsDescriptor() : base() - { - } - - private string? BasePathValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSizeValue { get; set; } - private string? ClientValue { get; set; } - private bool? CompressValue { get; set; } - private string? ContainerValue { get; set; } - private string? LocationModeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSecValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSecValue { get; set; } - private bool? ReadonlyValue { get; set; } - - public AzureRepositorySettingsDescriptor BasePath(string? basePath) - { - BasePathValue = basePath; - return Self; - } - - public AzureRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? chunkSize) - { - ChunkSizeValue = chunkSize; - return Self; - } - - public AzureRepositorySettingsDescriptor Client(string? client) - { - ClientValue = client; - return Self; - } - - public AzureRepositorySettingsDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public AzureRepositorySettingsDescriptor Container(string? container) - { - ContainerValue = container; - return Self; - } - - public AzureRepositorySettingsDescriptor LocationMode(string? locationMode) - { - LocationModeValue = locationMode; - return Self; - } - - public AzureRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxRestoreBytesPerSec) - { - MaxRestoreBytesPerSecValue = maxRestoreBytesPerSec; - return Self; - } - - public AzureRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSnapshotBytesPerSec) - { - MaxSnapshotBytesPerSecValue = maxSnapshotBytesPerSec; - return Self; - } - - public AzureRepositorySettingsDescriptor Readonly(bool? value = true) - { - ReadonlyValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(BasePathValue)) - { - writer.WritePropertyName("base_path"); - writer.WriteStringValue(BasePathValue); - } - - if (ChunkSizeValue is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, ChunkSizeValue, options); - } - - if (!string.IsNullOrEmpty(ClientValue)) - { - writer.WritePropertyName("client"); - writer.WriteStringValue(ClientValue); - } - - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - if (!string.IsNullOrEmpty(ContainerValue)) - { - writer.WritePropertyName("container"); - writer.WriteStringValue(ContainerValue); - } - - if (!string.IsNullOrEmpty(LocationModeValue)) - { - writer.WritePropertyName("location_mode"); - writer.WriteStringValue(LocationModeValue); - } - - if (MaxRestoreBytesPerSecValue is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxRestoreBytesPerSecValue, options); - } - - if (MaxSnapshotBytesPerSecValue is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxSnapshotBytesPerSecValue, options); - } - - if (ReadonlyValue.HasValue) - { - writer.WritePropertyName("readonly"); - writer.WriteBooleanValue(ReadonlyValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs deleted file mode 100644 index 630ebffe578..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CleanupRepositoryResults -{ - /// - /// - /// Number of binary large objects (blobs) removed during cleanup. - /// - /// - [JsonInclude, JsonPropertyName("deleted_blobs")] - public long DeletedBlobs { get; init; } - - /// - /// - /// Number of bytes freed by cleanup operations. - /// - /// - [JsonInclude, JsonPropertyName("deleted_bytes")] - public long DeletedBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CompactNodeInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CompactNodeInfo.g.cs deleted file mode 100644 index 97858134697..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/CompactNodeInfo.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class CompactNodeInfo -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/FileCountSnapshotStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/FileCountSnapshotStats.g.cs deleted file mode 100644 index f95ec40b41d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/FileCountSnapshotStats.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class FileCountSnapshotStats -{ - [JsonInclude, JsonPropertyName("file_count")] - public int FileCount { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepository.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepository.g.cs deleted file mode 100644 index e0700adbd5f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepository.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class GcsRepository : IRepository -{ - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettings Settings { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "gcs"; - - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; set; } -} - -public sealed partial class GcsRepositoryDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal GcsRepositoryDescriptor(Action configure) => configure.Invoke(this); - - public GcsRepositoryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private string? UuidValue { get; set; } - - public GcsRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public GcsRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public GcsRepositoryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public GcsRepositoryDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettingsDescriptor(SettingsDescriptorAction), options); - } - else - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("gcs"); - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettings BuildSettings() - { - if (SettingsValue is not null) - { - return SettingsValue; - } - - if ((object)SettingsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (SettingsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepositorySettingsDescriptor(SettingsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - GcsRepository IBuildableDescriptor.Build() => new() - { - Settings = BuildSettings(), - Uuid = UuidValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs deleted file mode 100644 index f8129208016..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs +++ /dev/null @@ -1,179 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class GcsRepositorySettings -{ - [JsonInclude, JsonPropertyName("application_name")] - public string? ApplicationName { get; set; } - [JsonInclude, JsonPropertyName("base_path")] - public string? BasePath { get; set; } - [JsonInclude, JsonPropertyName("bucket")] - public string Bucket { get; set; } - [JsonInclude, JsonPropertyName("chunk_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSize { get; set; } - [JsonInclude, JsonPropertyName("client")] - public string? Client { get; set; } - [JsonInclude, JsonPropertyName("compress")] - public bool? Compress { get; set; } - [JsonInclude, JsonPropertyName("max_restore_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("max_snapshot_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("readonly")] - public bool? Readonly { get; set; } -} - -public sealed partial class GcsRepositorySettingsDescriptor : SerializableDescriptor -{ - internal GcsRepositorySettingsDescriptor(Action configure) => configure.Invoke(this); - - public GcsRepositorySettingsDescriptor() : base() - { - } - - private string? ApplicationNameValue { get; set; } - private string? BasePathValue { get; set; } - private string BucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSizeValue { get; set; } - private string? ClientValue { get; set; } - private bool? CompressValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSecValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSecValue { get; set; } - private bool? ReadonlyValue { get; set; } - - public GcsRepositorySettingsDescriptor ApplicationName(string? applicationName) - { - ApplicationNameValue = applicationName; - return Self; - } - - public GcsRepositorySettingsDescriptor BasePath(string? basePath) - { - BasePathValue = basePath; - return Self; - } - - public GcsRepositorySettingsDescriptor Bucket(string bucket) - { - BucketValue = bucket; - return Self; - } - - public GcsRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? chunkSize) - { - ChunkSizeValue = chunkSize; - return Self; - } - - public GcsRepositorySettingsDescriptor Client(string? client) - { - ClientValue = client; - return Self; - } - - public GcsRepositorySettingsDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public GcsRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxRestoreBytesPerSec) - { - MaxRestoreBytesPerSecValue = maxRestoreBytesPerSec; - return Self; - } - - public GcsRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSnapshotBytesPerSec) - { - MaxSnapshotBytesPerSecValue = maxSnapshotBytesPerSec; - return Self; - } - - public GcsRepositorySettingsDescriptor Readonly(bool? value = true) - { - ReadonlyValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ApplicationNameValue)) - { - writer.WritePropertyName("application_name"); - writer.WriteStringValue(ApplicationNameValue); - } - - if (!string.IsNullOrEmpty(BasePathValue)) - { - writer.WritePropertyName("base_path"); - writer.WriteStringValue(BasePathValue); - } - - writer.WritePropertyName("bucket"); - writer.WriteStringValue(BucketValue); - if (ChunkSizeValue is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, ChunkSizeValue, options); - } - - if (!string.IsNullOrEmpty(ClientValue)) - { - writer.WritePropertyName("client"); - writer.WriteStringValue(ClientValue); - } - - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - if (MaxRestoreBytesPerSecValue is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxRestoreBytesPerSecValue, options); - } - - if (MaxSnapshotBytesPerSecValue is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxSnapshotBytesPerSecValue, options); - } - - if (ReadonlyValue.HasValue) - { - writer.WritePropertyName("readonly"); - writer.WriteBooleanValue(ReadonlyValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/IndexDetails.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/IndexDetails.g.cs deleted file mode 100644 index ecd38d300fa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/IndexDetails.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class IndexDetails -{ - [JsonInclude, JsonPropertyName("max_segments_per_shard")] - public long MaxSegmentsPerShard { get; init; } - [JsonInclude, JsonPropertyName("shard_count")] - public int ShardCount { get; init; } - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Size { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/InfoFeatureState.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/InfoFeatureState.g.cs deleted file mode 100644 index c7a92a7f6e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/InfoFeatureState.g.cs +++ /dev/null @@ -1,37 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class InfoFeatureState -{ - [JsonInclude, JsonPropertyName("feature_name")] - public string FeatureName { get; init; } - [JsonInclude, JsonPropertyName("indices")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection Indices { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs deleted file mode 100644 index af28380959d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class ReadOnlyUrlRepository : IRepository -{ - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettings Settings { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "url"; - - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; set; } -} - -public sealed partial class ReadOnlyUrlRepositoryDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal ReadOnlyUrlRepositoryDescriptor(Action configure) => configure.Invoke(this); - - public ReadOnlyUrlRepositoryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private string? UuidValue { get; set; } - - public ReadOnlyUrlRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public ReadOnlyUrlRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public ReadOnlyUrlRepositoryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public ReadOnlyUrlRepositoryDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor(SettingsDescriptorAction), options); - } - else - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("url"); - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettings BuildSettings() - { - if (SettingsValue is not null) - { - return SettingsValue; - } - - if ((object)SettingsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (SettingsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor(SettingsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - ReadOnlyUrlRepository IBuildableDescriptor.Build() => new() - { - Settings = BuildSettings(), - Uuid = UuidValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs deleted file mode 100644 index 3335b4442f6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs +++ /dev/null @@ -1,164 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class ReadOnlyUrlRepositorySettings -{ - [JsonInclude, JsonPropertyName("chunk_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSize { get; set; } - [JsonInclude, JsonPropertyName("compress")] - public bool? Compress { get; set; } - [JsonInclude, JsonPropertyName("http_max_retries")] - public int? HttpMaxRetries { get; set; } - [JsonInclude, JsonPropertyName("http_socket_timeout")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? HttpSocketTimeout { get; set; } - [JsonInclude, JsonPropertyName("max_number_of_snapshots")] - public int? MaxNumberOfSnapshots { get; set; } - [JsonInclude, JsonPropertyName("max_restore_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("max_snapshot_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("url")] - public string Url { get; set; } -} - -public sealed partial class ReadOnlyUrlRepositorySettingsDescriptor : SerializableDescriptor -{ - internal ReadOnlyUrlRepositorySettingsDescriptor(Action configure) => configure.Invoke(this); - - public ReadOnlyUrlRepositorySettingsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSizeValue { get; set; } - private bool? CompressValue { get; set; } - private int? HttpMaxRetriesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? HttpSocketTimeoutValue { get; set; } - private int? MaxNumberOfSnapshotsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSecValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSecValue { get; set; } - private string UrlValue { get; set; } - - public ReadOnlyUrlRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? chunkSize) - { - ChunkSizeValue = chunkSize; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor HttpMaxRetries(int? httpMaxRetries) - { - HttpMaxRetriesValue = httpMaxRetries; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor HttpSocketTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? httpSocketTimeout) - { - HttpSocketTimeoutValue = httpSocketTimeout; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor MaxNumberOfSnapshots(int? maxNumberOfSnapshots) - { - MaxNumberOfSnapshotsValue = maxNumberOfSnapshots; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxRestoreBytesPerSec) - { - MaxRestoreBytesPerSecValue = maxRestoreBytesPerSec; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSnapshotBytesPerSec) - { - MaxSnapshotBytesPerSecValue = maxSnapshotBytesPerSec; - return Self; - } - - public ReadOnlyUrlRepositorySettingsDescriptor Url(string url) - { - UrlValue = url; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ChunkSizeValue is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, ChunkSizeValue, options); - } - - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - if (HttpMaxRetriesValue.HasValue) - { - writer.WritePropertyName("http_max_retries"); - writer.WriteNumberValue(HttpMaxRetriesValue.Value); - } - - if (HttpSocketTimeoutValue is not null) - { - writer.WritePropertyName("http_socket_timeout"); - JsonSerializer.Serialize(writer, HttpSocketTimeoutValue, options); - } - - if (MaxNumberOfSnapshotsValue.HasValue) - { - writer.WritePropertyName("max_number_of_snapshots"); - writer.WriteNumberValue(MaxNumberOfSnapshotsValue.Value); - } - - if (MaxRestoreBytesPerSecValue is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxRestoreBytesPerSecValue, options); - } - - if (MaxSnapshotBytesPerSecValue is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxSnapshotBytesPerSecValue, options); - } - - writer.WritePropertyName("url"); - writer.WriteStringValue(UrlValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Repositories.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Repositories.g.cs deleted file mode 100644 index a8395962378..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Repositories.g.cs +++ /dev/null @@ -1,161 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public partial class Repositories : IsADictionary -{ - public Repositories() - { - } - - public Repositories(IDictionary container) : base(container) - { - } - - public void Add(string name, IRepository repository) => BackingDictionary.Add(Sanitize(name), repository); - public bool TryGetRepository(string name, [NotNullWhen(returnValue: true)] out IRepository repository) => BackingDictionary.TryGetValue(Sanitize(name), out repository); - - public bool TryGetRepository(string name, [NotNullWhen(returnValue: true)] out T? repository) where T : class, IRepository - { - if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue) - { - repository = finalValue; - return true; - } - - repository = null; - return false; - } -} - -public sealed partial class RepositoriesDescriptor : IsADictionaryDescriptor -{ - public RepositoriesDescriptor() : base(new Repositories()) - { - } - - public RepositoriesDescriptor(Repositories repositories) : base(repositories ?? new Repositories()) - { - } - - public RepositoriesDescriptor Azure(string repositoryName) => AssignVariant(repositoryName, null); - public RepositoriesDescriptor Azure(string repositoryName, Action configure) => AssignVariant(repositoryName, configure); - public RepositoriesDescriptor Azure(string repositoryName, AzureRepository azureRepository) => AssignVariant(repositoryName, azureRepository); - public RepositoriesDescriptor Gcs(string repositoryName) => AssignVariant(repositoryName, null); - public RepositoriesDescriptor Gcs(string repositoryName, Action configure) => AssignVariant(repositoryName, configure); - public RepositoriesDescriptor Gcs(string repositoryName, GcsRepository gcsRepository) => AssignVariant(repositoryName, gcsRepository); - public RepositoriesDescriptor ReadOnlyUrl(string repositoryName) => AssignVariant(repositoryName, null); - public RepositoriesDescriptor ReadOnlyUrl(string repositoryName, Action configure) => AssignVariant(repositoryName, configure); - public RepositoriesDescriptor ReadOnlyUrl(string repositoryName, ReadOnlyUrlRepository readOnlyUrlRepository) => AssignVariant(repositoryName, readOnlyUrlRepository); - public RepositoriesDescriptor S3(string repositoryName) => AssignVariant(repositoryName, null); - public RepositoriesDescriptor S3(string repositoryName, Action configure) => AssignVariant(repositoryName, configure); - public RepositoriesDescriptor S3(string repositoryName, S3Repository s3Repository) => AssignVariant(repositoryName, s3Repository); - public RepositoriesDescriptor SharedFileSystem(string repositoryName) => AssignVariant(repositoryName, null); - public RepositoriesDescriptor SharedFileSystem(string repositoryName, Action configure) => AssignVariant(repositoryName, configure); - public RepositoriesDescriptor SharedFileSystem(string repositoryName, SharedFileSystemRepository sharedFileSystemRepository) => AssignVariant(repositoryName, sharedFileSystemRepository); - public RepositoriesDescriptor SourceOnly(string repositoryName) => AssignVariant(repositoryName, null); - public RepositoriesDescriptor SourceOnly(string repositoryName, Action configure) => AssignVariant(repositoryName, configure); - public RepositoriesDescriptor SourceOnly(string repositoryName, SourceOnlyRepository sourceOnlyRepository) => AssignVariant(repositoryName, sourceOnlyRepository); -} - -internal sealed partial class RepositoryInterfaceConverter : JsonConverter -{ - public override IRepository Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var copiedReader = reader; - string? type = null; - using var jsonDoc = JsonDocument.ParseValue(ref copiedReader); - if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String) - { - type = readType.ToString(); - } - - switch (type) - { - case "azure": - return JsonSerializer.Deserialize(ref reader, options); - case "gcs": - return JsonSerializer.Deserialize(ref reader, options); - case "url": - return JsonSerializer.Deserialize(ref reader, options); - case "s3": - return JsonSerializer.Deserialize(ref reader, options); - case "fs": - return JsonSerializer.Deserialize(ref reader, options); - case "source": - return JsonSerializer.Deserialize(ref reader, options); - default: - ThrowHelper.ThrowUnknownTaggedUnionVariantJsonException(type, typeof(IRepository)); - return null; - } - } - - public override void Write(Utf8JsonWriter writer, IRepository value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - switch (value.Type) - { - case "azure": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.AzureRepository), options); - return; - case "gcs": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.GcsRepository), options); - return; - case "url": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.ReadOnlyUrlRepository), options); - return; - case "s3": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3Repository), options); - return; - case "fs": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepository), options); - return; - case "source": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepository), options); - return; - default: - var type = value.GetType(); - JsonSerializer.Serialize(writer, value, type, options); - return; - } - } -} - -[JsonConverter(typeof(RepositoryInterfaceConverter))] -public partial interface IRepository -{ - public string? Type { get; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3Repository.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3Repository.g.cs deleted file mode 100644 index 5082b90ec15..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3Repository.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class S3Repository : IRepository -{ - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettings Settings { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "s3"; - - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; set; } -} - -public sealed partial class S3RepositoryDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal S3RepositoryDescriptor(Action configure) => configure.Invoke(this); - - public S3RepositoryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private string? UuidValue { get; set; } - - public S3RepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public S3RepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public S3RepositoryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public S3RepositoryDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettingsDescriptor(SettingsDescriptorAction), options); - } - else - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("s3"); - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettings BuildSettings() - { - if (SettingsValue is not null) - { - return SettingsValue; - } - - if ((object)SettingsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (SettingsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Snapshot.S3RepositorySettingsDescriptor(SettingsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - S3Repository IBuildableDescriptor.Build() => new() - { - Settings = BuildSettings(), - Uuid = UuidValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3RepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3RepositorySettings.g.cs deleted file mode 100644 index 9a22a6fa90c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/S3RepositorySettings.g.cs +++ /dev/null @@ -1,224 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class S3RepositorySettings -{ - [JsonInclude, JsonPropertyName("base_path")] - public string? BasePath { get; set; } - [JsonInclude, JsonPropertyName("bucket")] - public string Bucket { get; set; } - [JsonInclude, JsonPropertyName("buffer_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? BufferSize { get; set; } - [JsonInclude, JsonPropertyName("canned_acl")] - public string? CannedAcl { get; set; } - [JsonInclude, JsonPropertyName("chunk_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSize { get; set; } - [JsonInclude, JsonPropertyName("client")] - public string? Client { get; set; } - [JsonInclude, JsonPropertyName("compress")] - public bool? Compress { get; set; } - [JsonInclude, JsonPropertyName("max_restore_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("max_snapshot_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("readonly")] - public bool? Readonly { get; set; } - [JsonInclude, JsonPropertyName("server_side_encryption")] - public bool? ServerSideEncryption { get; set; } - [JsonInclude, JsonPropertyName("storage_class")] - public string? StorageClass { get; set; } -} - -public sealed partial class S3RepositorySettingsDescriptor : SerializableDescriptor -{ - internal S3RepositorySettingsDescriptor(Action configure) => configure.Invoke(this); - - public S3RepositorySettingsDescriptor() : base() - { - } - - private string? BasePathValue { get; set; } - private string BucketValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? BufferSizeValue { get; set; } - private string? CannedAclValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSizeValue { get; set; } - private string? ClientValue { get; set; } - private bool? CompressValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSecValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSecValue { get; set; } - private bool? ReadonlyValue { get; set; } - private bool? ServerSideEncryptionValue { get; set; } - private string? StorageClassValue { get; set; } - - public S3RepositorySettingsDescriptor BasePath(string? basePath) - { - BasePathValue = basePath; - return Self; - } - - public S3RepositorySettingsDescriptor Bucket(string bucket) - { - BucketValue = bucket; - return Self; - } - - public S3RepositorySettingsDescriptor BufferSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? bufferSize) - { - BufferSizeValue = bufferSize; - return Self; - } - - public S3RepositorySettingsDescriptor CannedAcl(string? cannedAcl) - { - CannedAclValue = cannedAcl; - return Self; - } - - public S3RepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? chunkSize) - { - ChunkSizeValue = chunkSize; - return Self; - } - - public S3RepositorySettingsDescriptor Client(string? client) - { - ClientValue = client; - return Self; - } - - public S3RepositorySettingsDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public S3RepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxRestoreBytesPerSec) - { - MaxRestoreBytesPerSecValue = maxRestoreBytesPerSec; - return Self; - } - - public S3RepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSnapshotBytesPerSec) - { - MaxSnapshotBytesPerSecValue = maxSnapshotBytesPerSec; - return Self; - } - - public S3RepositorySettingsDescriptor Readonly(bool? value = true) - { - ReadonlyValue = value; - return Self; - } - - public S3RepositorySettingsDescriptor ServerSideEncryption(bool? serverSideEncryption = true) - { - ServerSideEncryptionValue = serverSideEncryption; - return Self; - } - - public S3RepositorySettingsDescriptor StorageClass(string? storageClass) - { - StorageClassValue = storageClass; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(BasePathValue)) - { - writer.WritePropertyName("base_path"); - writer.WriteStringValue(BasePathValue); - } - - writer.WritePropertyName("bucket"); - writer.WriteStringValue(BucketValue); - if (BufferSizeValue is not null) - { - writer.WritePropertyName("buffer_size"); - JsonSerializer.Serialize(writer, BufferSizeValue, options); - } - - if (!string.IsNullOrEmpty(CannedAclValue)) - { - writer.WritePropertyName("canned_acl"); - writer.WriteStringValue(CannedAclValue); - } - - if (ChunkSizeValue is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, ChunkSizeValue, options); - } - - if (!string.IsNullOrEmpty(ClientValue)) - { - writer.WritePropertyName("client"); - writer.WriteStringValue(ClientValue); - } - - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - if (MaxRestoreBytesPerSecValue is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxRestoreBytesPerSecValue, options); - } - - if (MaxSnapshotBytesPerSecValue is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxSnapshotBytesPerSecValue, options); - } - - if (ReadonlyValue.HasValue) - { - writer.WritePropertyName("readonly"); - writer.WriteBooleanValue(ReadonlyValue.Value); - } - - if (ServerSideEncryptionValue.HasValue) - { - writer.WritePropertyName("server_side_encryption"); - writer.WriteBooleanValue(ServerSideEncryptionValue.Value); - } - - if (!string.IsNullOrEmpty(StorageClassValue)) - { - writer.WritePropertyName("storage_class"); - writer.WriteStringValue(StorageClassValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStats.g.cs deleted file mode 100644 index cacaaed5705..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class ShardsStats -{ - [JsonInclude, JsonPropertyName("done")] - public long Done { get; init; } - [JsonInclude, JsonPropertyName("failed")] - public long Failed { get; init; } - [JsonInclude, JsonPropertyName("finalizing")] - public long Finalizing { get; init; } - [JsonInclude, JsonPropertyName("initializing")] - public long Initializing { get; init; } - [JsonInclude, JsonPropertyName("started")] - public long Started { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummary.g.cs deleted file mode 100644 index 0a0a53d921d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummary.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class ShardsStatsSummary -{ - [JsonInclude, JsonPropertyName("incremental")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ShardsStatsSummaryItem Incremental { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_millis")] - public long TimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ShardsStatsSummaryItem Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummaryItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummaryItem.g.cs deleted file mode 100644 index 659caee8f26..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/ShardsStatsSummaryItem.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class ShardsStatsSummaryItem -{ - [JsonInclude, JsonPropertyName("file_count")] - public long FileCount { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs deleted file mode 100644 index ce70a279ec7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepository.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SharedFileSystemRepository : IRepository -{ - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettings Settings { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "fs"; - - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; set; } -} - -public sealed partial class SharedFileSystemRepositoryDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SharedFileSystemRepositoryDescriptor(Action configure) => configure.Invoke(this); - - public SharedFileSystemRepositoryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private string? UuidValue { get; set; } - - public SharedFileSystemRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public SharedFileSystemRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public SharedFileSystemRepositoryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public SharedFileSystemRepositoryDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettingsDescriptor(SettingsDescriptorAction), options); - } - else - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("fs"); - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettings BuildSettings() - { - if (SettingsValue is not null) - { - return SettingsValue; - } - - if ((object)SettingsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (SettingsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Snapshot.SharedFileSystemRepositorySettingsDescriptor(SettingsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - SharedFileSystemRepository IBuildableDescriptor.Build() => new() - { - Settings = BuildSettings(), - Uuid = UuidValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs deleted file mode 100644 index ca0a1dcea34..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs +++ /dev/null @@ -1,149 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SharedFileSystemRepositorySettings -{ - [JsonInclude, JsonPropertyName("chunk_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSize { get; set; } - [JsonInclude, JsonPropertyName("compress")] - public bool? Compress { get; set; } - [JsonInclude, JsonPropertyName("location")] - public string Location { get; set; } - [JsonInclude, JsonPropertyName("max_number_of_snapshots")] - public int? MaxNumberOfSnapshots { get; set; } - [JsonInclude, JsonPropertyName("max_restore_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("max_snapshot_bytes_per_sec")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSec { get; set; } - [JsonInclude, JsonPropertyName("readonly")] - public bool? Readonly { get; set; } -} - -public sealed partial class SharedFileSystemRepositorySettingsDescriptor : SerializableDescriptor -{ - internal SharedFileSystemRepositorySettingsDescriptor(Action configure) => configure.Invoke(this); - - public SharedFileSystemRepositorySettingsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSizeValue { get; set; } - private bool? CompressValue { get; set; } - private string LocationValue { get; set; } - private int? MaxNumberOfSnapshotsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSecValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSecValue { get; set; } - private bool? ReadonlyValue { get; set; } - - public SharedFileSystemRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? chunkSize) - { - ChunkSizeValue = chunkSize; - return Self; - } - - public SharedFileSystemRepositorySettingsDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public SharedFileSystemRepositorySettingsDescriptor Location(string location) - { - LocationValue = location; - return Self; - } - - public SharedFileSystemRepositorySettingsDescriptor MaxNumberOfSnapshots(int? maxNumberOfSnapshots) - { - MaxNumberOfSnapshotsValue = maxNumberOfSnapshots; - return Self; - } - - public SharedFileSystemRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxRestoreBytesPerSec) - { - MaxRestoreBytesPerSecValue = maxRestoreBytesPerSec; - return Self; - } - - public SharedFileSystemRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSnapshotBytesPerSec) - { - MaxSnapshotBytesPerSecValue = maxSnapshotBytesPerSec; - return Self; - } - - public SharedFileSystemRepositorySettingsDescriptor Readonly(bool? value = true) - { - ReadonlyValue = value; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ChunkSizeValue is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, ChunkSizeValue, options); - } - - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - writer.WritePropertyName("location"); - writer.WriteStringValue(LocationValue); - if (MaxNumberOfSnapshotsValue.HasValue) - { - writer.WritePropertyName("max_number_of_snapshots"); - writer.WriteNumberValue(MaxNumberOfSnapshotsValue.Value); - } - - if (MaxRestoreBytesPerSecValue is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxRestoreBytesPerSecValue, options); - } - - if (MaxSnapshotBytesPerSecValue is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxSnapshotBytesPerSecValue, options); - } - - if (ReadonlyValue.HasValue) - { - writer.WritePropertyName("readonly"); - writer.WriteBooleanValue(ReadonlyValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotIndexStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotIndexStats.g.cs deleted file mode 100644 index 6eba7b4b26e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotIndexStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotIndexStats -{ - [JsonInclude, JsonPropertyName("shards")] - public IReadOnlyDictionary Shards { get; init; } - [JsonInclude, JsonPropertyName("shards_stats")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ShardsStats ShardsStats { get; init; } - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotStats Stats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotInfo.g.cs deleted file mode 100644 index 56b8fa219e3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotInfo.g.cs +++ /dev/null @@ -1,75 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotInfo -{ - [JsonInclude, JsonPropertyName("data_streams")] - public IReadOnlyCollection DataStreams { get; init; } - [JsonInclude, JsonPropertyName("duration")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Duration { get; init; } - [JsonInclude, JsonPropertyName("duration_in_millis")] - public long? DurationInMillis { get; init; } - [JsonInclude, JsonPropertyName("end_time")] - public DateTimeOffset? EndTime { get; init; } - [JsonInclude, JsonPropertyName("end_time_in_millis")] - public long? EndTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("failures")] - public IReadOnlyCollection? Failures { get; init; } - [JsonInclude, JsonPropertyName("feature_states")] - public IReadOnlyCollection? FeatureStates { get; init; } - [JsonInclude, JsonPropertyName("include_global_state")] - public bool? IncludeGlobalState { get; init; } - [JsonInclude, JsonPropertyName("index_details")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Snapshot.IndexDetails))] - public IReadOnlyDictionary? IndexDetails { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection? Indices { get; init; } - [JsonInclude, JsonPropertyName("metadata")] - public IReadOnlyDictionary? Metadata { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public string? Reason { get; init; } - [JsonInclude, JsonPropertyName("repository")] - public string? Repository { get; init; } - [JsonInclude, JsonPropertyName("shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; } - [JsonInclude, JsonPropertyName("snapshot")] - public string Snapshot { get; init; } - [JsonInclude, JsonPropertyName("start_time")] - public DateTimeOffset? StartTime { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long? StartTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("state")] - public string? State { get; init; } - [JsonInclude, JsonPropertyName("uuid")] - public string Uuid { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; init; } - [JsonInclude, JsonPropertyName("version_id")] - public long? VersionId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotResponseItem.g.cs deleted file mode 100644 index 773e673d3f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotResponseItem.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotResponseItem -{ - [JsonInclude, JsonPropertyName("error")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause? Error { get; init; } - [JsonInclude, JsonPropertyName("repository")] - public string Repository { get; init; } - [JsonInclude, JsonPropertyName("snapshots")] - public IReadOnlyCollection? Snapshots { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotRestore.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotRestore.g.cs deleted file mode 100644 index 66f4eafe57b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotRestore.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotRestore -{ - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } - [JsonInclude, JsonPropertyName("shards")] - public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; } - [JsonInclude, JsonPropertyName("snapshot")] - public string Snapshot { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.cs deleted file mode 100644 index 4c2effd0b43..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardFailure.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotShardFailure -{ - [JsonInclude, JsonPropertyName("index")] - public string Index { get; init; } - [JsonInclude, JsonPropertyName("index_uuid")] - public string IndexUuid { get; init; } - [JsonInclude, JsonPropertyName("node_id")] - public string? NodeId { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public string Reason { get; init; } - [JsonInclude, JsonPropertyName("shard_id")] - public string ShardId { get; init; } - [JsonInclude, JsonPropertyName("status")] - public string Status { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardsStatus.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardsStatus.g.cs deleted file mode 100644 index 6f840e7deb3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotShardsStatus.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotShardsStatus -{ - [JsonInclude, JsonPropertyName("stage")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ShardsStatsStage Stage { get; init; } - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ShardsStatsSummary Stats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotStats.g.cs deleted file mode 100644 index f6089c6b216..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SnapshotStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SnapshotStats -{ - [JsonInclude, JsonPropertyName("incremental")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.FileCountSnapshotStats Incremental { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } - [JsonInclude, JsonPropertyName("time_in_millis")] - public long TimeInMillis { get; init; } - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.FileCountSnapshotStats Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs deleted file mode 100644 index 559095c9279..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepository.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class SourceOnlyRepository : IRepository -{ - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettings Settings { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "source"; - - [JsonInclude, JsonPropertyName("uuid")] - public string? Uuid { get; set; } -} - -public sealed partial class SourceOnlyRepositoryDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal SourceOnlyRepositoryDescriptor(Action configure) => configure.Invoke(this); - - public SourceOnlyRepositoryDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettings SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - private string? UuidValue { get; set; } - - public SourceOnlyRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettings settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public SourceOnlyRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public SourceOnlyRepositoryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - return Self; - } - - public SourceOnlyRepositoryDescriptor Uuid(string? uuid) - { - UuidValue = uuid; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (SettingsDescriptor is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsDescriptor, options); - } - else if (SettingsDescriptorAction is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettingsDescriptor(SettingsDescriptorAction), options); - } - else - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("source"); - if (!string.IsNullOrEmpty(UuidValue)) - { - writer.WritePropertyName("uuid"); - writer.WriteStringValue(UuidValue); - } - - writer.WriteEndObject(); - } - - private Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettings BuildSettings() - { - if (SettingsValue is not null) - { - return SettingsValue; - } - - if ((object)SettingsDescriptor is IBuildableDescriptor buildable) - { - return buildable.Build(); - } - - if (SettingsDescriptorAction is not null) - { - var descriptor = new Elastic.Clients.Elasticsearch.Serverless.Snapshot.SourceOnlyRepositorySettingsDescriptor(SettingsDescriptorAction); - if ((object)descriptor is IBuildableDescriptor buildableFromAction) - { - return buildableFromAction.Build(); - } - } - - return null; - } - - SourceOnlyRepository IBuildableDescriptor.Build() => new() - { - Settings = BuildSettings(), - Uuid = UuidValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs deleted file mode 100644 index b039cdb0a45..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs +++ /dev/null @@ -1,255 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -internal sealed partial class SourceOnlyRepositorySettingsConverter : JsonConverter -{ - public override SourceOnlyRepositorySettings Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new SourceOnlyRepositorySettings(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "chunk_size") - { - variant.ChunkSize = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "compress") - { - variant.Compress = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "delegate_type") - { - variant.DelegateType = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_number_of_snapshots") - { - variant.MaxNumberOfSnapshots = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_restore_bytes_per_sec") - { - variant.MaxRestoreBytesPerSec = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "max_snapshot_bytes_per_sec") - { - variant.MaxSnapshotBytesPerSec = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "read_only" || property == "readonly") - { - variant.ReadOnly = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, SourceOnlyRepositorySettings value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.ChunkSize is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, value.ChunkSize, options); - } - - if (value.Compress.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(value.Compress.Value); - } - - if (!string.IsNullOrEmpty(value.DelegateType)) - { - writer.WritePropertyName("delegate_type"); - writer.WriteStringValue(value.DelegateType); - } - - if (value.MaxNumberOfSnapshots.HasValue) - { - writer.WritePropertyName("max_number_of_snapshots"); - writer.WriteNumberValue(value.MaxNumberOfSnapshots.Value); - } - - if (value.MaxRestoreBytesPerSec is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, value.MaxRestoreBytesPerSec, options); - } - - if (value.MaxSnapshotBytesPerSec is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, value.MaxSnapshotBytesPerSec, options); - } - - if (value.ReadOnly.HasValue) - { - writer.WritePropertyName("read_only"); - writer.WriteBooleanValue(value.ReadOnly.Value); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(SourceOnlyRepositorySettingsConverter))] -public sealed partial class SourceOnlyRepositorySettings -{ - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSize { get; set; } - public bool? Compress { get; set; } - public string? DelegateType { get; set; } - public int? MaxNumberOfSnapshots { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSec { get; set; } - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSec { get; set; } - public bool? ReadOnly { get; set; } -} - -public sealed partial class SourceOnlyRepositorySettingsDescriptor : SerializableDescriptor -{ - internal SourceOnlyRepositorySettingsDescriptor(Action configure) => configure.Invoke(this); - - public SourceOnlyRepositorySettingsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? ChunkSizeValue { get; set; } - private bool? CompressValue { get; set; } - private string? DelegateTypeValue { get; set; } - private int? MaxNumberOfSnapshotsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxRestoreBytesPerSecValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSnapshotBytesPerSecValue { get; set; } - private bool? ReadOnlyValue { get; set; } - - public SourceOnlyRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? chunkSize) - { - ChunkSizeValue = chunkSize; - return Self; - } - - public SourceOnlyRepositorySettingsDescriptor Compress(bool? compress = true) - { - CompressValue = compress; - return Self; - } - - public SourceOnlyRepositorySettingsDescriptor DelegateType(string? delegateType) - { - DelegateTypeValue = delegateType; - return Self; - } - - public SourceOnlyRepositorySettingsDescriptor MaxNumberOfSnapshots(int? maxNumberOfSnapshots) - { - MaxNumberOfSnapshotsValue = maxNumberOfSnapshots; - return Self; - } - - public SourceOnlyRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxRestoreBytesPerSec) - { - MaxRestoreBytesPerSecValue = maxRestoreBytesPerSec; - return Self; - } - - public SourceOnlyRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSnapshotBytesPerSec) - { - MaxSnapshotBytesPerSecValue = maxSnapshotBytesPerSec; - return Self; - } - - public SourceOnlyRepositorySettingsDescriptor ReadOnly(bool? readOnly = true) - { - ReadOnlyValue = readOnly; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (ChunkSizeValue is not null) - { - writer.WritePropertyName("chunk_size"); - JsonSerializer.Serialize(writer, ChunkSizeValue, options); - } - - if (CompressValue.HasValue) - { - writer.WritePropertyName("compress"); - writer.WriteBooleanValue(CompressValue.Value); - } - - if (!string.IsNullOrEmpty(DelegateTypeValue)) - { - writer.WritePropertyName("delegate_type"); - writer.WriteStringValue(DelegateTypeValue); - } - - if (MaxNumberOfSnapshotsValue.HasValue) - { - writer.WritePropertyName("max_number_of_snapshots"); - writer.WriteNumberValue(MaxNumberOfSnapshotsValue.Value); - } - - if (MaxRestoreBytesPerSecValue is not null) - { - writer.WritePropertyName("max_restore_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxRestoreBytesPerSecValue, options); - } - - if (MaxSnapshotBytesPerSecValue is not null) - { - writer.WritePropertyName("max_snapshot_bytes_per_sec"); - JsonSerializer.Serialize(writer, MaxSnapshotBytesPerSecValue, options); - } - - if (ReadOnlyValue.HasValue) - { - writer.WritePropertyName("read_only"); - writer.WriteBooleanValue(ReadOnlyValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Status.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Status.g.cs deleted file mode 100644 index e8d92e580c4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Snapshot/Status.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot; - -public sealed partial class Status -{ - [JsonInclude, JsonPropertyName("include_global_state")] - public bool IncludeGlobalState { get; init; } - [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyDictionary Indices { get; init; } - [JsonInclude, JsonPropertyName("repository")] - public string Repository { get; init; } - [JsonInclude, JsonPropertyName("shards_stats")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.ShardsStats ShardsStats { get; init; } - [JsonInclude, JsonPropertyName("snapshot")] - public string Snapshot { get; init; } - [JsonInclude, JsonPropertyName("state")] - public string State { get; init; } - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotStats Stats { get; init; } - [JsonInclude, JsonPropertyName("uuid")] - public string Uuid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/InProgress.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/InProgress.g.cs deleted file mode 100644 index 6cbb520abf2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/InProgress.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class InProgress -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("start_time_millis")] - public long StartTimeMillis { get; init; } - [JsonInclude, JsonPropertyName("state")] - public string State { get; init; } - [JsonInclude, JsonPropertyName("uuid")] - public string Uuid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Invocation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Invocation.g.cs deleted file mode 100644 index 2e140785f84..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Invocation.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class Invocation -{ - [JsonInclude, JsonPropertyName("snapshot_name")] - public string SnapshotName { get; init; } - [JsonInclude, JsonPropertyName("time")] - public DateTimeOffset Time { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Retention.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Retention.g.cs deleted file mode 100644 index 7a871d8ba13..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Retention.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class Retention -{ - /// - /// - /// Time period after which a snapshot is considered expired and eligible for deletion. SLM deletes expired snapshots based on the slm.retention_schedule. - /// - /// - [JsonInclude, JsonPropertyName("expire_after")] - public Elastic.Clients.Elasticsearch.Serverless.Duration ExpireAfter { get; set; } - - /// - /// - /// Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots. - /// - /// - [JsonInclude, JsonPropertyName("max_count")] - public int MaxCount { get; set; } - - /// - /// - /// Minimum number of snapshots to retain, even if the snapshots have expired. - /// - /// - [JsonInclude, JsonPropertyName("min_count")] - public int MinCount { get; set; } -} - -public sealed partial class RetentionDescriptor : SerializableDescriptor -{ - internal RetentionDescriptor(Action configure) => configure.Invoke(this); - - public RetentionDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration ExpireAfterValue { get; set; } - private int MaxCountValue { get; set; } - private int MinCountValue { get; set; } - - /// - /// - /// Time period after which a snapshot is considered expired and eligible for deletion. SLM deletes expired snapshots based on the slm.retention_schedule. - /// - /// - public RetentionDescriptor ExpireAfter(Elastic.Clients.Elasticsearch.Serverless.Duration expireAfter) - { - ExpireAfterValue = expireAfter; - return Self; - } - - /// - /// - /// Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots. - /// - /// - public RetentionDescriptor MaxCount(int maxCount) - { - MaxCountValue = maxCount; - return Self; - } - - /// - /// - /// Minimum number of snapshots to retain, even if the snapshots have expired. - /// - /// - public RetentionDescriptor MinCount(int minCount) - { - MinCountValue = minCount; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("expire_after"); - JsonSerializer.Serialize(writer, ExpireAfterValue, options); - writer.WritePropertyName("max_count"); - writer.WriteNumberValue(MaxCountValue); - writer.WritePropertyName("min_count"); - writer.WriteNumberValue(MinCountValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs deleted file mode 100644 index 2644e660bfc..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs +++ /dev/null @@ -1,207 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class SlmConfiguration -{ - /// - /// - /// A list of feature states to be included in this snapshot. A list of features available for inclusion in the snapshot and their descriptions be can be retrieved using the get features API. - /// Each feature state includes one or more system indices containing data necessary for the function of that feature. Providing an empty array will include no feature states in the snapshot, regardless of the value of include_global_state. By default, all available feature states will be included in the snapshot if include_global_state is true, or no feature states if include_global_state is false. - /// - /// - [JsonInclude, JsonPropertyName("feature_states")] - public ICollection? FeatureStates { get; set; } - - /// - /// - /// If false, the snapshot fails if any data stream or index in indices is missing or closed. If true, the snapshot ignores missing or closed data streams and indices. - /// - /// - [JsonInclude, JsonPropertyName("ignore_unavailable")] - public bool? IgnoreUnavailable { get; set; } - - /// - /// - /// If true, the current global state is included in the snapshot. - /// - /// - [JsonInclude, JsonPropertyName("include_global_state")] - public bool? IncludeGlobalState { get; set; } - - /// - /// - /// A comma-separated list of data streams and indices to include in the snapshot. Multi-index syntax is supported. - /// By default, a snapshot includes all data streams and indices in the cluster. If this argument is provided, the snapshot only includes the specified data streams and clusters. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? Indices { get; set; } - - /// - /// - /// Attaches arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. Metadata must be less than 1024 bytes. - /// - /// - [JsonInclude, JsonPropertyName("metadata")] - public IDictionary? Metadata { get; set; } - - /// - /// - /// If false, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - [JsonInclude, JsonPropertyName("partial")] - public bool? Partial { get; set; } -} - -public sealed partial class SlmConfigurationDescriptor : SerializableDescriptor -{ - internal SlmConfigurationDescriptor(Action configure) => configure.Invoke(this); - - public SlmConfigurationDescriptor() : base() - { - } - - private ICollection? FeatureStatesValue { get; set; } - private bool? IgnoreUnavailableValue { get; set; } - private bool? IncludeGlobalStateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndicesValue { get; set; } - private IDictionary? MetadataValue { get; set; } - private bool? PartialValue { get; set; } - - /// - /// - /// A list of feature states to be included in this snapshot. A list of features available for inclusion in the snapshot and their descriptions be can be retrieved using the get features API. - /// Each feature state includes one or more system indices containing data necessary for the function of that feature. Providing an empty array will include no feature states in the snapshot, regardless of the value of include_global_state. By default, all available feature states will be included in the snapshot if include_global_state is true, or no feature states if include_global_state is false. - /// - /// - public SlmConfigurationDescriptor FeatureStates(ICollection? featureStates) - { - FeatureStatesValue = featureStates; - return Self; - } - - /// - /// - /// If false, the snapshot fails if any data stream or index in indices is missing or closed. If true, the snapshot ignores missing or closed data streams and indices. - /// - /// - public SlmConfigurationDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) - { - IgnoreUnavailableValue = ignoreUnavailable; - return Self; - } - - /// - /// - /// If true, the current global state is included in the snapshot. - /// - /// - public SlmConfigurationDescriptor IncludeGlobalState(bool? includeGlobalState = true) - { - IncludeGlobalStateValue = includeGlobalState; - return Self; - } - - /// - /// - /// A comma-separated list of data streams and indices to include in the snapshot. Multi-index syntax is supported. - /// By default, a snapshot includes all data streams and indices in the cluster. If this argument is provided, the snapshot only includes the specified data streams and clusters. - /// - /// - public SlmConfigurationDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Attaches arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. Metadata must be less than 1024 bytes. - /// - /// - public SlmConfigurationDescriptor Metadata(Func, FluentDictionary> selector) - { - MetadataValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// If false, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - public SlmConfigurationDescriptor Partial(bool? partial = true) - { - PartialValue = partial; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (FeatureStatesValue is not null) - { - writer.WritePropertyName("feature_states"); - JsonSerializer.Serialize(writer, FeatureStatesValue, options); - } - - if (IgnoreUnavailableValue.HasValue) - { - writer.WritePropertyName("ignore_unavailable"); - writer.WriteBooleanValue(IgnoreUnavailableValue.Value); - } - - if (IncludeGlobalStateValue.HasValue) - { - writer.WritePropertyName("include_global_state"); - writer.WriteBooleanValue(IncludeGlobalStateValue.Value); - } - - if (IndicesValue is not null) - { - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - } - - if (MetadataValue is not null) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, MetadataValue, options); - } - - if (PartialValue.HasValue) - { - writer.WritePropertyName("partial"); - writer.WriteBooleanValue(PartialValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmPolicy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmPolicy.g.cs deleted file mode 100644 index d95d7365b69..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SlmPolicy.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class SlmPolicy -{ - [JsonInclude, JsonPropertyName("config")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmConfiguration? Config { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("repository")] - public string Repository { get; init; } - [JsonInclude, JsonPropertyName("retention")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Retention? Retention { get; init; } - [JsonInclude, JsonPropertyName("schedule")] - public string Schedule { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs deleted file mode 100644 index e9e918b2431..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -public sealed partial class SnapshotLifecycle -{ - [JsonInclude, JsonPropertyName("in_progress")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.InProgress? InProgress { get; init; } - [JsonInclude, JsonPropertyName("last_failure")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Invocation? LastFailure { get; init; } - [JsonInclude, JsonPropertyName("last_success")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Invocation? LastSuccess { get; init; } - [JsonInclude, JsonPropertyName("modified_date")] - public DateTimeOffset? ModifiedDate { get; init; } - [JsonInclude, JsonPropertyName("modified_date_millis")] - public long ModifiedDateMillis { get; init; } - [JsonInclude, JsonPropertyName("next_execution")] - public DateTimeOffset? NextExecution { get; init; } - [JsonInclude, JsonPropertyName("next_execution_millis")] - public long NextExecutionMillis { get; init; } - [JsonInclude, JsonPropertyName("policy")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.SlmPolicy Policy { get; init; } - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Statistics Stats { get; init; } - [JsonInclude, JsonPropertyName("version")] - public long Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs deleted file mode 100644 index d55ab71cb05..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs +++ /dev/null @@ -1,135 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement; - -internal sealed partial class StatisticsConverter : JsonConverter -{ - public override Statistics Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - string? policy = default; - Elastic.Clients.Elasticsearch.Serverless.Duration? retentionDeletionTime = default; - long? retentionDeletionTimeMillis = default; - long? retentionFailed = default; - long? retentionRuns = default; - long? retentionTimedOut = default; - long? totalSnapshotDeletionFailures = default; - long? totalSnapshotsDeleted = default; - long? totalSnapshotsFailed = default; - long? totalSnapshotsTaken = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "policy") - { - policy = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "retention_deletion_time") - { - retentionDeletionTime = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "retention_deletion_time_millis") - { - retentionDeletionTimeMillis = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "retention_failed") - { - retentionFailed = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "retention_runs") - { - retentionRuns = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "retention_timed_out") - { - retentionTimedOut = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "total_snapshot_deletion_failures" || property == "snapshot_deletion_failures") - { - totalSnapshotDeletionFailures = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "total_snapshots_deleted" || property == "snapshots_deleted") - { - totalSnapshotsDeleted = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "total_snapshots_failed" || property == "snapshots_failed") - { - totalSnapshotsFailed = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (property == "total_snapshots_taken" || property == "snapshots_taken") - { - totalSnapshotsTaken = JsonSerializer.Deserialize(ref reader, options); - continue; - } - } - } - - return new Statistics { Policy = policy, RetentionDeletionTime = retentionDeletionTime, RetentionDeletionTimeMillis = retentionDeletionTimeMillis, RetentionFailed = retentionFailed, RetentionRuns = retentionRuns, RetentionTimedOut = retentionTimedOut, TotalSnapshotDeletionFailures = totalSnapshotDeletionFailures, TotalSnapshotsDeleted = totalSnapshotsDeleted, TotalSnapshotsFailed = totalSnapshotsFailed, TotalSnapshotsTaken = totalSnapshotsTaken }; - } - - public override void Write(Utf8JsonWriter writer, Statistics value, JsonSerializerOptions options) - { - throw new NotImplementedException("'Statistics' is a readonly type, used only on responses and does not support being written to JSON."); - } -} - -[JsonConverter(typeof(StatisticsConverter))] -public sealed partial class Statistics -{ - public string? Policy { get; init; } - public Elastic.Clients.Elasticsearch.Serverless.Duration? RetentionDeletionTime { get; init; } - public long? RetentionDeletionTimeMillis { get; init; } - public long? RetentionFailed { get; init; } - public long? RetentionRuns { get; init; } - public long? RetentionTimedOut { get; init; } - public long? TotalSnapshotDeletionFailures { get; init; } - public long? TotalSnapshotsDeleted { get; init; } - public long? TotalSnapshotsFailed { get; init; } - public long? TotalSnapshotsTaken { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SortOptions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SortOptions.g.cs deleted file mode 100644 index 1ffdf611674..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SortOptions.g.cs +++ /dev/null @@ -1,296 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -[JsonConverter(typeof(SortOptionsConverter))] -public sealed partial class SortOptions -{ - internal SortOptions(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 SortOptions(Elastic.Clients.Elasticsearch.Serverless.Field field, object variant) - { - if (field is null) - throw new ArgumentNullException(nameof(field)); - if (variant is null) - throw new ArgumentNullException(nameof(variant)); - AdditionalPropertyName = field; - Variant = variant; - } - - internal object Variant { get; } - internal string VariantName { get; } - internal Elastic.Clients.Elasticsearch.Serverless.Field? AdditionalPropertyName { get; } - - public static SortOptions Doc(Elastic.Clients.Elasticsearch.Serverless.ScoreSort scoreSort) => new SortOptions("_doc", scoreSort); - public static SortOptions GeoDistance(Elastic.Clients.Elasticsearch.Serverless.GeoDistanceSort geoDistanceSort) => new SortOptions("_geo_distance", geoDistanceSort); - public static SortOptions Score(Elastic.Clients.Elasticsearch.Serverless.ScoreSort scoreSort) => new SortOptions("_score", scoreSort); - public static SortOptions Script(Elastic.Clients.Elasticsearch.Serverless.ScriptSort scriptSort) => new SortOptions("_script", scriptSort); - public static SortOptions Field(Elastic.Clients.Elasticsearch.Serverless.Field field, Elastic.Clients.Elasticsearch.Serverless.FieldSort fieldSort) => new SortOptions(field, fieldSort); -} - -public sealed partial class SortOptionsDescriptor : SerializableDescriptor> -{ - internal SortOptionsDescriptor(Action> configure) => configure.Invoke(this); - - public SortOptionsDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field AdditionalPropertyName { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldSort AdditionalPropertyValue { get; set; } - - private SortOptionsDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - AdditionalPropertyValue = null; - AdditionalPropertyName = null; - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SortOptionsDescriptor Set(object variant, string variantName) - { - AdditionalPropertyValue = null; - AdditionalPropertyName = null; - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private SortOptionsDescriptor Set(Action descriptorAction, Elastic.Clients.Elasticsearch.Serverless.Field variantName) where T : Descriptor - { - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - ContainedVariantName = null; - Variant = null; - AdditionalPropertyValue = null; - AdditionalPropertyName = variantName; - ContainsVariant = true; - return Self; - } - - private SortOptionsDescriptor Set(Elastic.Clients.Elasticsearch.Serverless.FieldSort variant, Elastic.Clients.Elasticsearch.Serverless.Field variantName) - { - ContainedVariantName = null; - Variant = null; - AdditionalPropertyValue = variant; - AdditionalPropertyName = variantName; - ContainsVariant = true; - return Self; - } - - public SortOptionsDescriptor Doc(ScoreSort scoreSort) => Set(scoreSort, "_doc"); - public SortOptionsDescriptor Doc(Action configure) => Set(configure, "_doc"); - public SortOptionsDescriptor GeoDistance(GeoDistanceSort geoDistanceSort) => Set(geoDistanceSort, "_geo_distance"); - public SortOptionsDescriptor GeoDistance(Action> configure) => Set(configure, "_geo_distance"); - public SortOptionsDescriptor Score(ScoreSort scoreSort) => Set(scoreSort, "_score"); - public SortOptionsDescriptor Score(Action configure) => Set(configure, "_score"); - public SortOptionsDescriptor Script(ScriptSort scriptSort) => Set(scriptSort, "_script"); - public SortOptionsDescriptor Script(Action> configure) => Set(configure, "_script"); - public SortOptionsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) => Set(FieldSort.Empty, field); - public SortOptionsDescriptor Field(Expression> field) => Set(FieldSort.Empty, field); - public SortOptionsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field, Elastic.Clients.Elasticsearch.Serverless.FieldSort sort) => Set(sort, field); - public SortOptionsDescriptor Field(Expression> field, Elastic.Clients.Elasticsearch.Serverless.FieldSort sort) => Set(sort, field); - public SortOptionsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field, Action> configure) => Set(configure, field); - public SortOptionsDescriptor Field(Expression> field, Action> configure) => Set(configure, field); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (!ContainsVariant) - { - writer.WriteNullValue(); - return; - } - - var fieldName = ContainedVariantName; - if (AdditionalPropertyName is IUrlParameter urlParameter) - { - fieldName = urlParameter.GetString(settings); - } - - if ((Variant is not null && Variant.Equals(FieldSort.Empty)) || (AdditionalPropertyValue is not null && AdditionalPropertyValue.Equals(FieldSort.Empty))) - { - writer.WriteStringValue(fieldName); - return; - } - - writer.WriteStartObject(); - writer.WritePropertyName(fieldName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - if (AdditionalPropertyValue is not null) - { - JsonSerializer.Serialize(writer, AdditionalPropertyValue, options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - writer.WriteEndObject(); - } -} - -public sealed partial class SortOptionsDescriptor : SerializableDescriptor -{ - internal SortOptionsDescriptor(Action configure) => configure.Invoke(this); - - public SortOptionsDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field AdditionalPropertyName { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.FieldSort AdditionalPropertyValue { get; set; } - - private SortOptionsDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - AdditionalPropertyValue = null; - AdditionalPropertyName = null; - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SortOptionsDescriptor Set(object variant, string variantName) - { - AdditionalPropertyValue = null; - AdditionalPropertyName = null; - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - private SortOptionsDescriptor Set(Action descriptorAction, Elastic.Clients.Elasticsearch.Serverless.Field variantName) where T : Descriptor - { - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - ContainedVariantName = null; - Variant = null; - AdditionalPropertyValue = null; - AdditionalPropertyName = variantName; - ContainsVariant = true; - return Self; - } - - private SortOptionsDescriptor Set(Elastic.Clients.Elasticsearch.Serverless.FieldSort variant, Elastic.Clients.Elasticsearch.Serverless.Field variantName) - { - ContainedVariantName = null; - Variant = null; - AdditionalPropertyValue = variant; - AdditionalPropertyName = variantName; - ContainsVariant = true; - return Self; - } - - public SortOptionsDescriptor Doc(ScoreSort scoreSort) => Set(scoreSort, "_doc"); - public SortOptionsDescriptor Doc(Action configure) => Set(configure, "_doc"); - public SortOptionsDescriptor GeoDistance(GeoDistanceSort geoDistanceSort) => Set(geoDistanceSort, "_geo_distance"); - public SortOptionsDescriptor GeoDistance(Action configure) => Set(configure, "_geo_distance"); - public SortOptionsDescriptor GeoDistance(Action> configure) => Set(configure, "_geo_distance"); - public SortOptionsDescriptor Score(ScoreSort scoreSort) => Set(scoreSort, "_score"); - public SortOptionsDescriptor Score(Action configure) => Set(configure, "_score"); - public SortOptionsDescriptor Script(ScriptSort scriptSort) => Set(scriptSort, "_script"); - public SortOptionsDescriptor Script(Action configure) => Set(configure, "_script"); - public SortOptionsDescriptor Script(Action> configure) => Set(configure, "_script"); - public SortOptionsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) => Set(FieldSort.Empty, field); - public SortOptionsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field, Elastic.Clients.Elasticsearch.Serverless.FieldSort sort) => Set(sort, field); - public SortOptionsDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field, Action configure) => Set(configure, field); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (!ContainsVariant) - { - writer.WriteNullValue(); - return; - } - - var fieldName = ContainedVariantName; - if (AdditionalPropertyName is IUrlParameter urlParameter) - { - fieldName = urlParameter.GetString(settings); - } - - if ((Variant is not null && Variant.Equals(FieldSort.Empty)) || (AdditionalPropertyValue is not null && AdditionalPropertyValue.Equals(FieldSort.Empty))) - { - writer.WriteStringValue(fieldName); - return; - } - - writer.WriteStartObject(); - writer.WritePropertyName(fieldName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - if (AdditionalPropertyValue is not null) - { - JsonSerializer.Serialize(writer, AdditionalPropertyValue, options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SpecUtils/OverloadOf.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SpecUtils/OverloadOf.g.cs deleted file mode 100644 index 42c76c698cf..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/SpecUtils/OverloadOf.g.cs +++ /dev/null @@ -1,39 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.SpecUtils; - -/// -/// -/// A class that implements OverloadOf should have the exact same properties with the same types. -/// It can change if a property is required or not. There is no need to port the descriptions -/// and js doc tags, the compiler will do that for you. -/// -/// -public sealed partial class OverloadOf -{ -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Sql/Column.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Sql/Column.g.cs deleted file mode 100644 index 89f4e40f009..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Sql/Column.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; - -public sealed partial class Column -{ - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StandardRetriever.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StandardRetriever.g.cs deleted file mode 100644 index 82e67fa2a28..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StandardRetriever.g.cs +++ /dev/null @@ -1,719 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class StandardRetriever -{ - /// - /// - /// Collapses the top documents by a specified key into a single top document per key. - /// - /// - [JsonInclude, JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public float? MinScore { get; set; } - - /// - /// - /// Defines a query to retrieve a set of top documents. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Defines a search after object parameter used for pagination. - /// - /// - [JsonInclude, JsonPropertyName("search_after")] - public ICollection? SearchAfter { get; set; } - - /// - /// - /// A sort object that that specifies the order of matching documents. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))] - public ICollection? Sort { get; set; } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// - /// - [JsonInclude, JsonPropertyName("terminate_after")] - public int? TerminateAfter { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(StandardRetriever standardRetriever) => Elastic.Clients.Elasticsearch.Serverless.Retriever.Standard(standardRetriever); -} - -public sealed partial class StandardRetrieverDescriptor : SerializableDescriptor> -{ - internal StandardRetrieverDescriptor(Action> configure) => configure.Invoke(this); - - public StandardRetrieverDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private float? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } - private int? TerminateAfterValue { get; set; } - - /// - /// - /// Collapses the top documents by a specified key into a single top document per key. - /// - /// - public StandardRetrieverDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public StandardRetrieverDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Collapse(Action> configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public StandardRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public StandardRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public StandardRetrieverDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public StandardRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Defines a query to retrieve a set of top documents. - /// - /// - public StandardRetrieverDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public StandardRetrieverDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a search after object parameter used for pagination. - /// - /// - public StandardRetrieverDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// A sort object that that specifies the order of matching documents. - /// - /// - public StandardRetrieverDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public StandardRetrieverDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public StandardRetrieverDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// - /// - public StandardRetrieverDescriptor TerminateAfter(int? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class StandardRetrieverDescriptor : SerializableDescriptor -{ - internal StandardRetrieverDescriptor(Action configure) => configure.Invoke(this); - - public StandardRetrieverDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? CollapseValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private float? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private ICollection? SearchAfterValue { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } - private int? TerminateAfterValue { get; set; } - - /// - /// - /// Collapses the top documents by a specified key into a single top document per key. - /// - /// - public StandardRetrieverDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? collapse) - { - CollapseDescriptor = null; - CollapseDescriptorAction = null; - CollapseValue = collapse; - return Self; - } - - public StandardRetrieverDescriptor Collapse(Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor descriptor) - { - CollapseValue = null; - CollapseDescriptorAction = null; - CollapseDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Collapse(Action configure) - { - CollapseValue = null; - CollapseDescriptor = null; - CollapseDescriptorAction = configure; - return Self; - } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public StandardRetrieverDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public StandardRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public StandardRetrieverDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public StandardRetrieverDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// Defines a query to retrieve a set of top documents. - /// - /// - public StandardRetrieverDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public StandardRetrieverDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Defines a search after object parameter used for pagination. - /// - /// - public StandardRetrieverDescriptor SearchAfter(ICollection? searchAfter) - { - SearchAfterValue = searchAfter; - return Self; - } - - /// - /// - /// A sort object that that specifies the order of matching documents. - /// - /// - public StandardRetrieverDescriptor Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public StandardRetrieverDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public StandardRetrieverDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public StandardRetrieverDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - - /// - /// - /// Maximum number of documents to collect for each shard. - /// - /// - public StandardRetrieverDescriptor TerminateAfter(int? terminateAfter) - { - TerminateAfterValue = terminateAfter; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CollapseDescriptor is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseDescriptor, options); - } - else if (CollapseDescriptorAction is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); - } - else if (CollapseValue is not null) - { - writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, CollapseValue, options); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (SearchAfterValue is not null) - { - writer.WritePropertyName("search_after"); - JsonSerializer.Serialize(writer, SearchAfterValue, options); - } - - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - - if (TerminateAfterValue.HasValue) - { - writer.WritePropertyName("terminate_after"); - writer.WriteNumberValue(TerminateAfterValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoreStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoreStats.g.cs deleted file mode 100644 index a83eb985d4b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoreStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class StoreStats -{ - /// - /// - /// A prediction of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities. - /// - /// - [JsonInclude, JsonPropertyName("reserved")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Reserved { get; init; } - - /// - /// - /// A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities. - /// - /// - [JsonInclude, JsonPropertyName("reserved_in_bytes")] - public long ReservedInBytes { get; init; } - - /// - /// - /// Total size of all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Size { get; init; } - - /// - /// - /// Total size, in bytes, of all shards assigned to selected nodes. - /// - /// - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } - - /// - /// - /// Total data set size of all shards assigned to selected nodes. - /// This includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices. - /// - /// - [JsonInclude, JsonPropertyName("total_data_set_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TotalDataSetSize { get; init; } - - /// - /// - /// Total data set size, in bytes, of all shards assigned to selected nodes. - /// This includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices. - /// - /// - [JsonInclude, JsonPropertyName("total_data_set_size_in_bytes")] - public long? TotalDataSetSizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoredScript.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoredScript.g.cs deleted file mode 100644 index 9b8e806088e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/StoredScript.g.cs +++ /dev/null @@ -1,106 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class StoredScript -{ - /// - /// - /// Specifies the language the script is written in. - /// - /// - [JsonInclude, JsonPropertyName("lang")] - public Elastic.Clients.Elasticsearch.Serverless.ScriptLanguage Language { get; set; } - [JsonInclude, JsonPropertyName("options")] - public IDictionary? Options { get; set; } - - /// - /// - /// The script source. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public string Source { get; set; } -} - -public sealed partial class StoredScriptDescriptor : SerializableDescriptor -{ - internal StoredScriptDescriptor(Action configure) => configure.Invoke(this); - - public StoredScriptDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.ScriptLanguage LanguageValue { get; set; } - private IDictionary? OptionsValue { get; set; } - private string SourceValue { get; set; } - - /// - /// - /// Specifies the language the script is written in. - /// - /// - public StoredScriptDescriptor Language(Elastic.Clients.Elasticsearch.Serverless.ScriptLanguage language) - { - LanguageValue = language; - return Self; - } - - public StoredScriptDescriptor Options(Func, FluentDictionary> selector) - { - OptionsValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// - /// The script source. - /// - /// - public StoredScriptDescriptor Source(string source) - { - SourceValue = source; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("lang"); - JsonSerializer.Serialize(writer, LanguageValue, options); - if (OptionsValue is not null) - { - writer.WritePropertyName("options"); - JsonSerializer.Serialize(writer, OptionsValue, options); - } - - writer.WritePropertyName("source"); - writer.WriteStringValue(SourceValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRule.g.cs deleted file mode 100644 index 309df1f48e1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRule.g.cs +++ /dev/null @@ -1,95 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class SynonymRule -{ - /// - /// - /// Synonym Rule identifier - /// - /// - [JsonInclude, JsonPropertyName("id")] - public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get; set; } - - /// - /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 - /// - /// - [JsonInclude, JsonPropertyName("synonyms")] - public string Synonyms { get; set; } -} - -public sealed partial class SynonymRuleDescriptor : SerializableDescriptor -{ - internal SynonymRuleDescriptor(Action configure) => configure.Invoke(this); - - public SynonymRuleDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Id? IdValue { get; set; } - private string SynonymsValue { get; set; } - - /// - /// - /// Synonym Rule identifier - /// - /// - public SynonymRuleDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) - { - IdValue = id; - return Self; - } - - /// - /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 - /// - /// - public SynonymRuleDescriptor Synonyms(string synonyms) - { - SynonymsValue = synonyms; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IdValue is not null) - { - writer.WritePropertyName("id"); - JsonSerializer.Serialize(writer, IdValue, options); - } - - writer.WritePropertyName("synonyms"); - writer.WriteStringValue(SynonymsValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRuleRead.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRuleRead.g.cs deleted file mode 100644 index 6dcd59c66f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymRuleRead.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class SynonymRuleRead -{ - /// - /// - /// Synonym Rule identifier - /// - /// - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - - /// - /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 - /// - /// - [JsonInclude, JsonPropertyName("synonyms")] - public string Synonyms { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymsSetItem.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymsSetItem.g.cs deleted file mode 100644 index 08e2ab2ee00..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Synonyms/SynonymsSetItem.g.cs +++ /dev/null @@ -1,47 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Synonyms; - -public sealed partial class SynonymsSetItem -{ - /// - /// - /// Number of synonym rules that the synonym set contains - /// - /// - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - - /// - /// - /// Synonyms set identifier - /// - /// - [JsonInclude, JsonPropertyName("synonyms_set")] - public string SynonymsSet { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TaskFailure.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TaskFailure.g.cs deleted file mode 100644 index 5ca1c93d417..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TaskFailure.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TaskFailure -{ - [JsonInclude, JsonPropertyName("node_id")] - public string NodeId { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public Elastic.Clients.Elasticsearch.Serverless.ErrorCause Reason { get; init; } - [JsonInclude, JsonPropertyName("status")] - public string Status { get; init; } - [JsonInclude, JsonPropertyName("task_id")] - public long TaskId { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/NodeTasks.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/NodeTasks.g.cs deleted file mode 100644 index cc5ab990522..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/NodeTasks.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Tasks; - -public sealed partial class NodeTasks -{ - [JsonInclude, JsonPropertyName("attributes")] - public IReadOnlyDictionary? Attributes { get; init; } - [JsonInclude, JsonPropertyName("host")] - public string? Host { get; init; } - [JsonInclude, JsonPropertyName("ip")] - public string? Ip { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public IReadOnlyCollection? Roles { get; init; } - [JsonInclude, JsonPropertyName("tasks")] - public IReadOnlyDictionary Tasks { get; init; } - [JsonInclude, JsonPropertyName("transport_address")] - public string? TransportAddress { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/ParentTaskInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/ParentTaskInfo.g.cs deleted file mode 100644 index 43a33d43cd5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/ParentTaskInfo.g.cs +++ /dev/null @@ -1,78 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Tasks; - -public sealed partial class ParentTaskInfo -{ - [JsonInclude, JsonPropertyName("action")] - public string Action { get; init; } - [JsonInclude, JsonPropertyName("cancellable")] - public bool Cancellable { get; init; } - [JsonInclude, JsonPropertyName("cancelled")] - public bool? Cancelled { get; init; } - [JsonInclude, JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } - - /// - /// - /// Human readable text that identifies the particular request that the task is performing. - /// For example, it might identify the search request being performed by a search task. - /// Other kinds of tasks have different descriptions, like _reindex which has the source and the destination, or _bulk which just has the number of requests and the destination indices. - /// Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("headers")] - public IReadOnlyDictionary Headers { get; init; } - [JsonInclude, JsonPropertyName("id")] - public long Id { get; init; } - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } - [JsonInclude, JsonPropertyName("parent_task_id")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? ParentTaskId { get; init; } - [JsonInclude, JsonPropertyName("running_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? RunningTime { get; init; } - [JsonInclude, JsonPropertyName("running_time_in_nanos")] - public long RunningTimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } - - /// - /// - /// The internal status of the task, which varies from task to task. - /// The format also varies. - /// While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. - /// Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases. - /// - /// - [JsonInclude, JsonPropertyName("status")] - public object? Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfo.g.cs deleted file mode 100644 index 0180c47de17..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfo.g.cs +++ /dev/null @@ -1,76 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Tasks; - -public sealed partial class TaskInfo -{ - [JsonInclude, JsonPropertyName("action")] - public string Action { get; init; } - [JsonInclude, JsonPropertyName("cancellable")] - public bool Cancellable { get; init; } - [JsonInclude, JsonPropertyName("cancelled")] - public bool? Cancelled { get; init; } - - /// - /// - /// Human readable text that identifies the particular request that the task is performing. - /// For example, it might identify the search request being performed by a search task. - /// Other kinds of tasks have different descriptions, like _reindex which has the source and the destination, or _bulk which just has the number of requests and the destination indices. - /// Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("headers")] - public IReadOnlyDictionary Headers { get; init; } - [JsonInclude, JsonPropertyName("id")] - public long Id { get; init; } - [JsonInclude, JsonPropertyName("node")] - public string Node { get; init; } - [JsonInclude, JsonPropertyName("parent_task_id")] - public Elastic.Clients.Elasticsearch.Serverless.TaskId? ParentTaskId { get; init; } - [JsonInclude, JsonPropertyName("running_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? RunningTime { get; init; } - [JsonInclude, JsonPropertyName("running_time_in_nanos")] - public long RunningTimeInNanos { get; init; } - [JsonInclude, JsonPropertyName("start_time_in_millis")] - public long StartTimeInMillis { get; init; } - - /// - /// - /// The internal status of the task, which varies from task to task. - /// The format also varies. - /// While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. - /// Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases. - /// - /// - [JsonInclude, JsonPropertyName("status")] - public object? Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfos.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfos.g.cs deleted file mode 100644 index 5e951907a42..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Tasks/TaskInfos.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Core; -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Tasks; - -public sealed partial class TaskInfos : Union, IReadOnlyDictionary> -{ - public TaskInfos(IReadOnlyCollection Flat) : base(Flat) - { - } - - public TaskInfos(IReadOnlyDictionary Grouped) : base(Grouped) - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextEmbedding.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextEmbedding.g.cs deleted file mode 100644 index e98b1858db7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextEmbedding.g.cs +++ /dev/null @@ -1,72 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TextEmbedding -{ - [JsonInclude, JsonPropertyName("model_id")] - public string ModelId { get; set; } - [JsonInclude, JsonPropertyName("model_text")] - public string ModelText { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder(TextEmbedding textEmbedding) => Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder.TextEmbedding(textEmbedding); -} - -public sealed partial class TextEmbeddingDescriptor : SerializableDescriptor -{ - internal TextEmbeddingDescriptor(Action configure) => configure.Invoke(this); - - public TextEmbeddingDescriptor() : base() - { - } - - private string ModelIdValue { get; set; } - private string ModelTextValue { get; set; } - - public TextEmbeddingDescriptor ModelId(string modelId) - { - ModelIdValue = modelId; - return Self; - } - - public TextEmbeddingDescriptor ModelText(string modelText) - { - ModelTextValue = modelText; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("model_id"); - writer.WriteStringValue(ModelIdValue); - writer.WritePropertyName("model_text"); - writer.WriteStringValue(ModelTextValue); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs deleted file mode 100644 index c3ac989c0e2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs +++ /dev/null @@ -1,546 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TextSimilarityReranker -{ - /// - /// - /// The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text - /// - /// - [JsonInclude, JsonPropertyName("field")] - public string? Field { get; set; } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - [JsonInclude, JsonPropertyName("filter")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] - public ICollection? Filter { get; set; } - - /// - /// - /// Unique identifier of the inference endpoint created using the inference API. - /// - /// - [JsonInclude, JsonPropertyName("inference_id")] - public string? InferenceId { get; set; } - - /// - /// - /// The text snippet used as the basis for similarity comparison - /// - /// - [JsonInclude, JsonPropertyName("inference_text")] - public string? InferenceText { get; set; } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - [JsonInclude, JsonPropertyName("min_score")] - public float? MinScore { get; set; } - - /// - /// - /// This value determines how many documents we will consider from the nested retriever. - /// - /// - [JsonInclude, JsonPropertyName("rank_window_size")] - public int? RankWindowSize { get; set; } - - /// - /// - /// The nested retriever which will produce the first-level results, that will later be used for reranking. - /// - /// - [JsonInclude, JsonPropertyName("retriever")] - public Elastic.Clients.Elasticsearch.Serverless.Retriever Retriever { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(TextSimilarityReranker textSimilarityReranker) => Elastic.Clients.Elasticsearch.Serverless.Retriever.TextSimilarityReranker(textSimilarityReranker); -} - -public sealed partial class TextSimilarityRerankerDescriptor : SerializableDescriptor> -{ - internal TextSimilarityRerankerDescriptor(Action> configure) => configure.Invoke(this); - - public TextSimilarityRerankerDescriptor() : base() - { - } - - private string? FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action> FilterDescriptorAction { get; set; } - private Action>[] FilterDescriptorActions { get; set; } - private string? InferenceIdValue { get; set; } - private string? InferenceTextValue { get; set; } - private float? MinScoreValue { get; set; } - private int? RankWindowSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } - private Action> RetrieverDescriptorAction { get; set; } - - /// - /// - /// The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text - /// - /// - public TextSimilarityRerankerDescriptor Field(string? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public TextSimilarityRerankerDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public TextSimilarityRerankerDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public TextSimilarityRerankerDescriptor Filter(Action> configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public TextSimilarityRerankerDescriptor Filter(params Action>[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Unique identifier of the inference endpoint created using the inference API. - /// - /// - public TextSimilarityRerankerDescriptor InferenceId(string? inferenceId) - { - InferenceIdValue = inferenceId; - return Self; - } - - /// - /// - /// The text snippet used as the basis for similarity comparison - /// - /// - public TextSimilarityRerankerDescriptor InferenceText(string? inferenceText) - { - InferenceTextValue = inferenceText; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public TextSimilarityRerankerDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// This value determines how many documents we will consider from the nested retriever. - /// - /// - public TextSimilarityRerankerDescriptor RankWindowSize(int? rankWindowSize) - { - RankWindowSizeValue = rankWindowSize; - return Self; - } - - /// - /// - /// The nested retriever which will produce the first-level results, that will later be used for reranking. - /// - /// - public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) - { - RetrieverDescriptor = null; - RetrieverDescriptorAction = null; - RetrieverValue = retriever; - return Self; - } - - public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieverValue = null; - RetrieverDescriptorAction = null; - RetrieverDescriptor = descriptor; - return Self; - } - - public TextSimilarityRerankerDescriptor Retriever(Action> configure) - { - RetrieverValue = null; - RetrieverDescriptor = null; - RetrieverDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FieldValue)) - { - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (!string.IsNullOrEmpty(InferenceIdValue)) - { - writer.WritePropertyName("inference_id"); - writer.WriteStringValue(InferenceIdValue); - } - - if (!string.IsNullOrEmpty(InferenceTextValue)) - { - writer.WritePropertyName("inference_text"); - writer.WriteStringValue(InferenceTextValue); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (RankWindowSizeValue.HasValue) - { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); - } - - if (RetrieverDescriptor is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverDescriptor, options); - } - else if (RetrieverDescriptorAction is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); - } - else - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class TextSimilarityRerankerDescriptor : SerializableDescriptor -{ - internal TextSimilarityRerankerDescriptor(Action configure) => configure.Invoke(this); - - public TextSimilarityRerankerDescriptor() : base() - { - } - - private string? FieldValue { get; set; } - private ICollection? FilterValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } - private Action FilterDescriptorAction { get; set; } - private Action[] FilterDescriptorActions { get; set; } - private string? InferenceIdValue { get; set; } - private string? InferenceTextValue { get; set; } - private float? MinScoreValue { get; set; } - private int? RankWindowSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } - private Action RetrieverDescriptorAction { get; set; } - - /// - /// - /// The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text - /// - /// - public TextSimilarityRerankerDescriptor Field(string? field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Query to filter the documents that can match. - /// - /// - public TextSimilarityRerankerDescriptor Filter(ICollection? filter) - { - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterValue = filter; - return Self; - } - - public TextSimilarityRerankerDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - FilterValue = null; - FilterDescriptorAction = null; - FilterDescriptorActions = null; - FilterDescriptor = descriptor; - return Self; - } - - public TextSimilarityRerankerDescriptor Filter(Action configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorActions = null; - FilterDescriptorAction = configure; - return Self; - } - - public TextSimilarityRerankerDescriptor Filter(params Action[] configure) - { - FilterValue = null; - FilterDescriptor = null; - FilterDescriptorAction = null; - FilterDescriptorActions = configure; - return Self; - } - - /// - /// - /// Unique identifier of the inference endpoint created using the inference API. - /// - /// - public TextSimilarityRerankerDescriptor InferenceId(string? inferenceId) - { - InferenceIdValue = inferenceId; - return Self; - } - - /// - /// - /// The text snippet used as the basis for similarity comparison - /// - /// - public TextSimilarityRerankerDescriptor InferenceText(string? inferenceText) - { - InferenceTextValue = inferenceText; - return Self; - } - - /// - /// - /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. - /// - /// - public TextSimilarityRerankerDescriptor MinScore(float? minScore) - { - MinScoreValue = minScore; - return Self; - } - - /// - /// - /// This value determines how many documents we will consider from the nested retriever. - /// - /// - public TextSimilarityRerankerDescriptor RankWindowSize(int? rankWindowSize) - { - RankWindowSizeValue = rankWindowSize; - return Self; - } - - /// - /// - /// The nested retriever which will produce the first-level results, that will later be used for reranking. - /// - /// - public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) - { - RetrieverDescriptor = null; - RetrieverDescriptorAction = null; - RetrieverValue = retriever; - return Self; - } - - public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) - { - RetrieverValue = null; - RetrieverDescriptorAction = null; - RetrieverDescriptor = descriptor; - return Self; - } - - public TextSimilarityRerankerDescriptor Retriever(Action configure) - { - RetrieverValue = null; - RetrieverDescriptor = null; - RetrieverDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(FieldValue)) - { - writer.WritePropertyName("field"); - writer.WriteStringValue(FieldValue); - } - - if (FilterDescriptor is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, FilterDescriptor, options); - } - else if (FilterDescriptorAction is not null) - { - writer.WritePropertyName("filter"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); - } - else if (FilterDescriptorActions is not null) - { - writer.WritePropertyName("filter"); - if (FilterDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in FilterDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); - } - - if (FilterDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (FilterValue is not null) - { - writer.WritePropertyName("filter"); - SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); - } - - if (!string.IsNullOrEmpty(InferenceIdValue)) - { - writer.WritePropertyName("inference_id"); - writer.WriteStringValue(InferenceIdValue); - } - - if (!string.IsNullOrEmpty(InferenceTextValue)) - { - writer.WritePropertyName("inference_text"); - writer.WriteStringValue(InferenceTextValue); - } - - if (MinScoreValue.HasValue) - { - writer.WritePropertyName("min_score"); - writer.WriteNumberValue(MinScoreValue.Value); - } - - if (RankWindowSizeValue.HasValue) - { - writer.WritePropertyName("rank_window_size"); - writer.WriteNumberValue(RankWindowSizeValue.Value); - } - - if (RetrieverDescriptor is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverDescriptor, options); - } - else if (RetrieverDescriptorAction is not null) - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); - } - else - { - writer.WritePropertyName("retriever"); - JsonSerializer.Serialize(writer, RetrieverValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedField.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedField.g.cs deleted file mode 100644 index e00168eadf6..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedField.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TextStructure; - -public sealed partial class MatchedField -{ - [JsonInclude, JsonPropertyName("length")] - public int Length { get; init; } - [JsonInclude, JsonPropertyName("match")] - public string Match { get; init; } - [JsonInclude, JsonPropertyName("offset")] - public int Offset { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedText.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedText.g.cs deleted file mode 100644 index 1a552192c91..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextStructure/MatchedText.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TextStructure; - -public sealed partial class MatchedText -{ - [JsonInclude, JsonPropertyName("fields")] - public IReadOnlyDictionary>? Fields { get; init; } - [JsonInclude, JsonPropertyName("matched")] - public bool Matched { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs deleted file mode 100644 index 802fede7de5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs +++ /dev/null @@ -1,70 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TopLeftBottomRightGeoBounds -{ - [JsonInclude, JsonPropertyName("bottom_right")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation BottomRight { get; set; } - [JsonInclude, JsonPropertyName("top_left")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation TopLeft { get; set; } -} - -public sealed partial class TopLeftBottomRightGeoBoundsDescriptor : SerializableDescriptor -{ - internal TopLeftBottomRightGeoBoundsDescriptor(Action configure) => configure.Invoke(this); - - public TopLeftBottomRightGeoBoundsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation BottomRightValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation TopLeftValue { get; set; } - - public TopLeftBottomRightGeoBoundsDescriptor BottomRight(Elastic.Clients.Elasticsearch.Serverless.GeoLocation bottomRight) - { - BottomRightValue = bottomRight; - return Self; - } - - public TopLeftBottomRightGeoBoundsDescriptor TopLeft(Elastic.Clients.Elasticsearch.Serverless.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.Serverless/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs deleted file mode 100644 index b36239edcfb..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs +++ /dev/null @@ -1,70 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TopRightBottomLeftGeoBounds -{ - [JsonInclude, JsonPropertyName("bottom_left")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation BottomLeft { get; set; } - [JsonInclude, JsonPropertyName("top_right")] - public Elastic.Clients.Elasticsearch.Serverless.GeoLocation TopRight { get; set; } -} - -public sealed partial class TopRightBottomLeftGeoBoundsDescriptor : SerializableDescriptor -{ - internal TopRightBottomLeftGeoBoundsDescriptor(Action configure) => configure.Invoke(this); - - public TopRightBottomLeftGeoBoundsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation BottomLeftValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.GeoLocation TopRightValue { get; set; } - - public TopRightBottomLeftGeoBoundsDescriptor BottomLeft(Elastic.Clients.Elasticsearch.Serverless.GeoLocation bottomLeft) - { - BottomLeftValue = bottomLeft; - return Self; - } - - public TopRightBottomLeftGeoBoundsDescriptor TopRight(Elastic.Clients.Elasticsearch.Serverless.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.Serverless/_Generated/Types/TransformManagement/CheckpointStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/CheckpointStats.g.cs deleted file mode 100644 index a01385c2f71..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/CheckpointStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class CheckpointStats -{ - [JsonInclude, JsonPropertyName("checkpoint")] - public long Checkpoint { get; init; } - [JsonInclude, JsonPropertyName("checkpoint_progress")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TransformProgress? CheckpointProgress { get; init; } - [JsonInclude, JsonPropertyName("timestamp")] - public DateTimeOffset? Timestamp { get; init; } - [JsonInclude, JsonPropertyName("timestamp_millis")] - public long? TimestampMillis { get; init; } - [JsonInclude, JsonPropertyName("time_upper_bound")] - public DateTimeOffset? TimeUpperBound { get; init; } - [JsonInclude, JsonPropertyName("time_upper_bound_millis")] - public long? TimeUpperBoundMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Checkpointing.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Checkpointing.g.cs deleted file mode 100644 index fa1925fb923..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Checkpointing.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class Checkpointing -{ - [JsonInclude, JsonPropertyName("changes_last_detected_at")] - public long? ChangesLastDetectedAt { get; init; } - [JsonInclude, JsonPropertyName("changes_last_detected_at_date_time")] - public DateTimeOffset? ChangesLastDetectedAtDateTime { get; init; } - [JsonInclude, JsonPropertyName("last")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.CheckpointStats Last { get; init; } - [JsonInclude, JsonPropertyName("last_search_time")] - public long? LastSearchTime { get; init; } - [JsonInclude, JsonPropertyName("next")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.CheckpointStats? Next { get; init; } - [JsonInclude, JsonPropertyName("operations_behind")] - public long? OperationsBehind { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Destination.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Destination.g.cs deleted file mode 100644 index 7b122eafbfa..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Destination.g.cs +++ /dev/null @@ -1,103 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class Destination -{ - /// - /// - /// The destination index for the transform. The mappings of the destination index are deduced based on the source - /// fields when possible. If alternate mappings are required, use the create index API prior to starting the - /// transform. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } - - /// - /// - /// The unique identifier for an ingest pipeline. - /// - /// - [JsonInclude, JsonPropertyName("pipeline")] - public string? Pipeline { get; set; } -} - -public sealed partial class DestinationDescriptor : SerializableDescriptor -{ - internal DestinationDescriptor(Action configure) => configure.Invoke(this); - - public DestinationDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.IndexName? IndexValue { get; set; } - private string? PipelineValue { get; set; } - - /// - /// - /// The destination index for the transform. The mappings of the destination index are deduced based on the source - /// fields when possible. If alternate mappings are required, use the create index API prior to starting the - /// transform. - /// - /// - public DestinationDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) - { - IndexValue = index; - return Self; - } - - /// - /// - /// The unique identifier for an ingest pipeline. - /// - /// - public DestinationDescriptor Pipeline(string? pipeline) - { - PipelineValue = pipeline; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (IndexValue is not null) - { - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndexValue, options); - } - - if (!string.IsNullOrEmpty(PipelineValue)) - { - writer.WritePropertyName("pipeline"); - writer.WriteStringValue(PipelineValue); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Latest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Latest.g.cs deleted file mode 100644 index 246e68681c4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Latest.g.cs +++ /dev/null @@ -1,180 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class Latest -{ - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - [JsonInclude, JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.Serverless.Field Sort { get; set; } - - /// - /// - /// Specifies an array of one or more fields that are used to group the data. - /// - /// - [JsonInclude, JsonPropertyName("unique_key")] - [JsonConverter(typeof(FieldsConverter))] - public Elastic.Clients.Elasticsearch.Serverless.Fields UniqueKey { get; set; } -} - -public sealed partial class LatestDescriptor : SerializableDescriptor> -{ - internal LatestDescriptor(Action> configure) => configure.Invoke(this); - - public LatestDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields UniqueKeyValue { get; set; } - - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - public LatestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - public LatestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - public LatestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Specifies an array of one or more fields that are used to group the data. - /// - /// - public LatestDescriptor UniqueKey(Elastic.Clients.Elasticsearch.Serverless.Fields uniqueKey) - { - UniqueKeyValue = uniqueKey; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - writer.WritePropertyName("unique_key"); - JsonSerializer.Serialize(writer, UniqueKeyValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class LatestDescriptor : SerializableDescriptor -{ - internal LatestDescriptor(Action configure) => configure.Invoke(this); - - public LatestDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field SortValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Fields UniqueKeyValue { get; set; } - - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - public LatestDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.Field sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - public LatestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Specifies the date field that is used to identify the latest documents. - /// - /// - public LatestDescriptor Sort(Expression> sort) - { - SortValue = sort; - return Self; - } - - /// - /// - /// Specifies an array of one or more fields that are used to group the data. - /// - /// - public LatestDescriptor UniqueKey(Elastic.Clients.Elasticsearch.Serverless.Fields uniqueKey) - { - UniqueKeyValue = uniqueKey; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortValue, options); - writer.WritePropertyName("unique_key"); - JsonSerializer.Serialize(writer, UniqueKeyValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Pivot.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Pivot.g.cs deleted file mode 100644 index b688a16548d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Pivot.g.cs +++ /dev/null @@ -1,210 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -internal sealed partial class PivotConverter : JsonConverter -{ - public override Pivot Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException("Unexpected JSON detected."); - var variant = new Pivot(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - var property = reader.GetString(); - if (property == "aggregations" || property == "aggs") - { - variant.Aggregations = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - - if (property == "group_by") - { - variant.GroupBy = JsonSerializer.Deserialize?>(ref reader, options); - continue; - } - } - } - - return variant; - } - - public override void Write(Utf8JsonWriter writer, Pivot value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.Aggregations is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, value.Aggregations, options); - } - - if (value.GroupBy is not null) - { - writer.WritePropertyName("group_by"); - JsonSerializer.Serialize(writer, value.GroupBy, options); - } - - writer.WriteEndObject(); - } -} - -[JsonConverter(typeof(PivotConverter))] -public sealed partial class Pivot -{ - /// - /// - /// Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket - /// script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, - /// min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted - /// average. - /// - /// - public IDictionary? Aggregations { get; set; } - - /// - /// - /// Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are - /// currently supported: date histogram, geotile grid, histogram, terms. - /// - /// - public IDictionary? GroupBy { get; set; } -} - -public sealed partial class PivotDescriptor : SerializableDescriptor> -{ - internal PivotDescriptor(Action> configure) => configure.Invoke(this); - - public PivotDescriptor() : base() - { - } - - private IDictionary> AggregationsValue { get; set; } - private IDictionary> GroupByValue { get; set; } - - /// - /// - /// Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket - /// script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, - /// min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted - /// average. - /// - /// - public PivotDescriptor Aggregations(Func>, FluentDescriptorDictionary>> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - /// - /// - /// Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are - /// currently supported: date histogram, geotile grid, histogram, terms. - /// - /// - public PivotDescriptor GroupBy(Func>, FluentDescriptorDictionary>> selector) - { - GroupByValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (GroupByValue is not null) - { - writer.WritePropertyName("group_by"); - JsonSerializer.Serialize(writer, GroupByValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PivotDescriptor : SerializableDescriptor -{ - internal PivotDescriptor(Action configure) => configure.Invoke(this); - - public PivotDescriptor() : base() - { - } - - private IDictionary AggregationsValue { get; set; } - private IDictionary GroupByValue { get; set; } - - /// - /// - /// Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket - /// script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, - /// min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted - /// average. - /// - /// - public PivotDescriptor Aggregations(Func, FluentDescriptorDictionary> selector) - { - AggregationsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - /// - /// - /// Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are - /// currently supported: date histogram, geotile grid, histogram, terms. - /// - /// - public PivotDescriptor GroupBy(Func, FluentDescriptorDictionary> selector) - { - GroupByValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AggregationsValue is not null) - { - writer.WritePropertyName("aggregations"); - JsonSerializer.Serialize(writer, AggregationsValue, options); - } - - if (GroupByValue is not null) - { - writer.WritePropertyName("group_by"); - JsonSerializer.Serialize(writer, GroupByValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/PivotGroupBy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/PivotGroupBy.g.cs deleted file mode 100644 index 18ae3954bf8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/PivotGroupBy.g.cs +++ /dev/null @@ -1,272 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -[JsonConverter(typeof(PivotGroupByConverter))] -public sealed partial class PivotGroupBy -{ - internal PivotGroupBy(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 PivotGroupBy DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation dateHistogramAggregation) => new PivotGroupBy("date_histogram", dateHistogramAggregation); - public static PivotGroupBy GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation geotileGridAggregation) => new PivotGroupBy("geotile_grid", geotileGridAggregation); - public static PivotGroupBy Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation histogramAggregation) => new PivotGroupBy("histogram", histogramAggregation); - public static PivotGroupBy Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => new PivotGroupBy("terms", termsAggregation); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class PivotGroupByConverter : JsonConverter -{ - public override PivotGroupBy 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; - 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 == "date_histogram") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "geotile_grid") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "histogram") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "terms") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'PivotGroupBy' from the response."); - } - - var result = new PivotGroupBy(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, PivotGroupBy value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "date_histogram": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation)value.Variant, options); - break; - case "geotile_grid": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation)value.Variant, options); - break; - case "histogram": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation)value.Variant, options); - break; - case "terms": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PivotGroupByDescriptor : SerializableDescriptor> -{ - internal PivotGroupByDescriptor(Action> configure) => configure.Invoke(this); - - public PivotGroupByDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private PivotGroupByDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private PivotGroupByDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public PivotGroupByDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation dateHistogramAggregation) => Set(dateHistogramAggregation, "date_histogram"); - public PivotGroupByDescriptor DateHistogram(Action> configure) => Set(configure, "date_histogram"); - public PivotGroupByDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation geotileGridAggregation) => Set(geotileGridAggregation, "geotile_grid"); - public PivotGroupByDescriptor GeotileGrid(Action> configure) => Set(configure, "geotile_grid"); - public PivotGroupByDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation histogramAggregation) => Set(histogramAggregation, "histogram"); - public PivotGroupByDescriptor Histogram(Action> configure) => Set(configure, "histogram"); - public PivotGroupByDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); - public PivotGroupByDescriptor Terms(Action> configure) => Set(configure, "terms"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class PivotGroupByDescriptor : SerializableDescriptor -{ - internal PivotGroupByDescriptor(Action configure) => configure.Invoke(this); - - public PivotGroupByDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private PivotGroupByDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private PivotGroupByDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public PivotGroupByDescriptor DateHistogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateHistogramAggregation dateHistogramAggregation) => Set(dateHistogramAggregation, "date_histogram"); - public PivotGroupByDescriptor DateHistogram(Action configure) => Set(configure, "date_histogram"); - public PivotGroupByDescriptor GeotileGrid(Elastic.Clients.Elasticsearch.Serverless.Aggregations.GeotileGridAggregation geotileGridAggregation) => Set(geotileGridAggregation, "geotile_grid"); - public PivotGroupByDescriptor GeotileGrid(Action configure) => Set(configure, "geotile_grid"); - public PivotGroupByDescriptor Histogram(Elastic.Clients.Elasticsearch.Serverless.Aggregations.HistogramAggregation histogramAggregation) => Set(histogramAggregation, "histogram"); - public PivotGroupByDescriptor Histogram(Action configure) => Set(configure, "histogram"); - public PivotGroupByDescriptor Terms(Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregation termsAggregation) => Set(termsAggregation, "terms"); - public PivotGroupByDescriptor Terms(Action configure) => Set(configure, "terms"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/RetentionPolicy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/RetentionPolicy.g.cs deleted file mode 100644 index 9839e946239..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/RetentionPolicy.g.cs +++ /dev/null @@ -1,227 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -[JsonConverter(typeof(RetentionPolicyConverter))] -public sealed partial class RetentionPolicy -{ - internal RetentionPolicy(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 RetentionPolicy Time(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeRetentionPolicy retentionPolicy) => new RetentionPolicy("time", retentionPolicy); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class RetentionPolicyConverter : JsonConverter -{ - public override RetentionPolicy 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; - 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 == "time") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'RetentionPolicy' from the response."); - } - - var result = new RetentionPolicy(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, RetentionPolicy value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "time": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeRetentionPolicy)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RetentionPolicyDescriptor : SerializableDescriptor> -{ - internal RetentionPolicyDescriptor(Action> configure) => configure.Invoke(this); - - public RetentionPolicyDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RetentionPolicyDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RetentionPolicyDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RetentionPolicyDescriptor Time(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeRetentionPolicy retentionPolicy) => Set(retentionPolicy, "time"); - public RetentionPolicyDescriptor Time(Action> configure) => Set(configure, "time"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class RetentionPolicyDescriptor : SerializableDescriptor -{ - internal RetentionPolicyDescriptor(Action configure) => configure.Invoke(this); - - public RetentionPolicyDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private RetentionPolicyDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private RetentionPolicyDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public RetentionPolicyDescriptor Time(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeRetentionPolicy retentionPolicy) => Set(retentionPolicy, "time"); - public RetentionPolicyDescriptor Time(Action configure) => Set(configure, "time"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Settings.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Settings.g.cs deleted file mode 100644 index 236495082d1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Settings.g.cs +++ /dev/null @@ -1,231 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -/// -/// -/// The source of the data for the transform. -/// -/// -public sealed partial class Settings -{ - /// - /// - /// Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align - /// checkpoint ranges with the date histogram interval when date histogram is specified as a group source in the - /// transform config. As a result, less document updates in the destination index will be performed thus improving - /// overall performance. - /// - /// - [JsonInclude, JsonPropertyName("align_checkpoints")] - public bool? AlignCheckpoints { get; set; } - - /// - /// - /// Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was - /// the default for transforms created before version 7.11. For compatible output set this value to true. - /// - /// - [JsonInclude, JsonPropertyName("dates_as_epoch_millis")] - public bool? DatesAsEpochMillis { get; set; } - - /// - /// - /// Specifies whether the transform should deduce the destination index mappings from the transform configuration. - /// - /// - [JsonInclude, JsonPropertyName("deduce_mappings")] - public bool? DeduceMappings { get; set; } - - /// - /// - /// Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a - /// wait time between search requests. The default value is null, which disables throttling. - /// - /// - [JsonInclude, JsonPropertyName("docs_per_second")] - public float? DocsPerSecond { get; set; } - - /// - /// - /// Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker - /// exceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is 10 and the - /// maximum is 65,536. - /// - /// - [JsonInclude, JsonPropertyName("max_page_search_size")] - public int? MaxPageSearchSize { get; set; } - - /// - /// - /// If true, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case - /// of an error which means the transform never fails. Setting the number of retries other than infinite fails in - /// validation. - /// - /// - [JsonInclude, JsonPropertyName("unattended")] - public bool? Unattended { get; set; } -} - -/// -/// -/// The source of the data for the transform. -/// -/// -public sealed partial class SettingsDescriptor : SerializableDescriptor -{ - internal SettingsDescriptor(Action configure) => configure.Invoke(this); - - public SettingsDescriptor() : base() - { - } - - private bool? AlignCheckpointsValue { get; set; } - private bool? DatesAsEpochMillisValue { get; set; } - private bool? DeduceMappingsValue { get; set; } - private float? DocsPerSecondValue { get; set; } - private int? MaxPageSearchSizeValue { get; set; } - private bool? UnattendedValue { get; set; } - - /// - /// - /// Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align - /// checkpoint ranges with the date histogram interval when date histogram is specified as a group source in the - /// transform config. As a result, less document updates in the destination index will be performed thus improving - /// overall performance. - /// - /// - public SettingsDescriptor AlignCheckpoints(bool? alignCheckpoints = true) - { - AlignCheckpointsValue = alignCheckpoints; - return Self; - } - - /// - /// - /// Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was - /// the default for transforms created before version 7.11. For compatible output set this value to true. - /// - /// - public SettingsDescriptor DatesAsEpochMillis(bool? datesAsEpochMillis = true) - { - DatesAsEpochMillisValue = datesAsEpochMillis; - return Self; - } - - /// - /// - /// Specifies whether the transform should deduce the destination index mappings from the transform configuration. - /// - /// - public SettingsDescriptor DeduceMappings(bool? deduceMappings = true) - { - DeduceMappingsValue = deduceMappings; - return Self; - } - - /// - /// - /// Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a - /// wait time between search requests. The default value is null, which disables throttling. - /// - /// - public SettingsDescriptor DocsPerSecond(float? docsPerSecond) - { - DocsPerSecondValue = docsPerSecond; - return Self; - } - - /// - /// - /// Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker - /// exceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is 10 and the - /// maximum is 65,536. - /// - /// - public SettingsDescriptor MaxPageSearchSize(int? maxPageSearchSize) - { - MaxPageSearchSizeValue = maxPageSearchSize; - return Self; - } - - /// - /// - /// If true, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case - /// of an error which means the transform never fails. Setting the number of retries other than infinite fails in - /// validation. - /// - /// - public SettingsDescriptor Unattended(bool? unattended = true) - { - UnattendedValue = unattended; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AlignCheckpointsValue.HasValue) - { - writer.WritePropertyName("align_checkpoints"); - writer.WriteBooleanValue(AlignCheckpointsValue.Value); - } - - if (DatesAsEpochMillisValue.HasValue) - { - writer.WritePropertyName("dates_as_epoch_millis"); - writer.WriteBooleanValue(DatesAsEpochMillisValue.Value); - } - - if (DeduceMappingsValue.HasValue) - { - writer.WritePropertyName("deduce_mappings"); - writer.WriteBooleanValue(DeduceMappingsValue.Value); - } - - if (DocsPerSecondValue.HasValue) - { - writer.WritePropertyName("docs_per_second"); - writer.WriteNumberValue(DocsPerSecondValue.Value); - } - - if (MaxPageSearchSizeValue.HasValue) - { - writer.WritePropertyName("max_page_search_size"); - writer.WriteNumberValue(MaxPageSearchSizeValue.Value); - } - - if (UnattendedValue.HasValue) - { - writer.WritePropertyName("unattended"); - writer.WriteBooleanValue(UnattendedValue.Value); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Source.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Source.g.cs deleted file mode 100644 index 334c94a87c4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Source.g.cs +++ /dev/null @@ -1,259 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class Source -{ - /// - /// - /// The source indices for the transform. It can be a single index, an index pattern (for example, "my-index-*""), an - /// array of indices (for example, ["my-index-000001", "my-index-000002"]), or an array of index patterns (for - /// example, ["my-index-*", "my-other-index-*"]. For remote indices use the syntax "remote_name:index_name". If - /// any indices are in remote clusters then the master node and at least one transform node must have the remote_cluster_client node role. - /// - /// - [JsonInclude, JsonPropertyName("index")] - public Elastic.Clients.Elasticsearch.Serverless.Indices Indices { get; set; } - - /// - /// - /// A query clause that retrieves a subset of data from the source index. - /// - /// - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; } - - /// - /// - /// Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data - /// nodes, including remote nodes, must be 7.12 or later. - /// - /// - [JsonInclude, JsonPropertyName("runtime_mappings")] - public IDictionary? RuntimeMappings { get; set; } -} - -public sealed partial class SourceDescriptor : SerializableDescriptor> -{ - internal SourceDescriptor(Action> configure) => configure.Invoke(this); - - public SourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private IDictionary> RuntimeMappingsValue { get; set; } - - /// - /// - /// The source indices for the transform. It can be a single index, an index pattern (for example, "my-index-*""), an - /// array of indices (for example, ["my-index-000001", "my-index-000002"]), or an array of index patterns (for - /// example, ["my-index-*", "my-other-index-*"]. For remote indices use the syntax "remote_name:index_name". If - /// any indices are in remote clusters then the master node and at least one transform node must have the remote_cluster_client node role. - /// - /// - public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// A query clause that retrieves a subset of data from the source index. - /// - /// - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data - /// nodes, including remote nodes, must be 7.12 or later. - /// - /// - public SourceDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SourceDescriptor : SerializableDescriptor -{ - internal SourceDescriptor(Action configure) => configure.Invoke(this); - - public SourceDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Indices IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private IDictionary RuntimeMappingsValue { get; set; } - - /// - /// - /// The source indices for the transform. It can be a single index, an index pattern (for example, "my-index-*""), an - /// array of indices (for example, ["my-index-000001", "my-index-000002"]), or an array of index patterns (for - /// example, ["my-index-*", "my-other-index-*"]. For remote indices use the syntax "remote_name:index_name". If - /// any indices are in remote clusters then the master node and at least one transform node must have the remote_cluster_client node role. - /// - /// - public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// A query clause that retrieves a subset of data from the source index. - /// - /// - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? query) - { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; - return Self; - } - - public SourceDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) - { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } - - /// - /// - /// Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data - /// nodes, including remote nodes, must be 7.12 or later. - /// - /// - public SourceDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) - { - RuntimeMappingsValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("index"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(QueryDescriptorAction), options); - } - else if (QueryValue is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - - if (RuntimeMappingsValue is not null) - { - writer.WritePropertyName("runtime_mappings"); - JsonSerializer.Serialize(writer, RuntimeMappingsValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Sync.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Sync.g.cs deleted file mode 100644 index c55ee411781..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/Sync.g.cs +++ /dev/null @@ -1,227 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -[JsonConverter(typeof(SyncConverter))] -public sealed partial class Sync -{ - internal Sync(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 Sync Time(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeSync timeSync) => new Sync("time", timeSync); - - public bool TryGet([NotNullWhen(true)] out T? result) where T : class - { - result = default; - if (Variant is T variant) - { - result = variant; - return true; - } - - return false; - } -} - -internal sealed partial class SyncConverter : JsonConverter -{ - public override Sync 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; - 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 == "time") - { - variantValue = JsonSerializer.Deserialize(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Sync' from the response."); - } - - var result = new Sync(variantNameValue, variantValue); - return result; - } - - public override void Write(Utf8JsonWriter writer, Sync value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (value.VariantName is not null && value.Variant is not null) - { - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "time": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeSync)value.Variant, options); - break; - } - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SyncDescriptor : SerializableDescriptor> -{ - internal SyncDescriptor(Action> configure) => configure.Invoke(this); - - public SyncDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SyncDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SyncDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public SyncDescriptor Time(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeSync timeSync) => Set(timeSync, "time"); - public SyncDescriptor Time(Action> configure) => Set(configure, "time"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class SyncDescriptor : SerializableDescriptor -{ - internal SyncDescriptor(Action configure) => configure.Invoke(this); - - public SyncDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - private string ContainedVariantName { get; set; } - private object Variant { get; set; } - private Descriptor Descriptor { get; set; } - - private SyncDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor - { - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - return Self; - } - - private SyncDescriptor Set(object variant, string variantName) - { - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - return Self; - } - - public SyncDescriptor Time(Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TimeSync timeSync) => Set(timeSync, "time"); - public SyncDescriptor Time(Action configure) => Set(configure, "time"); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(ContainedVariantName)) - { - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - writer.WriteEndObject(); - return; - } - - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeRetentionPolicy.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeRetentionPolicy.g.cs deleted file mode 100644 index 830dd573c4e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeRetentionPolicy.g.cs +++ /dev/null @@ -1,184 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TimeRetentionPolicy -{ - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - /// - /// - /// Specifies the maximum age of a document in the destination index. Documents that are older than the configured - /// value are removed from the destination index. - /// - /// - [JsonInclude, JsonPropertyName("max_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration MaxAge { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy(TimeRetentionPolicy timeRetentionPolicy) => Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy.Time(timeRetentionPolicy); -} - -public sealed partial class TimeRetentionPolicyDescriptor : SerializableDescriptor> -{ - internal TimeRetentionPolicyDescriptor(Action> configure) => configure.Invoke(this); - - public TimeRetentionPolicyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration MaxAgeValue { get; set; } - - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - public TimeRetentionPolicyDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - public TimeRetentionPolicyDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - public TimeRetentionPolicyDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specifies the maximum age of a document in the destination index. Documents that are older than the configured - /// value are removed from the destination index. - /// - /// - public TimeRetentionPolicyDescriptor MaxAge(Elastic.Clients.Elasticsearch.Serverless.Duration maxAge) - { - MaxAgeValue = maxAge; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("max_age"); - JsonSerializer.Serialize(writer, MaxAgeValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class TimeRetentionPolicyDescriptor : SerializableDescriptor -{ - internal TimeRetentionPolicyDescriptor(Action configure) => configure.Invoke(this); - - public TimeRetentionPolicyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration MaxAgeValue { get; set; } - - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - public TimeRetentionPolicyDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - public TimeRetentionPolicyDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to calculate the age of the document. - /// - /// - public TimeRetentionPolicyDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// Specifies the maximum age of a document in the destination index. Documents that are older than the configured - /// value are removed from the destination index. - /// - /// - public TimeRetentionPolicyDescriptor MaxAge(Elastic.Clients.Elasticsearch.Serverless.Duration maxAge) - { - MaxAgeValue = maxAge; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WritePropertyName("max_age"); - JsonSerializer.Serialize(writer, MaxAgeValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeSync.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeSync.g.cs deleted file mode 100644 index 95938096402..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TimeSync.g.cs +++ /dev/null @@ -1,203 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TimeSync -{ - /// - /// - /// The time delay between the current time and the latest input data time. - /// - /// - [JsonInclude, JsonPropertyName("delay")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Delay { get; set; } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - [JsonInclude, JsonPropertyName("field")] - public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync(TimeSync timeSync) => Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync.Time(timeSync); -} - -public sealed partial class TimeSyncDescriptor : SerializableDescriptor> -{ - internal TimeSyncDescriptor(Action> configure) => configure.Invoke(this); - - public TimeSyncDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? DelayValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// The time delay between the current time and the latest input data time. - /// - /// - public TimeSyncDescriptor Delay(Elastic.Clients.Elasticsearch.Serverless.Duration? delay) - { - DelayValue = delay; - return Self; - } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - public TimeSyncDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - public TimeSyncDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - public TimeSyncDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DelayValue is not null) - { - writer.WritePropertyName("delay"); - JsonSerializer.Serialize(writer, DelayValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} - -public sealed partial class TimeSyncDescriptor : SerializableDescriptor -{ - internal TimeSyncDescriptor(Action configure) => configure.Invoke(this); - - public TimeSyncDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? DelayValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - - /// - /// - /// The time delay between the current time and the latest input data time. - /// - /// - public TimeSyncDescriptor Delay(Elastic.Clients.Elasticsearch.Serverless.Duration? delay) - { - DelayValue = delay; - return Self; - } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - public TimeSyncDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - public TimeSyncDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - /// - /// - /// The date field that is used to identify new documents in the source. In general, it’s a good idea to use a field - /// that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it - /// accounts for data transmission delays. - /// - /// - public TimeSyncDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DelayValue is not null) - { - writer.WritePropertyName("delay"); - JsonSerializer.Serialize(writer, DelayValue, options); - } - - writer.WritePropertyName("field"); - JsonSerializer.Serialize(writer, FieldValue, options); - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs deleted file mode 100644 index 5598a12e818..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs +++ /dev/null @@ -1,66 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TransformIndexerStats -{ - [JsonInclude, JsonPropertyName("delete_time_in_ms")] - public long? DeleteTimeInMs { get; init; } - [JsonInclude, JsonPropertyName("documents_deleted")] - public long? DocumentsDeleted { get; init; } - [JsonInclude, JsonPropertyName("documents_indexed")] - public long DocumentsIndexed { get; init; } - [JsonInclude, JsonPropertyName("documents_processed")] - public long DocumentsProcessed { get; init; } - [JsonInclude, JsonPropertyName("exponential_avg_checkpoint_duration_ms")] - public double ExponentialAvgCheckpointDurationMs { get; init; } - [JsonInclude, JsonPropertyName("exponential_avg_documents_indexed")] - public double ExponentialAvgDocumentsIndexed { get; init; } - [JsonInclude, JsonPropertyName("exponential_avg_documents_processed")] - public double ExponentialAvgDocumentsProcessed { get; init; } - [JsonInclude, JsonPropertyName("index_failures")] - public long IndexFailures { get; init; } - [JsonInclude, JsonPropertyName("index_time_in_ms")] - public long IndexTimeInMs { get; init; } - [JsonInclude, JsonPropertyName("index_total")] - public long IndexTotal { get; init; } - [JsonInclude, JsonPropertyName("pages_processed")] - public long PagesProcessed { get; init; } - [JsonInclude, JsonPropertyName("processing_time_in_ms")] - public long ProcessingTimeInMs { get; init; } - [JsonInclude, JsonPropertyName("processing_total")] - public long ProcessingTotal { get; init; } - [JsonInclude, JsonPropertyName("search_failures")] - public long SearchFailures { get; init; } - [JsonInclude, JsonPropertyName("search_time_in_ms")] - public long SearchTimeInMs { get; init; } - [JsonInclude, JsonPropertyName("search_total")] - public long SearchTotal { get; init; } - [JsonInclude, JsonPropertyName("trigger_count")] - public long TriggerCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformProgress.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformProgress.g.cs deleted file mode 100644 index f66f3ef24da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformProgress.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TransformProgress -{ - [JsonInclude, JsonPropertyName("docs_indexed")] - public long DocsIndexed { get; init; } - [JsonInclude, JsonPropertyName("docs_processed")] - public long DocsProcessed { get; init; } - [JsonInclude, JsonPropertyName("docs_remaining")] - public long? DocsRemaining { get; init; } - [JsonInclude, JsonPropertyName("percent_complete")] - public double? PercentComplete { get; init; } - [JsonInclude, JsonPropertyName("total_docs")] - public long? TotalDocs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStats.g.cs deleted file mode 100644 index 9ef4feeee09..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStats.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TransformStats -{ - [JsonInclude, JsonPropertyName("checkpointing")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Checkpointing Checkpointing { get; init; } - [JsonInclude, JsonPropertyName("health")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TransformStatsHealth? Health { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("reason")] - public string? Reason { get; init; } - [JsonInclude, JsonPropertyName("state")] - public string State { get; init; } - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.TransformIndexerStats Stats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStatsHealth.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStatsHealth.g.cs deleted file mode 100644 index 0f9e040603e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformStatsHealth.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TransformStatsHealth -{ - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.HealthStatus Status { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformSummary.g.cs deleted file mode 100644 index 2b16dd6e585..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TransformManagement/TransformSummary.g.cs +++ /dev/null @@ -1,113 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.TransformManagement; - -public sealed partial class TransformSummary -{ - /// - /// - /// The security privileges that the transform uses to run its queries. If Elastic Stack security features were disabled at the time of the most recent update to the transform, this property is omitted. - /// - /// - [JsonInclude, JsonPropertyName("authorization")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.TransformAuthorization? Authorization { get; init; } - - /// - /// - /// The time the transform was created. - /// - /// - [JsonInclude, JsonPropertyName("create_time")] - public long? CreateTime { get; init; } - - /// - /// - /// Free text description of the transform. - /// - /// - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - - /// - /// - /// The destination for the transform. - /// - /// - [JsonInclude, JsonPropertyName("dest")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Reindex.Destination Dest { get; init; } - [JsonInclude, JsonPropertyName("frequency")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Frequency { get; init; } - [JsonInclude, JsonPropertyName("id")] - public string Id { get; init; } - [JsonInclude, JsonPropertyName("latest")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Latest? Latest { get; init; } - [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } - - /// - /// - /// The pivot method transforms the data by aggregating and grouping it. - /// - /// - [JsonInclude, JsonPropertyName("pivot")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Pivot? Pivot { get; init; } - [JsonInclude, JsonPropertyName("retention_policy")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.RetentionPolicy? RetentionPolicy { get; init; } - - /// - /// - /// Defines optional transform settings. - /// - /// - [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Settings? Settings { get; init; } - - /// - /// - /// The source of the data for the transform. - /// - /// - [JsonInclude, JsonPropertyName("source")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Source Source { get; init; } - - /// - /// - /// Defines the properties transforms require to run continuously. - /// - /// - [JsonInclude, JsonPropertyName("sync")] - public Elastic.Clients.Elasticsearch.Serverless.TransformManagement.Sync? Sync { get; init; } - - /// - /// - /// The version of Elasticsearch that existed on the node when the transform was created. - /// - /// - [JsonInclude, JsonPropertyName("version")] - public string? Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TranslogStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TranslogStats.g.cs deleted file mode 100644 index 93916b748cd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TranslogStats.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class TranslogStats -{ - [JsonInclude, JsonPropertyName("earliest_last_modified_age")] - public long EarliestLastModifiedAge { get; init; } - [JsonInclude, JsonPropertyName("operations")] - public long Operations { get; init; } - [JsonInclude, JsonPropertyName("size")] - public string? Size { get; init; } - [JsonInclude, JsonPropertyName("size_in_bytes")] - public long SizeInBytes { get; init; } - [JsonInclude, JsonPropertyName("uncommitted_operations")] - public int UncommittedOperations { get; init; } - [JsonInclude, JsonPropertyName("uncommitted_size")] - public string? UncommittedSize { get; init; } - [JsonInclude, JsonPropertyName("uncommitted_size_in_bytes")] - public long UncommittedSizeInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WarmerStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WarmerStats.g.cs deleted file mode 100644 index e928884a331..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WarmerStats.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class WarmerStats -{ - [JsonInclude, JsonPropertyName("current")] - public long Current { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } - [JsonInclude, JsonPropertyName("total_time")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? TotalTime { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_millis")] - public long TotalTimeInMillis { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WktGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WktGeoBounds.g.cs deleted file mode 100644 index 3c7d254b5e5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/WktGeoBounds.g.cs +++ /dev/null @@ -1,59 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless; - -public sealed partial class WktGeoBounds -{ - [JsonInclude, JsonPropertyName("wkt")] - public string Wkt { get; set; } -} - -public sealed partial class WktGeoBoundsDescriptor : SerializableDescriptor -{ - 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/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Analytics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Analytics.g.cs deleted file mode 100644 index e8ae431eabe..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Analytics.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Analytics -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("stats")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.AnalyticsStatistics Stats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/AnalyticsStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/AnalyticsStatistics.g.cs deleted file mode 100644 index e4b357a6fb3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/AnalyticsStatistics.g.cs +++ /dev/null @@ -1,50 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class AnalyticsStatistics -{ - [JsonInclude, JsonPropertyName("boxplot_usage")] - public long BoxplotUsage { get; init; } - [JsonInclude, JsonPropertyName("cumulative_cardinality_usage")] - public long CumulativeCardinalityUsage { get; init; } - [JsonInclude, JsonPropertyName("moving_percentiles_usage")] - public long MovingPercentilesUsage { get; init; } - [JsonInclude, JsonPropertyName("multi_terms_usage")] - public long? MultiTermsUsage { get; init; } - [JsonInclude, JsonPropertyName("normalize_usage")] - public long NormalizeUsage { get; init; } - [JsonInclude, JsonPropertyName("rate_usage")] - public long RateUsage { get; init; } - [JsonInclude, JsonPropertyName("string_stats_usage")] - public long StringStatsUsage { get; init; } - [JsonInclude, JsonPropertyName("top_metrics_usage")] - public long TopMetricsUsage { get; init; } - [JsonInclude, JsonPropertyName("t_test_usage")] - public long TTestUsage { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Archive.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Archive.g.cs deleted file mode 100644 index c546b7f76ac..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Archive.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Archive -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("indices_count")] - public long IndicesCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Audit.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Audit.g.cs deleted file mode 100644 index 8a83da0392d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Audit.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Audit -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("outputs")] - public IReadOnlyCollection? Outputs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Base.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Base.g.cs deleted file mode 100644 index 300d124aef9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Base.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Base -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/BuildInformation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/BuildInformation.g.cs deleted file mode 100644 index 3a0fe0808f2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/BuildInformation.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class BuildInformation -{ - [JsonInclude, JsonPropertyName("date")] - public DateTimeOffset Date { get; init; } - [JsonInclude, JsonPropertyName("hash")] - public string Hash { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ccr.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ccr.g.cs deleted file mode 100644 index a620f573c2e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ccr.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Ccr -{ - [JsonInclude, JsonPropertyName("auto_follow_patterns_count")] - public int AutoFollowPatternsCount { get; init; } - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("follower_indices_count")] - public int FollowerIndicesCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Counter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Counter.g.cs deleted file mode 100644 index 1039ec2e67c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Counter.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Counter -{ - [JsonInclude, JsonPropertyName("active")] - public long Active { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataStreams.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataStreams.g.cs deleted file mode 100644 index ab13e3404f9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataStreams.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class DataStreams -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("data_streams")] - public long DataStreams2 { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("indices_count")] - public long IndicesCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTierPhaseStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTierPhaseStatistics.g.cs deleted file mode 100644 index 925b688cdd4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTierPhaseStatistics.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class DataTierPhaseStatistics -{ - [JsonInclude, JsonPropertyName("doc_count")] - public long DocCount { get; init; } - [JsonInclude, JsonPropertyName("index_count")] - public long IndexCount { get; init; } - [JsonInclude, JsonPropertyName("node_count")] - public long NodeCount { get; init; } - [JsonInclude, JsonPropertyName("primary_shard_count")] - public long PrimaryShardCount { get; init; } - [JsonInclude, JsonPropertyName("primary_shard_size_avg_bytes")] - public long PrimaryShardSizeAvgBytes { get; init; } - [JsonInclude, JsonPropertyName("primary_shard_size_mad_bytes")] - public long PrimaryShardSizeMadBytes { get; init; } - [JsonInclude, JsonPropertyName("primary_shard_size_median_bytes")] - public long PrimaryShardSizeMedianBytes { get; init; } - [JsonInclude, JsonPropertyName("primary_size_bytes")] - public long PrimarySizeBytes { get; init; } - [JsonInclude, JsonPropertyName("total_shard_count")] - public long TotalShardCount { get; init; } - [JsonInclude, JsonPropertyName("total_size_bytes")] - public long TotalSizeBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTiers.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTiers.g.cs deleted file mode 100644 index 5ab69df2f3f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/DataTiers.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class DataTiers -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("data_cold")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataTierPhaseStatistics DataCold { get; init; } - [JsonInclude, JsonPropertyName("data_content")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataTierPhaseStatistics DataContent { get; init; } - [JsonInclude, JsonPropertyName("data_frozen")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataTierPhaseStatistics? DataFrozen { get; init; } - [JsonInclude, JsonPropertyName("data_hot")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataTierPhaseStatistics DataHot { get; init; } - [JsonInclude, JsonPropertyName("data_warm")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.DataTierPhaseStatistics DataWarm { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Datafeed.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Datafeed.g.cs deleted file mode 100644 index daefcc8c031..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Datafeed.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Datafeed -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Eql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Eql.g.cs deleted file mode 100644 index 99115845263..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Eql.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Eql -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("features")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.EqlFeatures Features { get; init; } - [JsonInclude, JsonPropertyName("queries")] - public IReadOnlyDictionary Queries { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeatures.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeatures.g.cs deleted file mode 100644 index df7fb215a94..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeatures.g.cs +++ /dev/null @@ -1,46 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class EqlFeatures -{ - [JsonInclude, JsonPropertyName("event")] - public int Event { get; init; } - [JsonInclude, JsonPropertyName("join")] - public int Join { get; init; } - [JsonInclude, JsonPropertyName("joins")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.EqlFeaturesJoin Joins { get; init; } - [JsonInclude, JsonPropertyName("keys")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.EqlFeaturesKeys Keys { get; init; } - [JsonInclude, JsonPropertyName("pipes")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.EqlFeaturesPipes Pipes { get; init; } - [JsonInclude, JsonPropertyName("sequence")] - public int Sequence { get; init; } - [JsonInclude, JsonPropertyName("sequences")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.EqlFeaturesSequences Sequences { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesJoin.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesJoin.g.cs deleted file mode 100644 index f5c38fc1912..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesJoin.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class EqlFeaturesJoin -{ - [JsonInclude, JsonPropertyName("join_queries_five_or_more")] - public int JoinQueriesFiveOrMore { get; init; } - [JsonInclude, JsonPropertyName("join_queries_four")] - public int JoinQueriesFour { get; init; } - [JsonInclude, JsonPropertyName("join_queries_three")] - public int JoinQueriesThree { get; init; } - [JsonInclude, JsonPropertyName("join_queries_two")] - public int JoinQueriesTwo { get; init; } - [JsonInclude, JsonPropertyName("join_until")] - public int JoinUntil { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesKeys.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesKeys.g.cs deleted file mode 100644 index 0c07c70c350..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesKeys.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class EqlFeaturesKeys -{ - [JsonInclude, JsonPropertyName("join_keys_five_or_more")] - public int JoinKeysFiveOrMore { get; init; } - [JsonInclude, JsonPropertyName("join_keys_four")] - public int JoinKeysFour { get; init; } - [JsonInclude, JsonPropertyName("join_keys_one")] - public int JoinKeysOne { get; init; } - [JsonInclude, JsonPropertyName("join_keys_three")] - public int JoinKeysThree { get; init; } - [JsonInclude, JsonPropertyName("join_keys_two")] - public int JoinKeysTwo { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesPipes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesPipes.g.cs deleted file mode 100644 index 7854cf5e341..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesPipes.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class EqlFeaturesPipes -{ - [JsonInclude, JsonPropertyName("pipe_head")] - public int PipeHead { get; init; } - [JsonInclude, JsonPropertyName("pipe_tail")] - public int PipeTail { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesSequences.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesSequences.g.cs deleted file mode 100644 index 490ea023d6b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/EqlFeaturesSequences.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class EqlFeaturesSequences -{ - [JsonInclude, JsonPropertyName("sequence_maxspan")] - public int SequenceMaxspan { get; init; } - [JsonInclude, JsonPropertyName("sequence_queries_five_or_more")] - public int SequenceQueriesFiveOrMore { get; init; } - [JsonInclude, JsonPropertyName("sequence_queries_four")] - public int SequenceQueriesFour { get; init; } - [JsonInclude, JsonPropertyName("sequence_queries_three")] - public int SequenceQueriesThree { get; init; } - [JsonInclude, JsonPropertyName("sequence_queries_two")] - public int SequenceQueriesTwo { get; init; } - [JsonInclude, JsonPropertyName("sequence_until")] - public int SequenceUntil { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Feature.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Feature.g.cs deleted file mode 100644 index 61fe59b8353..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Feature.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Feature -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("description")] - public string? Description { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("native_code_info")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.NativeCodeInformation? NativeCodeInfo { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FeatureToggle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FeatureToggle.g.cs deleted file mode 100644 index 859c9a92856..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FeatureToggle.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class FeatureToggle -{ - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Features.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Features.g.cs deleted file mode 100644 index 9b76bc470f1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Features.g.cs +++ /dev/null @@ -1,80 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Features -{ - [JsonInclude, JsonPropertyName("aggregate_metric")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature AggregateMetric { get; init; } - [JsonInclude, JsonPropertyName("analytics")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Analytics { get; init; } - [JsonInclude, JsonPropertyName("ccr")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Ccr { get; init; } - [JsonInclude, JsonPropertyName("data_streams")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature DataStreams { get; init; } - [JsonInclude, JsonPropertyName("data_tiers")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature DataTiers { get; init; } - [JsonInclude, JsonPropertyName("enrich")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Enrich { get; init; } - [JsonInclude, JsonPropertyName("eql")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Eql { get; init; } - [JsonInclude, JsonPropertyName("frozen_indices")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature FrozenIndices { get; init; } - [JsonInclude, JsonPropertyName("graph")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Graph { get; init; } - [JsonInclude, JsonPropertyName("ilm")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Ilm { get; init; } - [JsonInclude, JsonPropertyName("logsdb")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Logsdb { get; init; } - [JsonInclude, JsonPropertyName("logstash")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Logstash { get; init; } - [JsonInclude, JsonPropertyName("ml")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Ml { get; init; } - [JsonInclude, JsonPropertyName("monitoring")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Monitoring { get; init; } - [JsonInclude, JsonPropertyName("rollup")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Rollup { get; init; } - [JsonInclude, JsonPropertyName("runtime_fields")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature? RuntimeFields { get; init; } - [JsonInclude, JsonPropertyName("searchable_snapshots")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature SearchableSnapshots { get; init; } - [JsonInclude, JsonPropertyName("security")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Security { get; init; } - [JsonInclude, JsonPropertyName("slm")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Slm { get; init; } - [JsonInclude, JsonPropertyName("spatial")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Spatial { get; init; } - [JsonInclude, JsonPropertyName("sql")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Sql { get; init; } - [JsonInclude, JsonPropertyName("transform")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Transform { get; init; } - [JsonInclude, JsonPropertyName("voting_only")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature VotingOnly { get; init; } - [JsonInclude, JsonPropertyName("watcher")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Feature Watcher { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Flattened.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Flattened.g.cs deleted file mode 100644 index cab37e171d4..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Flattened.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Flattened -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("field_count")] - public int FieldCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FrozenIndices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FrozenIndices.g.cs deleted file mode 100644 index e44ef006237..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/FrozenIndices.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class FrozenIndices -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("indices_count")] - public long IndicesCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/HealthStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/HealthStatistics.g.cs deleted file mode 100644 index 2f944f32b16..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/HealthStatistics.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class HealthStatistics -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("invocations")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Invocations Invocations { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ilm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ilm.g.cs deleted file mode 100644 index 4798e3b942d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ilm.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Ilm -{ - [JsonInclude, JsonPropertyName("policy_count")] - public int PolicyCount { get; init; } - [JsonInclude, JsonPropertyName("policy_stats")] - public IReadOnlyCollection PolicyStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs deleted file mode 100644 index cafdbb0915e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class IlmPolicyStatistics -{ - [JsonInclude, JsonPropertyName("indices_managed")] - public int IndicesManaged { get; init; } - [JsonInclude, JsonPropertyName("phases")] - public Elastic.Clients.Elasticsearch.Serverless.IndexLifecycleManagement.Phases Phases { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Invocations.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Invocations.g.cs deleted file mode 100644 index 7c9ef68c9b3..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Invocations.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Invocations -{ - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IpFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IpFilter.g.cs deleted file mode 100644 index 2ffbebba860..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/IpFilter.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class IpFilter -{ - [JsonInclude, JsonPropertyName("http")] - public bool Http { get; init; } - [JsonInclude, JsonPropertyName("transport")] - public bool Transport { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/JobUsage.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/JobUsage.g.cs deleted file mode 100644 index db5b13551ef..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/JobUsage.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class JobUsage -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("created_by")] - public IReadOnlyDictionary CreatedBy { get; init; } - [JsonInclude, JsonPropertyName("detectors")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics Detectors { get; init; } - [JsonInclude, JsonPropertyName("forecasts")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlJobForecasts Forecasts { get; init; } - [JsonInclude, JsonPropertyName("model_size")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics ModelSize { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MachineLearning.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MachineLearning.g.cs deleted file mode 100644 index bb355cf693c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MachineLearning.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MachineLearning -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("datafeeds")] - public IReadOnlyDictionary Datafeeds { get; init; } - [JsonInclude, JsonPropertyName("data_frame_analytics_jobs")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlDataFrameAnalyticsJobs DataFrameAnalyticsJobs { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("inference")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInference Inference { get; init; } - - /// - /// - /// Job usage statistics. The _all entry is always present and gathers statistics for all jobs. - /// - /// - [JsonInclude, JsonPropertyName("jobs")] - public IReadOnlyDictionary Jobs { get; init; } - [JsonInclude, JsonPropertyName("node_count")] - public int NodeCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MinimalLicenseInformation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MinimalLicenseInformation.g.cs deleted file mode 100644 index a502ed120da..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MinimalLicenseInformation.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MinimalLicenseInformation -{ - [JsonInclude, JsonPropertyName("expiry_date_in_millis")] - public long ExpiryDateInMillis { get; init; } - [JsonInclude, JsonPropertyName("mode")] - public Elastic.Clients.Elasticsearch.Serverless.LicenseManagement.LicenseType Mode { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Serverless.LicenseManagement.LicenseStatus Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Serverless.LicenseManagement.LicenseType Type { get; init; } - [JsonInclude, JsonPropertyName("uid")] - public string Uid { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlCounter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlCounter.g.cs deleted file mode 100644 index da55acf45e5..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlCounter.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlCounter -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobs.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobs.g.cs deleted file mode 100644 index ebef5e3011e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobs.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlDataFrameAnalyticsJobs -{ - [JsonInclude, JsonPropertyName("_all")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlDataFrameAnalyticsJobsCount All { get; init; } - [JsonInclude, JsonPropertyName("analysis_counts")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlDataFrameAnalyticsJobsAnalysis? AnalysisCounts { get; init; } - [JsonInclude, JsonPropertyName("memory_usage")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlDataFrameAnalyticsJobsMemory? MemoryUsage { get; init; } - [JsonInclude, JsonPropertyName("stopped")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlDataFrameAnalyticsJobsCount? Stopped { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs deleted file mode 100644 index afa9d637b0e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlDataFrameAnalyticsJobsAnalysis -{ - [JsonInclude, JsonPropertyName("classification")] - public int? Classification { get; init; } - [JsonInclude, JsonPropertyName("outlier_detection")] - public int? OutlierDetection { get; init; } - [JsonInclude, JsonPropertyName("regression")] - public int? Regression { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsCount.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsCount.g.cs deleted file mode 100644 index faf8f65809f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsCount.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlDataFrameAnalyticsJobsCount -{ - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsMemory.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsMemory.g.cs deleted file mode 100644 index a1b8243319b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsMemory.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlDataFrameAnalyticsJobsMemory -{ - [JsonInclude, JsonPropertyName("peak_usage_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics PeakUsageBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInference.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInference.g.cs deleted file mode 100644 index 4f2d5a6527e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInference.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInference -{ - [JsonInclude, JsonPropertyName("deployments")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceDeployments? Deployments { get; init; } - [JsonInclude, JsonPropertyName("ingest_processors")] - public IReadOnlyDictionary IngestProcessors { get; init; } - [JsonInclude, JsonPropertyName("trained_models")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceTrainedModels TrainedModels { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeployments.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeployments.g.cs deleted file mode 100644 index 7f0f17f580c..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeployments.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInferenceDeployments -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("inference_counts")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics InferenceCounts { get; init; } - [JsonInclude, JsonPropertyName("model_sizes_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics ModelSizesBytes { get; init; } - [JsonInclude, JsonPropertyName("time_ms")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceDeploymentsTimeMs TimeMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeploymentsTimeMs.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeploymentsTimeMs.g.cs deleted file mode 100644 index f7051c056c9..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceDeploymentsTimeMs.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInferenceDeploymentsTimeMs -{ - [JsonInclude, JsonPropertyName("avg")] - public double Avg { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessor.g.cs deleted file mode 100644 index c063c037e0b..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessor.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInferenceIngestProcessor -{ - [JsonInclude, JsonPropertyName("num_docs_processed")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceIngestProcessorCount NumDocsProcessed { get; init; } - [JsonInclude, JsonPropertyName("num_failures")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceIngestProcessorCount NumFailures { get; init; } - [JsonInclude, JsonPropertyName("pipelines")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlCounter Pipelines { get; init; } - [JsonInclude, JsonPropertyName("time_ms")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceIngestProcessorCount TimeMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessorCount.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessorCount.g.cs deleted file mode 100644 index b3de2f545ca..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceIngestProcessorCount.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInferenceIngestProcessorCount -{ - [JsonInclude, JsonPropertyName("max")] - public long Max { get; init; } - [JsonInclude, JsonPropertyName("min")] - public long Min { get; init; } - [JsonInclude, JsonPropertyName("sum")] - public long Sum { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModels.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModels.g.cs deleted file mode 100644 index fe319ef07af..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModels.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInferenceTrainedModels -{ - [JsonInclude, JsonPropertyName("_all")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlCounter All { get; init; } - [JsonInclude, JsonPropertyName("count")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.MlInferenceTrainedModelsCount? Count { get; init; } - [JsonInclude, JsonPropertyName("estimated_heap_memory_usage_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics? EstimatedHeapMemoryUsageBytes { get; init; } - [JsonInclude, JsonPropertyName("estimated_operations")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics? EstimatedOperations { get; init; } - [JsonInclude, JsonPropertyName("model_size_bytes")] - public Elastic.Clients.Elasticsearch.Serverless.MachineLearning.JobStatistics? ModelSizeBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs deleted file mode 100644 index ad74c6694f8..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs +++ /dev/null @@ -1,48 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlInferenceTrainedModelsCount -{ - [JsonInclude, JsonPropertyName("classification")] - public long? Classification { get; init; } - [JsonInclude, JsonPropertyName("ner")] - public long? Ner { get; init; } - [JsonInclude, JsonPropertyName("other")] - public long Other { get; init; } - [JsonInclude, JsonPropertyName("pass_through")] - public long? PassThrough { get; init; } - [JsonInclude, JsonPropertyName("prepackaged")] - public long Prepackaged { get; init; } - [JsonInclude, JsonPropertyName("regression")] - public long? Regression { get; init; } - [JsonInclude, JsonPropertyName("text_embedding")] - public long? TextEmbedding { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlJobForecasts.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlJobForecasts.g.cs deleted file mode 100644 index cc1d5719be0..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/MlJobForecasts.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class MlJobForecasts -{ - [JsonInclude, JsonPropertyName("forecasted_jobs")] - public long ForecastedJobs { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Monitoring.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Monitoring.g.cs deleted file mode 100644 index e205c28a569..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Monitoring.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Monitoring -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("collection_enabled")] - public bool CollectionEnabled { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("enabled_exporters")] - public IReadOnlyDictionary EnabledExporters { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/NativeCodeInformation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/NativeCodeInformation.g.cs deleted file mode 100644 index 6f08c7cd376..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/NativeCodeInformation.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class NativeCodeInformation -{ - [JsonInclude, JsonPropertyName("build_hash")] - public string BuildHash { get; init; } - [JsonInclude, JsonPropertyName("version")] - public string Version { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Realm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Realm.g.cs deleted file mode 100644 index 10f1b193815..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Realm.g.cs +++ /dev/null @@ -1,52 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Realm -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("cache")] - public IReadOnlyCollection? Cache { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("has_authorization_realms")] - public IReadOnlyCollection? HasAuthorizationRealms { get; init; } - [JsonInclude, JsonPropertyName("has_default_username_pattern")] - public IReadOnlyCollection? HasDefaultUsernamePattern { get; init; } - [JsonInclude, JsonPropertyName("has_truststore")] - public IReadOnlyCollection? HasTruststore { get; init; } - [JsonInclude, JsonPropertyName("is_authentication_delegated")] - public IReadOnlyCollection? IsAuthenticationDelegated { get; init; } - [JsonInclude, JsonPropertyName("name")] - public IReadOnlyCollection? Name { get; init; } - [JsonInclude, JsonPropertyName("order")] - public IReadOnlyCollection? Order { get; init; } - [JsonInclude, JsonPropertyName("size")] - public IReadOnlyCollection? Size { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RealmCache.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RealmCache.g.cs deleted file mode 100644 index 1acc373ee33..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RealmCache.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class RealmCache -{ - [JsonInclude, JsonPropertyName("size")] - public long Size { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RoleMapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RoleMapping.g.cs deleted file mode 100644 index 30715f8461e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RoleMapping.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class RoleMapping -{ - [JsonInclude, JsonPropertyName("enabled")] - public int Enabled { get; init; } - [JsonInclude, JsonPropertyName("size")] - public int Size { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldTypes.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldTypes.g.cs deleted file mode 100644 index 29d1c98ebe2..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldTypes.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class RuntimeFieldTypes -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("field_types")] - public IReadOnlyCollection FieldTypes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldsType.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldsType.g.cs deleted file mode 100644 index 979efc96503..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/RuntimeFieldsType.g.cs +++ /dev/null @@ -1,60 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class RuntimeFieldsType -{ - [JsonInclude, JsonPropertyName("chars_max")] - public long CharsMax { get; init; } - [JsonInclude, JsonPropertyName("chars_total")] - public long CharsTotal { get; init; } - [JsonInclude, JsonPropertyName("count")] - public long Count { get; init; } - [JsonInclude, JsonPropertyName("doc_max")] - public long DocMax { get; init; } - [JsonInclude, JsonPropertyName("doc_total")] - public long DocTotal { get; init; } - [JsonInclude, JsonPropertyName("index_count")] - public long IndexCount { get; init; } - [JsonInclude, JsonPropertyName("lang")] - public IReadOnlyCollection Lang { get; init; } - [JsonInclude, JsonPropertyName("lines_max")] - public long LinesMax { get; init; } - [JsonInclude, JsonPropertyName("lines_total")] - public long LinesTotal { get; init; } - [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } - [JsonInclude, JsonPropertyName("scriptless_count")] - public long ScriptlessCount { get; init; } - [JsonInclude, JsonPropertyName("shadowed_count")] - public long ShadowedCount { get; init; } - [JsonInclude, JsonPropertyName("source_max")] - public long SourceMax { get; init; } - [JsonInclude, JsonPropertyName("source_total")] - public long SourceTotal { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SearchableSnapshots.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SearchableSnapshots.g.cs deleted file mode 100644 index 2ce854bdd8a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SearchableSnapshots.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class SearchableSnapshots -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("full_copy_indices_count")] - public int? FullCopyIndicesCount { get; init; } - [JsonInclude, JsonPropertyName("indices_count")] - public int IndicesCount { get; init; } - [JsonInclude, JsonPropertyName("shared_cache_indices_count")] - public int? SharedCacheIndicesCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Security.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Security.g.cs deleted file mode 100644 index f987fa4f3cd..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Security.g.cs +++ /dev/null @@ -1,60 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Security -{ - [JsonInclude, JsonPropertyName("anonymous")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle Anonymous { get; init; } - [JsonInclude, JsonPropertyName("api_key_service")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle ApiKeyService { get; init; } - [JsonInclude, JsonPropertyName("audit")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Audit Audit { get; init; } - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("fips_140")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle Fips140 { get; init; } - [JsonInclude, JsonPropertyName("ipfilter")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.IpFilter Ipfilter { get; init; } - [JsonInclude, JsonPropertyName("operator_privileges")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Base OperatorPrivileges { get; init; } - [JsonInclude, JsonPropertyName("realms")] - public IReadOnlyDictionary Realms { get; init; } - [JsonInclude, JsonPropertyName("role_mapping")] - public IReadOnlyDictionary RoleMapping { get; init; } - [JsonInclude, JsonPropertyName("roles")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.SecurityRoles Roles { get; init; } - [JsonInclude, JsonPropertyName("ssl")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Ssl Ssl { get; init; } - [JsonInclude, JsonPropertyName("system_key")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle? SystemKey { get; init; } - [JsonInclude, JsonPropertyName("token_service")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle TokenService { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRoles.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRoles.g.cs deleted file mode 100644 index 9f74bbedff7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRoles.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class SecurityRoles -{ - [JsonInclude, JsonPropertyName("dls")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.SecurityRolesDls Dls { get; init; } - [JsonInclude, JsonPropertyName("file")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.SecurityRolesFile File { get; init; } - [JsonInclude, JsonPropertyName("native")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.SecurityRolesNative Native { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDls.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDls.g.cs deleted file mode 100644 index e6de2cb08d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDls.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class SecurityRolesDls -{ - [JsonInclude, JsonPropertyName("bit_set_cache")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.SecurityRolesDlsBitSetCache BitSetCache { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDlsBitSetCache.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDlsBitSetCache.g.cs deleted file mode 100644 index 92e8dbdd33e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesDlsBitSetCache.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class SecurityRolesDlsBitSetCache -{ - [JsonInclude, JsonPropertyName("count")] - public int Count { get; init; } - [JsonInclude, JsonPropertyName("memory")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Memory { get; init; } - [JsonInclude, JsonPropertyName("memory_in_bytes")] - public long MemoryInBytes { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesFile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesFile.g.cs deleted file mode 100644 index 626eb3dc92d..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesFile.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class SecurityRolesFile -{ - [JsonInclude, JsonPropertyName("dls")] - public bool Dls { get; init; } - [JsonInclude, JsonPropertyName("fls")] - public bool Fls { get; init; } - [JsonInclude, JsonPropertyName("size")] - public long Size { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesNative.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesNative.g.cs deleted file mode 100644 index 5b94639eb10..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/SecurityRolesNative.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class SecurityRolesNative -{ - [JsonInclude, JsonPropertyName("dls")] - public bool Dls { get; init; } - [JsonInclude, JsonPropertyName("fls")] - public bool Fls { get; init; } - [JsonInclude, JsonPropertyName("size")] - public long Size { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Slm.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Slm.g.cs deleted file mode 100644 index e27ee18bb9f..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Slm.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Slm -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("policy_count")] - public int? PolicyCount { get; init; } - [JsonInclude, JsonPropertyName("policy_stats")] - public Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement.Statistics? PolicyStats { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Sql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Sql.g.cs deleted file mode 100644 index 8811ad78e0a..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Sql.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Sql -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("features")] - public IReadOnlyDictionary Features { get; init; } - [JsonInclude, JsonPropertyName("queries")] - public IReadOnlyDictionary Queries { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ssl.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ssl.g.cs deleted file mode 100644 index 2fe1cb85582..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Ssl.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Ssl -{ - [JsonInclude, JsonPropertyName("http")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle Http { get; init; } - [JsonInclude, JsonPropertyName("transport")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.FeatureToggle Transport { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Vector.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Vector.g.cs deleted file mode 100644 index a69bbe0ee39..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Vector.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Vector -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("dense_vector_dims_avg_count")] - public int DenseVectorDimsAvgCount { get; init; } - [JsonInclude, JsonPropertyName("dense_vector_fields_count")] - public int DenseVectorFieldsCount { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("sparse_vector_fields_count")] - public int? SparseVectorFieldsCount { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Watcher.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Watcher.g.cs deleted file mode 100644 index dc49f61282e..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/Watcher.g.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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class Watcher -{ - [JsonInclude, JsonPropertyName("available")] - public bool Available { get; init; } - [JsonInclude, JsonPropertyName("count")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Counter Count { get; init; } - [JsonInclude, JsonPropertyName("enabled")] - public bool Enabled { get; init; } - [JsonInclude, JsonPropertyName("execution")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.WatcherActions Execution { get; init; } - [JsonInclude, JsonPropertyName("watch")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.WatcherWatch Watch { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActionTotals.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActionTotals.g.cs deleted file mode 100644 index ac37c4573d7..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActionTotals.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class WatcherActionTotals -{ - [JsonInclude, JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.Serverless.Duration Total { get; init; } - [JsonInclude, JsonPropertyName("total_time_in_ms")] - public long TotalTimeInMs { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActions.g.cs deleted file mode 100644 index 7b71ef3d484..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherActions.g.cs +++ /dev/null @@ -1,34 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class WatcherActions -{ - [JsonInclude, JsonPropertyName("actions")] - public IReadOnlyDictionary Actions { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatch.g.cs deleted file mode 100644 index 490c7e5eb21..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatch.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class WatcherWatch -{ - [JsonInclude, JsonPropertyName("action")] - public IReadOnlyDictionary? Action { get; init; } - [JsonInclude, JsonPropertyName("condition")] - public IReadOnlyDictionary? Condition { get; init; } - [JsonInclude, JsonPropertyName("input")] - public IReadOnlyDictionary Input { get; init; } - [JsonInclude, JsonPropertyName("trigger")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.WatcherWatchTrigger Trigger { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTrigger.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTrigger.g.cs deleted file mode 100644 index c05af2cc6b1..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTrigger.g.cs +++ /dev/null @@ -1,36 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class WatcherWatchTrigger -{ - [JsonInclude, JsonPropertyName("_all")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Counter All { get; init; } - [JsonInclude, JsonPropertyName("schedule")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.WatcherWatchTriggerSchedule? Schedule { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTriggerSchedule.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTriggerSchedule.g.cs deleted file mode 100644 index 42ce175d791..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/WatcherWatchTriggerSchedule.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class WatcherWatchTriggerSchedule -{ - [JsonInclude, JsonPropertyName("active")] - public long Active { get; init; } - [JsonInclude, JsonPropertyName("_all")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Counter All { get; init; } - [JsonInclude, JsonPropertyName("cron")] - public Elastic.Clients.Elasticsearch.Serverless.Xpack.Counter Cron { get; init; } - [JsonInclude, JsonPropertyName("total")] - public long Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/XpackUsageQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/XpackUsageQuery.g.cs deleted file mode 100644 index 997b65d42db..00000000000 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Xpack/XpackUsageQuery.g.cs +++ /dev/null @@ -1,40 +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. -// -// ------------------------------------------------ - -#nullable restore - -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; - -public sealed partial class XpackUsageQuery -{ - [JsonInclude, JsonPropertyName("count")] - public int? Count { get; init; } - [JsonInclude, JsonPropertyName("failed")] - public int? Failed { get; init; } - [JsonInclude, JsonPropertyName("paging")] - public int? Paging { get; init; } - [JsonInclude, JsonPropertyName("total")] - public int? Total { get; init; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index 782d0808216..d21f64b5921 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -9,9 +9,6 @@ true README.md - - $(DefineConstants);ELASTICSEARCH_STACK - true true diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/GetAsyncSearchRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/GetAsyncSearchRequest.cs index f2f73c8857d..0df7e6e5abe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/GetAsyncSearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/GetAsyncSearchRequest.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; -#else namespace Elastic.Clients.Elasticsearch.AsyncSearch; -#endif public partial class GetAsyncSearchRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/SubmitAsyncSearchRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/SubmitAsyncSearchRequest.cs index a28d9a55e58..a1ced0490e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/SubmitAsyncSearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/AsyncSearch/SubmitAsyncSearchRequest.cs @@ -3,17 +3,9 @@ // See the LICENSE file in the project root for more information. using System; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else using Elastic.Clients.Elasticsearch.QueryDsl; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; -#else namespace Elastic.Clients.Elasticsearch.AsyncSearch; -#endif public partial class SubmitAsyncSearchRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs index 853b13a8be5..f23c1024675 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs @@ -8,27 +8,11 @@ using System.IO; using System.Collections.Generic; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else using Elastic.Clients.Elasticsearch.Core.Bulk; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Requests; -#else using Elastic.Clients.Elasticsearch.Requests; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class BulkRequest : IStreamSerializable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkResponse.cs index d5fd6d808f3..10780cbce97 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkResponse.cs @@ -6,17 +6,9 @@ using System.Text.Json.Serialization; using System.Text; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else using Elastic.Clients.Elasticsearch.Core.Bulk; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class BulkResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/CountRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/CountRequest.cs index 208739a25d6..63dcddab77c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/CountRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/CountRequest.cs @@ -3,17 +3,9 @@ // See the LICENSE file in the project root for more information. using System; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else using Elastic.Clients.Elasticsearch.QueryDsl; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed partial class CountRequest : CountRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/CreateRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/CreateRequest.cs index 0adcab0935c..c5675311479 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/CreateRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/CreateRequest.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed partial class CreateRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/DeleteRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/DeleteRequest.cs index f1b209d2706..c2a6e9ceb67 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/DeleteRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/DeleteRequest.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed partial class DeleteRequest : DeleteRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Esql/EsqlQueryRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Esql/EsqlQueryRequest.cs index 981a599fcc3..0bd7841bfd9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Esql/EsqlQueryRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Esql/EsqlQueryRequest.cs @@ -9,11 +9,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Esql; -#else namespace Elastic.Clients.Elasticsearch.Esql; -#endif internal sealed class EsqlResponseBuilder : TypedResponseBuilder { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsRequest.cs index ff6b53bf5eb..abb03eb618c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsRequest.cs @@ -7,11 +7,7 @@ using System.Linq; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class ExistsRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsResponse.cs index 2f92cd51777..069cdeb14d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsResponse.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed partial class ExistsResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsSourceResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsSourceResponse.cs index 6e537053a64..efc2f4269a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsSourceResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ExistsSourceResponse.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed partial class ExistsSourceResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceRequestDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceRequestDescriptor.cs index d862790031d..9c284eac810 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceRequestDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceRequestDescriptor.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class GetSourceRequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs index 3cc2eb06a73..96cfa23efe7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs @@ -4,17 +4,9 @@ using System.Text.Json; using System.IO; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class GetSourceResponse : ISelfDeserializable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsAliasResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsAliasResponse.cs index c5c1aa04369..221d54ba104 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsAliasResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsAliasResponse.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public sealed partial class ExistsAliasResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs index dc054dcc4c8..86a9d0aae2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsIndexTemplateResponse.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public sealed partial class ExistsIndexTemplateResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsResponse.cs index 26cd81fcce8..93544c6ee00 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsResponse.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public sealed partial class ExistsResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsTemplateResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsTemplateResponse.cs index a3362dc7e18..224c3fd4211 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsTemplateResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/ExistsTemplateResponse.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public sealed partial class ExistsTemplateResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs index 0bbc5b5b3f3..d0a3fdcd288 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public partial class GetAliasResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetIndexResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetIndexResponse.cs index ebb9409beae..9b33d1544fd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetIndexResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetIndexResponse.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public partial class GetIndexResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs index 383346b5da4..bfe6ac31e30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs @@ -4,17 +4,9 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Mapping; -#else using Elastic.Clients.Elasticsearch.Mapping; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; -#else namespace Elastic.Clients.Elasticsearch.IndexManagement; -#endif public partial class GetMappingResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexRequest.cs index 731ae90bfcb..b1f8495634c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexRequest.cs @@ -3,18 +3,10 @@ // See the LICENSE file in the project root for more information. using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Requests; -#else using Elastic.Clients.Elasticsearch.Requests; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class IndexRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Ingest/GetPipelineResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Ingest/GetPipelineResponse.cs index 4f9bf0a7259..22c85ee1f72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Ingest/GetPipelineResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Ingest/GetPipelineResponse.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Ingest; -#else namespace Elastic.Clients.Elasticsearch.Ingest; -#endif public partial class GetPipelineResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/MultiSearchRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/MultiSearchRequest.cs index 067e83ec882..c7fc45a28af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/MultiSearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/MultiSearchRequest.cs @@ -5,11 +5,7 @@ using System.Linq; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class MultiSearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ResponseItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ResponseItem.cs index 893c62831a7..f43dd53ef29 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ResponseItem.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public abstract partial class ResponseItem { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ScrollResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ScrollResponse.cs index 8e9988f7f63..494b3b15084 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/ScrollResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/ScrollResponse.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class ScrollResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchRequest.cs index 844ad157bc2..f22e3e323c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchRequest.cs @@ -4,17 +4,9 @@ using System; using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Requests; -#else using Elastic.Clients.Elasticsearch.Requests; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class SearchRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchResponse.cs index 27b97c50e3b..22d4cd39207 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/SearchResponse.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class SearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/GetAsyncResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/GetAsyncResponse.cs index f6437b688f3..0ef4200ceb6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/GetAsyncResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/GetAsyncResponse.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; -#else namespace Elastic.Clients.Elasticsearch.Sql; -#endif public partial class GetAsyncResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/QueryResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/QueryResponse.cs index e441429bfb9..b8b0f77dbc3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/QueryResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/Sql/QueryResponse.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; -#else namespace Elastic.Clients.Elasticsearch.Sql; -#endif public partial class QueryResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient-Manual.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient-Manual.cs index 2c2a1186461..30b2a62e3f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient-Manual.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient-Manual.cs @@ -6,11 +6,7 @@ using System.Threading.Tasks; using System.Threading; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class ElasticsearchClient { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs index faee0c33fbc..b8af23beebe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs @@ -13,17 +13,9 @@ using Elastic.Transport; using Elastic.Transport.Diagnostics; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Requests; -#else using Elastic.Clients.Elasticsearch.Requests; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// A strongly-typed client for communicating with Elasticsearch server endpoints. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchResponseBaseExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchResponseBaseExtensions.cs index bde69cf5f81..aca4334e42a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchResponseBaseExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchResponseBaseExtensions.cs @@ -4,11 +4,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public static class ElasticsearchResponseExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Client/IndexManyExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/IndexManyExtensions.cs index d1a41d9780e..9002e2f13dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/IndexManyExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/IndexManyExtensions.cs @@ -7,17 +7,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else using Elastic.Clients.Elasticsearch.Core.Bulk; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Provides GetMany extensions that make it easier to get many documents given a list of ids diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs index 08d43d8d6a7..65b32e91a8a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs @@ -5,19 +5,11 @@ using System; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Requests; -#else using Elastic.Clients.Elasticsearch.Requests; -#endif using Elastic.Transport; using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public abstract class NamespacedClientProxy { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ClrTypeDefaults.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ClrTypeDefaults.cs index c5f6b858a00..18759b25600 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ClrTypeDefaults.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ClrTypeDefaults.cs @@ -4,17 +4,9 @@ using System; using System.Linq.Expressions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public class ClrTypeMapping { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs index b8381c7df40..164388c4ad0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs @@ -17,22 +17,14 @@ using Elastic.Clients.Elasticsearch.Fluent; #endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; using Elastic.Transport.Products; using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// public class ElasticsearchClientSettings : ElasticsearchClientSettingsBase diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs index 070b7ebb27a..5f480534fe5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs @@ -5,18 +5,10 @@ using System; using System.Collections.Generic; using System.Reflection; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Provides the connection settings for Elastic.Clients.Elasticsearch's high level diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/MemberInfoResolver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/MemberInfoResolver.cs index 04dcf8806d0..e1401c4f9e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/MemberInfoResolver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/MemberInfoResolver.cs @@ -6,11 +6,7 @@ using System.Linq.Expressions; using System.Reflection; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Resolves member infos in an expression, instance may NOT be shared. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMath.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMath.cs index 05c5217b0ad..b83b689a4f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMath.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMath.cs @@ -10,11 +10,7 @@ using System.Text.Json.Serialization; using System.Text.RegularExpressions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(DateMathConverter))] public abstract class DateMath diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathExpression.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathExpression.cs index 8c62e942c12..bac070f3404 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathExpression.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathExpression.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(DateMathExpressionConverter))] public class DateMathExpression : DateMath diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathOperation.cs index c98daed1077..97b6443ae32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathOperation.cs @@ -6,17 +6,9 @@ using System.Runtime.Serialization; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [StringEnum] [JsonConverter(typeof(DateMathOperationConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTime.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTime.cs index b04d6a4884c..ba472b8fbe3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTime.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTime.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; using System.Text.RegularExpressions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// A time representation for use within expressions. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTimeUnit.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTimeUnit.cs index 8efa78ff0e8..424df43497b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTimeUnit.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/DateMath/DateMathTimeUnit.cs @@ -6,17 +6,9 @@ using System.Runtime.Serialization; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [StringEnum] [JsonConverter(typeof(DateMathTimeUnitConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/Duration.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/Duration.cs index aff9c726056..c419e74112d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/Duration.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/Duration.cs @@ -9,11 +9,7 @@ using System.Text.RegularExpressions; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Represents a duration value. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/TimeUnit.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/TimeUnit.cs index 830a0c2a6a2..bb14adbe488 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/TimeUnit.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/DateTime/TimeUnit.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public static class TimeUnitExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnly.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnly.cs index 0ff1f98b165..4c315cc8ec8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnly.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnly.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class EmptyReadOnly { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnlyExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnlyExtensions.cs index df41d8091f5..516e97be6c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnlyExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/EmptyReadOnlyExtensions.cs @@ -6,11 +6,7 @@ using System.Collections.ObjectModel; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class EmptyReadOnlyExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Exceptions/ThrowHelper.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Exceptions/ThrowHelper.cs index 881592d3e73..0f3376692d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Exceptions/ThrowHelper.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Exceptions/ThrowHelper.cs @@ -7,11 +7,7 @@ using System.Runtime.CompilerServices; using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class ThrowHelper { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExceptionExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExceptionExtensions.cs index 687beed1811..9bea6600ff0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExceptionExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExceptionExtensions.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class ExceptionExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExpressionExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExpressionExtensions.cs index 5e4c2c494e5..c95b207f3c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExpressionExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/ExpressionExtensions.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Linq.Expressions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public static class ExpressionExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/Extensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/Extensions.cs index 81210225106..c990a339bb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/Extensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/Extensions.cs @@ -14,11 +14,7 @@ using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class Extensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/StringExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/StringExtensions.cs index b2493d99503..2e6e9599315 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/StringExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/StringExtensions.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class StringExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/SuffixExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/SuffixExtensions.cs index 7d4e661ce1d..2fe7f90222a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/SuffixExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/SuffixExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public static class SuffixExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TaskExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TaskExtensions.cs index dcff3fbf155..0b740fd82ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TaskExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TaskExtensions.cs @@ -10,11 +10,7 @@ using System.Diagnostics; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class TaskExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TypeExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TypeExtensions.cs index 432cfce1908..331b4ed39c0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TypeExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Extensions/TypeExtensions.cs @@ -10,11 +10,7 @@ using System.Reflection; using System.Text; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class TypeExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValue.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValue.cs index a2b89956e86..9caff82f822 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValue.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValue.cs @@ -11,17 +11,9 @@ using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Represents a value for a field which depends on the field mapping and is only known at runtime, diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValues.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValues.cs index affeca53609..cf2ef28ec16 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValues.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fields/FieldValues.cs @@ -8,17 +8,9 @@ using System.Linq.Expressions; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(FieldValuesConverter))] public sealed class FieldValues : IsADictionary diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Descriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Descriptor.cs index d6fb61d5560..becbd038927 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Descriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Descriptor.cs @@ -8,17 +8,9 @@ using System.Runtime.Serialization; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif public abstract class Descriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Fluent.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Fluent.cs index 4383a8c9704..c3d9572a920 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Fluent.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Fluent.cs @@ -5,11 +5,7 @@ using System; using System.Runtime.CompilerServices; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif internal static class FluentAssign { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/FluentDictionary.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/FluentDictionary.cs index 9ab6b0e2982..ee895d79cb1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/FluentDictionary.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/FluentDictionary.cs @@ -5,11 +5,7 @@ using System; using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif /// /// Used in the "fluent" syntax to support chained configuration of dictionary entries. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/IBuildableDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/IBuildableDescriptor.cs index 6d4c47cc9ed..697f243ae5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/IBuildableDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/IBuildableDescriptor.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif /// /// Used to mark descriptors which can be used to build the object they describe. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IPromise.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IPromise.cs index b4e4438a344..2f467d0347a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IPromise.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IPromise.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif internal interface IPromise where TValue : class { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IsADictionaryDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IsADictionaryDescriptor.cs index 09d8a241725..f6b5ac2b798 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IsADictionaryDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/IsADictionaryDescriptor.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif public abstract class IsADictionaryDescriptor : PromiseDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/PromiseDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/PromiseDescriptor.cs index c2f4ce2fa47..7eefb2578f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/PromiseDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Fluent/Promise/PromiseDescriptor.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else namespace Elastic.Clients.Elasticsearch.Fluent; -#endif public abstract class PromiseDescriptor : Descriptor, IPromise where TDescriptor : PromiseDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IComplexUnion.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IComplexUnion.cs index 678b6ed05d9..5f8e77b8826 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IComplexUnion.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IComplexUnion.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core; -#else namespace Elastic.Clients.Elasticsearch.Core; -#endif internal interface IComplexUnion where TEnum : Enum { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IEnumStruct.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IEnumStruct.cs index 06ec5d57b8a..0fc170344fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IEnumStruct.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IEnumStruct.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core; -#else namespace Elastic.Clients.Elasticsearch.Core; -#endif internal interface IEnumStruct where TSelf : struct, IEnumStruct { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DefaultPropertyMappingProvider.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DefaultPropertyMappingProvider.cs index 48401f5d47f..434f54e30ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DefaultPropertyMappingProvider.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DefaultPropertyMappingProvider.cs @@ -6,11 +6,7 @@ using System.Reflection; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// public class DefaultPropertyMappingProvider : IPropertyMappingProvider diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DocumentPath/DocumentPath.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DocumentPath/DocumentPath.cs index ce4f7b3dd77..30daca886a1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DocumentPath/DocumentPath.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/DocumentPath/DocumentPath.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif // MARKED INTERNAL AS WE MAY NO LONGER USE THIS TYPE // TODO - REVIEW THIS @@ -22,11 +18,7 @@ internal interface IDocumentPath // TODO - REVIEW THIS internal sealed class DocumentPath : IEquatable>, IDocumentPath { -#if ELASTICSEARCH_SERVERLESS - public DocumentPath(T document) : this(Elasticsearch.Serverless.Id.From(document)) => Document = document; -#else public DocumentPath(T document) : this(Elasticsearch.Id.From(document)) => Document = document; -#endif public DocumentPath(Id id) { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldConverter.cs index 3269e0143e3..43cfededc56 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldConverter.cs @@ -5,18 +5,10 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class FieldConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExpressionVisitor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExpressionVisitor.cs index f9b202fe880..237ec3a2a80 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExpressionVisitor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExpressionVisitor.cs @@ -11,11 +11,7 @@ using System.Text; using System.Collections; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal class FieldExpressionVisitor : ExpressionVisitor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExtensions.cs index 68f7b260972..8752441d6ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif //internal static class FieldExtensions //{ // internal static bool IsConditionless(this Field field) => diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldResolver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldResolver.cs index c0dc6f65aa8..82b17ff3f3a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldResolver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/FieldResolver.cs @@ -8,11 +8,7 @@ using System.Globalization; using System.Linq.Expressions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal class FieldResolver { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/ToStringExpressionVisitor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/ToStringExpressionVisitor.cs index cc4f09d81a7..a84cc653f6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/ToStringExpressionVisitor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Field/ToStringExpressionVisitor.cs @@ -11,11 +11,7 @@ using System.Runtime.CompilerServices; using System.Text; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal class ToStringExpressionVisitor : ExpressionVisitor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/Fields.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/Fields.cs index cf610735c72..fc2aabc9eba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/Fields.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/Fields.cs @@ -12,11 +12,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay($"{{{nameof(DebuggerDisplay)},nq}}")] public sealed class Fields : diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsConverter.cs index 2e7c514c3b3..f0a6b611f0f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class FieldsConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsDescriptor.cs index c9c353833d1..a7eb3d5b8ba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Fields/FieldsDescriptor.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif //public class FieldsDescriptor : DescriptorPromiseBase, Fields> // where T : class //{ diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IPropertyMappingProvider.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IPropertyMappingProvider.cs index 2f75e613fcd..27d4b0e6bb1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IPropertyMappingProvider.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IPropertyMappingProvider.cs @@ -4,11 +4,7 @@ using System.Reflection; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Provides mappings for CLR types. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Id.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Id.cs index aabd32c7c23..1adab333a9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Id.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Id.cs @@ -9,11 +9,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] [JsonConverter(typeof(IdConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdConverter.cs index 03294d94ff9..4e4781092d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdConverter.cs @@ -5,18 +5,10 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class IdConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdExtensions.cs index ea4f36499de..b246a83173f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif //internal static class IdExtensions //{ // internal static bool IsConditionless(this Id id) => diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdResolver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdResolver.cs index 70b07561a6f..b7f5bd46b30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdResolver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdResolver.cs @@ -7,11 +7,7 @@ using System.Globalization; using System.Reflection; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public class IdResolver { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Ids.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Ids.cs index 9385d4a80a7..7ca13c2d2b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Ids.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/Ids.cs @@ -9,11 +9,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] [JsonConverter(typeof(IdsConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdsConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdsConverter.cs index 5e9da65b3fc..0fcada2b2fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdsConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdsConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class IdsConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexName.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexName.cs index ddbf28ac5d6..9109432ffa2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexName.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexName.cs @@ -7,11 +7,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Represents the name of an index, which may be inferred from a . diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameConverter.cs index d42f354bc9e..675f04d48a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameConverter.cs @@ -5,18 +5,10 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Converts an to and from its JSON representation. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameExtensions.cs index cfb09b3828d..44075fc9d6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif //public static class IndexNameExtensions //{ // public static string? Resolve(this IndexName? marker, IElasticsearchClientSettings elasticsearchClientSettings) diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameResolver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameResolver.cs index 65aa393a66e..82526235753 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameResolver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/IndexName/IndexNameResolver.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal class IndexNameResolver { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Indices/Indices.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Indices/Indices.cs index 2a23cba5062..60937ddbcf5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Indices/Indices.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Indices/Indices.cs @@ -9,18 +9,10 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] [JsonConverter(typeof(IndicesJsonConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Inferrer.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Inferrer.cs index d98c695df67..4d5c459660f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Inferrer.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Inferrer.cs @@ -5,11 +5,7 @@ using System; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class Inferrer { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinField.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinField.cs index bd18619542b..d3b791c999a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinField.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinField.cs @@ -5,11 +5,7 @@ using System; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(JoinFieldConverter))] public class JoinField diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldConverter.cs index f7ac5d2221c..7aff28193fd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldConverter.cs @@ -6,18 +6,10 @@ using System.Text.Json.Serialization; using System.Text.Json; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using System.Runtime; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class JoinFieldConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/Routing.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/Routing.cs index 518c1420c64..9e5108a7101 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/Routing.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/Routing.cs @@ -10,11 +10,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(RoutingConverter))] [DebuggerDisplay("{" + nameof(DebugDisplay) + ",nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/RoutingConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/RoutingConverter.cs index 7a475f18f23..1691211f273 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/RoutingConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/JoinFieldRouting/RoutingConverter.cs @@ -5,17 +5,9 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class RoutingConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Metric/Metrics.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Metric/Metrics.cs index 279a4221c1d..68cc21015f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Metric/Metrics.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Metric/Metrics.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Represents a collection of unique metric names to be included in URL paths to limit the request. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyMapping.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyMapping.cs index 5e0051b5516..3292fe6cdb6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyMapping.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyMapping.cs @@ -3,17 +3,9 @@ // See the LICENSE file in the project root for more information. using System; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Represents meta data about a property which may be used by inferrence and during serialization. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyName.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyName.cs index cdf3a03d1e7..8da6edd6523 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyName.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyName.cs @@ -7,18 +7,10 @@ using System.Linq.Expressions; using System.Reflection; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{" + nameof(DebugDisplay) + ",nq}")] [JsonConverter(typeof(PropertyNameConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyNameExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyNameExtensions.cs index ba572b2a680..e24e1559818 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyNameExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/PropertyName/PropertyNameExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif //internal static class PropertyNameExtensions //{ // internal static bool IsConditionless(this PropertyName property) => diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationName.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationName.cs index ce4dc4ad35d..7808bed02b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationName.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationName.cs @@ -6,17 +6,9 @@ using Elastic.Transport; using System.Text.Json.Serialization; using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(RelationNameConverter))] public sealed class RelationName : IEquatable, IUrlParameter diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationNameResolver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationNameResolver.cs index 1da804f368f..d14ed4c4344 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationNameResolver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RelationName/RelationNameResolver.cs @@ -5,11 +5,7 @@ using System; using System.Collections.Concurrent; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal sealed class RelationNameResolver { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RoutingResolver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RoutingResolver.cs index 838523def95..dac444251ac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RoutingResolver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/RoutingResolver.cs @@ -7,11 +7,7 @@ using System.Reflection; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public class RoutingResolver { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Timestamp/Timestamp.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Timestamp/Timestamp.cs index 289e223bff6..921f39a66d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Timestamp/Timestamp.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Timestamp/Timestamp.cs @@ -6,11 +6,7 @@ using System.Globalization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class Timestamp : IUrlParameter, IEquatable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsADictionary.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsADictionary.cs index 3347c55f910..3afb7a0a598 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsADictionary.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsADictionary.cs @@ -8,11 +8,7 @@ using System.ComponentModel; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public interface IIsADictionary { } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsAReadOnlyDictionary.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsAReadOnlyDictionary.cs index 8bdc1d9f65b..3921e5ed085 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsAReadOnlyDictionary.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/IsAReadOnlyDictionary.cs @@ -5,11 +5,7 @@ using System.Collections; using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public interface IIsAReadOnlyDictionary { } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/LazyJson.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/LazyJson.cs index 5e57d9ae070..6a231c9a501 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/LazyJson.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/LazyJson.cs @@ -5,17 +5,9 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Lazily deserializable JSON. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/MinimumShouldMatch.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/MinimumShouldMatch.cs index ae1fb1f6ee6..b8a954eff2e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/MinimumShouldMatch.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/MinimumShouldMatch.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class MinimumShouldMatch : Union { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/OpenTelemetry/SemanticConventions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/OpenTelemetry/SemanticConventions.cs index 2f7cce8386c..afc1d7437cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/OpenTelemetry/SemanticConventions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/OpenTelemetry/SemanticConventions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.OpenTelemetry; -#else namespace Elastic.Clients.Elasticsearch.OpenTelemetry; -#endif internal static class SemanticConventions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/RawJsonString.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/RawJsonString.cs index bf910b35e80..981a9642556 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/RawJsonString.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/RawJsonString.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif #if NET6_0_OR_GREATER [JsonConverter(typeof(RawJsonConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyFieldDictionary.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyFieldDictionary.cs index c75f89e23f0..018f0e82c46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyFieldDictionary.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyFieldDictionary.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// A specialised readonly dictionary for data, keyed by . diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyIndexNameDictionary.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyIndexNameDictionary.cs index 74a8155d6ab..e0e254f0906 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyIndexNameDictionary.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/ReadOnlyIndexNameDictionary.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// A specialised readonly dictionary for data, keyed by . diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/ApiUrls.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/ApiUrls.cs index 8fbd5de5eab..de845025315 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/ApiUrls.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/ApiUrls.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; -#else namespace Elastic.Clients.Elasticsearch.Requests; -#endif /// /// Each Request type holds a static instance of this class which creates cached builders for each diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs index 9e36e7f3894..0feaf827f3d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs @@ -6,11 +6,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; -#else namespace Elastic.Clients.Elasticsearch.Requests; -#endif public abstract class PlainRequest : Request where TParameters : RequestParameters, new() diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs index 9d3a2470874..5d33f00b393 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs @@ -7,11 +7,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; -#else namespace Elastic.Clients.Elasticsearch.Requests; -#endif /// /// Base type for requests sent by the client. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RequestDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RequestDescriptor.cs index 157552162a8..87d747be588 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RequestDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RequestDescriptor.cs @@ -6,18 +6,10 @@ using System.ComponentModel; using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; -#else namespace Elastic.Clients.Elasticsearch.Requests; -#endif /// /// Base class for all request descriptor types. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RouteValues.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RouteValues.cs index c2b520c8d28..5265cb15d1c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RouteValues.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RouteValues.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; -#else namespace Elastic.Clients.Elasticsearch.Requests; -#endif internal sealed class ResolvedRouteValues : Dictionary { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/UrlLookup.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/UrlLookup.cs index a250290d1e8..55e2f8f4624 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/UrlLookup.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/UrlLookup.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Text; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Requests; -#else namespace Elastic.Clients.Elasticsearch.Requests; -#endif internal class UrlLookup { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/DictionaryResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/DictionaryResponse.cs index 63e3e4630db..e9a8537cfb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/DictionaryResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/DictionaryResponse.cs @@ -7,11 +7,7 @@ using Elastic.Transport.Products.Elasticsearch; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public abstract class DictionaryResponse : ElasticsearchResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/ResolvableDictionaryProxy.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/ResolvableDictionaryProxy.cs index 0a90cbba2ed..1edc6924b3f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/ResolvableDictionaryProxy.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Response/ResolvableDictionaryProxy.cs @@ -6,11 +6,7 @@ using System.Collections; using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// A proxy dictionary that is settings-aware to correctly handle IUrlParameter-based keys such as IndexName. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Static/Infer.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Static/Infer.cs index 400b7238b02..15b320e96e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Static/Infer.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Static/Infer.cs @@ -8,11 +8,7 @@ using System.Linq.Expressions; using System.Reflection; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public static class Infer { @@ -44,11 +40,7 @@ public static class Infer public static Names Names(IEnumerable names) => string.Join(",", names); -#if ELASTICSEARCH_SERVERLESS - public static Id Id(T document) where T : class => Elasticsearch.Serverless.Id.From(document); -#else public static Id Id(T document) where T : class => Elasticsearch.Id.From(document); -#endif public static Fields Fields(params Expression>[] fields) where T : class => new(fields.Select(f => new Field(f))); diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Union/Union.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Union/Union.cs index 7245632274b..95fcf32d3a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Union/Union.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Union/Union.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Represents the union of two types, and . Used diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamName.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamName.cs index 217d2b8bb50..45de4980f85 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamName.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamName.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(DataStreamNameConverter))] [DebuggerDisplay("{DebugDisplay,nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamNames.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamNames.cs index 5c0bbfaf5b6..3cf8c5e97d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamNames.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/DataStreamNames/DataStreamNames.cs @@ -11,11 +11,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(DataStreamNamesConverter))] [DebuggerDisplay("{DebugDisplay,nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexAlias/IndexAlias.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexAlias/IndexAlias.cs index 565bc674ddb..cf11c50cb3b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexAlias/IndexAlias.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexAlias/IndexAlias.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(IndexAliasConverter))] [DebuggerDisplay("{DebugDisplay,nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexUuid/IndexUuid.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexUuid/IndexUuid.cs index a7341ae6e3f..5a29dbec53c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexUuid/IndexUuid.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/IndexUuid/IndexUuid.cs @@ -5,11 +5,7 @@ using System; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class IndexUuid : IUrlParameter, IEquatable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Name.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Name.cs index cd2b68acb0a..906d3e34c38 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Name.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Name.cs @@ -5,18 +5,10 @@ using System; using System.Diagnostics; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] [JsonConverter(typeof(StringAliasConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Names.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Names.cs index 19f7e64c788..0cd673b3a4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Names.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Name/Names.cs @@ -8,11 +8,7 @@ using System.Linq; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] public sealed class Names : IEquatable, IUrlParameter diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/NodeIds/NodeIds.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/NodeIds/NodeIds.cs index 38f045d330e..5537e7ff7a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/NodeIds/NodeIds.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/NodeIds/NodeIds.cs @@ -8,11 +8,7 @@ using System.Linq; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] public sealed class NodeIds : IEquatable, IUrlParameter diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollId.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollId.cs index f8eee29cc64..a7f26e6469e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollId.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollId.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(ScrollIdConverter))] [DebuggerDisplay("{DebugDisplay,nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollIds.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollIds.cs index d261b36c264..2a9028fce7a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollIds.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/ScrollIds/ScrollIds.cs @@ -11,11 +11,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(ScrollIdsConverter))] [DebuggerDisplay("{DebugDisplay,nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/TaskId/TaskId.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/TaskId/TaskId.cs index e5a3eaad137..107e8da4cdb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/TaskId/TaskId.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/TaskId/TaskId.cs @@ -7,18 +7,10 @@ using System.Globalization; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(TaskIdConverter))] [DebuggerDisplay("{DebugDisplay,nq}")] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs index 93d41f39dd3..65f8b734471 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs @@ -5,18 +5,10 @@ using System; using System.Diagnostics; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [DebuggerDisplay("{DebugDisplay,nq}")] [JsonConverter(typeof(StringAliasConverter))] diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/NativeMethods.cs b/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/NativeMethods.cs index 3c9def509f3..665237fc284 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/NativeMethods.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/NativeMethods.cs @@ -9,11 +9,7 @@ using System.Runtime.InteropServices; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class NativeMethods { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/RuntimeInformation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/RuntimeInformation.cs index e7893241f88..488262a3f45 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/RuntimeInformation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/RuntimeInformation.cs @@ -7,11 +7,7 @@ using System.Linq; using System.Reflection; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless -#else namespace Elastic.Clients.Elasticsearch -#endif { internal static class RuntimeInformation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/TypeExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/TypeExtensions.cs index eeba6465023..61cdbf2d2bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/TypeExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/CrossPlatform/TypeExtensions.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class DotNetCoreTypeExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Exceptions/UnsupportedProductException.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Exceptions/UnsupportedProductException.cs index df4fd46e68e..720106de74b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Exceptions/UnsupportedProductException.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Exceptions/UnsupportedProductException.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// Thrown when the client pre-flight check determines that the server is not a supported Elasticsearch product. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllObserver.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllObserver.cs index a5d810090a4..d0e0b327264 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllObserver.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllObserver.cs @@ -5,11 +5,7 @@ using System; using System.Threading; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class BulkAllObserver : CoordinatedRequestObserverBase { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllRequest.cs index 391b40c1955..131b127a268 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllRequest.cs @@ -6,22 +6,10 @@ using System.Collections.Generic; using System.Text.Json; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else using Elastic.Clients.Elasticsearch.Core.Bulk; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class BulkAllRequest : IBulkAllRequest, IHelperCallable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllResponse.cs index 567a0d6baba..396c4e8bfc3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/BulkAllResponse.cs @@ -3,17 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else using Elastic.Clients.Elasticsearch.Core.Bulk; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class BulkAllResponse { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestDefaults.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestDefaults.cs index c6ad0dec3e1..930ffdddf13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestDefaults.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestDefaults.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class CoordinatedRequestDefaults { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestObserverBase.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestObserverBase.cs index bf0b4bb9980..5f66f7f0367 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestObserverBase.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/CoordinatedRequestObserverBase.cs @@ -5,11 +5,7 @@ using System; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public abstract class CoordinatedRequestObserverBase : IObserver { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/HelperIdentifiers.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/HelperIdentifiers.cs index e44d73ba972..156bcd50c9f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/HelperIdentifiers.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/HelperIdentifiers.cs @@ -3,11 +3,7 @@ // See the LICENSE file in the project root for more information. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class HelperIdentifiers { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IBulkAllRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IBulkAllRequest.cs index 8b0c5133dc1..ee368951c8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IBulkAllRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IBulkAllRequest.cs @@ -4,17 +4,9 @@ using System; using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else using Elastic.Clients.Elasticsearch.Core.Bulk; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public interface IBulkAllRequest { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IHelperCallable.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IHelperCallable.cs index 8ca3e936d73..18f320b85c0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IHelperCallable.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/IHelperCallable.cs @@ -4,11 +4,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif /// /// May be applied to helper requests where they may be called by an upstream helper. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/PartitionHelper.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/PartitionHelper.cs index dc28a29f92a..ea89d130820 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/PartitionHelper.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/PartitionHelper.cs @@ -6,11 +6,7 @@ using System.Collections.Generic; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal class PartitionHelper : IEnumerable> { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/ProducerConsumerBackPressure.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/ProducerConsumerBackPressure.cs index 3ace1481f88..d7e8db23c82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/ProducerConsumerBackPressure.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/ProducerConsumerBackPressure.cs @@ -6,11 +6,7 @@ using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public sealed class ProducerConsumerBackPressure { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataExtensions.cs index 88f4c3d1c57..591981f17a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataExtensions.cs @@ -5,11 +5,7 @@ using System; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class RequestMetaDataExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataFactory.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataFactory.cs index 7208249e327..87a76eb77f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Helpers/RequestMetaDataFactory.cs @@ -4,11 +4,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif internal static class RequestMetaDataFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/CustomizedNamingPolicy.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/CustomizedNamingPolicy.cs index 2a756018f4f..ae9ff4b20e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/CustomizedNamingPolicy.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/CustomizedNamingPolicy.cs @@ -5,11 +5,7 @@ using System; using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal class CustomizedNamingPolicy : JsonNamingPolicy { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs index 915c0552dcd..c0e8bfef918 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs @@ -11,11 +11,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// The built-in internal serializer that the uses to serialize built in types. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultSourceSerializer.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultSourceSerializer.cs index 2b986d4fa07..4402fd7b23a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultSourceSerializer.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultSourceSerializer.cs @@ -8,11 +8,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// The built-in internal serializer that the uses to serialize diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DictionaryResponseConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DictionaryResponseConverter.cs index 909b0292068..374b0667765 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DictionaryResponseConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DictionaryResponseConverter.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class DictionaryResponseConverterFactory : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DoubleWithFractionalPortionConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DoubleWithFractionalPortionConverter.cs index 6ccba78f21d..911f69f399e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DoubleWithFractionalPortionConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DoubleWithFractionalPortionConverter.cs @@ -21,11 +21,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class DoubleWithFractionalPortionConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/EnumStructConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/EnumStructConverter.cs index 80de1fa303d..7bfb00d91dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/EnumStructConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/EnumStructConverter.cs @@ -5,17 +5,9 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core; -#else using Elastic.Clients.Elasticsearch.Core; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class EnumStructConverter : JsonConverter where T : struct, IEnumStruct { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/GenericConverterAttribute.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/GenericConverterAttribute.cs index 6812414709b..efe2547dd06 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/GenericConverterAttribute.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/GenericConverterAttribute.cs @@ -6,11 +6,7 @@ using System.Reflection; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// A custom used to dynamically create diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ISourceMarker.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ISourceMarker.cs index a8cf2520d1f..70308dd7f03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ISourceMarker.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ISourceMarker.cs @@ -2,10 +2,6 @@ // 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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal interface ISourceMarker { } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IStreamSerializable.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IStreamSerializable.cs index 63549e092cd..8bd24041108 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IStreamSerializable.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IStreamSerializable.cs @@ -6,11 +6,7 @@ using Elastic.Transport; using System.IO; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// Used to mark types which expect to directly serialize into a stream. This supports non-json compliant output such as NDJSON. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IUnionVerifiable.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IUnionVerifiable.cs index 61770f76849..51fac87e1c9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IUnionVerifiable.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IUnionVerifiable.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal interface IUnionVerifiable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverter.cs index 280ac0552c8..dd48123d8f9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverter.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class InterfaceConverter : JsonConverter where TConcrete : class, TInterface diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverterAttribute.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverterAttribute.cs index 8a0ae48f724..b53215f504a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverterAttribute.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/InterfaceConverterAttribute.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif [AttributeUsage(AttributeTargets.Interface)] internal class InterfaceConverterAttribute : Attribute diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IntermediateSourceConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IntermediateSourceConverter.cs index 691d1091337..abc4703b5f8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IntermediateSourceConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IntermediateSourceConverter.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class IntermediateSourceConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IsADictionaryConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IsADictionaryConverterFactory.cs index 4d0261ac4fa..3d36da2a1ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IsADictionaryConverterFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/IsADictionaryConverterFactory.cs @@ -6,17 +6,9 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Mapping; -#else using Elastic.Clients.Elasticsearch.Mapping; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class IsADictionaryConverterFactory : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonConstants.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonConstants.cs index 3b1b4376108..3c28f552a46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonConstants.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonConstants.cs @@ -11,11 +11,7 @@ #endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal static class JsonConstants { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonHelper.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonHelper.cs index 19d4e1252a8..1e02bd31afc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonHelper.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonHelper.cs @@ -4,11 +4,7 @@ using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal static class JsonHelper { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonSerializerOptionsExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonSerializerOptionsExtensions.cs index 8f4ab29ee2f..3a8742c1962 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonSerializerOptionsExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/JsonSerializerOptionsExtensions.cs @@ -4,11 +4,7 @@ using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal static class JsonSerializerOptionsExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/KeyValuePairConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/KeyValuePairConverter.cs index 3e39dfa4369..7a9d39935fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/KeyValuePairConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/KeyValuePairConverter.cs @@ -9,11 +9,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class KeyValuePairConverterFactory : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/MultiItemUnionConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/MultiItemUnionConverter.cs index 3a8354ad3ee..0aece1e358a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/MultiItemUnionConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/MultiItemUnionConverter.cs @@ -6,17 +6,9 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core; -#else using Elastic.Clients.Elasticsearch.Core; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// A base converter for any multi-item (>2 items) unions. The code-generator creates a diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/NumericAliasConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/NumericAliasConverter.cs index ed5c204ba62..99d59a64379 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/NumericAliasConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/NumericAliasConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class NumericAliasConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ObjectToInferredTypesConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ObjectToInferredTypesConverter.cs index b9711de6e94..632b79272cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ObjectToInferredTypesConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ObjectToInferredTypesConverter.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class ObjectToInferredTypesConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/PropertyNameConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/PropertyNameConverter.cs index 40bdd478c9c..8ed87f2be87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/PropertyNameConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/PropertyNameConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class PropertyNameConverter : SettingsJsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/QueryConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/QueryConverter.cs index a408fb7a30e..2210f6ad23d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/QueryConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/QueryConverter.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif // This converter is generated for the Query container type. We add the CanConvert override here (for now) // as the Query type may be used in source POCOs. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyFieldDictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyFieldDictionaryConverter.cs index 853f538fe62..231a7b85c4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyFieldDictionaryConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyFieldDictionaryConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class ReadOnlyFieldDictionaryConverterAttribute : JsonConverterAttribute { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyIndexNameDictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyIndexNameDictionaryConverter.cs index c1d29d6fe35..4d585c65680 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyIndexNameDictionaryConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ReadOnlyIndexNameDictionaryConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class ReadOnlyIndexNameDictionaryConverter : JsonConverterAttribute { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs index bc58d7dada9..16f0e433e36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResolvableReadonlyDictionaryConverterFactory.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class ResolvableReadonlyDictionaryConverterFactory : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResponseItemConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResponseItemConverterFactory.cs index da50972972b..06f503d1e55 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResponseItemConverterFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/ResponseItemConverterFactory.cs @@ -5,22 +5,10 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Get; -#else using Elastic.Clients.Elasticsearch.Core.Get; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.MGet; -#else using Elastic.Clients.Elasticsearch.Core.MGet; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// A converter factory able to provide a converter to handle (de)serializing . diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializable.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializable.cs index 1a4fd1cf9ad..1f40c872ca9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializable.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializable.cs @@ -4,11 +4,7 @@ using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// Marks a type to provide it's own serialization code. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializableConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializableConverterFactory.cs index 8fb0b39a204..b1095fdc9d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializableConverterFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SelfSerializableConverterFactory.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class SelfSerializableConverterFactory : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SerializationConstants.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SerializationConstants.cs index 74d868fada4..006daf3a91c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SerializationConstants.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SerializationConstants.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal static class SerializationConstants { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SettingsJsonConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SettingsJsonConverter.cs index 21190673061..486bac3ae13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SettingsJsonConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SettingsJsonConverter.cs @@ -5,11 +5,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif /// /// Used for derived converters which need access to in order to serialize. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SimpleInterfaceConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SimpleInterfaceConverter.cs index 4a4315f08db..65a1a75c86a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SimpleInterfaceConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SimpleInterfaceConverter.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class SimpleInterfaceConverter : JsonConverter where TConcrete : class, TInterface { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionAttribute.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionAttribute.cs index 22581f4fc9e..1761ab6db7b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionAttribute.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionAttribute.cs @@ -5,11 +5,7 @@ using System; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif [AttributeUsage(AttributeTargets.Property)] internal class SingleOrManyCollectionConverterAttribute : JsonConverterAttribute diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionConverter.cs index bb734416a2c..0e76814ad14 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManyCollectionConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal class SingleOrManyCollectionConverter : JsonConverter> { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManySerializationHelper.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManySerializationHelper.cs index c7b6e6f25b1..da2689fa490 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManySerializationHelper.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleOrManySerializationHelper.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Text.Json; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal static class SingleOrManySerializationHelper { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleWithFractionalPortionConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleWithFractionalPortionConverter.cs index 731b07d58a0..279516fcfbf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleWithFractionalPortionConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SingleWithFractionalPortionConverter.cs @@ -21,11 +21,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class SingleWithFractionalPortionConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverter.cs index 6c1e0295cd5..82292ea1155 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverter.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport.Extensions; diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterAttribute.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterAttribute.cs index 2b166d3c612..d7d3e06fb02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterAttribute.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterAttribute.cs @@ -5,11 +5,7 @@ using System; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class SourceConverterAttribute : JsonConverterAttribute { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterFactory.cs index c0e5adc9ffd..d576c964a4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceConverterFactory.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class SourceConverterFactory : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceMarker.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceMarker.cs index 70ed8c5335f..7cb89ef1d84 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceMarker.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/SourceMarker.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class SourceMarker { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringAliasConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringAliasConverter.cs index 4271f61dcf2..a1107687c1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringAliasConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringAliasConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif // TODO - In .NET 7 we could review supporting IParsable as a type constraint? internal sealed class StringAliasConverter : JsonConverter diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringEnumAttribute.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringEnumAttribute.cs index 1edcc2a1cc8..2bdf4c83d18 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringEnumAttribute.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/StringEnumAttribute.cs @@ -4,11 +4,7 @@ using System; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif [AttributeUsage(AttributeTargets.Property | AttributeTargets.Enum)] public class StringEnumAttribute : Attribute { } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/Stringified.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/Stringified.cs index 0d178e886f8..36a51971fe9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/Stringified.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/Stringified.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class StringifiedLongConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/TermsAggregateSerializationHelper.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/TermsAggregateSerializationHelper.cs index d3e0e72294f..87d1e8e6882 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/TermsAggregateSerializationHelper.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/TermsAggregateSerializationHelper.cs @@ -5,17 +5,9 @@ using System; using System.Text.Json; using System.Text; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Aggregations; -#else using Elastic.Clients.Elasticsearch.Aggregations; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal static class TermsAggregateSerializationHelper { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/UnionConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/UnionConverter.cs index 779d37be2c9..25f61bf8fa9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/UnionConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/UnionConverter.cs @@ -6,17 +6,9 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Aggregations; -#else using Elastic.Clients.Elasticsearch.Aggregations; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else namespace Elastic.Clients.Elasticsearch.Serialization; -#endif internal sealed class UnionConverter : JsonConverterFactory { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/AggregateOrder.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/AggregateOrder.cs index 6ce16971c97..1a8aba299ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/AggregateOrder.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/AggregateOrder.cs @@ -4,11 +4,7 @@ using System.Collections.Generic; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; -#else namespace Elastic.Clients.Elasticsearch.Aggregations; -#endif public static class AggregateOrder { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs index d01f5260ce8..21c585824f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs @@ -4,11 +4,7 @@ #nullable enable -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core; -#else using Elastic.Clients.Elasticsearch.Core; -#endif using System; using System.Collections.Generic; @@ -16,11 +12,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; -#else namespace Elastic.Clients.Elasticsearch.Aggregations; -#endif /// /// Buckets path can be expressed in different ways, and an aggregation may accept some or all of these
forms depending on its type. Please refer to each aggregation's documentation to know what buckets
path forms they accept.
diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsExclude.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsExclude.cs index 0f4c415a100..67d4491be29 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsExclude.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsExclude.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; #nullable enable -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; -#else namespace Elastic.Clients.Elasticsearch.Aggregations; -#endif /// /// Filters which terms to exclude from the response. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsInclude.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsInclude.cs index 00b6cf85974..2861d59703c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsInclude.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/TermsInclude.cs @@ -8,11 +8,7 @@ using System.Text.Json.Serialization; #nullable enable -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; -#else namespace Elastic.Clients.Elasticsearch.Aggregations; -#endif /// /// Filters which terms to include in the response. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/AsyncSearch/AsyncSearch.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/AsyncSearch/AsyncSearch.cs index e3536ef6f54..289ef7cf6be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/AsyncSearch/AsyncSearch.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/AsyncSearch/AsyncSearch.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch; -#else namespace Elastic.Clients.Elasticsearch.AsyncSearch; -#endif public partial class AsyncSearch { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperation.cs index f9674169a14..34dc3cb2fb0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperation.cs @@ -9,17 +9,9 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif /// /// Represents a bulk operation to create a document. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperationDescriptor.cs index e5de624043c..9b52cefff6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperationDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkCreateOperationDescriptor.cs @@ -8,24 +8,12 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkCreateOperationDescriptor : BulkOperationDescriptor> { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperation.cs index 92b16d6099d..93db7a670f9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperation.cs @@ -8,17 +8,9 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public class BulkDeleteOperation : BulkOperation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs index 63ce144185d..64ccdf0566e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs @@ -7,19 +7,11 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public class BulkDeleteOperationDescriptor : BulkOperationDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperation.cs index c71cf41949a..dcd9179a838 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperation.cs @@ -9,17 +9,9 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkIndexOperation : BulkOperation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperationDescriptor.cs index a59188d75c0..ed64fce6c4a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperationDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkIndexOperationDescriptor.cs @@ -8,24 +8,12 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkIndexOperationDescriptor : BulkOperationDescriptor> { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperation.cs index 861543eecd2..562d60a61b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperation.cs @@ -6,18 +6,10 @@ using System.IO; using System.Text.Json.Serialization; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif /// /// Provides the base class from which the classes that represent bulk operations are derived. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationDescriptor.cs index c8103d07e5b..0451a0ba7c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationDescriptor.cs @@ -7,23 +7,11 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public abstract class BulkOperationDescriptor : SerializableDescriptor, IBulkOperation, IStreamSerializable where TDescriptor : BulkOperationDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationsCollection.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationsCollection.cs index 85b12f55a8a..80cc7e01cdb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationsCollection.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkOperationsCollection.cs @@ -7,18 +7,10 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif ///// ///// This class is used by which needs thread-safe adding , as well as expose diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkResponseItemConverter.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkResponseItemConverter.cs index 4881e942d03..992bcd61e8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkResponseItemConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkResponseItemConverter.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif internal sealed class BulkResponseItemConverter : JsonConverter> { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateBody.cs index a4804b1b425..1451045cb03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateBody.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateBody.cs @@ -4,22 +4,10 @@ using System.Text.Json; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Search; -#else using Elastic.Clients.Elasticsearch.Core.Search; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif internal abstract class BulkUpdateBody : ISelfSerializable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperation.cs index 1ddc44f3c4e..d3ea1a0a78d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperation.cs @@ -7,19 +7,11 @@ using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public abstract class BulkUpdateOperation : BulkOperation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs index 9b18c46939f..45b3802a956 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs @@ -10,22 +10,10 @@ using System.Threading.Tasks; using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Search; -#else using Elastic.Clients.Elasticsearch.Core.Search; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkUpdateOperationDescriptor : BulkOperationDescriptor> { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationT.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationT.cs index 07eab380c94..0272e5f9ae0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationT.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationT.cs @@ -7,17 +7,9 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.Search; -#else using Elastic.Clients.Elasticsearch.Core.Search; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkUpdateOperation : BulkUpdateOperation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs index 26c09249de3..8ad17bb279a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkUpdateOperationWithPartial : BulkUpdateOperation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithScript.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithScript.cs index 92663e6851a..d3feccab61d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithScript.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/BulkUpdateOperationWithScript.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public class BulkUpdateOperationWithScript : BulkUpdateOperation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/IBulkOperation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/IBulkOperation.cs index 70edfd8397f..ed6e49ba40c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/IBulkOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/IBulkOperation.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif /// /// Marker interface for types that can be serialised as an operation of a bulk API request. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/PartialBulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/PartialBulkUpdateBody.cs index 62d1f378193..256239bfe4f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/PartialBulkUpdateBody.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/PartialBulkUpdateBody.cs @@ -4,17 +4,9 @@ using System.Text.Json; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif internal class PartialBulkUpdateBody : BulkUpdateBody { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkCreateResponseItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkCreateResponseItem.cs index 0e59d96e7ed..6e183cbb35c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkCreateResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkCreateResponseItem.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class CreateResponseItem : ResponseItem { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs index f7d3bf5698a..d7462faf2d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkDeleteResponseItem : ResponseItem { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkIndexResponseItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkIndexResponseItem.cs index c1e5dac1bf1..4b6c0219107 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkIndexResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkIndexResponseItem.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkIndexResponseItem : ResponseItem { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs index 636d8992580..ac2530b6e5d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif public sealed class BulkUpdateResponseItem : ResponseItem { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/ScriptedBulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/ScriptedBulkUpdateBody.cs index 08200fe989b..531f5c09240 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/ScriptedBulkUpdateBody.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Bulk/ScriptedBulkUpdateBody.cs @@ -4,17 +4,9 @@ using System.Text.Json; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Bulk; -#else namespace Elastic.Clients.Elasticsearch.Core.Bulk; -#endif internal class ScriptedBulkUpdateBody : BulkUpdateBody { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs index f3e0d25d78d..cdf12c100a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs @@ -5,19 +5,11 @@ using System.IO; using System.Text.Json; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; -#else namespace Elastic.Clients.Elasticsearch.Core.MSearch; -#endif // POC - If we have more than one union doing this, can we autogenerate with correct ctors etc. public sealed class SearchRequestItem : IStreamSerializable diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearchTemplate/SearchTemplateRequestItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearchTemplate/SearchTemplateRequestItem.cs index c6790c7abb3..10a089a4262 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearchTemplate/SearchTemplateRequestItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearchTemplate/SearchTemplateRequestItem.cs @@ -5,24 +5,12 @@ using System.IO; using System.Text.Json; using System.Threading.Tasks; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; -#else using Elastic.Clients.Elasticsearch.Core.MSearch; -#endif -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; using Elastic.Transport.Extensions; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearchTemplate; -#else namespace Elastic.Clients.Elasticsearch.Core.MSearchTemplate; -#endif public sealed class SearchTemplateRequestItem : IStreamSerializable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Search/SourceConfigParam.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Search/SourceConfigParam.cs index 9a1fb940454..2a1a1c6d706 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Search/SourceConfigParam.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/Search/SourceConfigParam.cs @@ -6,11 +6,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; -#else namespace Elastic.Clients.Elasticsearch.Core.Search; -#endif public partial class SourceConfigParam : IUrlParameter diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/FieldSort.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/FieldSort.cs index facf19d1b8b..ea4cd931ea7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/FieldSort.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/FieldSort.cs @@ -5,17 +5,9 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Mapping; -#else using Elastic.Clients.Elasticsearch.Mapping; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(FieldSortConverter))] public partial class FieldSort diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs index aa823d9402b..e3a6e3b4d10 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class GeoLocation { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/Properties.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/Properties.cs index 70852e0b977..6b0ebb9d460 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/Properties.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/Properties.cs @@ -6,17 +6,9 @@ using System.Linq.Expressions; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; -#else namespace Elastic.Clients.Elasticsearch.Mapping; -#endif [JsonConverter(typeof(PropertiesConverter))] public partial class Properties diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertiesDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertiesDescriptor.cs index 6e3a3ee74da..9bfb6107178 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertiesDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertiesDescriptor.cs @@ -5,17 +5,9 @@ using System; using System.Collections.Generic; using System.Linq.Expressions; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; -#else namespace Elastic.Clients.Elasticsearch.Mapping; -#endif public sealed partial class PropertiesDescriptor : IsADictionaryDescriptor, Properties, PropertyName, IProperty> diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertyNameExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertyNameExtensions.cs index 15349dd35f2..df487687f72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertyNameExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Mapping/PropertyNameExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Mapping; -#else namespace Elastic.Clients.Elasticsearch.Mapping; -#endif internal static class PropertyNameExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/MultiSearchItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/MultiSearchItem.cs index 9fec9a274bf..59a2008478d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/MultiSearchItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/MultiSearchItem.cs @@ -6,11 +6,7 @@ using System.Linq; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.MSearch; -#else namespace Elastic.Clients.Elasticsearch.Core.MSearch; -#endif public partial class MultiSearchItem { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/OpType.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/OpType.cs index 08e1887ae8f..ee10bfebc03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/OpType.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/OpType.cs @@ -8,11 +8,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif [JsonConverter(typeof(OpTypeConverter))] public partial struct OpType : IStringable diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/PointInTimeReferenceDescriptor.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/PointInTimeReferenceDescriptor.cs index 1adf99f8921..0370f78f5b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/PointInTimeReferenceDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/PointInTimeReferenceDescriptor.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; -#else namespace Elastic.Clients.Elasticsearch.Core.Search; -#endif public sealed partial class PointInTimeReferenceDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQuery.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQuery.cs index 184947b5bf2..2efca3b70a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQuery.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQuery.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif public partial class BoolQuery { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryAndExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryAndExtensions.cs index 70ff5bfb147..493c1dcdccc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryAndExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryAndExtensions.cs @@ -6,11 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif internal static class BoolQueryAndExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryExtensions.cs index 1cc438d1897..38af2755d39 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryExtensions.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif internal static class BoolQueryExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryOrExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryOrExtensions.cs index 22f2baf139d..4ed4fca190d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryOrExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/BoolQueryOrExtensions.cs @@ -5,11 +5,7 @@ using System.Collections.Generic; using System.Linq; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif internal static class BoolQueryOrExtensions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/FunctionScore.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/FunctionScore.cs index ca170eba4bf..21248c619a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/FunctionScore.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/FunctionScore.cs @@ -2,11 +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. -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif // A quirk of the function score type which is valid without a variant. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/Query.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/Query.cs index 3da5f73d917..772fd283d5d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/Query.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/Query.cs @@ -5,11 +5,7 @@ using System; using System.Diagnostics.CodeAnalysis; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif public partial class Query { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RangeQuery.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RangeQuery.cs index 220dde1f328..c4b7a918a9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RangeQuery.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RangeQuery.cs @@ -4,17 +4,9 @@ using System; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Fluent; -#else using Elastic.Clients.Elasticsearch.Fluent; -#endif -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif // TODO: This should be removed after implementing descriptor generation for union types diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RawJsonQuery.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RawJsonQuery.cs index 99057baca2d..4c1c879639e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RawJsonQuery.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/RawJsonQuery.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.QueryDsl; -#else namespace Elastic.Clients.Elasticsearch.QueryDsl; -#endif /// /// Allows a query represented as a string of JSON to be defined. This can be useful when support for a built-in query is not yet available. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Ranges.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Ranges.cs index 43013c58311..e6478ebe9db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Ranges.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Ranges.cs @@ -5,11 +5,7 @@ using System; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public class DateRange { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Refresh.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Refresh.cs index 9a2e7b99acb..c4f41a86102 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Refresh.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Refresh.cs @@ -4,11 +4,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial struct Refresh : IStringable { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Slices.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Slices.cs index 42fcbaa2879..baf72922b75 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Slices.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Slices.cs @@ -7,11 +7,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class Slices : IUrlParameter diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/SortOptions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/SortOptions.cs index cbbe2c06568..713272d31ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/SortOptions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/SortOptions.cs @@ -5,18 +5,10 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -using Elastic.Clients.Elasticsearch.Serverless.Serialization; -#else using Elastic.Clients.Elasticsearch.Serialization; -#endif using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial class SortOptions { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/SourceConfig.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/SourceConfig.cs index ca1aa59f17b..d9fdff1fba9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/SourceConfig.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/SourceConfig.cs @@ -7,11 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; -#else namespace Elastic.Clients.Elasticsearch.Core.Search; -#endif [JsonConverter(typeof(SourceConfigConverter))] public partial class SourceConfig diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlRow.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlRow.cs index 69376a1b646..d002fd031d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlRow.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlRow.cs @@ -8,11 +8,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; -#else namespace Elastic.Clients.Elasticsearch.Sql; -#endif [JsonConverter(typeof(SqlRowConverter))] public sealed class SqlRow : ReadOnlyCollection diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlValue.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlValue.cs index 28792699134..edd5d94d6c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlValue.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Sql/SqlValue.cs @@ -6,11 +6,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless.Sql; -#else namespace Elastic.Clients.Elasticsearch.Sql; -#endif [JsonConverter(typeof(SqlValueConverter))] public readonly struct SqlValue diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/WaitForActiveShards.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/WaitForActiveShards.cs index f512efe80ee..e033e7af327 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/WaitForActiveShards.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/WaitForActiveShards.cs @@ -4,11 +4,7 @@ using Elastic.Transport; -#if ELASTICSEARCH_SERVERLESS -namespace Elastic.Clients.Elasticsearch.Serverless; -#else namespace Elastic.Clients.Elasticsearch; -#endif public partial struct WaitForActiveShards : IStringable { diff --git a/src/Playground/Playground.csproj b/src/Playground/Playground.csproj index 004205ffb13..863f7d2015e 100644 --- a/src/Playground/Playground.csproj +++ b/src/Playground/Playground.csproj @@ -15,7 +15,6 @@ -